From 43168b0db9d5bdaec2c1279f9e3686130a933a30 Mon Sep 17 00:00:00 2001 From: Jared He <66887902+jaredjhe@users.noreply.github.com> Date: Thu, 3 Jun 2021 07:35:58 -0500 Subject: [PATCH 01/41] Add initial parsing --- scripts/mdx-scripts/afterhours.event.mdx | 21 ++++++++++++++ scripts/mdx-scripts/event-test.xml | 36 ++++++++++++++++++++++++ scripts/mdx-scripts/news-conversion.js | 27 ++++++++++++++++++ scripts/mdx-scripts/test.html | 14 +++++++++ 4 files changed, 98 insertions(+) create mode 100644 scripts/mdx-scripts/afterhours.event.mdx create mode 100644 scripts/mdx-scripts/event-test.xml create mode 100644 scripts/mdx-scripts/news-conversion.js create mode 100644 scripts/mdx-scripts/test.html diff --git a/scripts/mdx-scripts/afterhours.event.mdx b/scripts/mdx-scripts/afterhours.event.mdx new file mode 100644 index 0000000..7d227d6 --- /dev/null +++ b/scripts/mdx-scripts/afterhours.event.mdx @@ -0,0 +1,21 @@ +export const metadata = { + name: "Afterhours: Personal Relationships", + short: "Learn how React works and make your own version!", + date: new Date("2021-03-02 2:00 PM"), + online: false, + location: "MC", + registerLink: "http://csclub.uwaterloo.ca/", +}; + +The past year has been tough for all of us, having to deal with the pandemic +while studying or working remotely. If you've felt that meeting new people and +sustaining relationships with others has never been more challenging, we feel +that too, and we want to talk about it. + +CSC brings you the third chapter of Afterhours, and this time we're discussing +Personal Relationships. Join us for a chat about how our relationships +(platonic and romantic) have been affected, whether that be due to co-op, +sequence changes, or COVID. We'll be sharing our own personal stories and we'd +love for you all to join in on the discussion. + +Registration is required for attendance, so don't miss out! diff --git a/scripts/mdx-scripts/event-test.xml b/scripts/mdx-scripts/event-test.xml new file mode 100644 index 0000000..86b422e --- /dev/null +++ b/scripts/mdx-scripts/event-test.xml @@ -0,0 +1,36 @@ + + +

CSC and SE Soc are hosting an Interview Prep Workshop next week! Join Kristy Gao and Bimesh De Silva as they review the interview process, from behavioural to technical interviews. They'll finish off with live mock interviews, and the event will be held on Twitch (https://www.twitch.tv/uwcsclub).

+
+ +

Browsing through your unsolved Leetcode problems? Flipping open CTCI for the first time? Have no clue what to expect from a technical interview or just need an interview refresher?

+

We've got you covered at our CSC x SE Soc Interview Prep Workshop this Monday, May 24th from 7:00-8:30pm ET! Live-streamed on Twitch, Kristy Gao and Bimesh De Silva will be walking through important aspects of the interview process from coding challenges to behavioural interviews to algorithmic interviews, go through some live mock interviews, and share their tips and techniques along the way!

+

Registration isn't required, we'll just be sending you an email reminder, as well as inviting you to our calendar event!

+

The event will be hosted on Twitch at https://www.twitch.tv/uwcsclub

+

Register at http://bit.ly/csc-sesoc-interview-prep-signup!

+
+
+ + +

+ Learn about our plans for the term and play some games with us. +

+
+ +

Kick off your Spring term with CSC! Come join us on Discord to learn more about what we'll be up to this term and how you can participate!

+

Afterwards, stick around for a relaxing and fun game night. See you there!

+

Here, I am also testing with

+

Many headings, as well as bold text and italics.

+

More headings

+ +
    +
  1. One
  2. +
  3. Ordered
  4. +
  5. List
  6. +
+
+
\ No newline at end of file diff --git a/scripts/mdx-scripts/news-conversion.js b/scripts/mdx-scripts/news-conversion.js new file mode 100644 index 0000000..904d966 --- /dev/null +++ b/scripts/mdx-scripts/news-conversion.js @@ -0,0 +1,27 @@ +const converter = new showdown.Converter(); + +fetch("./event-test.xml") + .then((response) => response.text()) + .then((jsonResponse) => parseXML(jsonResponse)) + .catch((error) => console.error(error)); + +const parseXML = (XML) => { + const eventItemRegex = /(.|\n)*?<\/eventitem>/g; + const shortRegex = /(?<=)(.|\n)*?(?=<\/short>)/g; + const abstractRegex = /(?<=)(.|\n)*?(?=<\/abstract>)/g; + + let eventItems = []; + + // Find how many eventItems there are here + while ((eventItems = eventItemRegex.exec(XML)) !== null) { + shortRegex.lastIndex = 0 + abstractRegex.lastIndex = 0 + + const eventItem = eventItems[0]; + console.log(eventItem); + let short = shortRegex.exec(eventItem); + console.log(converter.makeMarkdown(short[0])); + let abstract = abstractRegex.exec(eventItem); + console.log(converter.makeMarkdown(abstract[0])); + } +}; diff --git a/scripts/mdx-scripts/test.html b/scripts/mdx-scripts/test.html new file mode 100644 index 0000000..7348ca8 --- /dev/null +++ b/scripts/mdx-scripts/test.html @@ -0,0 +1,14 @@ + + + + + + + + + Document + + + + + \ No newline at end of file -- 2.39.2 From c6ce8648c31c9b8b4288f72260f02bf554e60712 Mon Sep 17 00:00:00 2001 From: Jared He <66887902+jaredjhe@users.noreply.github.com> Date: Thu, 3 Jun 2021 07:37:18 -0500 Subject: [PATCH 02/41] Rename to event-conversion.js --- scripts/mdx-scripts/{news-conversion.js => event-conversion.js} | 0 scripts/mdx-scripts/test.html | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename scripts/mdx-scripts/{news-conversion.js => event-conversion.js} (100%) diff --git a/scripts/mdx-scripts/news-conversion.js b/scripts/mdx-scripts/event-conversion.js similarity index 100% rename from scripts/mdx-scripts/news-conversion.js rename to scripts/mdx-scripts/event-conversion.js diff --git a/scripts/mdx-scripts/test.html b/scripts/mdx-scripts/test.html index 7348ca8..f92a9dc 100644 --- a/scripts/mdx-scripts/test.html +++ b/scripts/mdx-scripts/test.html @@ -5,7 +5,7 @@ - + Document -- 2.39.2 From 3b6f57edaa1e6ceac41faf7fbd6502a934524267 Mon Sep 17 00:00:00 2001 From: Jared He <66887902+jaredjhe@users.noreply.github.com> Date: Thu, 3 Jun 2021 08:00:22 -0500 Subject: [PATCH 03/41] Add some regex for required metadata --- scripts/mdx-scripts/event-conversion.js | 29 ++++++++++++++++++++----- scripts/mdx-scripts/event-test.xml | 2 +- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/scripts/mdx-scripts/event-conversion.js b/scripts/mdx-scripts/event-conversion.js index 904d966..ba66082 100644 --- a/scripts/mdx-scripts/event-conversion.js +++ b/scripts/mdx-scripts/event-conversion.js @@ -10,18 +10,35 @@ const parseXML = (XML) => { const shortRegex = /(?<=)(.|\n)*?(?=<\/short>)/g; const abstractRegex = /(?<=)(.|\n)*?(?=<\/abstract>)/g; + const dateRegex = /(?<=)/g; + const timeRegex = /(?<=)/g; + const roomRegex = /(?<=)/g; + const titleRegex = /(?<=)/g; + let eventItems = []; - // Find how many eventItems there are here while ((eventItems = eventItemRegex.exec(XML)) !== null) { - shortRegex.lastIndex = 0 - abstractRegex.lastIndex = 0 - + dateRegex.lastIndex = 0; + timeRegex.lastIndex = 0; + roomRegex.lastIndex = 0; + titleRegex.lastIndex = 0; + shortRegex.lastIndex = 0; + abstractRegex.lastIndex = 0; + const eventItem = eventItems[0]; - console.log(eventItem); + let dateStr = dateRegex.exec(eventItem); + let timeStr = timeRegex.exec(eventItem); + date = new Date(dateStr[0] + " " + timeStr[0]); + let room = roomRegex.exec(eventItem); + let title = titleRegex.exec(eventItem); let short = shortRegex.exec(eventItem); - console.log(converter.makeMarkdown(short[0])); let abstract = abstractRegex.exec(eventItem); + + console.log(eventItem); + console.log(date); + console.log(room[0]); + console.log(title[0]); + console.log(converter.makeMarkdown(short[0])); console.log(converter.makeMarkdown(abstract[0])); } }; diff --git a/scripts/mdx-scripts/event-test.xml b/scripts/mdx-scripts/event-test.xml index 86b422e..e3ed3a3 100644 --- a/scripts/mdx-scripts/event-test.xml +++ b/scripts/mdx-scripts/event-test.xml @@ -1,4 +1,4 @@ - +

CSC and SE Soc are hosting an Interview Prep Workshop next week! Join Kristy Gao and Bimesh De Silva as they review the interview process, from behavioural to technical interviews. They'll finish off with live mock interviews, and the event will be held on Twitch (https://www.twitch.tv/uwcsclub).

-- 2.39.2 From ca9592346e1eff162384a9b66829a794a3d96c54 Mon Sep 17 00:00:00 2001 From: Jared He <66887902+jaredjhe@users.noreply.github.com> Date: Thu, 3 Jun 2021 17:10:05 -0500 Subject: [PATCH 04/41] Use node and breakdance --- scripts/mdx-scripts/event-conversion.js | 44 +- scripts/mdx-scripts/event-test.xml | 2 +- scripts/mdx-scripts/package-lock.json | 1903 +++++++++++++++++++++++ scripts/mdx-scripts/package.json | 5 + scripts/mdx-scripts/test.html | 14 - 5 files changed, 1934 insertions(+), 34 deletions(-) create mode 100644 scripts/mdx-scripts/package-lock.json create mode 100644 scripts/mdx-scripts/package.json delete mode 100644 scripts/mdx-scripts/test.html diff --git a/scripts/mdx-scripts/event-conversion.js b/scripts/mdx-scripts/event-conversion.js index ba66082..bef1f8e 100644 --- a/scripts/mdx-scripts/event-conversion.js +++ b/scripts/mdx-scripts/event-conversion.js @@ -1,9 +1,14 @@ -const converter = new showdown.Converter(); +const Breakdance = require("breakdance"); +const converter = new Breakdance(); +const fs = require("fs"); -fetch("./event-test.xml") - .then((response) => response.text()) - .then((jsonResponse) => parseXML(jsonResponse)) - .catch((error) => console.error(error)); +fs.readFile("./event-test.xml", "utf8", (err, data) => { + if (err) { + console.error(err); + return; + } + parseXML(data); +}); const parseXML = (XML) => { const eventItemRegex = /(.|\n)*?<\/eventitem>/g; @@ -26,19 +31,20 @@ const parseXML = (XML) => { abstractRegex.lastIndex = 0; const eventItem = eventItems[0]; - let dateStr = dateRegex.exec(eventItem); - let timeStr = timeRegex.exec(eventItem); - date = new Date(dateStr[0] + " " + timeStr[0]); - let room = roomRegex.exec(eventItem); - let title = titleRegex.exec(eventItem); - let short = shortRegex.exec(eventItem); - let abstract = abstractRegex.exec(eventItem); + const dateStr = dateRegex.exec(eventItem); + const timeStr = timeRegex.exec(eventItem); - console.log(eventItem); - console.log(date); - console.log(room[0]); - console.log(title[0]); - console.log(converter.makeMarkdown(short[0])); - console.log(converter.makeMarkdown(abstract[0])); + const title = titleRegex.exec(eventItem)[0]; + const short = shortRegex.exec(eventItem)[0]; + // const short = shortRegex.exec(eventItem)[0]; if we want shorts in mdx + const room = roomRegex.exec(eventItem)[0]; + const date = new Date(`${dateStr[0]} ${timeStr[0]}`); + const abstract = converter.render(abstractRegex.exec(eventItem)[0]); + + mdx = `export const metadata = {\n name: ${title},\n short: ${short},\n date: ${date},\n online: TODO FIX THIS,\n location: ${room},\n registerLink: TODO FIX THIS,\n}\n\n${abstract}`; + + fs.writeFile(`${timeRegex.lastIndex}.mdx`, mdx, function (err) { + if (err) return console.log(err); + }); } -}; +}; \ No newline at end of file diff --git a/scripts/mdx-scripts/event-test.xml b/scripts/mdx-scripts/event-test.xml index e3ed3a3..5c26e05 100644 --- a/scripts/mdx-scripts/event-test.xml +++ b/scripts/mdx-scripts/event-test.xml @@ -20,7 +20,7 @@

Kick off your Spring term with CSC! Come join us on Discord to learn more about what we'll be up to this term and how you can participate!

Afterwards, stick around for a relaxing and fun game night. See you there!

Here, I am also testing with

-

Many headings, as well as bold text and italics.

+

Many headings, as well as bold text and italics

More headings

  • One
  • diff --git a/scripts/mdx-scripts/package-lock.json b/scripts/mdx-scripts/package-lock.json new file mode 100644 index 0000000..664175d --- /dev/null +++ b/scripts/mdx-scripts/package-lock.json @@ -0,0 +1,1903 @@ +{ + "name": "mdx-scripts", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "dependencies": { + "breakdance": "^3.0.1" + } + }, + "node_modules/atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "bin": { + "atob": "bin/atob.js" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" + }, + "node_modules/breakdance": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/breakdance/-/breakdance-3.0.1.tgz", + "integrity": "sha1-R1qYnIOJ9SKHaJC6FPOXrfsOMYQ=", + "dependencies": { + "breakdance-util": "^0.1.5", + "cheerio": "^0.22.0", + "condense-newlines": "^0.2.1", + "define-property": "^1.0.0", + "detect-indent": "^5.0.0", + "export-files": "^2.1.1", + "extend-shallow": "^2.0.1", + "is-self-closing": "^1.0.0", + "isobject": "^3.0.0", + "mixin-deep": "^1.2.0", + "repeat-string": "^1.6.1", + "snapdragon": "^0.11.0", + "snapdragon-cheerio": "^1.1.0", + "snapdragon-node": "^1.0.6", + "snapdragon-util": "^2.1.1", + "strip-attributes": "^0.2.0", + "trim-leading-lines": "^0.1.1", + "trim-trailing-lines": "^1.1.0", + "unescape": "^0.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/breakdance-util": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/breakdance-util/-/breakdance-util-0.1.5.tgz", + "integrity": "sha1-x2u5K6wl+U0q25Dq07PlQUBGa5g=", + "dependencies": { + "diacritics-map": "^0.1.0", + "get-value": "^2.0.6", + "is-self-closing": "^1.0.0", + "kind-of": "^3.1.0", + "snapdragon-util": "^1.0.6", + "strip-color": "^0.1.0", + "typeof-article": "^0.1.1", + "word-regex": "^0.1.1" + }, + "engines": { + "node": ">=4.7" + } + }, + "node_modules/breakdance-util/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/breakdance-util/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/breakdance-util/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/breakdance-util/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/breakdance-util/node_modules/is-descriptor/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/breakdance-util/node_modules/lazy-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", + "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "dependencies": { + "set-getter": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/breakdance-util/node_modules/snapdragon-util": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-1.0.6.tgz", + "integrity": "sha1-iz0tbeyJMMkOBUugUuViyhs6Yh4=", + "dependencies": { + "define-property": "^0.2.5", + "kind-of": "^3.1.0", + "lazy-cache": "^2.0.2", + "snapdragon-node": "^1.0.6" + }, + "engines": { + "node": ">=4.7" + } + }, + "node_modules/cheerio": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz", + "integrity": "sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=", + "dependencies": { + "css-select": "~1.2.0", + "dom-serializer": "~0.1.0", + "entities": "~1.1.1", + "htmlparser2": "^3.9.1", + "lodash.assignin": "^4.0.9", + "lodash.bind": "^4.1.4", + "lodash.defaults": "^4.0.1", + "lodash.filter": "^4.4.0", + "lodash.flatten": "^4.2.0", + "lodash.foreach": "^4.3.0", + "lodash.map": "^4.4.0", + "lodash.merge": "^4.4.0", + "lodash.pick": "^4.2.1", + "lodash.reduce": "^4.4.0", + "lodash.reject": "^4.4.0", + "lodash.some": "^4.4.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + }, + "node_modules/condense-newlines": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/condense-newlines/-/condense-newlines-0.2.1.tgz", + "integrity": "sha1-PemFVTE5R10yUCyDsC9gaE0kxV8=", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-whitespace": "^0.3.0", + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "dependencies": { + "boolbase": "~1.0.0", + "css-what": "2.1", + "domutils": "1.5.1", + "nth-check": "~1.0.1" + } + }, + "node_modules/css-what": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", + "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==", + "engines": { + "node": "*" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/detect-indent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", + "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", + "engines": { + "node": ">=4" + } + }, + "node_modules/diacritics-map": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/diacritics-map/-/diacritics-map-0.1.0.tgz", + "integrity": "sha1-bfwP+dAQAKLt8oZTccrDFulJd68=", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/dom-serializer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", + "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", + "dependencies": { + "domelementtype": "^1.3.0", + "entities": "^1.1.1" + } + }, + "node_modules/domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" + }, + "node_modules/domhandler": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", + "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "dependencies": { + "domelementtype": "1" + } + }, + "node_modules/domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dependencies": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "node_modules/entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" + }, + "node_modules/export-files": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/export-files/-/export-files-2.1.1.tgz", + "integrity": "sha1-u/ZFdAU6CeTrmOX0NQHVcrLDzn8=", + "dependencies": { + "lazy-cache": "^1.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dependencies": { + "for-in": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/htmlparser2": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", + "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", + "dependencies": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-descriptor/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-self-closing": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-self-closing/-/is-self-closing-1.0.1.tgz", + "integrity": "sha512-E+60FomW7Blv5GXTlYee2KDrnG6srxF7Xt1SjrhWUGUEsTFIqY/nq2y3DaftCsgUMdh89V07IVfhY9KIJhLezg==", + "dependencies": { + "self-closing-tags": "^1.0.1" + }, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-whitespace": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-whitespace/-/is-whitespace-0.3.0.tgz", + "integrity": "sha1-Fjnssb4DauxppUy7QBz77XEUq38=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lodash.assignin": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz", + "integrity": "sha1-uo31+4QesKPoBEIysOJjqNxqKKI=" + }, + "node_modules/lodash.bind": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-4.2.1.tgz", + "integrity": "sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=" + }, + "node_modules/lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=" + }, + "node_modules/lodash.filter": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz", + "integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=" + }, + "node_modules/lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" + }, + "node_modules/lodash.foreach": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz", + "integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=" + }, + "node_modules/lodash.map": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", + "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + }, + "node_modules/lodash.pick": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", + "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=" + }, + "node_modules/lodash.reduce": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz", + "integrity": "sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs=" + }, + "node_modules/lodash.reject": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.reject/-/lodash.reject-4.6.0.tgz", + "integrity": "sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU=" + }, + "node_modules/lodash.some": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz", + "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" + }, + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-deep/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "node_modules/nth-check": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", + "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "dependencies": { + "boolbase": "~1.0.0" + } + }, + "node_modules/object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dependencies": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "deprecated": "https://github.com/lydell/resolve-url#deprecated" + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/self-closing-tags": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/self-closing-tags/-/self-closing-tags-1.0.1.tgz", + "integrity": "sha512-7t6hNbYMxM+VHXTgJmxwgZgLGktuXtVVD5AivWzNTdJBM4DBjnDKDzkf2SrNjihaArpeJYNjxkELBu1evI4lQA==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/set-getter": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.0.tgz", + "integrity": "sha1-12nBgsnVpR9AkUXy+6guXoboA3Y=", + "dependencies": { + "to-object-path": "^0.3.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon": { + "version": "0.11.5", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.11.5.tgz", + "integrity": "sha512-iC2oF+H+TjiZN4a7I5HNUH8imAFT9z3GydV8X5ZFLcBiDYROWNeqI34BHArXTVO/RGs88STtAtiMP3tCiNdUYg==", + "dependencies": { + "component-emitter": "^1.2.1", + "debug": "^2.6.2", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "get-value": "^2.0.6", + "isobject": "^3.0.0", + "map-cache": "^0.2.2", + "snapdragon-node": "^1.0.6", + "snapdragon-util": "^2.1.1", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-cheerio": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/snapdragon-cheerio/-/snapdragon-cheerio-1.1.0.tgz", + "integrity": "sha1-FvO9P6FhX4XF+CZQTFu0Bs00Drc=", + "dependencies": { + "cheerio": "^0.22.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "is-self-closing": "^1.0.0", + "snapdragon-node": "^1.0.6", + "snapdragon-util": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/snapdragon-cheerio/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-cheerio/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-cheerio/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-cheerio/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-cheerio/node_modules/is-descriptor/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-1.0.6.tgz", + "integrity": "sha1-JEjV72/qf16P1TJqChFIVNonE1Y=", + "dependencies": { + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "lazy-cache": "^2.0.2", + "snapdragon-util": "^1.0.3" + }, + "engines": { + "node": ">=4.7" + } + }, + "node_modules/snapdragon-node/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-descriptor/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/lazy-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", + "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "dependencies": { + "set-getter": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/snapdragon-util": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-1.0.6.tgz", + "integrity": "sha1-iz0tbeyJMMkOBUugUuViyhs6Yh4=", + "dependencies": { + "define-property": "^0.2.5", + "kind-of": "^3.1.0", + "lazy-cache": "^2.0.2", + "snapdragon-node": "^1.0.6" + }, + "engines": { + "node": ">=4.7" + } + }, + "node_modules/snapdragon-util": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-2.1.1.tgz", + "integrity": "sha1-VSd534oUk6DnjAbMgJU6JidwlXo=", + "dependencies": { + "kind-of": "^3.1.0" + }, + "engines": { + "node": ">=4.7" + } + }, + "node_modules/snapdragon/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-descriptor/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "node_modules/source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==" + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/strip-attributes": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/strip-attributes/-/strip-attributes-0.2.0.tgz", + "integrity": "sha1-MLoifGq/Y1alGytoYmx5XxkoCUU=", + "dependencies": { + "cheerio": "^0.22.0", + "extend-shallow": "^2.0.1", + "isobject": "^3.0.0", + "object.omit": "^2.0.1", + "object.pick": "^1.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-color": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/strip-color/-/strip-color-0.1.0.tgz", + "integrity": "sha1-EG9l09PmotlAHKwOsM6LinArT3s=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/trim-leading-lines": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/trim-leading-lines/-/trim-leading-lines-0.1.1.tgz", + "integrity": "sha1-DnysPoMELc+Vp07TaWbxd0TVwWk=", + "dependencies": { + "is-whitespace": "^0.3.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/trim-trailing-lines": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.4.tgz", + "integrity": "sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/typeof-article": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/typeof-article/-/typeof-article-0.1.1.tgz", + "integrity": "sha1-nwfnM8P7tkb/qeYcCN66zUYOBq8=", + "dependencies": { + "kind-of": "^3.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/unescape": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/unescape/-/unescape-0.2.0.tgz", + "integrity": "sha1-t4ubYMhvFinfGBv1Pu47yNY2fd8=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "deprecated": "Please see https://github.com/lydell/urix#deprecated" + }, + "node_modules/use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "node_modules/word-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/word-regex/-/word-regex-0.1.2.tgz", + "integrity": "sha1-o7x/LSIs5Kk8JGw+9pRY9h9RFjk=", + "engines": { + "node": ">=0.10.0" + } + } + }, + "dependencies": { + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" + }, + "breakdance": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/breakdance/-/breakdance-3.0.1.tgz", + "integrity": "sha1-R1qYnIOJ9SKHaJC6FPOXrfsOMYQ=", + "requires": { + "breakdance-util": "^0.1.5", + "cheerio": "^0.22.0", + "condense-newlines": "^0.2.1", + "define-property": "^1.0.0", + "detect-indent": "^5.0.0", + "export-files": "^2.1.1", + "extend-shallow": "^2.0.1", + "is-self-closing": "^1.0.0", + "isobject": "^3.0.0", + "mixin-deep": "^1.2.0", + "repeat-string": "^1.6.1", + "snapdragon": "^0.11.0", + "snapdragon-cheerio": "^1.1.0", + "snapdragon-node": "^1.0.6", + "snapdragon-util": "^2.1.1", + "strip-attributes": "^0.2.0", + "trim-leading-lines": "^0.1.1", + "trim-trailing-lines": "^1.1.0", + "unescape": "^0.2.0" + } + }, + "breakdance-util": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/breakdance-util/-/breakdance-util-0.1.5.tgz", + "integrity": "sha1-x2u5K6wl+U0q25Dq07PlQUBGa5g=", + "requires": { + "diacritics-map": "^0.1.0", + "get-value": "^2.0.6", + "is-self-closing": "^1.0.0", + "kind-of": "^3.1.0", + "snapdragon-util": "^1.0.6", + "strip-color": "^0.1.0", + "typeof-article": "^0.1.1", + "word-regex": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "lazy-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", + "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "requires": { + "set-getter": "^0.1.0" + } + }, + "snapdragon-util": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-1.0.6.tgz", + "integrity": "sha1-iz0tbeyJMMkOBUugUuViyhs6Yh4=", + "requires": { + "define-property": "^0.2.5", + "kind-of": "^3.1.0", + "lazy-cache": "^2.0.2", + "snapdragon-node": "^1.0.6" + } + } + } + }, + "cheerio": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz", + "integrity": "sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=", + "requires": { + "css-select": "~1.2.0", + "dom-serializer": "~0.1.0", + "entities": "~1.1.1", + "htmlparser2": "^3.9.1", + "lodash.assignin": "^4.0.9", + "lodash.bind": "^4.1.4", + "lodash.defaults": "^4.0.1", + "lodash.filter": "^4.4.0", + "lodash.flatten": "^4.2.0", + "lodash.foreach": "^4.3.0", + "lodash.map": "^4.4.0", + "lodash.merge": "^4.4.0", + "lodash.pick": "^4.2.1", + "lodash.reduce": "^4.4.0", + "lodash.reject": "^4.4.0", + "lodash.some": "^4.4.0" + } + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + }, + "condense-newlines": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/condense-newlines/-/condense-newlines-0.2.1.tgz", + "integrity": "sha1-PemFVTE5R10yUCyDsC9gaE0kxV8=", + "requires": { + "extend-shallow": "^2.0.1", + "is-whitespace": "^0.3.0", + "kind-of": "^3.0.2" + } + }, + "css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "requires": { + "boolbase": "~1.0.0", + "css-what": "2.1", + "domutils": "1.5.1", + "nth-check": "~1.0.1" + } + }, + "css-what": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", + "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "detect-indent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", + "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=" + }, + "diacritics-map": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/diacritics-map/-/diacritics-map-0.1.0.tgz", + "integrity": "sha1-bfwP+dAQAKLt8oZTccrDFulJd68=" + }, + "dom-serializer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", + "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", + "requires": { + "domelementtype": "^1.3.0", + "entities": "^1.1.1" + } + }, + "domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" + }, + "domhandler": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", + "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" + }, + "export-files": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/export-files/-/export-files-2.1.1.tgz", + "integrity": "sha1-u/ZFdAU6CeTrmOX0NQHVcrLDzn8=", + "requires": { + "lazy-cache": "^1.0.3" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "requires": { + "for-in": "^1.0.1" + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" + }, + "htmlparser2": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", + "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", + "requires": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "^6.0.0" + }, + "dependencies": { + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + } + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + }, + "dependencies": { + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + } + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "requires": { + "isobject": "^3.0.1" + } + }, + "is-self-closing": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-self-closing/-/is-self-closing-1.0.1.tgz", + "integrity": "sha512-E+60FomW7Blv5GXTlYee2KDrnG6srxF7Xt1SjrhWUGUEsTFIqY/nq2y3DaftCsgUMdh89V07IVfhY9KIJhLezg==", + "requires": { + "self-closing-tags": "^1.0.1" + } + }, + "is-whitespace": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-whitespace/-/is-whitespace-0.3.0.tgz", + "integrity": "sha1-Fjnssb4DauxppUy7QBz77XEUq38=" + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + }, + "lodash.assignin": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz", + "integrity": "sha1-uo31+4QesKPoBEIysOJjqNxqKKI=" + }, + "lodash.bind": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-4.2.1.tgz", + "integrity": "sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=" + }, + "lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=" + }, + "lodash.filter": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz", + "integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=" + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" + }, + "lodash.foreach": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz", + "integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=" + }, + "lodash.map": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", + "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=" + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + }, + "lodash.pick": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", + "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=" + }, + "lodash.reduce": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz", + "integrity": "sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs=" + }, + "lodash.reject": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.reject/-/lodash.reject-4.6.0.tgz", + "integrity": "sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU=" + }, + "lodash.some": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz", + "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "nth-check": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", + "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "requires": { + "boolbase": "~1.0.0" + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "requires": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "requires": { + "isobject": "^3.0.1" + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "self-closing-tags": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/self-closing-tags/-/self-closing-tags-1.0.1.tgz", + "integrity": "sha512-7t6hNbYMxM+VHXTgJmxwgZgLGktuXtVVD5AivWzNTdJBM4DBjnDKDzkf2SrNjihaArpeJYNjxkELBu1evI4lQA==" + }, + "set-getter": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.0.tgz", + "integrity": "sha1-12nBgsnVpR9AkUXy+6guXoboA3Y=", + "requires": { + "to-object-path": "^0.3.0" + } + }, + "snapdragon": { + "version": "0.11.5", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.11.5.tgz", + "integrity": "sha512-iC2oF+H+TjiZN4a7I5HNUH8imAFT9z3GydV8X5ZFLcBiDYROWNeqI34BHArXTVO/RGs88STtAtiMP3tCiNdUYg==", + "requires": { + "component-emitter": "^1.2.1", + "debug": "^2.6.2", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "get-value": "^2.0.6", + "isobject": "^3.0.0", + "map-cache": "^0.2.2", + "snapdragon-node": "^1.0.6", + "snapdragon-util": "^2.1.1", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + } + } + }, + "snapdragon-cheerio": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/snapdragon-cheerio/-/snapdragon-cheerio-1.1.0.tgz", + "integrity": "sha1-FvO9P6FhX4XF+CZQTFu0Bs00Drc=", + "requires": { + "cheerio": "^0.22.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "is-self-closing": "^1.0.0", + "snapdragon-node": "^1.0.6", + "snapdragon-util": "^2.0.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + } + } + }, + "snapdragon-node": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-1.0.6.tgz", + "integrity": "sha1-JEjV72/qf16P1TJqChFIVNonE1Y=", + "requires": { + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "lazy-cache": "^2.0.2", + "snapdragon-util": "^1.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "lazy-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", + "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "requires": { + "set-getter": "^0.1.0" + } + }, + "snapdragon-util": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-1.0.6.tgz", + "integrity": "sha1-iz0tbeyJMMkOBUugUuViyhs6Yh4=", + "requires": { + "define-property": "^0.2.5", + "kind-of": "^3.1.0", + "lazy-cache": "^2.0.2", + "snapdragon-node": "^1.0.6" + } + } + } + }, + "snapdragon-util": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-2.1.1.tgz", + "integrity": "sha1-VSd534oUk6DnjAbMgJU6JidwlXo=", + "requires": { + "kind-of": "^3.1.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==" + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "strip-attributes": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/strip-attributes/-/strip-attributes-0.2.0.tgz", + "integrity": "sha1-MLoifGq/Y1alGytoYmx5XxkoCUU=", + "requires": { + "cheerio": "^0.22.0", + "extend-shallow": "^2.0.1", + "isobject": "^3.0.0", + "object.omit": "^2.0.1", + "object.pick": "^1.2.0" + } + }, + "strip-color": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/strip-color/-/strip-color-0.1.0.tgz", + "integrity": "sha1-EG9l09PmotlAHKwOsM6LinArT3s=" + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "requires": { + "kind-of": "^3.0.2" + } + }, + "trim-leading-lines": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/trim-leading-lines/-/trim-leading-lines-0.1.1.tgz", + "integrity": "sha1-DnysPoMELc+Vp07TaWbxd0TVwWk=", + "requires": { + "is-whitespace": "^0.3.0" + } + }, + "trim-trailing-lines": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.4.tgz", + "integrity": "sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ==" + }, + "typeof-article": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/typeof-article/-/typeof-article-0.1.1.tgz", + "integrity": "sha1-nwfnM8P7tkb/qeYcCN66zUYOBq8=", + "requires": { + "kind-of": "^3.1.0" + } + }, + "unescape": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/unescape/-/unescape-0.2.0.tgz", + "integrity": "sha1-t4ubYMhvFinfGBv1Pu47yNY2fd8=" + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "word-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/word-regex/-/word-regex-0.1.2.tgz", + "integrity": "sha1-o7x/LSIs5Kk8JGw+9pRY9h9RFjk=" + } + } +} diff --git a/scripts/mdx-scripts/package.json b/scripts/mdx-scripts/package.json new file mode 100644 index 0000000..5430aa6 --- /dev/null +++ b/scripts/mdx-scripts/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "breakdance": "^3.0.1" + } +} diff --git a/scripts/mdx-scripts/test.html b/scripts/mdx-scripts/test.html deleted file mode 100644 index f92a9dc..0000000 --- a/scripts/mdx-scripts/test.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - Document - - - - - \ No newline at end of file -- 2.39.2 From 64af3ba0885254bdf048b30e6b003a3a50f2cd90 Mon Sep 17 00:00:00 2001 From: Jared He <66887902+jaredjhe@users.noreply.github.com> Date: Thu, 3 Jun 2021 17:20:03 -0500 Subject: [PATCH 05/41] Change to informative titles --- scripts/mdx-scripts/event-conversion.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/mdx-scripts/event-conversion.js b/scripts/mdx-scripts/event-conversion.js index bef1f8e..d9f45b0 100644 --- a/scripts/mdx-scripts/event-conversion.js +++ b/scripts/mdx-scripts/event-conversion.js @@ -35,16 +35,17 @@ const parseXML = (XML) => { const timeStr = timeRegex.exec(eventItem); const title = titleRegex.exec(eventItem)[0]; - const short = shortRegex.exec(eventItem)[0]; + const short = shortRegex.exec(eventItem)[0]; // const short = shortRegex.exec(eventItem)[0]; if we want shorts in mdx const room = roomRegex.exec(eventItem)[0]; const date = new Date(`${dateStr[0]} ${timeStr[0]}`); const abstract = converter.render(abstractRegex.exec(eventItem)[0]); - mdx = `export const metadata = {\n name: ${title},\n short: ${short},\n date: ${date},\n online: TODO FIX THIS,\n location: ${room},\n registerLink: TODO FIX THIS,\n}\n\n${abstract}`; + const mdx = `export const metadata = {\n name: ${title},\n short: ${short},\n date: ${date},\n online: TODO FIX THIS,\n location: ${room},\n registerLink: TODO FIX THIS,\n}\n\n${abstract}`; + const mdxTitle = title.replace(/(\s+|:+)/g, "-"); - fs.writeFile(`${timeRegex.lastIndex}.mdx`, mdx, function (err) { - if (err) return console.log(err); + fs.writeFile(`${mdxTitle}.mdx`, mdx, function (err) { + if (err) return console.log(err); }); } -}; \ No newline at end of file +}; -- 2.39.2 From b5981ecab1f9e47288dd2fcd710fc7ef7c2648f9 Mon Sep 17 00:00:00 2001 From: Jared He <66887902+jaredjhe@users.noreply.github.com> Date: Fri, 4 Jun 2021 16:24:56 -0500 Subject: [PATCH 06/41] Use showdown and jsdom --- scripts/mdx-scripts/event-conversion.js | 22 +- scripts/mdx-scripts/package-lock.json | 441 +++++++++++++++++++++++- scripts/mdx-scripts/package.json | 3 +- 3 files changed, 461 insertions(+), 5 deletions(-) diff --git a/scripts/mdx-scripts/event-conversion.js b/scripts/mdx-scripts/event-conversion.js index d9f45b0..d9a91b7 100644 --- a/scripts/mdx-scripts/event-conversion.js +++ b/scripts/mdx-scripts/event-conversion.js @@ -1,6 +1,22 @@ -const Breakdance = require("breakdance"); -const converter = new Breakdance(); const fs = require("fs"); +const jsdom = require("jsdom"); +const { JSDOM } = jsdom; +const { window } = new JSDOM('') +global.window = window + +var showdown = require("showdown"); +const converterShowdown = new showdown.Converter(); + +const useShowdown = (HTML) => { + return converterShowdown.makeMarkdown(HTML) +} + +const Breakdance = require("breakdance"); +const converterBreakdance = new Breakdance(); + +const useBreakdance = (HTML) => { + return converterBreakdance.render(HTML) +} fs.readFile("./event-test.xml", "utf8", (err, data) => { if (err) { @@ -39,7 +55,7 @@ const parseXML = (XML) => { // const short = shortRegex.exec(eventItem)[0]; if we want shorts in mdx const room = roomRegex.exec(eventItem)[0]; const date = new Date(`${dateStr[0]} ${timeStr[0]}`); - const abstract = converter.render(abstractRegex.exec(eventItem)[0]); + const abstract = useShowdown(abstractRegex.exec(eventItem)[0]); const mdx = `export const metadata = {\n name: ${title},\n short: ${short},\n date: ${date},\n online: TODO FIX THIS,\n location: ${room},\n registerLink: TODO FIX THIS,\n}\n\n${abstract}`; const mdxTitle = title.replace(/(\s+|:+)/g, "-"); diff --git a/scripts/mdx-scripts/package-lock.json b/scripts/mdx-scripts/package-lock.json index 664175d..a4a418c 100644 --- a/scripts/mdx-scripts/package-lock.json +++ b/scripts/mdx-scripts/package-lock.json @@ -5,7 +5,27 @@ "packages": { "": { "dependencies": { - "breakdance": "^3.0.1" + "breakdance": "^3.0.1", + "showdown": "^1.9.1" + } + }, + "node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" } }, "node_modules/atob": { @@ -150,6 +170,14 @@ "node": ">=4.7" } }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "engines": { + "node": ">=6" + } + }, "node_modules/cheerio": { "version": "0.22.0", "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz", @@ -176,6 +204,29 @@ "node": ">= 0.6" } }, + "node_modules/cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dependencies": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, "node_modules/component-emitter": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", @@ -221,6 +272,14 @@ "ms": "2.0.0" } }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/decode-uri-component": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", @@ -287,6 +346,11 @@ "domelementtype": "1" } }, + "node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + }, "node_modules/entities": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", @@ -314,6 +378,17 @@ "node": ">=0.10.0" } }, + "node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -333,6 +408,14 @@ "node": ">=0.10.0" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -431,6 +514,14 @@ "node": ">=0.10.0" } }, + "node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "engines": { + "node": ">=4" + } + }, "node_modules/is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -488,6 +579,18 @@ "node": ">=0.10.0" } }, + "node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/lodash.assignin": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz", @@ -615,6 +718,47 @@ "node": ">=0.10.0" } }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "engines": { + "node": ">=4" + } + }, "node_modules/readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", @@ -636,6 +780,19 @@ "node": ">=0.10" } }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, "node_modules/resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", @@ -669,6 +826,11 @@ "node": ">=0.12.0" } }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, "node_modules/set-getter": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.0.tgz", @@ -680,6 +842,17 @@ "node": ">=0.10.0" } }, + "node_modules/showdown": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/showdown/-/showdown-1.9.1.tgz", + "integrity": "sha512-9cGuS382HcvExtf5AHk7Cb4pAeQQ+h0eTr33V1mu+crYWV4KvWAw6el92bDrqGEk5d46Ai/fhbEUwqJ/mTCNEA==", + "dependencies": { + "yargs": "^14.2" + }, + "bin": { + "showdown": "bin/showdown.js" + } + }, "node_modules/snapdragon": { "version": "0.11.5", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.11.5.tgz", @@ -963,6 +1136,30 @@ "safe-buffer": "~5.2.0" } }, + "node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/strip-attributes": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/strip-attributes/-/strip-attributes-0.2.0.tgz", @@ -1055,6 +1252,11 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, + "node_modules/which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, "node_modules/word-regex": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/word-regex/-/word-regex-0.1.2.tgz", @@ -1062,9 +1264,67 @@ "engines": { "node": ">=0.10.0" } + }, + "node_modules/wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dependencies": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" + }, + "node_modules/yargs": { + "version": "14.2.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz", + "integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==", + "dependencies": { + "cliui": "^5.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^15.0.1" + } + }, + "node_modules/yargs-parser": { + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz", + "integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } }, "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, "atob": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", @@ -1178,6 +1438,11 @@ } } }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + }, "cheerio": { "version": "0.22.0", "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz", @@ -1201,6 +1466,29 @@ "lodash.some": "^4.4.0" } }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, "component-emitter": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", @@ -1240,6 +1528,11 @@ "ms": "2.0.0" } }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, "decode-uri-component": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", @@ -1294,6 +1587,11 @@ "domelementtype": "1" } }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + }, "entities": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", @@ -1315,6 +1613,14 @@ "is-extendable": "^0.1.0" } }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "requires": { + "locate-path": "^3.0.0" + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -1328,6 +1634,11 @@ "for-in": "^1.0.1" } }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -1408,6 +1719,11 @@ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -1447,6 +1763,15 @@ "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, "lodash.assignin": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz", @@ -1561,6 +1886,32 @@ "isobject": "^3.0.1" } }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, "readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", @@ -1576,6 +1927,16 @@ "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, "resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", @@ -1591,6 +1952,11 @@ "resolved": "https://registry.npmjs.org/self-closing-tags/-/self-closing-tags-1.0.1.tgz", "integrity": "sha512-7t6hNbYMxM+VHXTgJmxwgZgLGktuXtVVD5AivWzNTdJBM4DBjnDKDzkf2SrNjihaArpeJYNjxkELBu1evI4lQA==" }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, "set-getter": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.0.tgz", @@ -1599,6 +1965,14 @@ "to-object-path": "^0.3.0" } }, + "showdown": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/showdown/-/showdown-1.9.1.tgz", + "integrity": "sha512-9cGuS382HcvExtf5AHk7Cb4pAeQQ+h0eTr33V1mu+crYWV4KvWAw6el92bDrqGEk5d46Ai/fhbEUwqJ/mTCNEA==", + "requires": { + "yargs": "^14.2" + } + }, "snapdragon": { "version": "0.11.5", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.11.5.tgz", @@ -1828,6 +2202,24 @@ "safe-buffer": "~5.2.0" } }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + }, "strip-attributes": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/strip-attributes/-/strip-attributes-0.2.0.tgz", @@ -1894,10 +2286,57 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, "word-regex": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/word-regex/-/word-regex-0.1.2.tgz", "integrity": "sha1-o7x/LSIs5Kk8JGw+9pRY9h9RFjk=" + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" + }, + "yargs": { + "version": "14.2.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz", + "integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==", + "requires": { + "cliui": "^5.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^15.0.1" + } + }, + "yargs-parser": { + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz", + "integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } } } diff --git a/scripts/mdx-scripts/package.json b/scripts/mdx-scripts/package.json index 5430aa6..3efe112 100644 --- a/scripts/mdx-scripts/package.json +++ b/scripts/mdx-scripts/package.json @@ -1,5 +1,6 @@ { "dependencies": { - "breakdance": "^3.0.1" + "breakdance": "^3.0.1", + "showdown": "^1.9.1" } } -- 2.39.2 From b22c7058a5a8a58558a4541119083d3b3c3c6f1b Mon Sep 17 00:00:00 2001 From: Jared He <66887902+jaredjhe@users.noreply.github.com> Date: Sun, 13 Jun 2021 11:26:10 -0500 Subject: [PATCH 07/41] Reduce code complexity by using xml-js --- scripts/mdx-scripts/CSC-BOT-&-Game-Night.mdx | 31 ++++++++++ .../CSC-x-SE-Soc--Interview-Prep.mdx | 19 ++++++ scripts/mdx-scripts/event-conversion.js | 62 +++++++------------ scripts/mdx-scripts/event-test.xml | 7 ++- scripts/mdx-scripts/package-lock.json | 33 +++++++++- scripts/mdx-scripts/package.json | 4 +- 6 files changed, 112 insertions(+), 44 deletions(-) create mode 100644 scripts/mdx-scripts/CSC-BOT-&-Game-Night.mdx create mode 100644 scripts/mdx-scripts/CSC-x-SE-Soc--Interview-Prep.mdx diff --git a/scripts/mdx-scripts/CSC-BOT-&-Game-Night.mdx b/scripts/mdx-scripts/CSC-BOT-&-Game-Night.mdx new file mode 100644 index 0000000..4c90baf --- /dev/null +++ b/scripts/mdx-scripts/CSC-BOT-&-Game-Night.mdx @@ -0,0 +1,31 @@ +export const metadata = { + name: "CSC BOT & Game Night", + short: "Learn about our plans for the term and play some games with us.", + date: "Mon May 17 2021 20:00:00 GMT-0500 (Central Daylight Time)", + online: TODO FIX THIS, + location: "Online", + registerLink: TODO FIX THIS, +} + +Kick off your Spring term with CSC! Come join us on Discord to learn more about what we'll be up to this term and how you can participate! + +Afterwards, stick around for a relaxing and fun game night. See you there! + +# Here, I am also testing with + +## Many headings, as well as **bold text** and *italics* + +#### More headings + +- One +- Unordered +- List + + + +1. One +2. Ordered +3. List + + + diff --git a/scripts/mdx-scripts/CSC-x-SE-Soc--Interview-Prep.mdx b/scripts/mdx-scripts/CSC-x-SE-Soc--Interview-Prep.mdx new file mode 100644 index 0000000..7a00e99 --- /dev/null +++ b/scripts/mdx-scripts/CSC-x-SE-Soc--Interview-Prep.mdx @@ -0,0 +1,19 @@ +export const metadata = { + name: "CSC x SE Soc: Interview Prep", + short: "CSC and SE Soc are hosting an Interview Prep Workshop next week! Join Kristy Gao and Bimesh De Silva as they review the interview process, from behavioural to technical interviews. They'll finish off with live mock interviews, and the event will be held on Twitch (https://www.twitch.tv/uwcsclub).", + date: "Mon May 24 2021 19:00:00 GMT-0500 (Central Daylight Time)", + online: TODO FIX THIS, + location: "Online", + registerLink: TODO FIX THIS, +} + +Browsing through your unsolved Leetcode problems? Flipping open CTCI for the first time? Have no clue what to expect from a technical interview or just need an interview refresher? + +We've got you covered at our CSC x SE Soc Interview Prep Workshop this Monday, May 24th from 7:00-8:30pm ET! Live-streamed on Twitch, Kristy Gao and Bimesh De Silva will be walking through important aspects of the interview process from coding challenges to behavioural interviews to algorithmic interviews, go through some live mock interviews, and share their tips and techniques along the way! + +Registration isn't required, we'll just be sending you an email reminder, as well as inviting you to our calendar event! + +The event will be hosted on Twitch at [https://www.twitch.tv/uwcsclub]() + +Register at [http://bit.ly/csc-sesoc-interview-prep-signup]()! + diff --git a/scripts/mdx-scripts/event-conversion.js b/scripts/mdx-scripts/event-conversion.js index d9a91b7..0e34107 100644 --- a/scripts/mdx-scripts/event-conversion.js +++ b/scripts/mdx-scripts/event-conversion.js @@ -1,22 +1,15 @@ const fs = require("fs"); const jsdom = require("jsdom"); const { JSDOM } = jsdom; -const { window } = new JSDOM('') -global.window = window - +const { window } = new JSDOM(""); +global.window = window; var showdown = require("showdown"); const converterShowdown = new showdown.Converter(); +const xmlJs = require("xml-js"); const useShowdown = (HTML) => { - return converterShowdown.makeMarkdown(HTML) -} - -const Breakdance = require("breakdance"); -const converterBreakdance = new Breakdance(); - -const useBreakdance = (HTML) => { - return converterBreakdance.render(HTML) -} + return converterShowdown.makeMarkdown(HTML); +}; fs.readFile("./event-test.xml", "utf8", (err, data) => { if (err) { @@ -27,37 +20,26 @@ fs.readFile("./event-test.xml", "utf8", (err, data) => { }); const parseXML = (XML) => { - const eventItemRegex = /(.|\n)*?<\/eventitem>/g; - const shortRegex = /(?<=)(.|\n)*?(?=<\/short>)/g; - const abstractRegex = /(?<=)(.|\n)*?(?=<\/abstract>)/g; + const js = xmlJs.xml2js(XML); - const dateRegex = /(?<=)/g; - const timeRegex = /(?<=)/g; - const roomRegex = /(?<=)/g; - const titleRegex = /(?<=)/g; + for (let i = 0; i < js.elements[0].elements.length; ++i) { + const title = js.elements[0].elements[i].attributes.title; + let short = useShowdown( + xmlJs.js2xml(js.elements[0].elements[i].elements[0]) + ); + short = short.replace(/\n+$/, ""); + const dateStr = js.elements[0].elements[i].attributes.date; + const timeStr = js.elements[0].elements[i].attributes.time; + const date = new Date(`${dateStr} ${timeStr} EST`); // need to add EST + const room = js.elements[0].elements[i].attributes.room; + // const online + // const location - let eventItems = []; + const abstract = useShowdown( + xmlJs.js2xml(js.elements[0].elements[i].elements[1]) + ); - while ((eventItems = eventItemRegex.exec(XML)) !== null) { - dateRegex.lastIndex = 0; - timeRegex.lastIndex = 0; - roomRegex.lastIndex = 0; - titleRegex.lastIndex = 0; - shortRegex.lastIndex = 0; - abstractRegex.lastIndex = 0; - - const eventItem = eventItems[0]; - const dateStr = dateRegex.exec(eventItem); - const timeStr = timeRegex.exec(eventItem); - - const title = titleRegex.exec(eventItem)[0]; - const short = shortRegex.exec(eventItem)[0]; - // const short = shortRegex.exec(eventItem)[0]; if we want shorts in mdx - const room = roomRegex.exec(eventItem)[0]; - const date = new Date(`${dateStr[0]} ${timeStr[0]}`); - const abstract = useShowdown(abstractRegex.exec(eventItem)[0]); - - const mdx = `export const metadata = {\n name: ${title},\n short: ${short},\n date: ${date},\n online: TODO FIX THIS,\n location: ${room},\n registerLink: TODO FIX THIS,\n}\n\n${abstract}`; + const mdx = `export const metadata = {\n name: "${title}",\n short: "${short}",\n date: "${date}",\n online: TODO FIX THIS,\n location: "${room}",\n registerLink: TODO FIX THIS,\n}\n\n${abstract}`; const mdxTitle = title.replace(/(\s+|:+)/g, "-"); fs.writeFile(`${mdxTitle}.mdx`, mdx, function (err) { diff --git a/scripts/mdx-scripts/event-test.xml b/scripts/mdx-scripts/event-test.xml index 5c26e05..7ae7c97 100644 --- a/scripts/mdx-scripts/event-test.xml +++ b/scripts/mdx-scripts/event-test.xml @@ -1,4 +1,6 @@ - + + +

    CSC and SE Soc are hosting an Interview Prep Workshop next week! Join Kristy Gao and Bimesh De Silva as they review the interview process, from behavioural to technical interviews. They'll finish off with live mock interviews, and the event will be held on Twitch (https://www.twitch.tv/uwcsclub).

    @@ -33,4 +35,5 @@
  • List
  • - \ No newline at end of file + + \ No newline at end of file diff --git a/scripts/mdx-scripts/package-lock.json b/scripts/mdx-scripts/package-lock.json index a4a418c..8738c9c 100644 --- a/scripts/mdx-scripts/package-lock.json +++ b/scripts/mdx-scripts/package-lock.json @@ -6,7 +6,9 @@ "": { "dependencies": { "breakdance": "^3.0.1", - "showdown": "^1.9.1" + "cheerio": "^0.22.0", + "showdown": "^1.9.1", + "xml-js": "^1.6.11" } }, "node_modules/ansi-regex": { @@ -818,6 +820,11 @@ } ] }, + "node_modules/sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, "node_modules/self-closing-tags": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/self-closing-tags/-/self-closing-tags-1.0.1.tgz", @@ -1278,6 +1285,17 @@ "node": ">=6" } }, + "node_modules/xml-js": { + "version": "1.6.11", + "resolved": "https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz", + "integrity": "sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==", + "dependencies": { + "sax": "^1.2.4" + }, + "bin": { + "xml-js": "bin/cli.js" + } + }, "node_modules/y18n": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", @@ -1947,6 +1965,11 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, "self-closing-tags": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/self-closing-tags/-/self-closing-tags-1.0.1.tgz", @@ -2306,6 +2329,14 @@ "strip-ansi": "^5.0.0" } }, + "xml-js": { + "version": "1.6.11", + "resolved": "https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz", + "integrity": "sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==", + "requires": { + "sax": "^1.2.4" + } + }, "y18n": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", diff --git a/scripts/mdx-scripts/package.json b/scripts/mdx-scripts/package.json index 3efe112..a76ff11 100644 --- a/scripts/mdx-scripts/package.json +++ b/scripts/mdx-scripts/package.json @@ -1,6 +1,8 @@ { "dependencies": { "breakdance": "^3.0.1", - "showdown": "^1.9.1" + "cheerio": "^0.22.0", + "showdown": "^1.9.1", + "xml-js": "^1.6.11" } } -- 2.39.2 From c4a0e607601b5eff7f24b5649cb1389fc32dfe20 Mon Sep 17 00:00:00 2001 From: Jared He <66887902+jaredjhe@users.noreply.github.com> Date: Sun, 13 Jun 2021 12:46:05 -0500 Subject: [PATCH 08/41] Add registerLink and parseTime --- scripts/mdx-scripts/CSC-BOT-&-Game-Night.mdx | 10 +- .../CSC-x-SE-Soc--Interview-Prep.mdx | 10 +- scripts/mdx-scripts/event-conversion.js | 44 +- scripts/mdx-scripts/event-test.xml | 10 +- scripts/mdx-scripts/package-lock.json | 1891 ----------------- scripts/mdx-scripts/package.json | 2 - scripts/mdx-scripts/parseTime.js | 20 + 7 files changed, 73 insertions(+), 1914 deletions(-) create mode 100644 scripts/mdx-scripts/parseTime.js diff --git a/scripts/mdx-scripts/CSC-BOT-&-Game-Night.mdx b/scripts/mdx-scripts/CSC-BOT-&-Game-Night.mdx index 4c90baf..115b255 100644 --- a/scripts/mdx-scripts/CSC-BOT-&-Game-Night.mdx +++ b/scripts/mdx-scripts/CSC-BOT-&-Game-Night.mdx @@ -1,17 +1,17 @@ export const metadata = { name: "CSC BOT & Game Night", short: "Learn about our plans for the term and play some games with us.", - date: "Mon May 17 2021 20:00:00 GMT-0500 (Central Daylight Time)", - online: TODO FIX THIS, - location: "Online", - registerLink: TODO FIX THIS, + date: "Mon May 17 2021 21:00:00 GMT-0500 (Central Daylight Time)", + online: false, + location: "DC", + registerLink: "no link" } Kick off your Spring term with CSC! Come join us on Discord to learn more about what we'll be up to this term and how you can participate! Afterwards, stick around for a relaxing and fun game night. See you there! -# Here, I am also testing with +# Here, I am also testing with ## Many headings, as well as **bold text** and *italics* diff --git a/scripts/mdx-scripts/CSC-x-SE-Soc--Interview-Prep.mdx b/scripts/mdx-scripts/CSC-x-SE-Soc--Interview-Prep.mdx index 7a00e99..a351100 100644 --- a/scripts/mdx-scripts/CSC-x-SE-Soc--Interview-Prep.mdx +++ b/scripts/mdx-scripts/CSC-x-SE-Soc--Interview-Prep.mdx @@ -1,10 +1,10 @@ export const metadata = { name: "CSC x SE Soc: Interview Prep", short: "CSC and SE Soc are hosting an Interview Prep Workshop next week! Join Kristy Gao and Bimesh De Silva as they review the interview process, from behavioural to technical interviews. They'll finish off with live mock interviews, and the event will be held on Twitch (https://www.twitch.tv/uwcsclub).", - date: "Mon May 24 2021 19:00:00 GMT-0500 (Central Daylight Time)", - online: TODO FIX THIS, + date: "Mon May 24 2021 20:00:00 GMT-0500 (Central Daylight Time)", + online: true, location: "Online", - registerLink: TODO FIX THIS, + registerLink: "http://bit.ly/csc-sesoc-interview-prep-signup" } Browsing through your unsolved Leetcode problems? Flipping open CTCI for the first time? Have no clue what to expect from a technical interview or just need an interview refresher? @@ -13,7 +13,7 @@ We've got you covered at our CSC x SE Soc Interview Prep Workshop this Monday, M Registration isn't required, we'll just be sending you an email reminder, as well as inviting you to our calendar event! -The event will be hosted on Twitch at [https://www.twitch.tv/uwcsclub]() +The event will be hosted on Twitch at [http://bit.ly/csc-sesoc-interview-prep-signup]() -Register at [http://bit.ly/csc-sesoc-interview-prep-signup]()! +Register at! diff --git a/scripts/mdx-scripts/event-conversion.js b/scripts/mdx-scripts/event-conversion.js index 0e34107..76e0f46 100644 --- a/scripts/mdx-scripts/event-conversion.js +++ b/scripts/mdx-scripts/event-conversion.js @@ -19,6 +19,29 @@ fs.readFile("./event-test.xml", "utf8", (err, data) => { parseXML(data); }); +const parseTime = (dateStr, timeStr) => { + if (/-/.exec(timeStr)) { + console.error(`${timeStr} has date a range`); + return; + } + // converting cases like 7pm to 7PM + timeStr = timeStr.toUpperCase(); + // converting cases like 7PM to 7 PM + if (/[0-9](a|A|p|P)/g.exec(timeStr)) { + timeStr = timeStr.replace(/[0-9](?=(a|A|p|P))/g, "$& "); + } + // converting cases like 7 PM to 7:00 PM + if (/(? { const js = xmlJs.xml2js(XML); @@ -30,16 +53,25 @@ const parseXML = (XML) => { short = short.replace(/\n+$/, ""); const dateStr = js.elements[0].elements[i].attributes.date; const timeStr = js.elements[0].elements[i].attributes.time; - const date = new Date(`${dateStr} ${timeStr} EST`); // need to add EST - const room = js.elements[0].elements[i].attributes.room; - // const online - // const location - + const date = parseTime(dateStr, timeStr); + const location = js.elements[0].elements[i].attributes.room; + const online = location.toLowerCase() === "online" ? true : false; const abstract = useShowdown( xmlJs.js2xml(js.elements[0].elements[i].elements[1]) ); - const mdx = `export const metadata = {\n name: "${title}",\n short: "${short}",\n date: "${date}",\n online: TODO FIX THIS,\n location: "${room}",\n registerLink: TODO FIX THIS,\n}\n\n${abstract}`; + let registerLink = ""; + // detects a link in markdown + const markdownLinkDetectRegex = /(?<=\[(.*)\]\(<)(.*)(?=>\))/; + if (markdownLinkDetectRegex.exec(abstract)) { + registerLink = markdownLinkDetectRegex.exec(abstract)[0]; + } else { + registerLink = "no link"; + } + + console.log(registerLink); + + const mdx = `export const metadata = {\n name: "${title}",\n short: "${short}",\n date: "${date}",\n online: ${online},\n location: "${location}",\n registerLink: "${registerLink}"\n}\n\n${abstract}`; const mdxTitle = title.replace(/(\s+|:+)/g, "-"); fs.writeFile(`${mdxTitle}.mdx`, mdx, function (err) { diff --git a/scripts/mdx-scripts/event-test.xml b/scripts/mdx-scripts/event-test.xml index 7ae7c97..fb198ad 100644 --- a/scripts/mdx-scripts/event-test.xml +++ b/scripts/mdx-scripts/event-test.xml @@ -1,6 +1,6 @@ - +

    CSC and SE Soc are hosting an Interview Prep Workshop next week! Join Kristy Gao and Bimesh De Silva as they review the interview process, from behavioural to technical interviews. They'll finish off with live mock interviews, and the event will be held on Twitch (https://www.twitch.tv/uwcsclub).

    @@ -8,11 +8,11 @@

    Browsing through your unsolved Leetcode problems? Flipping open CTCI for the first time? Have no clue what to expect from a technical interview or just need an interview refresher?

    We've got you covered at our CSC x SE Soc Interview Prep Workshop this Monday, May 24th from 7:00-8:30pm ET! Live-streamed on Twitch, Kristy Gao and Bimesh De Silva will be walking through important aspects of the interview process from coding challenges to behavioural interviews to algorithmic interviews, go through some live mock interviews, and share their tips and techniques along the way!

    Registration isn't required, we'll just be sending you an email reminder, as well as inviting you to our calendar event!

    -

    The event will be hosted on Twitch at https://www.twitch.tv/uwcsclub

    -

    Register at http://bit.ly/csc-sesoc-interview-prep-signup!

    +

    The event will be hosted on Twitch at http://bit.ly/csc-sesoc-interview-prep-signup

    +

    Register at!

    - +

    Learn about our plans for the term and play some games with us. @@ -21,7 +21,7 @@

    Kick off your Spring term with CSC! Come join us on Discord to learn more about what we'll be up to this term and how you can participate!

    Afterwards, stick around for a relaxing and fun game night. See you there!

    -

    Here, I am also testing with

    +

    Here, I am also testing with

    Many headings, as well as bold text and italics

    More headings

      diff --git a/scripts/mdx-scripts/package-lock.json b/scripts/mdx-scripts/package-lock.json index 8738c9c..63eb740 100644 --- a/scripts/mdx-scripts/package-lock.json +++ b/scripts/mdx-scripts/package-lock.json @@ -5,8 +5,6 @@ "packages": { "": { "dependencies": { - "breakdance": "^3.0.1", - "cheerio": "^0.22.0", "showdown": "^1.9.1", "xml-js": "^1.6.11" } @@ -30,148 +28,6 @@ "node": ">=4" } }, - "node_modules/atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "bin": { - "atob": "bin/atob.js" - }, - "engines": { - "node": ">= 4.5.0" - } - }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" - }, - "node_modules/breakdance": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/breakdance/-/breakdance-3.0.1.tgz", - "integrity": "sha1-R1qYnIOJ9SKHaJC6FPOXrfsOMYQ=", - "dependencies": { - "breakdance-util": "^0.1.5", - "cheerio": "^0.22.0", - "condense-newlines": "^0.2.1", - "define-property": "^1.0.0", - "detect-indent": "^5.0.0", - "export-files": "^2.1.1", - "extend-shallow": "^2.0.1", - "is-self-closing": "^1.0.0", - "isobject": "^3.0.0", - "mixin-deep": "^1.2.0", - "repeat-string": "^1.6.1", - "snapdragon": "^0.11.0", - "snapdragon-cheerio": "^1.1.0", - "snapdragon-node": "^1.0.6", - "snapdragon-util": "^2.1.1", - "strip-attributes": "^0.2.0", - "trim-leading-lines": "^0.1.1", - "trim-trailing-lines": "^1.1.0", - "unescape": "^0.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/breakdance-util": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/breakdance-util/-/breakdance-util-0.1.5.tgz", - "integrity": "sha1-x2u5K6wl+U0q25Dq07PlQUBGa5g=", - "dependencies": { - "diacritics-map": "^0.1.0", - "get-value": "^2.0.6", - "is-self-closing": "^1.0.0", - "kind-of": "^3.1.0", - "snapdragon-util": "^1.0.6", - "strip-color": "^0.1.0", - "typeof-article": "^0.1.1", - "word-regex": "^0.1.1" - }, - "engines": { - "node": ">=4.7" - } - }, - "node_modules/breakdance-util/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/breakdance-util/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/breakdance-util/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/breakdance-util/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/breakdance-util/node_modules/is-descriptor/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/breakdance-util/node_modules/lazy-cache": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", - "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", - "dependencies": { - "set-getter": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/breakdance-util/node_modules/snapdragon-util": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-1.0.6.tgz", - "integrity": "sha1-iz0tbeyJMMkOBUugUuViyhs6Yh4=", - "dependencies": { - "define-property": "^0.2.5", - "kind-of": "^3.1.0", - "lazy-cache": "^2.0.2", - "snapdragon-node": "^1.0.6" - }, - "engines": { - "node": ">=4.7" - } - }, "node_modules/camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -180,32 +36,6 @@ "node": ">=6" } }, - "node_modules/cheerio": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz", - "integrity": "sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=", - "dependencies": { - "css-select": "~1.2.0", - "dom-serializer": "~0.1.0", - "entities": "~1.1.1", - "htmlparser2": "^3.9.1", - "lodash.assignin": "^4.0.9", - "lodash.bind": "^4.1.4", - "lodash.defaults": "^4.0.1", - "lodash.filter": "^4.4.0", - "lodash.flatten": "^4.2.0", - "lodash.foreach": "^4.3.0", - "lodash.map": "^4.4.0", - "lodash.merge": "^4.4.0", - "lodash.pick": "^4.2.1", - "lodash.reduce": "^4.4.0", - "lodash.reject": "^4.4.0", - "lodash.some": "^4.4.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/cliui": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", @@ -229,51 +59,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, - "node_modules/component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" - }, - "node_modules/condense-newlines": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/condense-newlines/-/condense-newlines-0.2.1.tgz", - "integrity": "sha1-PemFVTE5R10yUCyDsC9gaE0kxV8=", - "dependencies": { - "extend-shallow": "^2.0.1", - "is-whitespace": "^0.3.0", - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/css-select": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", - "dependencies": { - "boolbase": "~1.0.0", - "css-what": "2.1", - "domutils": "1.5.1", - "nth-check": "~1.0.1" - } - }, - "node_modules/css-what": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", - "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==", - "engines": { - "node": "*" - } - }, - "node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, "node_modules/decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", @@ -282,104 +67,11 @@ "node": ">=0.10.0" } }, - "node_modules/decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "engines": { - "node": ">=0.10" - } - }, - "node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/detect-indent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", - "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", - "engines": { - "node": ">=4" - } - }, - "node_modules/diacritics-map": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/diacritics-map/-/diacritics-map-0.1.0.tgz", - "integrity": "sha1-bfwP+dAQAKLt8oZTccrDFulJd68=", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/dom-serializer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", - "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", - "dependencies": { - "domelementtype": "^1.3.0", - "entities": "^1.1.1" - } - }, - "node_modules/domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" - }, - "node_modules/domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", - "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", - "dependencies": { - "domelementtype": "1" - } - }, - "node_modules/domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "dependencies": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, "node_modules/emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" }, - "node_modules/entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" - }, - "node_modules/export-files": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/export-files/-/export-files-2.1.1.tgz", - "integrity": "sha1-u/ZFdAU6CeTrmOX0NQHVcrLDzn8=", - "dependencies": { - "lazy-cache": "^1.0.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", @@ -391,25 +83,6 @@ "node": ">=6" } }, - "node_modules/for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "dependencies": { - "for-in": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -418,104 +91,6 @@ "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/htmlparser2": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", - "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", - "dependencies": { - "domelementtype": "^1.3.1", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.1.1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - }, - "node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-descriptor/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", @@ -524,63 +99,6 @@ "node": ">=4" } }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-self-closing": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-self-closing/-/is-self-closing-1.0.1.tgz", - "integrity": "sha512-E+60FomW7Blv5GXTlYee2KDrnG6srxF7Xt1SjrhWUGUEsTFIqY/nq2y3DaftCsgUMdh89V07IVfhY9KIJhLezg==", - "dependencies": { - "self-closing-tags": "^1.0.1" - }, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-whitespace": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/is-whitespace/-/is-whitespace-0.3.0.tgz", - "integrity": "sha1-Fjnssb4DauxppUy7QBz77XEUq38=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", @@ -593,133 +111,6 @@ "node": ">=6" } }, - "node_modules/lodash.assignin": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz", - "integrity": "sha1-uo31+4QesKPoBEIysOJjqNxqKKI=" - }, - "node_modules/lodash.bind": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-4.2.1.tgz", - "integrity": "sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=" - }, - "node_modules/lodash.defaults": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", - "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=" - }, - "node_modules/lodash.filter": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz", - "integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=" - }, - "node_modules/lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" - }, - "node_modules/lodash.foreach": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz", - "integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=" - }, - "node_modules/lodash.map": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", - "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=" - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" - }, - "node_modules/lodash.pick": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", - "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=" - }, - "node_modules/lodash.reduce": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz", - "integrity": "sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs=" - }, - "node_modules/lodash.reject": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.reject/-/lodash.reject-4.6.0.tgz", - "integrity": "sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU=" - }, - "node_modules/lodash.some": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz", - "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" - }, - "node_modules/map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", - "dependencies": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/mixin-deep/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "node_modules/nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", - "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", - "dependencies": { - "boolbase": "~1.0.0" - } - }, - "node_modules/object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "dependencies": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -761,27 +152,6 @@ "node": ">=4" } }, - "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "engines": { - "node": ">=0.10" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -795,60 +165,16 @@ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" }, - "node_modules/resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "deprecated": "https://github.com/lydell/resolve-url#deprecated" - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, - "node_modules/self-closing-tags": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/self-closing-tags/-/self-closing-tags-1.0.1.tgz", - "integrity": "sha512-7t6hNbYMxM+VHXTgJmxwgZgLGktuXtVVD5AivWzNTdJBM4DBjnDKDzkf2SrNjihaArpeJYNjxkELBu1evI4lQA==", - "engines": { - "node": ">=0.12.0" - } - }, "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, - "node_modules/set-getter": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.0.tgz", - "integrity": "sha1-12nBgsnVpR9AkUXy+6guXoboA3Y=", - "dependencies": { - "to-object-path": "^0.3.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/showdown": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/showdown/-/showdown-1.9.1.tgz", @@ -860,289 +186,6 @@ "showdown": "bin/showdown.js" } }, - "node_modules/snapdragon": { - "version": "0.11.5", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.11.5.tgz", - "integrity": "sha512-iC2oF+H+TjiZN4a7I5HNUH8imAFT9z3GydV8X5ZFLcBiDYROWNeqI34BHArXTVO/RGs88STtAtiMP3tCiNdUYg==", - "dependencies": { - "component-emitter": "^1.2.1", - "debug": "^2.6.2", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "get-value": "^2.0.6", - "isobject": "^3.0.0", - "map-cache": "^0.2.2", - "snapdragon-node": "^1.0.6", - "snapdragon-util": "^2.1.1", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-cheerio": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/snapdragon-cheerio/-/snapdragon-cheerio-1.1.0.tgz", - "integrity": "sha1-FvO9P6FhX4XF+CZQTFu0Bs00Drc=", - "dependencies": { - "cheerio": "^0.22.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "is-self-closing": "^1.0.0", - "snapdragon-node": "^1.0.6", - "snapdragon-util": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/snapdragon-cheerio/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-cheerio/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-cheerio/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-cheerio/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-cheerio/node_modules/is-descriptor/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-1.0.6.tgz", - "integrity": "sha1-JEjV72/qf16P1TJqChFIVNonE1Y=", - "dependencies": { - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "lazy-cache": "^2.0.2", - "snapdragon-util": "^1.0.3" - }, - "engines": { - "node": ">=4.7" - } - }, - "node_modules/snapdragon-node/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node/node_modules/is-descriptor/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node/node_modules/lazy-cache": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", - "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", - "dependencies": { - "set-getter": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node/node_modules/snapdragon-util": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-1.0.6.tgz", - "integrity": "sha1-iz0tbeyJMMkOBUugUuViyhs6Yh4=", - "dependencies": { - "define-property": "^0.2.5", - "kind-of": "^3.1.0", - "lazy-cache": "^2.0.2", - "snapdragon-node": "^1.0.6" - }, - "engines": { - "node": ">=4.7" - } - }, - "node_modules/snapdragon-util": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-2.1.1.tgz", - "integrity": "sha1-VSd534oUk6DnjAbMgJU6JidwlXo=", - "dependencies": { - "kind-of": "^3.1.0" - }, - "engines": { - "node": ">=4.7" - } - }, - "node_modules/snapdragon/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-descriptor/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "dependencies": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "node_modules/source-map-url": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", - "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==" - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, "node_modules/string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", @@ -1167,111 +210,11 @@ "node": ">=6" } }, - "node_modules/strip-attributes": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/strip-attributes/-/strip-attributes-0.2.0.tgz", - "integrity": "sha1-MLoifGq/Y1alGytoYmx5XxkoCUU=", - "dependencies": { - "cheerio": "^0.22.0", - "extend-shallow": "^2.0.1", - "isobject": "^3.0.0", - "object.omit": "^2.0.1", - "object.pick": "^1.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-color": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/strip-color/-/strip-color-0.1.0.tgz", - "integrity": "sha1-EG9l09PmotlAHKwOsM6LinArT3s=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/trim-leading-lines": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/trim-leading-lines/-/trim-leading-lines-0.1.1.tgz", - "integrity": "sha1-DnysPoMELc+Vp07TaWbxd0TVwWk=", - "dependencies": { - "is-whitespace": "^0.3.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/trim-trailing-lines": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.4.tgz", - "integrity": "sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/typeof-article": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/typeof-article/-/typeof-article-0.1.1.tgz", - "integrity": "sha1-nwfnM8P7tkb/qeYcCN66zUYOBq8=", - "dependencies": { - "kind-of": "^3.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/unescape": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/unescape/-/unescape-0.2.0.tgz", - "integrity": "sha1-t4ubYMhvFinfGBv1Pu47yNY2fd8=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "deprecated": "Please see https://github.com/lydell/urix#deprecated" - }, - "node_modules/use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, "node_modules/which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, - "node_modules/word-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/word-regex/-/word-regex-0.1.2.tgz", - "integrity": "sha1-o7x/LSIs5Kk8JGw+9pRY9h9RFjk=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/wrap-ansi": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", @@ -1343,147 +286,11 @@ "color-convert": "^1.9.0" } }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" - }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" - }, - "breakdance": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/breakdance/-/breakdance-3.0.1.tgz", - "integrity": "sha1-R1qYnIOJ9SKHaJC6FPOXrfsOMYQ=", - "requires": { - "breakdance-util": "^0.1.5", - "cheerio": "^0.22.0", - "condense-newlines": "^0.2.1", - "define-property": "^1.0.0", - "detect-indent": "^5.0.0", - "export-files": "^2.1.1", - "extend-shallow": "^2.0.1", - "is-self-closing": "^1.0.0", - "isobject": "^3.0.0", - "mixin-deep": "^1.2.0", - "repeat-string": "^1.6.1", - "snapdragon": "^0.11.0", - "snapdragon-cheerio": "^1.1.0", - "snapdragon-node": "^1.0.6", - "snapdragon-util": "^2.1.1", - "strip-attributes": "^0.2.0", - "trim-leading-lines": "^0.1.1", - "trim-trailing-lines": "^1.1.0", - "unescape": "^0.2.0" - } - }, - "breakdance-util": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/breakdance-util/-/breakdance-util-0.1.5.tgz", - "integrity": "sha1-x2u5K6wl+U0q25Dq07PlQUBGa5g=", - "requires": { - "diacritics-map": "^0.1.0", - "get-value": "^2.0.6", - "is-self-closing": "^1.0.0", - "kind-of": "^3.1.0", - "snapdragon-util": "^1.0.6", - "strip-color": "^0.1.0", - "typeof-article": "^0.1.1", - "word-regex": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - }, - "lazy-cache": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", - "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", - "requires": { - "set-getter": "^0.1.0" - } - }, - "snapdragon-util": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-1.0.6.tgz", - "integrity": "sha1-iz0tbeyJMMkOBUugUuViyhs6Yh4=", - "requires": { - "define-property": "^0.2.5", - "kind-of": "^3.1.0", - "lazy-cache": "^2.0.2", - "snapdragon-node": "^1.0.6" - } - } - } - }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" }, - "cheerio": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz", - "integrity": "sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=", - "requires": { - "css-select": "~1.2.0", - "dom-serializer": "~0.1.0", - "entities": "~1.1.1", - "htmlparser2": "^3.9.1", - "lodash.assignin": "^4.0.9", - "lodash.bind": "^4.1.4", - "lodash.defaults": "^4.0.1", - "lodash.filter": "^4.4.0", - "lodash.flatten": "^4.2.0", - "lodash.foreach": "^4.3.0", - "lodash.map": "^4.4.0", - "lodash.merge": "^4.4.0", - "lodash.pick": "^4.2.1", - "lodash.reduce": "^4.4.0", - "lodash.reject": "^4.4.0", - "lodash.some": "^4.4.0" - } - }, "cliui": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", @@ -1507,130 +314,16 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" - }, - "condense-newlines": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/condense-newlines/-/condense-newlines-0.2.1.tgz", - "integrity": "sha1-PemFVTE5R10yUCyDsC9gaE0kxV8=", - "requires": { - "extend-shallow": "^2.0.1", - "is-whitespace": "^0.3.0", - "kind-of": "^3.0.2" - } - }, - "css-select": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", - "requires": { - "boolbase": "~1.0.0", - "css-what": "2.1", - "domutils": "1.5.1", - "nth-check": "~1.0.1" - } - }, - "css-what": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", - "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==" - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" - }, - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "detect-indent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", - "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=" - }, - "diacritics-map": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/diacritics-map/-/diacritics-map-0.1.0.tgz", - "integrity": "sha1-bfwP+dAQAKLt8oZTccrDFulJd68=" - }, - "dom-serializer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", - "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", - "requires": { - "domelementtype": "^1.3.0", - "entities": "^1.1.1" - } - }, - "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" - }, - "domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", - "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" }, - "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" - }, - "export-files": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/export-files/-/export-files-2.1.1.tgz", - "integrity": "sha1-u/ZFdAU6CeTrmOX0NQHVcrLDzn8=", - "requires": { - "lazy-cache": "^1.0.3" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - }, "find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", @@ -1639,148 +332,16 @@ "locate-path": "^3.0.0" } }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" - }, - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "requires": { - "for-in": "^1.0.1" - } - }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" - }, - "htmlparser2": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", - "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", - "requires": { - "domelementtype": "^1.3.1", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.1.1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "requires": { - "kind-of": "^6.0.0" - }, - "dependencies": { - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" - } - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "requires": { - "kind-of": "^6.0.0" - }, - "dependencies": { - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" - } - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" - } - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" - }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "requires": { - "isobject": "^3.0.1" - } - }, - "is-self-closing": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-self-closing/-/is-self-closing-1.0.1.tgz", - "integrity": "sha512-E+60FomW7Blv5GXTlYee2KDrnG6srxF7Xt1SjrhWUGUEsTFIqY/nq2y3DaftCsgUMdh89V07IVfhY9KIJhLezg==", - "requires": { - "self-closing-tags": "^1.0.1" - } - }, - "is-whitespace": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/is-whitespace/-/is-whitespace-0.3.0.tgz", - "integrity": "sha1-Fjnssb4DauxppUy7QBz77XEUq38=" - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" - }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", @@ -1790,120 +351,6 @@ "path-exists": "^3.0.0" } }, - "lodash.assignin": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz", - "integrity": "sha1-uo31+4QesKPoBEIysOJjqNxqKKI=" - }, - "lodash.bind": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-4.2.1.tgz", - "integrity": "sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=" - }, - "lodash.defaults": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", - "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=" - }, - "lodash.filter": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz", - "integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=" - }, - "lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" - }, - "lodash.foreach": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz", - "integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=" - }, - "lodash.map": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", - "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=" - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" - }, - "lodash.pick": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", - "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=" - }, - "lodash.reduce": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz", - "integrity": "sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs=" - }, - "lodash.reject": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.reject/-/lodash.reject-4.6.0.tgz", - "integrity": "sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU=" - }, - "lodash.some": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz", - "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" - }, - "mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", - "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", - "requires": { - "boolbase": "~1.0.0" - } - }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "requires": { - "isobject": "^3.0.1" - } - }, "p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -1930,21 +377,6 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -1955,39 +387,16 @@ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, - "self-closing-tags": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/self-closing-tags/-/self-closing-tags-1.0.1.tgz", - "integrity": "sha512-7t6hNbYMxM+VHXTgJmxwgZgLGktuXtVVD5AivWzNTdJBM4DBjnDKDzkf2SrNjihaArpeJYNjxkELBu1evI4lQA==" - }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, - "set-getter": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.0.tgz", - "integrity": "sha1-12nBgsnVpR9AkUXy+6guXoboA3Y=", - "requires": { - "to-object-path": "^0.3.0" - } - }, "showdown": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/showdown/-/showdown-1.9.1.tgz", @@ -1996,235 +405,6 @@ "yargs": "^14.2" } }, - "snapdragon": { - "version": "0.11.5", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.11.5.tgz", - "integrity": "sha512-iC2oF+H+TjiZN4a7I5HNUH8imAFT9z3GydV8X5ZFLcBiDYROWNeqI34BHArXTVO/RGs88STtAtiMP3tCiNdUYg==", - "requires": { - "component-emitter": "^1.2.1", - "debug": "^2.6.2", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "get-value": "^2.0.6", - "isobject": "^3.0.0", - "map-cache": "^0.2.2", - "snapdragon-node": "^1.0.6", - "snapdragon-util": "^2.1.1", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - } - } - }, - "snapdragon-cheerio": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/snapdragon-cheerio/-/snapdragon-cheerio-1.1.0.tgz", - "integrity": "sha1-FvO9P6FhX4XF+CZQTFu0Bs00Drc=", - "requires": { - "cheerio": "^0.22.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "is-self-closing": "^1.0.0", - "snapdragon-node": "^1.0.6", - "snapdragon-util": "^2.0.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - } - } - }, - "snapdragon-node": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-1.0.6.tgz", - "integrity": "sha1-JEjV72/qf16P1TJqChFIVNonE1Y=", - "requires": { - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "lazy-cache": "^2.0.2", - "snapdragon-util": "^1.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - }, - "lazy-cache": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", - "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", - "requires": { - "set-getter": "^0.1.0" - } - }, - "snapdragon-util": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-1.0.6.tgz", - "integrity": "sha1-iz0tbeyJMMkOBUugUuViyhs6Yh4=", - "requires": { - "define-property": "^0.2.5", - "kind-of": "^3.1.0", - "lazy-cache": "^2.0.2", - "snapdragon-node": "^1.0.6" - } - } - } - }, - "snapdragon-util": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-2.1.1.tgz", - "integrity": "sha1-VSd534oUk6DnjAbMgJU6JidwlXo=", - "requires": { - "kind-of": "^3.1.0" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" - }, - "source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-url": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", - "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==" - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "requires": { - "safe-buffer": "~5.2.0" - } - }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", @@ -2243,82 +423,11 @@ "ansi-regex": "^4.1.0" } }, - "strip-attributes": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/strip-attributes/-/strip-attributes-0.2.0.tgz", - "integrity": "sha1-MLoifGq/Y1alGytoYmx5XxkoCUU=", - "requires": { - "cheerio": "^0.22.0", - "extend-shallow": "^2.0.1", - "isobject": "^3.0.0", - "object.omit": "^2.0.1", - "object.pick": "^1.2.0" - } - }, - "strip-color": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/strip-color/-/strip-color-0.1.0.tgz", - "integrity": "sha1-EG9l09PmotlAHKwOsM6LinArT3s=" - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "requires": { - "kind-of": "^3.0.2" - } - }, - "trim-leading-lines": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/trim-leading-lines/-/trim-leading-lines-0.1.1.tgz", - "integrity": "sha1-DnysPoMELc+Vp07TaWbxd0TVwWk=", - "requires": { - "is-whitespace": "^0.3.0" - } - }, - "trim-trailing-lines": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.4.tgz", - "integrity": "sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ==" - }, - "typeof-article": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/typeof-article/-/typeof-article-0.1.1.tgz", - "integrity": "sha1-nwfnM8P7tkb/qeYcCN66zUYOBq8=", - "requires": { - "kind-of": "^3.1.0" - } - }, - "unescape": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/unescape/-/unescape-0.2.0.tgz", - "integrity": "sha1-t4ubYMhvFinfGBv1Pu47yNY2fd8=" - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, - "word-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/word-regex/-/word-regex-0.1.2.tgz", - "integrity": "sha1-o7x/LSIs5Kk8JGw+9pRY9h9RFjk=" - }, "wrap-ansi": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", diff --git a/scripts/mdx-scripts/package.json b/scripts/mdx-scripts/package.json index a76ff11..0ec7dcf 100644 --- a/scripts/mdx-scripts/package.json +++ b/scripts/mdx-scripts/package.json @@ -1,7 +1,5 @@ { "dependencies": { - "breakdance": "^3.0.1", - "cheerio": "^0.22.0", "showdown": "^1.9.1", "xml-js": "^1.6.11" } diff --git a/scripts/mdx-scripts/parseTime.js b/scripts/mdx-scripts/parseTime.js new file mode 100644 index 0000000..57e34e7 --- /dev/null +++ b/scripts/mdx-scripts/parseTime.js @@ -0,0 +1,20 @@ +const parseTime = (dateStr, timeStr) => { + if (/-/.exec(timeStr)) { + console.error(`${timeStr} has date a range`); + return; + } + + timeStr = timeStr.toUpperCase() // converting cases like 7PM to 7PM + if (/[0-9](a|A|p|P)/g.exec(timeStr)) { // converting cases like 7PM to 7 PM + timeStr = timeStr.replace(/[0-9](?=(a|A|p|P))/g, "$& "); + } + if (/(? Date: Sun, 13 Jun 2021 12:52:06 -0500 Subject: [PATCH 09/41] Add events to a folder --- scripts/mdx-scripts/event-conversion.js | 6 ++---- .../{ => markdown-events}/CSC-BOT-&-Game-Night.mdx | 0 .../{ => markdown-events}/CSC-x-SE-Soc--Interview-Prep.mdx | 0 3 files changed, 2 insertions(+), 4 deletions(-) rename scripts/mdx-scripts/{ => markdown-events}/CSC-BOT-&-Game-Night.mdx (100%) rename scripts/mdx-scripts/{ => markdown-events}/CSC-x-SE-Soc--Interview-Prep.mdx (100%) diff --git a/scripts/mdx-scripts/event-conversion.js b/scripts/mdx-scripts/event-conversion.js index 76e0f46..c31dd2d 100644 --- a/scripts/mdx-scripts/event-conversion.js +++ b/scripts/mdx-scripts/event-conversion.js @@ -50,6 +50,7 @@ const parseXML = (XML) => { let short = useShowdown( xmlJs.js2xml(js.elements[0].elements[i].elements[0]) ); + // remove trailing newlines from short short = short.replace(/\n+$/, ""); const dateStr = js.elements[0].elements[i].attributes.date; const timeStr = js.elements[0].elements[i].attributes.time; @@ -59,7 +60,6 @@ const parseXML = (XML) => { const abstract = useShowdown( xmlJs.js2xml(js.elements[0].elements[i].elements[1]) ); - let registerLink = ""; // detects a link in markdown const markdownLinkDetectRegex = /(?<=\[(.*)\]\(<)(.*)(?=>\))/; @@ -69,12 +69,10 @@ const parseXML = (XML) => { registerLink = "no link"; } - console.log(registerLink); - const mdx = `export const metadata = {\n name: "${title}",\n short: "${short}",\n date: "${date}",\n online: ${online},\n location: "${location}",\n registerLink: "${registerLink}"\n}\n\n${abstract}`; const mdxTitle = title.replace(/(\s+|:+)/g, "-"); - fs.writeFile(`${mdxTitle}.mdx`, mdx, function (err) { + fs.writeFile(`./markdown-events/${mdxTitle}.mdx`, mdx, function (err) { if (err) return console.log(err); }); } diff --git a/scripts/mdx-scripts/CSC-BOT-&-Game-Night.mdx b/scripts/mdx-scripts/markdown-events/CSC-BOT-&-Game-Night.mdx similarity index 100% rename from scripts/mdx-scripts/CSC-BOT-&-Game-Night.mdx rename to scripts/mdx-scripts/markdown-events/CSC-BOT-&-Game-Night.mdx diff --git a/scripts/mdx-scripts/CSC-x-SE-Soc--Interview-Prep.mdx b/scripts/mdx-scripts/markdown-events/CSC-x-SE-Soc--Interview-Prep.mdx similarity index 100% rename from scripts/mdx-scripts/CSC-x-SE-Soc--Interview-Prep.mdx rename to scripts/mdx-scripts/markdown-events/CSC-x-SE-Soc--Interview-Prep.mdx -- 2.39.2 From 31a3a21dbce72a4c9dcc4ca2a4bceadf0b8e5ad7 Mon Sep 17 00:00:00 2001 From: Jared He <66887902+jaredjhe@users.noreply.github.com> Date: Sun, 13 Jun 2021 12:58:26 -0500 Subject: [PATCH 10/41] Removed markdown-events directory --- .../markdown-events/CSC-BOT-&-Game-Night.mdx | 31 ------------------- .../CSC-x-SE-Soc--Interview-Prep.mdx | 19 ------------ 2 files changed, 50 deletions(-) delete mode 100644 scripts/mdx-scripts/markdown-events/CSC-BOT-&-Game-Night.mdx delete mode 100644 scripts/mdx-scripts/markdown-events/CSC-x-SE-Soc--Interview-Prep.mdx diff --git a/scripts/mdx-scripts/markdown-events/CSC-BOT-&-Game-Night.mdx b/scripts/mdx-scripts/markdown-events/CSC-BOT-&-Game-Night.mdx deleted file mode 100644 index 115b255..0000000 --- a/scripts/mdx-scripts/markdown-events/CSC-BOT-&-Game-Night.mdx +++ /dev/null @@ -1,31 +0,0 @@ -export const metadata = { - name: "CSC BOT & Game Night", - short: "Learn about our plans for the term and play some games with us.", - date: "Mon May 17 2021 21:00:00 GMT-0500 (Central Daylight Time)", - online: false, - location: "DC", - registerLink: "no link" -} - -Kick off your Spring term with CSC! Come join us on Discord to learn more about what we'll be up to this term and how you can participate! - -Afterwards, stick around for a relaxing and fun game night. See you there! - -# Here, I am also testing with - -## Many headings, as well as **bold text** and *italics* - -#### More headings - -- One -- Unordered -- List - - - -1. One -2. Ordered -3. List - - - diff --git a/scripts/mdx-scripts/markdown-events/CSC-x-SE-Soc--Interview-Prep.mdx b/scripts/mdx-scripts/markdown-events/CSC-x-SE-Soc--Interview-Prep.mdx deleted file mode 100644 index a351100..0000000 --- a/scripts/mdx-scripts/markdown-events/CSC-x-SE-Soc--Interview-Prep.mdx +++ /dev/null @@ -1,19 +0,0 @@ -export const metadata = { - name: "CSC x SE Soc: Interview Prep", - short: "CSC and SE Soc are hosting an Interview Prep Workshop next week! Join Kristy Gao and Bimesh De Silva as they review the interview process, from behavioural to technical interviews. They'll finish off with live mock interviews, and the event will be held on Twitch (https://www.twitch.tv/uwcsclub).", - date: "Mon May 24 2021 20:00:00 GMT-0500 (Central Daylight Time)", - online: true, - location: "Online", - registerLink: "http://bit.ly/csc-sesoc-interview-prep-signup" -} - -Browsing through your unsolved Leetcode problems? Flipping open CTCI for the first time? Have no clue what to expect from a technical interview or just need an interview refresher? - -We've got you covered at our CSC x SE Soc Interview Prep Workshop this Monday, May 24th from 7:00-8:30pm ET! Live-streamed on Twitch, Kristy Gao and Bimesh De Silva will be walking through important aspects of the interview process from coding challenges to behavioural interviews to algorithmic interviews, go through some live mock interviews, and share their tips and techniques along the way! - -Registration isn't required, we'll just be sending you an email reminder, as well as inviting you to our calendar event! - -The event will be hosted on Twitch at [http://bit.ly/csc-sesoc-interview-prep-signup]() - -Register at! - -- 2.39.2 From 8b684b12366b9baa4d0bb1b4c76e5115c598f681 Mon Sep 17 00:00:00 2001 From: Jared He <66887902+jaredjhe@users.noreply.github.com> Date: Sun, 13 Jun 2021 20:28:12 -0500 Subject: [PATCH 11/41] Fix filenames, commented out events --- scripts/mdx-scripts/event-conversion.js | 104 +- scripts/mdx-scripts/event-test.xml | 39 - scripts/mdx-scripts/events-test.xml | 76 + scripts/mdx-scripts/events.xml | 11316 ++++++++++++++++++++++ 4 files changed, 11460 insertions(+), 75 deletions(-) delete mode 100644 scripts/mdx-scripts/event-test.xml create mode 100644 scripts/mdx-scripts/events-test.xml create mode 100644 scripts/mdx-scripts/events.xml diff --git a/scripts/mdx-scripts/event-conversion.js b/scripts/mdx-scripts/event-conversion.js index c31dd2d..bc59495 100644 --- a/scripts/mdx-scripts/event-conversion.js +++ b/scripts/mdx-scripts/event-conversion.js @@ -7,11 +7,7 @@ var showdown = require("showdown"); const converterShowdown = new showdown.Converter(); const xmlJs = require("xml-js"); -const useShowdown = (HTML) => { - return converterShowdown.makeMarkdown(HTML); -}; - -fs.readFile("./event-test.xml", "utf8", (err, data) => { +fs.readFile("./events.xml", "utf8", (err, data) => { if (err) { console.error(err); return; @@ -19,9 +15,13 @@ fs.readFile("./event-test.xml", "utf8", (err, data) => { parseXML(data); }); -const parseTime = (dateStr, timeStr) => { +fs.mkdir("./markdown-events/", { recursive: true }, (err) => { + if (err) throw err; +}); + +const parseTime = (dateStr, timeStr, title, currentTerm) => { if (/-/.exec(timeStr)) { - console.error(`${timeStr} has date a range`); + console.error(`${title}, ${currentTerm} has a date range: ${timeStr}`); return; } // converting cases like 7pm to 7PM @@ -44,36 +44,68 @@ const parseTime = (dateStr, timeStr) => { const parseXML = (XML) => { const js = xmlJs.xml2js(XML); - + let currentTerm = ""; for (let i = 0; i < js.elements[0].elements.length; ++i) { - const title = js.elements[0].elements[i].attributes.title; - let short = useShowdown( - xmlJs.js2xml(js.elements[0].elements[i].elements[0]) - ); - // remove trailing newlines from short - short = short.replace(/\n+$/, ""); - const dateStr = js.elements[0].elements[i].attributes.date; - const timeStr = js.elements[0].elements[i].attributes.time; - const date = parseTime(dateStr, timeStr); - const location = js.elements[0].elements[i].attributes.room; - const online = location.toLowerCase() === "online" ? true : false; - const abstract = useShowdown( - xmlJs.js2xml(js.elements[0].elements[i].elements[1]) - ); - let registerLink = ""; - // detects a link in markdown - const markdownLinkDetectRegex = /(?<=\[(.*)\]\(<)(.*)(?=>\))/; - if (markdownLinkDetectRegex.exec(abstract)) { - registerLink = markdownLinkDetectRegex.exec(abstract)[0]; - } else { - registerLink = "no link"; + if (js.elements[0].elements[i].type === "comment") { + // sometimes there's events that are commented out, hopefully this catches that + if ( + /(winter)|(fall)|(spring)/.exec( + js.elements[0].elements[i].comment.toLowerCase() + ) + ) { + currentTerm = js.elements[0].elements[i].comment.replace( + /(\s+|:+)/g, + "-" + ); + } + } else if (js.elements[0].elements[i].type === "element") { + const title = js.elements[0].elements[i].attributes.title; + let short = converterShowdown.makeMarkdown( + xmlJs.js2xml(js.elements[0].elements[i].elements[0]) + ); + // remove newlines from short + short = short.replace(/\n/g, ""); + const dateStr = js.elements[0].elements[i].attributes.date; + const timeStr = js.elements[0].elements[i].attributes.time; + const date = parseTime(dateStr, timeStr, title, currentTerm); + const location = js.elements[0].elements[i].attributes.room; + const online = location.toLowerCase() === "online" ? true : false; + let abstract = "undefined"; + if (js.elements[0].elements[i].elements[1] === undefined) { + console.error(`${title}, ${currentTerm} has no abstract`); + } else { + abstract = converterShowdown.makeMarkdown( + xmlJs.js2xml(js.elements[0].elements[i].elements[1]) + ); + } + let registerLink = ""; + // detects a link in markdown such as [CSC Club Website]() + const markdownLinkDetectRegex = /(?<=\[(.*)\]\(<)(.*)(?=>\))/; + if (markdownLinkDetectRegex.exec(abstract)) { + registerLink = markdownLinkDetectRegex.exec(abstract)[0]; + } else { + registerLink = "no link"; + } + + const mdx = `export const metadata = {\n name: "${title}",\n short: "${short}",\n date: "${date}",\n online: ${online},\n location: "${location}",\n registerLink: "${registerLink}"\n}\n\n${abstract}`; + // remove invalid characters from filenames + let mdxTitle = title.replace(/[\\\\/:*?\"<>|]/g, ""); + mdxTitle = mdxTitle.replace(/(\s+)/g, "-"); + + fs.mkdir( + `./markdown-events/${currentTerm}`, + { recursive: true }, + (err) => { + if (err) throw err; + } + ); + fs.writeFile( + `./markdown-events/${currentTerm}/${mdxTitle}.mdx`, + mdx, + (err) => { + if (err) throw err; + } + ); } - - const mdx = `export const metadata = {\n name: "${title}",\n short: "${short}",\n date: "${date}",\n online: ${online},\n location: "${location}",\n registerLink: "${registerLink}"\n}\n\n${abstract}`; - const mdxTitle = title.replace(/(\s+|:+)/g, "-"); - - fs.writeFile(`./markdown-events/${mdxTitle}.mdx`, mdx, function (err) { - if (err) return console.log(err); - }); } }; diff --git a/scripts/mdx-scripts/event-test.xml b/scripts/mdx-scripts/event-test.xml deleted file mode 100644 index fb198ad..0000000 --- a/scripts/mdx-scripts/event-test.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - -

      CSC and SE Soc are hosting an Interview Prep Workshop next week! Join Kristy Gao and Bimesh De Silva as they review the interview process, from behavioural to technical interviews. They'll finish off with live mock interviews, and the event will be held on Twitch (https://www.twitch.tv/uwcsclub).

      -
      - -

      Browsing through your unsolved Leetcode problems? Flipping open CTCI for the first time? Have no clue what to expect from a technical interview or just need an interview refresher?

      -

      We've got you covered at our CSC x SE Soc Interview Prep Workshop this Monday, May 24th from 7:00-8:30pm ET! Live-streamed on Twitch, Kristy Gao and Bimesh De Silva will be walking through important aspects of the interview process from coding challenges to behavioural interviews to algorithmic interviews, go through some live mock interviews, and share their tips and techniques along the way!

      -

      Registration isn't required, we'll just be sending you an email reminder, as well as inviting you to our calendar event!

      -

      The event will be hosted on Twitch at http://bit.ly/csc-sesoc-interview-prep-signup

      -

      Register at!

      -
      -
      - - -

      - Learn about our plans for the term and play some games with us. -

      -
      - -

      Kick off your Spring term with CSC! Come join us on Discord to learn more about what we'll be up to this term and how you can participate!

      -

      Afterwards, stick around for a relaxing and fun game night. See you there!

      -

      Here, I am also testing with

      -

      Many headings, as well as bold text and italics

      -

      More headings

      -
        -
      • One
      • -
      • Unordered
      • -
      • List
      • -
      -
        -
      1. One
      2. -
      3. Ordered
      4. -
      5. List
      6. -
      -
      -
      -
      \ No newline at end of file diff --git a/scripts/mdx-scripts/events-test.xml b/scripts/mdx-scripts/events-test.xml new file mode 100644 index 0000000..f3449e1 --- /dev/null +++ b/scripts/mdx-scripts/events-test.xml @@ -0,0 +1,76 @@ + + + + + +

      CSC and SE Soc are hosting an Interview Prep Workshop next week! Join Kristy Gao and Bimesh De Silva as they review the interview process, from behavioural to technical interviews. They'll finish off with live mock interviews, and the event will be held on Twitch (https://www.twitch.tv/uwcsclub).

      +
      + +

      Browsing through your unsolved Leetcode problems? Flipping open CTCI for the first time? Have no clue what to expect from a technical interview or just need an interview refresher?

      +

      We've got you covered at our CSC x SE Soc Interview Prep Workshop this Monday, May 24th from 7:00-8:30pm ET! Live-streamed on Twitch, Kristy Gao and Bimesh De Silva will be walking through important aspects of the interview process from coding challenges to behavioural interviews to algorithmic interviews, go through some live mock interviews, and share their tips and techniques along the way!

      +

      Registration isn't required, we'll just be sending you an email reminder, as well as inviting you to our calendar event!

      +

      The event will be hosted on Twitch at http://bit.ly/csc-sesoc-interview-prep-signup

      +

      Register at!

      +
      +
      + + + + + +

      + Learn about our plans for the term and play some games with us. +

      +
      + +

      Kick off your Spring term with CSC! Come join us on Discord to learn more about what we'll be up to this term and how you can participate!

      +

      Afterwards, stick around for a relaxing and fun game night. See you there!

      +

      Here, I am also testing with

      +

      Many headings, as well as bold text and italics

      +

      More headings

      +
        +
      • One
      • +
      • Unordered
      • +
      • List
      • +
      +
        +
      1. One
      2. +
      3. Ordered
      4. +
      5. List
      6. +
      +
      +
      + + +

      + Professor Richard Mann will be talking about the BBC micro:bit, an embedded computer that is popular with hobbyists and comes with a variety of peripherals. +

      +
      + +

      This talk was cancelled. The material for the talk can be found here.

      +

      Abstract:

      +

      + BBC micro:bit (microbit.org) was introduced in 2015 and has since become popular with educators and hobbyists. +

      + Micro:bit uses an ARM Cortex M0 processor running the "mbed" OS/runtime (mbed.arm.com). It has a built in LED 7x7 array, two buttons, compass, accelerometer, infra red transceivers, and low power wireless communication. Most importantly, it has multiple analog and digital pins to connect to the external world. +

      + Web based tools compile gui/blocks, javascript, or python to executable (HEX) files that run on the device. The device appears as a USB drive. It is programmed by copying (dragging) the HEX image to the device. Once programmed, the device runs standalone and communicates with the the host computer via a serial port API. +

      + All of this is great fun and a gateway into electronics and real time programming. +

      + In this talk I will present a brief introduction to micro:bit, electronics, and electronic signal measurement (voltmeter, function generator, oscilloscope). +

      + We will measure the run time performance of the micro:bit, in particular the operation of the analog inputs and outputs and the response time/latency of the device and consider its suitability for user interface, music and audio projects. +

      +

      Bio:

      +

      + Richard Mann is Associate Professor in Computer Science. His research is in AI, Sound/Audio, Acoustics, and Electro/acoustic measurement. Details at www.cs.uwaterloo.ca/~mannr +

      + In W19 I will teach: CS489 -- Advanced topics, Computational Sound and Audio. This is a project-based course (no final). +

      + I am also looking for URA students in the Sound/Audio area. +

      +
      +
      +
      \ No newline at end of file diff --git a/scripts/mdx-scripts/events.xml b/scripts/mdx-scripts/events.xml new file mode 100644 index 0000000..09bc4a7 --- /dev/null +++ b/scripts/mdx-scripts/events.xml @@ -0,0 +1,11316 @@ + + + + +

      CSC and SE Soc are hosting an Interview Prep Workshop next week! Join Kristy Gao and Bimesh De Silva as they review the interview process, from behavioural to technical interviews. They'll finish off with live mock interviews, and the event will be held on Twitch (https://www.twitch.tv/uwcsclub).

      +
      + +

      Browsing through your unsolved Leetcode problems? Flipping open CTCI for the first time? Have no clue what to expect from a technical interview or just need an interview refresher?

      +

      We've got you covered at our CSC x SE Soc Interview Prep Workshop this Monday, May 24th from 7:00-8:30pm ET! Live-streamed on Twitch, Kristy Gao and Bimesh De Silva will be walking through important aspects of the interview process from coding challenges to behavioural interviews to algorithmic interviews, go through some live mock interviews, and share their tips and techniques along the way!

      +

      Registration isn't required, we'll just be sending you an email reminder, as well as inviting you to our calendar event!

      +

      The event will be hosted on Twitch at https://www.twitch.tv/uwcsclub

      +

      Register at http://bit.ly/csc-sesoc-interview-prep-signup!

      +
      +
      + + +

      + Learn about our plans for the term and play some games with us. +

      +
      + +

      Kick off your Spring term with CSC! Come join us on Discord to learn more about what we'll be up to this term and how you can participate!

      +

      Afterwards, stick around for a relaxing and fun game night. See you there!

      +
      +
      + + +

      + Live Resume Critiques with Tech+, UW Data Science Club, and UW PM (registration required). +

      +
      + +

      Joining forces with Tech+, UW Data Science Club, and UW PM, we're hosting live resume critiques!

      +

      The session will be held on Discord; you must sign up at http://bit.ly/S21-resume-critique to gain access to the critiques. Deadline to signup is Friday, May 14th at 11:59pm EDT.

      +
      +
      + + +

      + Live Resume Critiques with Tech+, UW Data Science Club, and UW PM (registration required). +

      +
      + +

      Joining forces with Tech+, UW Data Science Club, and UW PM, we're hosting live resume critiques!

      +

      The session will be held on Discord; you must sign up at http://bit.ly/S21-resume-critique to gain access to the critiques. Deadline to signup is Friday, May 14th at 11:59pm EDT.

      +
      +
      + + + +

      + Join us for lightning tech talk presented by students. +

      +
      + +

      CSC is proud to present to you Alt-Tab! Join us in a lightning tech talk series presented to you by our very own students. Alt-Tab consists of 10 to 15-minute talks about anything related to tech. Learn more about exciting topics that range from competitive programming to cryptography!

      +

      We will have four incredible presenters that are eager to share their insights with you. Stay tuned as we'll be introducing them and the topics that they will be discussing soon!.

      +

      Registration is not required to attend! We'll just be sending you an email reminder, as well as inviting you to our calendar event.

      +

      Event Date: March 27th EDT via Twitch (https://www.twitch.tv/uwcsclub) at 2:30-4pm

      +

      You can also attend here: https://live.csclub.uwaterloo.ca/2021-03-27-alt-tab.html.

      +

      Register at http://bit.ly/uwcsclub-alt-tab-signup! Alternatively, you can also email us at exec@csclub.uwaterloo.ca to sign up as well.

      +

      See you all soon!

      +
      +
      + + +

      + Learn how React works and make your own version! +

      +
      + +

      Modern web frameworks are a black-box. They're easy to use, but they have numerous minute details to master in order to apply them to truly scalable websites. Over the last few years, front-end frameworks have absorbed the responsibilities of the back-end, meaning it's become ever more important to dig their details out of the box.

      +

      Out of the Box is a series of code-along projects that explore what's under the hood of modern web frameworks. Nearly 5 million websites use React, including many of the internet's most popular websites. While its simple syntax attracts developers from all over, underneath lies a complex infrastructure of code to manage all elements from caching to hooks. Rishi will bring these ideas to light in our inaugural episode of Out of the Box. Come join him and code your own version of React!

      +

      Only basic web experience is needed. All JavaScript code will be written within a single HTML document for simplicity. Node.js will also be required to participate in the event!

      +

      Registration is not required to attend! We'll just be sending you an email reminder, as well as inviting you to our calendar event.

      +

      Event Date: Thurs. March 25 at 7-9 PM EST via Twitch (http://twitch.tv/uwcsclub)

      +

      Register at http://bit.ly/uwcsc-ootb-diy-react-signup! Alternatively, you can also email us at exec@csclub.uwaterloo.ca to sign up as well.

      +
      +
      + + +

      + Join CSC to meet new people in a Speed-Friending event. +

      +
      + +

      + Meeting people in University can be challenging, especially when it's virtual. + We understand these struggles, and we want to give you a chance to meet other students! The CS community is huge, and we'd like to connect you all. +

      + +

      + Have you heard of speed-dating? Well, CSC is now introducing our Speed-Friending event, where you will get the chance to meet people in fast rotating groups of 3 or 4, and talk to them for about 10 minutes We'll provide you with an optional prompt to start off your discussions, but the rest is up to you!. Feel free to leave at any time with a group you like. +

      + +

      + You won't want to miss this event! Registration is optional; we'll just be sending you a reminder on the day of, as well as a calendar invite. +

      + +

      + Event Date: Tuesday, March 16th from 7:30 - 8:30PM EST +

      + +

      + Sign up at https://bit.ly/uwcsclub-speed-friending-signup! Alternatively, you can also email us at exec@csclub.uwaterloo.ca. +

      + +

      + Click this link to join the event once it starts! We'll be hosting it on Zoom: https://zoom.us/j/93667714038?pwd=aHIyOTAyOTNhd0VmREtONjl4QTNUUT09. +

      +
      +
      + + +

      + Join CSC as we talk about personal relationships. +

      +
      + +

      + The past year has been tough for all of us, having to deal with the pandemic while studying or working remotely. If you've felt that meeting new people and sustaining relationships with others has never been more challenging, we feel that too, and we want to talk about it. +

      + +

      + CSC brings you the third chapter of Afterhours, and this time we're discussing Personal Relationships. Join us for a chat about how our relationships (platonic and romantic) have been affected, whether that be due to co-op, sequence changes, or COVID. We'll be sharing our own personal stories and we'd love for you all to join in on the discussion. +

      + + Registration is required for attendance, so don't miss out! +
        +
      • Event Date: Sat. March 6 at 7 PM EST via Zoom
      • + +
      • Register at https://forms.gle/Gzeqvg9KpEghCH4H9! Alternatively, you can also email us at exec@csclub.uwaterloo.ca to sign up as well.
      • + +
      • Deadline to Register: Sat. March 6 at 12PM EST
      • +
      +
      +
      + + +

      + Join CSC as we play games all night! +

      +
      + +

      + Join CSC as we play games all night! Come for an opportunity to play League (win some free skins :eyes:), Scribbl.io, Among Us, Jackbox, Tetris and more! +

      +

      + This event will be occurring on our Discord: https://discord.gg/pHfYBCg +

      +
      +
      + + +

      + Come watch a movie with CSC! +

      +
      + +

      + Come watch a movie with CSC! Bring your popcorn and your movie commentary, we'll be looking for your input on what we watch so keep an eye out for a poll on our Discord. +

      +

      + This event will be occurring on our Discord: https://discord.gg/pHfYBCg +

      +
      +
      + + +

      + Come meet and chill out with CSC execs. +

      +
      + +

      + Come meet and chill out with CSC execs. This is an opportunity for you to meet new people and socialize with us! +

      +

      + This event will be occurring on our Discord: https://discord.gg/pHfYBCg +

      +
      +
      + + +

      + Join us to learn about other students have bounced back from a rough term, and how you can too. +

      +
      + +

      + The fall term has ended and the winter term is ramping up. Maybe you didn't meet all your expectations last term, you are feeling overwhelmed with your coop search, or you are feeling stuck with a bad mindset-we've been there before and you're not alone. +

      + +

      Introducing the first session of our Afterhours series, join us for a chat with fellow UW CS students. Learn about how they bounced back from their rough times and how you can too!

      + + +
      +
      + + +

      + Join us for tips and tricks on technical interviews. +

      +
      + +

      LeetCode? What is that?

      + +

      Your favourite course is back and ready to help you cram for your upcoming WaterlooWorks interviews.

      + +

      Join us on January 26 at 7PM EST on Twitch where we'll walk you through all the important concepts such as coding challenges, behavioural questions, and algorithms to help you crack the coding interview! Get your notebooks out and stay until the end to witness a CSC exec go through a sample problem and get some behind the scenes tips and tricks.

      + +

      + The event will be streamed at twitch.tv/uwcsclub +

      +

      + Register at https://forms.gle/pqG47mPh8cyf2sWB8 +

      +
      +
      + + +

      + Join us for resume and WaterlooWorks tips for the upcoming coop search. +

      +
      + +

      + Class is in session and the job search is starting! Want your resume reviewed before applying? +

      + +

      + With WaterlooWorks applications opening next week, we want to help you prepare for the coop hunt! Come join us on January 14th at 7pm EST on Twitch to get some WaterlooWorks tips and tricks and watch upper-year/alum students critique your resumes live. + Take notes as we provide resume advice from the perspective of engineers currently working in the tech industry! +

      + +

      + Drop your resume in the registration link for a chance to get your resume reviewed live! +

      + +

      + Not interested in a public critique? You can also drop your resume in the registration link for emailed feedback! More details on the RES135 registration form +

      +

      + The event will be streamed at twitch.tv/uwcsclub +

      +

      + Register at https://forms.gle/KFygHB6N6mmnwWpm7 +

      +
      +
      + + +

      + Learn about how you can involved with CS Club this term. +

      +
      + +

      Do you want to take part in CS Club's exciting upcoming events? Want to help out with our website redesign? Come join us on January 11th at 7pm EST on Twitch to learn about how you can become a member of CS Club, the roles that you can take on and how to participate in existing and brand-new community initiatives. +

      + +

      + The event will be streamed at twitch.tv/uwcsclub +

      +

      + Register at https://forms.gle/WBGPkvs5HzX1CEj98 +

      +
      +
      + + + +

      + Upper years students will be critiquing their own resumes from first year. +

      +

      + 👉 Streamed at twitch.tv/uwcsclub +

      +
      + +

      + Looking to start your resume for next term but don’t know where to start? CSC is hosting a Roasting Our First Year Resumes event. +

      +

      + Join us on November 25 from 7-8pm on Twitch to hear from some Waterloo upper years as they critique their resumes from first year. +

      +

      + Be sure to tune in to hear resume tips from a diverse group of upper years in varying tech domains and bring your questions for the Q&A! +

      +

      + The event will be streamed at twitch.tv/uwcsclub +

      +
      +
      + + +

      + CSC and WiCS are hosting Alt-Tab on November 19th, 5-7 PM EST. +

      +
      + +

      + Come join the UW Computer Science Club (CSC) and Women in Computer Science (WiCS) on Thursday, November 19th from 5-7PM EST for Alt-Tab! +

      +

      + Alt-Tab is a lightning tech talk series presented by students and alumni. This term's Alt-Tab event will comprise of 4 different speakers who will be talking about topics including Ethereum NFT gaming, proof assistants and vanity Tor URLS. There will also be a raffle to win $20 gift cards! +

      +
      +
      + + + +

      + "Bonfire" with WiCS Thursday March 12th @ 6PM in MC Comfy +

      +
      + +

      + CSC and WiCS are hosting an indoor get together event Thursday March 12th @ 6PM in MC Comfy. Gather around the "bonfire" for a night of fun, food, and friends! Free hot chocolate, food and s'mores on us! +

      +
      +
      + + +

      + Physical Security Workshop on Tuesday, Feb 11th, at 6:00 PM in MC 4045 +

      +
      + +

      + In this physical security workshop, students will learn about the theoretical considerations of what makes a system secure. Then, we will break into teams for a hands-on exercise, and a screening of the legendary movie "Hackers". +

      +

      + Snacks and drinks will be provided. +

      +
      +
      + + +

      + Code Party 0 on January 28th, 2020, at 6:30 PM in STC 0010 +

      +
      + +

      + Code Party 0 on January 28th, 2020, at 6:30 PM in STC 0010 +

      +

      + The CS Club is hosting our first Code Party of the term from 6:30 pm until 9 pm in STC 0010, on Tuesday, January 28. Come code with us, eat some food, do some things. +

      +

      + Personal projects you want to work on? Homework projects you need to finish? Or want some time to explore some new technology and chat about it? You can join us at Code Party 0 and do it, with great company and great food. Come any time after 6:30 pm. +

      +
      +
      + + + +

      + The Computer Science Club will be holding a end of term event on Monday, July 29th + at MC Comfy at 6:00 PM. +

      +
      + +

      + Come hang out and celebrate the end of the term with us. There will be pizza, + ice cream sandwiches, and juice boxes. :) +

      +
      +
      + + +

      + The Computer Science Club will be holding a joint event with Women in Computer + Science on Thursday, July 18th at MC 5417 at 6:00 PM. +

      +
      + +

      +Alt-Tab is back, and this time being co-hosted with WiCS. +Come listen to lightning tech talks by fellow students that will knock your metaphorical socks off! +

      +

      The speaker lineup:

      +
        +
      • Falah Shazib - How Not To Build A Virtual Escape Room
      • +
      • Anubhav Srivastava - The Fast Inverse Square Root Algorithm
      • +
      • Frieda Rong - Arrow's Impossibility Theorem
      • +
      • Charlie Wang - Gentle Introduction to Meltdown
      • +
      • Stacy Gaikovaia - Intro to Verilog: Hardware Simulation and Synthesis
      • +
      • William Gertler - Ethics in the Age of Lonely Qubits
      • +
      +

      Food and Bubble Tea will be provided!

      +
      +
      + + +

      + The Computer Science Club will be holding a joint event with Women in Computer Science on + Tuesday, July 9th at MC Comfy at 7:00 PM. +

      +
      + +

      + Come hang out and watch The Lego Batman Movie with us! There will popcorn and pizza! +

      +
      +
      + + +

      + The Computer Science Club will be holding Code Party 0 on Tuesday, June 18th + at PHY 150 at 6:00 PM. +

      +
      + +

      + Come hang out with us! Study for midterms, do assignments, work on side projects, or + prep for interviews. We'll have free food - we aren't ordering pizza, so don't worry. :) +

      +
      +
      + + +

      + The Computer Science Club will be holding a joint event with Women in + Computer Science on Wednesday, June 5th at MC Comfy at 7:00 PM. NOTE: the + event has been moved from the Laurel Creek Firepit due to rain. +

      +
      + +

      + Come and join us for a night of Campfire, friends, fun and yeah Free food 😁, + we'll be having Pitas, drinks, water(Gotta Keep my Fam hydrated eh! 😉) and + last but not the least we'll be having S'mores too, because any Campfire is + incomplete without them. +

      +
      +
      + + +

      + The Computer Science Club will be holding elections for the Spring 2019 + term on Thursday, May 16th in MC Comfy (MC 3001) at 7:00 PM. +

      +
      + +

      + During the meeting, the president, vice-president, treasurer and + assistant vice-president (formerly secretary) will be elected, the + sysadmin will be ratified, and the librarian and office manager will be + appointed. +

      +

      + If you'd like to run for any of these positions or nominate someone, + you can write your name on the whiteboard in the CSC office (MC + 3036/3037) or send an email to cro@csclub.uwaterloo.ca. You can also + deposit nominations in the CSC mailbox in MathSoc or present them to + the CRO, Charlie Wang, in-person. Nominations will close at 6:00 PM on + Wednesday, May 15th. +

      +
      +
      + + + +

      + We will be having our second prof talk of the term with Lesley Istead, on April 5, 3:30 pm in STC 0020. She will be talking about the problems and algorithms used in the film industry to go from 2D to S3D. Come listen to the talk and enjoy some free food! +

      +
      + +

      + We will be having our second prof talk of the term with Lesley Istead, on April 5, 3:30 pm in STC 0020. She will be talking about the problems faced, and algorithms used in the film industry to go from 2D to S3D. Come listen to the talk and enjoy some free food! +

      +

      + For the last 10 years, most blockbusters have been released in both 2D and stereoscopic 3D. The move from 2D to S3D is non-trivial and involves many new algorithms and technologies. + + But there are still many problems to be solved and many improvements that can still be made. In this talk, we'll explore artifacts of traditional 2D photography, methods to represent them comfortably in S3D, and their meaning in a 3D world. +

      +
      +
      + + +

      + CSC + WiCS Movie Night on March 21th, 2019, at 6 PM in MC Comfy +

      +
      + +

      + CSC + WiCS Movie Night on March 21th, 2019, at 6 PM in MC Comfy +

      +

      + Join us and bring all your friends to CSC and WiCS' movie night! We will be showing your fave tech-related movies and serving some delicious snacks. +

      +
      +
      + + +

      + Professor Craig Kaplan will be talking about tiling arrangements on March 20th, 2019, at 4 PM in PHY 150 +

      +
      + +

      + By slowly varying the shapes of tiles in a tiling, it's possible to create fun and interesting abstract animations. Many of these animations are a good fit for the genre of looping mathematical GIFs that proliferate in social media. In this talk, I'll introduce a few core concepts from tiling theory and then discuss techniques for constructing tilings that evolve in space or in time. +

      +
      +
      + + +

      + Code Party 0 on March 13th, 2019, at 6 PM in QNC 1502 +

      +
      + +

      + Code Party 0 on March 13th, 2019, at 6 PM in QNC 1502 +

      +

      + The CS Club is hosting our first Code Party of the term from 6 pm until 9 pm in QNC-1502, on Wednesday, March 13. Come code with us, eat some food, do some things. +

      +

      + Personal projects you want to work on? Homework projects you need to finish? Or want some time to explore some new technology and chat about it? You can join us at Code Party 0 and do it, with great company and great food. Come any time after 6 pm. +

      +
      +
      + + +

      + Git 101 workshop on March 2nd, 2019, at 12 PM in QNC 1502 +

      +
      + +

      + Git 101 workshop on March 2nd, 2019, at 12 PM in QNC 1502 +

      +

      + Git and source code management is an essential tool in software development. Knowing how to make the best out of it will help you get out of tricky situations, and allow you to be a better engineer. +

      +

      + Come learn some basic topics with us including the motivation for using git, interaction with git using the command line, pull requests, feature branch workflow, etc. This event targets first years with minimal git experience. +

      +

      + We are also searching for mentors for the workshop. Instructions for signing up are here +

      +

      Pizza will be provided.

      +
      +
      + + +

      + Algorithms practice workshop on January 24th, 2019, at 6:30 PM in STC 0060 +

      +
      + +

      + Algorithms practice workshop on January 24th, 2019, at 6:30 PM in STC 0060 +

      +

      + Worried about your upcoming WaterlooWorks technical interviews? Want to nail your dream internship this term? Come to the Algorithms Practice Workshop at 6:30 PM, January 24th at STC 0060! +

      +

      + During the workshop, you will learn tons of useful technical interview tips collected from experienced upper-year students, as well as gain hands-on experience by practicing efficiently! +

      +

      + Writing a good solution to the problem is only the beginning — technical interviewers are evaluating more than just your code. Let's learn how to impress them in multiple ways! +

      +

      + Please register here +
      + Facebook event page +

      +
      +
      + + + +

      + CSC End of term celebrations on December 3rd, at 7 PM in MC Comfy. +

      +
      + +

      + CSC End of term celebrations on December 3rd, at 7 PM in MC Comfy. +

      + +

      + The term is coming to an end, and we will be celebrating as such on Monday December 3rd 7-9pm in the MC Comfy. +

      +

      + Come hang out with fellow CSC members, and enjoy food and cake! +

      +
      +
      + + +

      + Alt-Tab is coming up next week on Thursday Nov. 29th 6-8pm at MC 5417. We have an amazing group of members giving short talks on topics of their choice. +

      +
      + +

      + Alt-Tab is coming up next week on Thursday Nov. 29th 6-8pm at MC 5417. We have an amazing group of members giving short talks on topics of their choice. +

      + +

      Talk List:

      + +

      Anna Lorimer - <redacted>

      +

      + All about Slitheen (no, not the dr who alien) +

      + +

      Will Gertler - Quantum Information: a Primer

      +

      + An introduction to elementary topics in quantum information theory as an analogous extension of classical information, including simple applications. +

      + +

      Fatema Boxwala - GANs, Generative Art and Edward Bellamy

      +

      On October 25th of this year, the first AI-generated work of art sold on the high-end art market at Christie's - for half a million dollars. A Portrait of Edward Bellamy is an image generated by a GAN, a Generative Adversarial Network. Fatema is going to wax poetic about GANs, generative art, and what it really means for something to be art.

      + +

      Alex Zvorygin - Designing Large Scale Systems for the Web

      +

      + Learn to build systems that scale! Handle millions of users, keep latencies low, and your systems stable! +

      +

      Patrick Melanson - ᴜɴɪᴄᴏᴅᴇ

      +

      + ᴜɴɪᴄᴏᴅᴇ! It will let you talk to all your friends in Egyptian hieroglyphs, pictures of rocketships, Urdu, or even just Latin characters! +

      +

      + ᴜɴɪᴄᴏᴅᴇ: BUT WHAT SECRETIVE CABAL CONTROLS THIS UNIMAGINABLE POWER? Find out at this talk! +

      +

      + ᴜɴɪᴄᴏᴅᴇ; not just a blessing, but a curse! Reset Spotify forum passwords, make fradulent PayPal sites, send misunderstood texts to your girlfriends' parents, and prevent all of these real-world examples!! +

      +

      + ᴜɴɪᴄᴏᴅᴇ. ؟؟Can you really afford to not tap into this power?? +

      +

      Zichuan Wei - Quantum Computers: what they are and what they can do

      +

      + Recently, quantum computing is getting a lot attention and companies like Google, IBM and Microsoft are investing millions of dollars into the field. What is it? and Why people are willing to spend so much money on it? This talk aims to partially answer these questions. +

      +
      +
      + + +

      + Professor Gregor Richards will be talking about netplay in emulators, which allows for playing video games over the internet. +

      +
      + +

      Abstract:

      + +

      + You've got a game, but you didn't write it. You're running it by emulating the machine it was meant to run on, and the machine it was meant to run on never had support for networking. Now, you want to play with your friend, over the Internet. Oh, and it's not acceptable to incur any latency between your controller and the game while we're at it. Surely that can't be possible, right? Wrong. This talk will discuss the re-emulation technique for netplay used commercially by a system called GGPO and freely in an emulator frontend called RetroArch, and how similar techniques can be applied to make networking work in other scenarios it was never meant for. This will be an unprepared, impromptu talk with no slides, so it should either be a fascinating dive into a little-heard-of technique, or an impenetrable mess of jargon and algorithms. Either way, it should be fun. +

      +

      + Prof. Richards is the maintainer of the netplay infrastructure for RetroArch, a popular emulator frontend for multiple platforms. +

      +
      +
      + + +

      + Professor Richard Mann will be talking about the BBC micro:bit, an embedded computer that is popular with hobbyists and comes with a variety of peripherals. +

      +
      + +

      This talk was cancelled. The material for the talk can be found here.

      +

      Abstract:

      +

      + BBC micro:bit (microbit.org) was introduced in 2015 and has since become popular with educators and hobbyists. +

      + Micro:bit uses an ARM Cortex M0 processor running the "mbed" OS/runtime (mbed.arm.com). It has a built in LED 7x7 array, two buttons, compass, accelerometer, infra red transceivers, and low power wireless communication. Most importantly, it has multiple analog and digital pins to connect to the external world. +

      + Web based tools compile gui/blocks, javascript, or python to executable (HEX) files that run on the device. The device appears as a USB drive. It is programmed by copying (dragging) the HEX image to the device. Once programmed, the device runs standalone and communicates with the the host computer via a serial port API. +

      + All of this is great fun and a gateway into electronics and real time programming. +

      + In this talk I will present a brief introduction to micro:bit, electronics, and electronic signal measurement (voltmeter, function generator, oscilloscope). +

      + We will measure the run time performance of the micro:bit, in particular the operation of the analog inputs and outputs and the response time/latency of the device and consider its suitability for user interface, music and audio projects. +

      +

      Bio:

      +

      + Richard Mann is Associate Professor in Computer Science. His research is in AI, Sound/Audio, Acoustics, and Electro/acoustic measurement. Details at www.cs.uwaterloo.ca/~mannr +

      + In W19 I will teach: CS489 -- Advanced topics, Computational Sound and Audio. This is a project-based course (no final). +

      + I am also looking for URA students in the Sound/Audio area. +

      +
      +
      + + +

      + Make touchscreen gloves with the CS Club on October 29, 5:30 PM in QNC 1506. +

      +
      + +

      + Do you have a pair of favorite gloves that you wish you could use with your phone? Do you not have that but have always wondered how touchscreen gloves work? Join us on Monday Oct 29th 5:30-6:30pm at QNC1506 to learn how you can make your own pair of touchscreen gloves! Fatema Boxwala will be teaching a hands-on workshop with all materials provided (but you can also totally bring your own). Come and learn a super easy introduction to wearable electronics and sewing! + +

      +
      +
      + + +

      + Learn the basics of UNIX with the CS Club on October 22, 5:30 PM in MC 3003. +

      +
      + +

      + Interested in Unix, but don’t know where to start? Then come learn some + basic topics with us including interaction with the command line, motivation + for using it, some simple commands, and more. This event targets first years + with minimal Unix experience. +

      +

      + Light refreshments and snacks will be provided. +

      +
      +
      + + +

      + The CS Club is hosting our first Code Party of the term from 6:30pm until ~9:30pm in EV3-1408, on Thursday October 18. +

      +
      + +

      + The CS Club is hosting our first Code Party of the term from 6:30pm until ~9:30pm in EV3-1408, on Thursday October 18. +

      +

      + Come code with us, eat some food, do some things. +

      +

      + Personal projects you want to work on? Homework projects you need to finish? Or want some time to explore some new technology and chat about it? You can join us at Code Party 0 and do it, with great company and great food. +

      +

      + Come any time after 6:30pm. +

      +
      +
      + + +

      + Jane Street's Yaron Minsky is coming to Waterloo to give a talk aimed at undergraduate students. +

      +
      + +

      + Jane Street's Yaron Minsky is coming to Waterloo to give a talk aimed at + undergraduate students. The talk titled Data Driven UIs, Incrementally + will be held in DC 1302 on Oct. 15th 5:30-6:30pm. Yaron Minsky got his + BA in Mathematics from Princeton and his PhD in Computer Science from + Cornell, where he studied distributed systems. He joined Jane Street in + 2003, where he started out developing quantitative trading strategies, + going on to found the firm's quantitative research group. Here's a brief + description of the talk: +

      +

      + Trading in financial markets is a data-driven affair, and as such, it + requires applications that can efficiently filter, transform and + present data to users in real time. +

      +

      + But there's a difficult problem at the heart of building such + applications: finding a way of expressing the necessary + transformations of the data in a way that is simultaneously easy to + understand and efficient to execute over large streams of data. +

      +

      + This talk will show how we've approached this problem using + Incremental, an OCaml library for constructing dynamic computations + that update efficiently in response to changing data. We'll show how + Incremental can be used throughout the application, from the servers + providing the data to be visualized, to the JavaScript code that + generates DOM nodes in the browser. We'll also discuss how these + applications have driven us to develop ways of using efficiently + diffable data structures to bridge the worlds of functional and + incremental computing. +

      +
      +
      + + +

      + We will be having a bonfire this Wednesday, Oct 3rd 7-10pm, at Columbia Lake Firepit 2 (NW of CIF), co-hosted with WiCS and MathSoc. Smores and snacks will be provided! +

      +
      + +

      + We will be having a bonfire this Wednesday, Oct 3rd 7-10pm, at Columbia Lake Firepit 2 (NW of CIF), co-hosted with WiCS and MathSoc. Smores and snacks will be provided! +

      +

      + Here's a map that shows the firepit location: https://uwaterloo.ca/economics/sites/ca.economics/files/uploads/files/firepit_map_oct_2012.pdf +

      +
      +
      + + + +

      + The CSC will be hosting a Prof Talk by Richard Mann. +

      +
      + +

      + The CSC will be hosting a Prof Talk by Richard Mann. +

      +

      + When you hit record on your phone how is the sound recorded? Air pressure changes come to a microphone, which converts electricity to voltage. The analog signal is digitized by an analog to digital converter (ADC), and finally stored as a digital file in memory. For playback, the process is reversed, and output to head phones or a (tiny) speaker.

      +

      + In a loud room does your phone distort? Can you hear the sound clearly? Phones are getting better. But what is needed to achieve professional quality sound recording?

      +
      +
      + + +

      + Test your programming, web, networking, and trivia skills in this computer security themed contest. Learn how to reverse engineer, crack codes, find flaws in websites, and use security tools. +

      +
      + +

      + Test your programming, web, networking, and trivia skills in this computer security themed contest. Learn how to reverse engineer, crack codes, find flaws in websites, and use security tools. +

      + + +

      Play as an individual, a team of up to three, or join a team at the event.

      + +

      Bring your laptops, have fun, win prizes!

      + + +

      Run by Capture The Flag Club in partnership with CACR and the CS Club.

      + +

      See http://ctf.uwaterloo.ca/ for more info!

      + +
      +
      + + +

      + Come hear 10-15 minutes talks from CSC members on a variety of topics. +

      +
      + +

      + Come hear 10-15 minutes talks from CSC members on a variety of topics. Currently planned talks include: +

      +
        +
      • Abstract Machines, what a PL person thinks a computer looks like!
      • +
      • Rendering with Signed Distance Fields
      • +
      • Strength, weaknesses, and applications of genetic algorithms
      • +
      +

      + Interested in talking? Email djauhar@edu.uwaterloo.ca with your title and + a short abstract. +

      +
      +
      + + +

      + Come join us for a bonfire outside at the Laurel Creek firepit (across Ring. Rd. from EV3) with fellow CSC and WiCS members. Smores and snacks will be provided. +

      +
      + +

      + Come join us for a bonfire outside at the Laurel Creek firepit (across Ring. Rd. from EV3) with fellow CSC and WiCS members. Smores and snacks will be provided. +

      +

      + The firepit we will be using is in the bottom right of this map. +

      +
      +
      + + +

      + The CS Club is hosting our first Code Party of the term from 6:30pm until ~9:30pm in STC 0020! +

      +

      + Come code with us, eat some food, do some things. +

      +
      + +

      + The CS Club is hosting our first Code Party of the term from 6:30pm until ~9:30pm in STC 0020! +

      +

      + Come code with us, eat some food, do some things. +

      +

      + Personal projects you want to work on? Homework projects you need to finish? Or want some time to explore some new technology and chat about it? You can join us at Code Party 0 and do it, with great company and great food. +

      +

      + Come any time after 6:30pm. + +

      +
      +
      + + + + + CSC will be hosting our termly Alt-Tab event, the Computer Science + version of Short Attention Span Math Seminars (SASMS) hosted by that + math club down the hall. It will be a night full of friendly talks. + + + + Our current lineup includes: +
        +
      • Ifaz Kabir: Efficient Type Inference with Union Find
      • +
      • Jordan Garside: GraphQL and APIs
      • +
      • Ansley Peduru: Lessons Learned from Cross-Compiling Rust
      • +
      • Sean Harrap: Implementing Structs Almost From Scratch
      • +
      • Ashish Gaurav: Teaching Programs to play Simple Games
      • +
      • Jennifer Zhou: Garbage Collection Concepts
      • +
      +
      +
      + + + We are having a joint Code Party with Women in Computer Science (WiCS). + This time, it's an Uncode Party, where you try to find the worst solutions + possible to programming problems that we will provide. + + + +

      An example of a good "bad" solution is + SlowSort. + Come and write shoddy code with us and eat free food. You can work on + your assignments too. No general meeting will be bundled with this event. +

      +
      +
      + + +

      Professor Richard Mann will be giving a talk on black-box testing + of audio gear. Come out to see fancy audio gear, learn more about his + Advanced Topics course in Computational Sound, and eat free food! Click + through for his abstract.

      +
      + +

      + Black box testing usually refers to computer testing, either software + or hardware. +

      + +

      + In this talk I apply similar ideas to testing analog and digital audio + gear. For example, given an audio device, such as a guitar effects pedal, + can we stimulate the system with test signals and determine what processing + is done inside? +

      + +

      + I will present our open source testing software to test the frequency + response, time delay and distortion in audio systems. We will show several + real world testing situations, including microphones, loud speakers, + digital keyboards, digital audio mixing boards, and guitar effects pedals. +

      + +

      + Students are encouraged to bring their own musical instruments and/or + sound processors for testing. +

      + +

      + Finally, I will present information about my current audio course, + CS489/689 -- Advanced Topics in Computer Science -- Computational + Sound. This is a project based course, normally offered in the Winter term. +

      +
      +
      + + + +

      + We'll be having a discussion session with maddog, an out-of-town speaker + from the LPI. Food will be provided, as well as good company. Come out! +

      +
      + +

      + Jon "maddog" Hall is the Executive Director of Linux International, an + association of computer users who wish to support and promote the Linux + Operating System. During his career in commercial computing which + started in 1969 (almost a half-century ago), Mr. Hall has been a + programmer, systems designer, systems administrator, product manager, + technical marketing manager, educator, and consultant. +
      + He has worked for such companies as Western Electric Corporation, Aetna + Life and Casualty, Bell Laboratories, Digital Equipment Corporation, VA + Linux Systems, SGI and Futura Networks (Campus Party). +
      + Mr. Hall is currently the CEO of OptDyn, Inc (www.optdyn.com) which + creates the Subutai(tm) suite of Open Source Peer-to-Peer Cloud + computing tools. He also works as an independent consultant, and is + involved with bringing environmentally friendly computing to emerging + marketplaces, as well as working on performance and educational issues + with Free and Open Source Software via the Linaro Association. He is + the Chairman Emeritus of wit.com +
      + Mr Hall has worked on many systems, both proprietary and open, having + concentrated on Unix systems since 1980 and Linux systems since 1994 + (almost a quarter century ago), when he first met Linus Torvalds and + correctly recognized the commercial importance of Linux and Free and + Open Source Software. +
      + He has taught at Hartford State Technical College, Merrimack College + and Daniel Webster College. He still likes talking to students over + pizza and beer (the pizza can be optional). +
      + Mr. Hall is the author of numerous magazine and newspaper articles, + many presentations and one book, "Linux for Dummies". He currently + writes a monthly article for Linux Pro Magazine and occasionally blogs + for them on their web site. +
      + Mr. Hall has consulted with the governments of China, Malaysia and + Brazil as well as the United Nations and many local and state + governments on the use of Free and Open Source Software. +
      + Mr. Hall has served and serves on the boards of several companies, + universities and several non-profit organizations. He is currently + very active with the University of Sao Paulo's Centro Interdisciplinar + Em Tecnologias Interativas (CITI), acting as a member of their advisory + board. Mr. Hall is also the Board Chair of the Linux Professional + Institute, the world's premier Open Source Certification organization, + and is the senior advisor and co-founder of Caninos Loucos, bringing + inexpensive, locally designed and manufactured single board computers + to Brazil. He is also the President of Project Caua. +
      + Mr. Hall has traveled the world (over 100 countries) speaking on the + benefits of Free and Open Source Software, and received his BS in + Commerce and Engineering from Drexel University (1973), and his MSCS + from RPI in Troy, New York (1977). +

      +
      +
      + + + +

      + We are bringing an out-of-town speaker, John "maddog" Hall, to come speak! + Come to this event, where he will be talking about changes in programming + paradigms since the invention of C, and the discussion event tomorrow. +

      +
      + +

      + Abstract: Many things have changed since the early days of programming, + but many programs are written as if they were for the machines of the 20th + century which had small memories, no cache, single core CPUs, small + address spaces. Even the definition of "performance" has changed. This + talk will investigate some of these issues and hopefully lead people to + better programming. +

      +
      +
      + + + +

      + Our first workshop of the term! Fatema and Arshia will be heading a + workshop on how to prepare for technical interviews. +

      +

      + Got technical interviews? Come out! +

      +
      + +

      + Details and abstract TBA. So far, we're going to be meeting and going + over how to get really good at technical interviews. +

      + +

      We will:

      +
        +
      • Talk about the different kinds of programming jobs you can apply and interview for
      • +
      • Present some general advice for tech interviews
      • +
      • have sessions in parallel for software engineering, frontend engineering, security, and devops interviews
      • +
      + +

      +If you're in 2B or below, you'll probably find this event helpful! Anyone is welcome to attend, however. +

      +
      +
      + + + +

      + Our first code party of the term! Food is sandwiches, constitution + amendments are a go, and Dr. Morton will be talking there! It'll be fun. +

      +
      + +

      + The food is sandwiches, fruit platter, and coffee! You can consume this + sustenance while: +

      +
        +
      • Dr. Andrew Morton talks about an upcoming CS final year project + course!
      • +
      • We take up Constitution and Code of Conduct amendments
      • +
      • We elect someone to the position of Secretary
      • +
      • Show off any cool things we're working on, and
      • +
      • Just, like, hang out for a while (that's what code parties are + for)
      • +
      +

      + Come out! There will be cool people there we promise. Like our VP Charlie + Wang. +

      +
      +
      + + + +

      + The Computer Science Club will be holding elections for the + Winter 2018 President, Vice-President, Secretary and Treasurer. + Additionally, the Systems Administrator, Office Manager and + Librarian, CTF Club Liaison and IMAPd (fridge and snack runs) + will be appointed. +

      +
      + +

      + The Computer Science Club will be holding elections for the Winter 2018 + term on Monday, January 15th at 5:00pm in the MC Comfy Lounge (MC 3001). + There will be snacks at the elections, probably Timbits. +

      + +

      + The following positions will be elected: President, Vice-President, + Treasurer and Secretary. The following positions will be appointed: + Systems Administrator (to be ratified at the meeting), Office Manager, + Librarian and IMAPd (fridge and snack runs). +

      + +

      + If you would like to run or nominate someone for any of the elected + positions, you can put your/their name and Quest ID as well as a list + of positions on a piece of paper into the nominations box in the CSC + office (MC 3036/3037) or send an email to the Chief Returning Officer + at cro@csclub.uwaterloo.ca. +

      + +

      + I will periodically empty the nominations box and notify the people + nominated via their @csclub.uwaterloo.ca (or failing that, + @edu.uwaterloo.ca) email address. Please note that club officer + positions (elected positions, plus Systems Administrator) are + restricted to MathSoc social members. +

      + +

      + Nominations will close at 5:00pm on Sunday, January 14th (24 hours + prior to the start of elections). At this time, I will publish the list + of nominations via the CSC mailing list as well as at + + https://csclub.uwaterloo.ca/elections + . +

      + +

      + Voting will be done in a heads-down, hands-up manner and is restricted + to MathSoc social members. A full description of the roles and the + election procedure are listed in our Constitution, available at + + https://csclub.uwaterloo.ca/about/constitution. + +

      + +

      + Any questions related to the election can be directed to + cro@csclub.uwaterloo.ca. +

      +
      +
      + + + + +

      + Join fellow CSC members for our end of term social. There will be food and + good company. We can grab board games from Mathsoc. +

      +
      + +

      + Join fellow CSC members for our end of term social. There will be food and + good company. We can grab board games from Mathsoc. +

      +
      +
      + + +

      + Hosted in collaboration with the Univerisy of Waterloo CTF Club +

      +
      + + +

      + Hosted in collaboration with the Univerisy of Waterloo CTF Club +

      +
      +
      + + +

      + The CS Club is hosting our second Code Party of the term from 6:00pm until late in the evening in STC 0050! +

      +

      + Come code with us, eat some food, do some things. +

      +
      + +

      + The CS Club is hosting our second Code Party of the term from 5:30pm until late in the evening in STC 0050! +

      +

      + Come code with us, eat some food, do some things. +

      +

      + Personal projects you want to work on? Homework projects you need to finish? Or want some time to explore some new technology and chat about it? You can join us at Code Party 1 and do it, with great company and great food. +

      +

      + Come any time after 5:30pm. +

      +
      +
      + + +

      + Test your programming, web, networking, and trivial skills

      +

      + Learn how to reverse engineer, crack codes, and use various tools. +

      +

      + Win prizes! +

      +
      + + +

      + Test your programming, web, networking, and trivial skills

      +

      + Learn how to reverse engineer, crack codes, and use various tools. +

      +

      + Win prizes! +

      +
      +
      + + +

      + Come watch (or give!) interesting short talks by CS Club members. + Talks include "Dynamic programming as path finding", "What is a landing page", "Subsurface scattering" and "How to compute on a GPU", but more are welcome (email tghume@csclub.uwaterloo.ca)! Click the link to the event detail page for more info. +

      +
      + +

      + Come watch (or give!) interesting short talks by CS Club members. + Talks include "Dynamic programming as path finding", "What is a landing page", "How to compute on a GPU" and "Subsurface scattering", but more are welcome (email tghume@csclub.uwaterloo.ca)! There will be food. +

      +

      + Each talk can be 5-15 minutes long on any computer-related topic of interest. + If you're interested in giving a talk (please do!) email tghume@csclub.uwaterloo.ca. +

      +
      +
      + + +

      + Join other CSC and WiCS members for a social event featuring free food, board games and a showing of Wonder Woman. +

      +
      + +

      + Join other CSC and WiCS members for a social event featuring free food, board games and a showing of Wonder Woman. +

      +
      +
      + + +

      + Interested in Linux, but don't know where to start? Come learn some + basic topics with us including interaction with the shell, motivation + for using it, some simple commands, and more! (Snacks after) +

      +
      + +

      + New to the Linux computing environment? If you seek an introduction, + look no further (you can if you want we're not the police). Topics that + will be covered include basic interaction with the shell and the + motivations behind using it, and an introduction to compilation. You'll + have to learn this stuff in CS 246 anyways, so why not get a head start! +

      +

      + If you're interested in attending, make sure you can log into the Macs + on the third floor, or show up to the CSC office (MC 3036) 20 minutes + early for some help. +

      +
      +
      + + + +

      + Come join us for a bonfire outside at the Laurel Creek firepit (across Ring. Rd. from EV3) with fellow CSC members. Smores and snacks will be provided. +

      +
      + +

      + Come join us for a bonfire outside at the Laurel Creek firepit (across Ring. Rd. from EV3) with fellow CSC members. Smores and snacks will be provided. +

      +

      + The firepit we will be using is in the bottom right of this map. +

      +
      +
      + + + +

      + The CS Club is hosting our first Code Party of the term (Friday September 29th) from 6:30pm until late in the evening in M3 1006! +

      +

      + Come code with us, eat some food, do some things. +

      +
      + +

      + The CS Club is hosting our first Code Party of the term (Friday September 29th) from 6:30pm until late in the evening in M3 1006! +

      +

      + Come code with us, eat some food, do some things. +

      +

      + Personal projects you want to work on? Homework projects you need to finish? Or want some time to explore some new technology and chat about it? You can join us at Code Party 0 and do it, with great company and great food. +

      +

      +Come any time after 6:30pm, there will be snacks and we'll be ordering pizza at around 7:00pm! +

      +
      +
      + + + +

      + The Computer Science Club will be holding special elections + for the Spring 2017 Vice-President and Secretary. + Additionally, the Systems Administrator, Office Manager and + Librarian, CTF Club Liaison and IMPAD will be appointed. +

      +
      + +

      + The Computer Science Club will be holding special elections + for the Fall 2017 term on Friday, September 22th at 6:00pm + in the MC Comfy Lounge (MC 3001). +

      +

      + The following positions will be elected: Vice-President and Secretary. + The following positions will be appointed: + Systems Administrator (to be ratified at the meeting), + Office Manager and Librarian, CTF Club Liaison and IMPAD. + Additionally, we will be looking for members to join the + Programme Committee. +

      +

      + The results of the previous election are as follows: +

      +
        +
      • President: matedesc (Melissa Tedesco)
      • +
      • Treasurer: tghume (Tristan Hume)
      • +
      +

      + If you would like to run or nominate someone for any of the elected positions, + you can put your name in a special box in the CSC office (MC 3036/3037) + or by sending an email to the Chief Returning Officer (Melissa) + at cro@csclub.uwaterloo.ca. + Please note that executive positions are restricted + to MathSoc social members. We welcome the participation of first years. + +

      +

      + Nominations will close at 6:00pm on Thursday, September 21st + (24 hours prior to the start of elections). + After that time, a list of current nominations will be sent out by email. It will also be available on the whiteboard + in the office and at + https://csclub.uwaterloo.ca/elections. + + Voting will be done in a heads-down, hands-up manner and is restricted + to MathSoc social members. A full description of the roles and + the election procedure are listed in our Constitution, + available at + + https://csclub.uwaterloo.ca/about/constitution + . + + Any questions related to the election can be directed to + cro@csclub.uwaterloo.ca. +

      +
      +
      + + + +

      + The Computer Science Club will be holding elections for the + Spring 2017 President, Vice-President, Secretary and Treasurer. + Additionally, the Systems Administrator, Office Manager and + Librarian, CTF Club Liaison and Fridge Person will be appointed. +

      +
      + +

      + The Computer Science Club will be holding elections for the + Fall 2017 term on Friday, September 15th at 6:00pm + in the MC Comfy Lounge (MC 3001). +

      +

      + The following positions will be elected: President, Vice-President, + Treasurer and Secretary. The following positions will be appointed: + Systems Administrator (to be ratified at the meeting), + Office Manager and Librarian, CTF Club Liaison and Fridge Person (the exact name of this position is still to be determined). Additionally, we will be looking + for members to join the Programme Committee. +

      +

      + If you would like to run or nominate someone for any of the elected positions, + you can put your name in a special box in the CSC office (MC 3036/3037) + or by sending an email to the Chief Returning Officer (Felix) + at cro@csclub.uwaterloo.ca. + Please note that executive positions are restricted + to MathSoc social members. We welcome the participation of first years. + +

      +

      + Nominations will close at 6:00pm on Thursday, September 14th + (24 hours prior to the start of elections). + After that time, a list of current nominations will be sent out by email. It will also be available on the whiteboard + in the office and at + https://csclub.uwaterloo.ca/elections. + + Voting will be done in a heads-down, hands-up manner and is restricted + to MathSoc social members. A full description of the roles and + the election procedure are listed in our Constitution, + available at + + https://csclub.uwaterloo.ca/about/constitution + . + + Any questions related to the election can be directed to + cro@csclub.uwaterloo.ca. +

      +
      +
      + + + + + +

      + Come celebrate the end of the term with us in MC Comfy! +

      +
      + +

      + Come celebrate the end of the term with us in MC Comfy! We will be serving Urban Bricks! +

      +
      +
      + + +

      + Join us for food and interesting member talks! +

      +
      + +

      + CSC's Alt-Tab is back! Join us for food and interesting member talks. The current lineup includes: +

      +
        +
      • Ifaz Kabir: "The comment that took Stack Exchange down and the algorithm that could have saved them"
      • +
      • Fatema Boxwala: "Manic PXE Dream Servers"
      • +
      • Charlie Wang: TBA (Something About Typed Racket)
      • +
      • Sean Harrap: "Register Allocation With Graphs"
      • +
      • Bryan Coutts: "Vehicle Routing"
      • +
      • Reila Lee: TBA
      • +
      +
      +
      + + +

      + Join us for Spring Cleaning! +

      +
      + +

      + We will be conducting our Spring Cleaning on Saturday, July the 15th @ + 10:00am. We'll be clearing out some junk, mopping the floors, dusting + off the tables/shelves, and generally tidying up the place. The more + help we can get the better! If you would like to lend a hand, just come + over to the office this weekend. +

      +
      +
      + + +

      + Come join Women in Computer Science and the Computer Science Club outdoors! +

      +
      + +

      + Come hang out with the Women in Computer Science and the Computer Science Club! We have Marshmallows and other + treats. Also fire. And a creek. Let's enjoy the outdoors! +

      +
      +
      + + +

      + Join us for Code Party 0! +

      +
      + +

      + Come code with us, eat some food, do some things. Personal projects you want to work on? Homework projects + you need to finish? Or want some time to explore some new technology and chat about it? You can join us at + Code Party 0 and do it, with great company and great food. +

      +
      +
      + + + +

      + Professor Shai Ben-David will discuss the basic principles behind machine learning and how they relate to some of + the headline-making practical tools, in addition to the major research challenges and directions that address + the fast expanding scope of potential machine learning applications. +

      +
      + +

      + We are all aware that we live in the era of ("big") data. In contrast to classical scientists + that devoted much of their resources to collecting data, nowadays researchers are flooded with + data and the focus has switched to trying to make sense of and utilize the big and complex available data. + Machine learning is aimed to use computer power to do just that. +

      +

      + It is therefore no wonder that machine learning is currently a hot topic. Evidence is all over the map, from + NYTimes articles to being a top priority for research investments by Google, Amazon, Microsoft and Facebook. + Throughout its (short) history, machine learning has enjoyed fruitful interactions between theory and practice. + The growing awareness to its power keeps stimulating research towards new applications to the field, which in turn + spur the development of algorithms and inspire new frontiers for our theoretical pursuit. +

      +

      + In this talk Professor Shai Ben-David will explain the basic principles behind machine learning and how these principles relate to some + of headline-making practical tools. Ben-David will also describe some of the major research challenges and research + directions that address the fast expanding scope of potential machine learning applications. +

      +
      +
      + + + +

      + Come gain some more in-depth knowledge or some less well-known tips and tricks for using the command line. +

      +
      + +

      + Finished the bash unit in CS246 and still don't see what's great about Unix? + Want to gain some more in-depth knowledge, or some less well-known tips and + tricks for using the command line? Unix 102 is the event for you! Fatema is + "kind of successful" and "knows things about Unix" and you can be too! Topics + covered will be: users, groups and permissions, ez string manipulation, additional skills, tips and tricks. +

      +
      +
      + + + +

      + The Computer Science Club will be holding elections for the + Spring 2017 President, Vice-President, Secretary and Treasurer. + Additionally, the Systems Administrator, Office Manager and + Librarian will be appointed. +

      +
      + +

      + The Computer Science Club will be holding elections for the + Spring 2017 term on Wednesday, May 17th at 6:00pm + in the MC Comfy Lounge (MC 3001). +

      +

      + The following positions will be elected: President, Vice-President, + Treasurer and Secretary. The following positions will be appointed: + Systems Administrator (to be ratified at the meeting), + Office Manager and Librarian. Additionally, we will be looking + for members to join the Programme Committee. +

      +

      + If you would like to run or nominate someone for any of the elected positions, + you can put your name in a special box in the CSC office (MC 3036/3037) + or by sending an email to the Chief Returning Officer (Zachary) + at cro@csclub.uwaterloo.ca. + Please note that executive positions are restricted + to MathSoc social members. We welcome the participation of first years. + A list of current nominations will be available on the whiteboard + in the office and at + https://csclub.uwaterloo.ca/elections. +

      +

      + Nominations will close at 6:00pm on Tuesday, May 16th + (24 hours prior to the start of elections). + + Voting will be done in a heads-down, hands-up manner and is restricted + to MathSoc social members. A full description of the roles and + the election procedure are listed in our Constitution, + available at + + https://csclub.uwaterloo.ca/about/constitution + . + + Any questions related to the election can be directed to + cro@csclub.uwaterloo.ca. +

      +
      +
      + + + + +

      + Come code with us, eat some food, do some things. + + Personal projects you want to work on? Homework + projects you need to finish? Or want some time to explore + some new technology and chat about it? You can join us at Code Party 1 + and do it, with great company and great food. + + Come any time after 5pm, but if you come earlier your food preferences are more likely to be accounted for, and there's more time for coding! +

      +
      + +

      + Come code with us, eat some food, do some things. +

      +

      + Personal projects you want to work on? Homework + projects you need to finish? Or want some time to explore + some new technology and chat about it? You can join us at Code Party 1 + and do it, with great company and great food. +

      +

      + Come any time after 5pm, but if you come earlier your food preferences are more likely to be accounted for, and there's more time for coding! +

      +
      +
      + + + +

      +A talk and demo about more advanced Unix tricks and tools than are taught in our regular Unix 101 events. Topics may include customizing your prompt, the ranger console file manager, fancy shells, htop, rsync and using terminal escape sequences in your programs. +

      +
      + +

      +A talk and demo about more advanced Unix tricks and tools than are taught in our regular Unix 101 events. Topics may include customizing your prompt, the ranger console file manager, fancy shells, htop, rsync and using terminal escape sequences in your programs. +

      +

      + List of things talked about can be found here. +

      +
      +
      + + +

      + Come watch (or give!) interesting short talks by CS Club members. + Talks include "Stepping into math: building a step-by-step algebra solver" and "Online database migrations at scale", but more are welcome (email tghume@csclub.uwaterloo.ca)! Click the link to the event detail page for more info. (Note: date was moved to Thursday) +

      +
      + +

      + Come watch (and/or give!) interesting short talks by CS Club members. + Talks include "How your text editor does syntax highlighting", "Online database migrations at scale", "Stitching Spaces in Subdivision Surfaces", "Theory of Computation" and "Stepping into math: building a step-by-step algebra solver", but more are welcome! +

      +

      + Each talk can be 5-15 minutes long on any computer-related topic of interest. + If you're interested in giving a talk (please do!) email tghume@csclub.uwaterloo.ca. +

      +

      + The event was previously scheduled for Wednesday but was moved to Thursday the 9th due to a conflict with a WICS event. +

      +
      +
      + + +

      + Come code with us, eat some food, do some things. + + Personal projects you want to work on? Homework + projects you need to finish? Or want some time to explore + some new technology and chat about it? You can join us at Code Party 0 + and do it, with great company and great food. + + Come any time after 5pm, but if you come earlier your food preferences are more likely to be accounted for, and there's more time for coding! +

      +
      + +

      + Come code with us, eat some food, do some things. +

      +

      + Personal projects you want to work on? Homework + projects you need to finish? Or want some time to explore + some new technology and chat about it? You can join us at Code Party 0 + and do it, with great company and great food. +

      +

      + Come any time after 5pm, but if you come earlier your food preferences are more likely to be accounted for, and there's more time for coding! +

      +
      +
      + + + + +

      + The Computer Science Club will be holding elections for the + Winter 2017 President, Vice-President, Secretary and Treasurer. + Additionally, the Systems Administrator, Office Manager and + Librarian will be appointed. +

      +
      + +

      + The Computer Science Club will be holding elections for the + Winter 2017 President, Vice-President, Secretary and Treasurer. + Additionally, the Systems Administrator, Office Manager and + Librarian will be appointed. +

      +

      + The following positions will be elected: President, Vice-President, + Treasurer and Secretary. The following positions will be appointed: + Systems Administrator (to be ratified at the meeting), + Office Manager and Librarian. Additionally, we will be looking + for members to join the Programme Committee. The nominees for the four + elected positions are: +

      +
        +
      • President
      • + +
          +
        • matedesc
        • +
        • wyschean
        • +
        +
        +
      • Vice President
      • + +
          +
        • tghume
        • +
        • wyschean
        • +
        +
        +
      • Treasurer
      • + +
          +
        • jj2baile
        • +
        • jxpryde
        • +
        • tghume
        • +
        +
        +
      • Secretary
      • + +
          +
        • aafata
        • +
        • tghume
        • +
        +
        +
      +

      + Voting will be done in a heads-down, hands-up manner and is restricted + to MathSoc social members. We use approval voting; for each position, + you may vote for any subset of the candidates. If you wish to vote but + will not be attending the election, you may send an absentee ballot + indicating which candidate(s) you wish to vote for, for each position. + This ballot must be sent to cro@csclub.uwaterloo.ca from your + @uwaterloo.ca or @csclub.uwaterloo.ca email address. A full + description of the roles and the election procedure are listed in our + Constitution, available at + https://csclub.uwaterloo.ca/about/constitution. +

      +
      +
      + + + + + +

      + The CSC and the PMAMC&OC (aka pure math club) are hosting our end + of term events together! We'll be taking over MC Comfy to hang out, + eat lots of food (from Kismet!), and play board games. +

      +
      + +

      + The CSC and the PMAMC&OC (aka pure math club) are hosting our end + of term events together! We'll be taking over MC Comfy to hang out, + eat lots of food (from Kismet!), and play board games. +

      +
      +
      + + + +

      + Various members of the CSC will be giving brief, 25 minute talks on + CS-related topics. An list of the talks being delivered can be found + if you follow the event page link in this description. There will be + food provided. +

      +
      + +

      + The CSC is hosting ALT+TAB this Wednesday. ALT+TAB is similar to the + PMC's SASMS events; several members of the CSC will give brief, 25 + minute talks on various interesting topics in CS. There will be food + provided at the event. The talks being delivered are: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      MemberTalk Title
      Felix BauckholtA Short Idris Tutorial
      Bryan CouttsLinear and Integer Programming
      Sean HarrapCommunication Complexity
      Christopher HawthorneGödel's Incompleteness Theorem
      Charlie WangTyped Racket
      Ifaz KabirHow Modern SAT Solvers Work
      +

      +
      +
      + + + +

      + CSC member Edmund Noble will be giving a talk, titled "Purely + Functional Programming with Freely-Generated Domain Specific + Languages". The talk will focus on embedded DSLs that exist within + other languages, and how they can easily be constructed. +

      +
      + +

      + CSC member Edmund Noble will be giving a talk, titled "Purely + Functional Programming with Freely-Generated Domain Specific + Languages". The talk will focus on embedded DSLs that exist within + other languages, and how they can easily be constructed. The abstract + for this talk is below.

      +

      +

      + Dependency injection is an often-used technique in object-oriented + programming to easily modify the behaviours of an object by providing + it with objects it would have otherwise generated on its own, to + increase modularity. Aspect-oriented programming is a related + technique which adds additional behaviour ("advice") to existing code, + aiming to address cross-cutting concerns which affect wide areas of an + application without sacrificing modularity. Dependency injection + might not seem a common topic in functional programming, but + application modularity is essential to functional programming in a + practical setting. A natural analogue to dependency injection and + aspect-oriented programming in functional programming comes from a + surprising place, and offers superior modularity to both. The free + monad (F f) for a type constructor (and domain-specific language + instruction set) f provides a syntax tree with internal nodes as + domain-specific language instructions, which in combination with + coproduct functors, allow domain-specific languages to be composed and + combined easily. + +

      +

      +
      +
      + + + +

      + Professor Richard Mann will be giving a talk, titled "Open Source + Software for Sound Measurement and Analysis". He will be presenting + information about his new course, CS 489, Computational Sound, which + will be running in Winter 2017. +

      +
      + +

      + Professor Richard Mann will be giving a talk, titled "Open Source + Software for Sound Measurement and Analysis". He will be presenting + information about his new course, CS 489, Computational Sound, which + will be running in Winter 2017. The abstract for this talk is below. +

      +

      +

      + The most common problem in acoustics is to measure the frequency + response of an (expensive!) listening room. While specifications + exist for the amplifiers, speakers, etc, each system must be still + evaluated individually, since the frequency response depends on the + direct sound from the speaker(s), the listener position and the + reverberation of the room. The user may spend considerable time + adjusting the speaker placement, the system equalization, and + possibly treating the room to get the best response. +

      +

      + There are several commercial and freeware applications for this task, + some of which are very good. However, to learn the methods the user + must understand the processing involved. +

      +

      + The purpose of this talk is to present an open source solution. Our + system is based on a very few lines of code, written in GNU Octave, a + Matlab(r) workalike that runs under Linux, Windows and Mac. +

      +

      + The program works by playing a known test signal, such a tone, or + some kind of noise source out of the sound card into the system. The + system is measured by comparing driving signal to that measured by a + microphone in the room. The frequency response is computed using the + Discrete Fourier Transform (DFT). +

      +

      + This is joint work with Prof. John Vanderkooy, Physics, University of + Waterloo. +

      +
      +
      + + + +

      + This general meeting will be held to discuss changes to our Code of + Conduct. +

      +
      + +

      The Code of Conduct and the amended version can be found below:

      + +
      +
      + + + +

      + Come code with us, eat some food, do some things. + + Personal projects you want to work on? Homework + projects you need to finish? Or want some time to explore + some new technology and chat about it? You can join us at Code Party + and do it, with great company and great food. +

      +
      +
      + + + + +

      + The CSC is having its next event, UNIX 101, on Wednesday November 9th + at 6 PM in MC 3003 (the mac lab across from the CSC). UNIX 101 is a + tutorial where we teach the basics of using a command-line (terminal) + environment in UNIX. Knowing how to use the command-line and UNIX is + an invaluable skill in CS, and helps prepare you for future projects + and co-ops. +

      +
      + +

      + The CSC is having its next event, UNIX 101, on Wednesday November 9th + at 6 PM in MC 3003 (the mac lab across from the CSC). UNIX 101 is a + tutorial where we teach the basics of using a command-line (terminal) + environment in UNIX. Knowing how to use the command-line and UNIX is + an invaluable skill in CS, and helps prepare you for future projects + and co-ops. +

      +
      +
      + + + + +

      An introductory feminism in STEM panel, free food.

      +
      + +

      + The CS Club is hosting an introductory panel for applications and benefits of feminism in STEM. + + Example topics will include the differences between general feminism and feminism applied to STEM. + + Dr. Prabhakar Ragde from SCS, Swetha Kulandaivelan, and Filzah Nasir will be speaking on the panel. Fatema Boxwala will be moderating. + + Free food will be there and we're in a fancy room. Come on out! +

      +
      +
      + + + + +

      + The CSC and WiCS (Women in Computer Science) are co-hosting a social + event on Thursday, October 13th (the day after reading week). We will + be Going Outside to the Columbia Lake 2 Fire Pit; there will be a + campfire, s'mores, lots of food, frisbees, grass, etc. Bring your + friends! +

      +
      + +

      + The CSC and WiCS (Women in Computer Science) are co-hosting a social + event on Thursday, October 13th (the day after reading week). We will + be Going Outside to the Columbia Lake 2 Fire Pit (see + map). + There will be a campfire, s'mores, lots of food, frisbees, grass, etc. Bring your friends! +

      +
      +
      + + + + +

      + The CSC will have its first talk of the term this Thursday, October + 6th. UW alumna and CSC member Elana Hashman will be giving a talk on + using functional programming languages (like Racket!) in industry, and + how some concepts from the more common object-oriented paradigm are + translated to the functional paradigm. The abstract for the talk is below. +

      +
      + +

      + I transitioned from writing software in imperative, object-oriented + (OO) programming languages to doing functional programming (FP) + full-time, and you can do it, too! In this talk, I'll make a case for + using FP for real-world development, cover some cases where common FP + language features substitute for design patterns and OOP structure, + and provide some examples of translating traditional OO design + patterns into functional code. +

      +
      +
      + + + + +

      + The Computer Science Club will be holding elections for the + Fall 2016 President, Vice-President, Secretary and Treasurer. + Additionally, the Systems Administrator, Office Manager and + Librarian will be appointed. +

      +
      + +

      + The Computer Science Club will be holding elections for the + Fall 2016 term on Monday, September 19th at 6:30pm + in the MC Comfy Lounge (MC 3001). +

      +

      + The following positions will be elected: President, Vice-President, + Treasurer and Secretary. The following positions will be appointed: + Systems Administrator (to be ratified at the meeting), + Office Manager and Librarian. Additionally, we will be looking + for members to join the Programme Committee. +

      +

      + If you would like to run or nominate someone for any of the elected positions, + you can put your name in a special box in the CSC office (MC 3036/3037) + or by sending an email to the Chief Returning Officer (Zachary) + at cro@csclub.uwaterloo.ca. + Please note that executive positions are restricted + to MathSoc social members. We welcome the participation of first years. + A list of current nominations will be available on the whiteboard + in the office and at + https://csclub.uwaterloo.ca/elections. +

      +

      + Nominations will close at 6:30pm on Sunday, September 18th + (24 hours prior to the start of elections). + + Voting will be done in a heads-down, hands-up manner and is restricted + to MathSoc social members. A full description of the roles and + the election procedure are listed in our Constitution, + available at + + https://csclub.uwaterloo.ca/about/constitution + . + + Any questions related to the election can be directed to + cro@csclub.uwaterloo.ca. +

      +
      +
      + + + + + +

      + Join us on Monday, July 25th at 6pm in the MC Comfy Lounge for an + exciting prof talk by Richard Mann on Open Source Computer Sound + Measurement. The abstract for the talk is below. We will follow + this up by an EOT event with dinner and board games! + Last event of the term, get hype. +

      +
      + +

      +An ideal computer audio system should faithfully reproduce signals of +all frequencies in the audible range (20 to 20,000 cycles per second). +Real systems, particularly mobile devices and laptops, may still +produce acceptable quality, but often have a limited response, +particularly at the low (bass) frequencies. + +Sound/acousic energy refers to time varying pressure waves in air. +When recording sound, the acoustic signal will be picked up by +microphone, which converts it to electrical signals (voltages). The +signal is then digitized (analog to digital conversion) and stored as +a stream of numbers in a data file. On playback the digital signal is +converted to an electrical signal (digital to analog conversion) and +finally returned as an acoustic signal by a speaker and/or headphones. + +In this talk I will present open source software (Octave/Linux) to +measure the end-to-end frequency response of an audio system using the +Discrete Fourier Transform. I will demonstrate the software using a +standard USB audio interface and a consumer grade omnidirectional +microphone. + +This is joint work with John Vanderkooy, Distinguished Professor +Emeritus, Department of Physics and Astronomy. +

      +
      +
      + + +

      + Bill Cowan is the Director of the Computer Graphics Lab, and + teaches the notorious CS452, lovingly known as the trains course + by CS students. He will be giving a talk on that very course. +

      +
      + +

      + CS452, aka the trains course, has for some time enjoyed notoriety + as a playground for over-achieving masochists. To maintain its + reputation it receives a periodic upgrade, which is now due. This + talk discusses possible directions for the upgrade in the context + of the philosophy that has guided its evolution over the decades + of its existence. +

      +
      +
      + + +

      + Gladimir Baranoski is an Associate Professor at the School of Computer Science, in the + Natural Phenomena Simulation Group. He will be giving a talk on underappreciated + facets of computer science and its connections to other disciplines. +

      +
      + +

      + Talk Abstract: Computer science is often perceived to be confined to + traditional areas such as operating systems, programming languages, + compilers and so on. Viewed in this context, one’s professional future + in this field seems to be directly linked to the accumulation of knowledge + and practical experience in these areas. Although their importance is + undeniable, it is also possible, and highly recommended, to expand one’s + horizons. In this talk, we are going to informally look at ubiquitous, + albeit sometimes underappreciated, facets of computer science and its + synergistic connections to other disciplines. We are also going to discuss + how creativity and serendipity can impact one’s career and lead to tangible + contributions in physical and life sciences. +

      +
      +
      + + +

      + Join us at BMH Green for a night outdoors with fellow people in Computer Science! + There will be ice cream and board games and frisbees and maybe some water guns. + + Bring your friends! +

      +
      +
      + + +

      + Listen to cool 15-20 lightning talks by CSC members on a variety of + computer science and related topics. +

      +
      + +

      + Come on out to the CSC Short Contemplation Period Talk night on Wednesday, + featuring many short (20 minute) talks from our members. From Automata to + Zip files, any topic is welcome. Come on out and give a talk, or just + learn things. Talks start at 6:00PM and runs till 9, with a break for + dinner, which will be provided. +

      +
      +
      + + +

      + Come code with us, eat some food, do some things. + + Personal projects you want to work on? Homework + projects you need to finish? Or want some time to explore + some new technology and chat about it? You can join us at Code Party 0 + and do it, with great company and great food. +

      +
      +
      + + + +

      + Come out and help make the office slightly less messy! We will bribe... + uh, provide you with food for helping. :) +

      +
      + +

      + It's that time of the year - spring cleaning. And if you haven't noticed, + our office needs it. Help us clean it and we will give you food to eat. + Pretty good deal if you ask me. +

      +

      + Our office manager will also be providing office training to interested + members before the event. +

      +
      +
      + + + +

      + The Computer Science Club will be holding elections for the Spring 2016 + for President, Vice-President, Secretary, and Treasurer. Additionally, + librarian, office manager, sysadmin, and fridge regent will be appointed + and ratified. +

      +
      + +

      + The Computer Science Club will be holding elections for the Spring 2016 + term on Thursday, May 12th at 19:00 in the MC Comfy (MC 3001). During + the meeting, the president, vice-president, treasurer and secretary will + be elected, the sysadmin will be appointed and ratified, and the + librarian and office manager will be appointed. There may be timbits. +

      +

      + If you'd like to run for any of these positions or nominate someone, you + can put your name in a special box on top of the fridge in the CSC + office (MC 3036/3037) or send me (Patrick) an email at cro@csclub + uwaterloo.ca. It is highly recommended to send me an email in addition + to nominating yourself by paper in the office. You can also deposit + nominations in the CSC mailbox in MathSoc or present them to me in person. + Nominations will close at 19:00 on Wednesday, May 11th (24 hours + before the start of elections). +

      +

      + Voting is done heads-down hands-up, and is restricted to Mathsoc social + members. +

      +

      + For the part of the constitution pertaining to elections, + see http://csclub.uwaterloo.ca/about/constitution#officers +

      +

      + All members are welcome to run! Especially new members and anyone + interested in being a new exec! Most of the roles have a small guide on + the wiki at https://wiki.csclub.uwaterloo.ca/Exec_Manual and I will + print out a hard copy of a more comprehensive exec manual and bind it myself, I swear. +

      +
      +
      + + + + +

      Come out to a talk on surrounding a polygon by Dr. Craig Kaplan! Also stay afterwards for our EOT and socialize :) food will be provided! +

      +
      + +

      +Come out to a talk on surrounding a polygon by Dr. Craig Kaplan! Also stay afterwards for our EOT and socialize :) food will be provided! + +The prof talk will be on Surrounding a Polygon: +Dr. Craig Kaplan will explore the problem of surrounding a polygon with copies of itself. This problem raises a number of fascinating mathematical questions, and we can use software as an experimental tool to probe the answers to those questions. + +

      +He'll also present known mathematical and computational results related to surrounds of polygons, and discuss what they say about larger open questions in tiling theory. Finally, he will also show how the task of surrounding individual polygons can make for fun and challenging puzzles, and say a bit about his experience creating an app based on those puzzles. +

      +
      +
      + + + + +

      The CSC is hosting the first annual member talk series! This is a chance for anyone to come and give a short talk on any relevant topic. +Some talks already arranged are on topics ranging from modern Javascript, to the Linux Kernel.

      +
      + +

      +The CSC is hosting the first annual member talk series. This is a chance for anyone to come and give a short talk on any relevant topic. + +We already have some talks arranged, on topics ranging from modern JavaScript, and the Linux Kernel. More speakers are welcome. If you are interested, please email tbelaire@uwaterloo.ca or signup here:http://goo.gl/forms/zNYbDEQSFU + +There will be a break for food halfway through. +

      +
      +
      + + + + + + +

      A talk about SAT and SMT Solvers for Software Engineering and Security by Dr. Vijay Ganesh

      +
      + +

      +Boolean SAT and SMT solvers increasingly play a central role in the construction of reliable and secure software, regardless of whether such reliability/security is ensured through formal methods, program analysis or testing. This dramatic influence of solvers on software engineering as a discipline is a recent phenomenon, largely attributable to impressive gains in solver efficiency and expressive power. Dr. Vijay Ganesh will motivate the need for SAT and SMT solvers, sketch out their research story thus far, and then describe his contributions to solver research. Specifically, he will talk about a SAT solver called MapleCMS, and a string SMT solver, called Z3str2, developed in his lab. He will also talk about real-world applications enabled by his solvers, and the techniques he developed that helped make them efficient. +

      +
      +
      + + + + +

      Git 102 : Why you learned git in the first place.

      +
      + +

      +Learn how to manage multiple remotes, for those times when GitHub goes down. Then learn what to do when you accidentally overwrite your source code! Only basic git knowledge is assumed. +

      +
      +
      + + + + + +

      +Steve Bourque and Mike Patterson of IST will give a brief overview of campus network connectivity and interconnectivity.

      +
      + +

      +Steve Bourque and Mike Patterson of IST will give a brief overview of campus network connectivity and interconnectivity. Steve will describe the general connections, and Mike will talk about specific security measures in place. We'll have refreshments! +

      +
      +
      + + + + +

      + It's midterms season, and everyone has to study. So why not come study with the CS Club? Everyone welcome, especially new members! +There will be tea and delicious snacks and outlets. Plus our delightful company. +See you there! + +

      +
      + +

      + +Come join CSC at our Tea and Study event! Everyone welcome, especially new members! +There will be tea and delicious snacks and outlets. Plus our delightful company. +

      +
      +
      + + + +

      + Movie Night! Come watch "Big Hero 6" with the CSC! +

      +
      + +

      + Come watch "Big Hero 6" with the Computer Science Club this wednesday the 10th at 6:30 PM in the MC Comfy Lounge. + Why "Big Hero 6"? It's an award-winning animated Disney movie involving an inflatable robot fighting evil in "San Frasokyo". Enough said. +

      +
      +
      + + + +

      + The CS Club is having its termly code party! Come out and work on projects, assignments, and more. Food is provided! +

      +
      + +

      + Want help installing Linux? Bring a USB, we'll help you. + Want to work on a project, CS homework, or an IRC bot? Come over, we'll have food. + Want to see what it's like to be in the new STC? Plugs at every desk, I'm telling you. + (This term it's going to be in the new STC not in the comfy. We're going for some adventure this term.) +

      +

      + Be there, we'll have dinner! +

      +
      +
      + + + +

      + Interested in Linux, but don't know where to start? Come learn some + basic topics with us including interaction with the shell, motivation + for using it, some simple commands, and more! (Cookies after) +

      +
      + +

      + New to the Linux computing environment? If you seek an introduction, + look no further (you can if you want we're not the police). Topics that + will be covered include basic interaction with the shell and the + motivations behind using it, and an introduction to compilation. You'll + have to learn this stuff in CS 246 anyways, so why not get a head start! +

      +

      + If you're interested in attending, make sure you can log into the Macs + on the third floor, or show up to the CSC office (MC 3036) 20 minutes + early for some help. If you're already familiar with these topics, don't + hesitate to come to Unix 102, planned to be held after Reading Week. +

      +
      +
      + + + +

      + eth1: a day-long programming contest. Form teams and hack + together a trading bot to compete against others and the markets. +

      +
      + +

      + eth1: a day-long programming contest. Form teams and hack together a trading bot to compete against others and the markets. +

      +

      + Brought to you by: CSC and Jane Street. +

      +

      + Each member of the winning team will receive $1000 USD. +

      +

      + There'll be lots of (free) food and drink available. +

      +

      + Absolutely no special math, OCaml, or finance knowledge is required; you can use any language you like. The contest is entirely technical in nature and you won't need any visual design skills. +

      +

      + The exact details of the hackathon aren't released until the competition begins. The one thing you can do ahead of time to prepare is familiarize yourself with the libraries for writing TCP clients in your programming language of choice. +

      +

      + Sign up! +

      +

      + The contest will be on Saturday, January 23rd, from 11:00AM - 11:00PM. Signups will close on Monday, January 18th at 11:59PM, and we'll send out confirmations to participants on the 20th. +

      +

      + For any other queries, email: eth1-waterloo@janestreet.com +

      +

      + Further details will be announced closer to the event. Teams of up to three will be accepted, but you don't have to have a team to sign up — feel free to turn up as a singleton and we'll form teams on the fly. +

      +
      +
      + + + +

      + Interested in Linux, but don't know where to start? Come learn some + basic topics with us including interaction with the shell, motivation + for using it, some simple commands, and more! (Cookies after) +

      +
      + +

      + The Computer Science Club will be holding elections for the Winter 2016 + term on Thursday, January 14th in MC Comfy (MC 3001) at 19:00. During + the meeting, the president, vice-president, treasurer and secretary will + be elected, the sysadmin will be ratified, and the librarian and office + manager will be appointed. +

      +

      + If you'd like to run for any of these positions or nominate someone, you + can write your name on the whiteboard in the CSC office (MC 3036/3037) or + send me (Charlie) an email at cro@csclub.uwaterloo.ca. Every effort will + be made to note down whiteboard nominations, but it is highly recommended + to send me an email in addition to writing on the whiteboard. You can + also deposit nominations in the CSC mailbox in MathSoc or present them to + me in person. Nominations will close at 18:00 on Wednesday, January 13th. + All members are welcome to run! +

      +
      +
      + + + + + + + +

      + WiCS and CSC are watching War Games in the Comfy lounge. +

      +
      + +

      + WiCS and CSC are watching War Games in the Comfy lounge. +

      +

      + War Games is this movie where these kids phone a computer and then the computer wants to nuke things. + Cold war stuff. Nowadays computers won't let you do that, you have to SSH in instead. +

      +

      + We're bringing food. Gluten-free, vegetarian options available. Sandwiches, drinks, and popcorn! +

      +

      + Everyone welcome! Stop by! +

      +
      +
      + + + +

      + An introduction to Google's FOAM framework, an open-source modeling + framework written in Javascript, by Google's Kevin Greer. +

      +
      + +

      + FOAM is an open-source modeling framework written in Javascript. With FOAM, + you can create Domain Specific Languages (DSLs), which are high-level + models that can be interpreted or compiled to different languages or + environments (Java/Android, Swift/iOS, and JS/Web). Currently, it supports + DSLs for entities/classes, parsers, animations, database queries, + interactive documents, and, most importantly, new DSLs. +

      +

      + FOAM supports building text, HTML, and graphical views for DSLs using a + small Model View Controller (MVC) library, which is itself modeled with + FOAM. This library can also be used by modeled Javascript applications. +

      +

      + FOAM increases developer productivity by allowing them to express + solutions at a higher, more succinct level. The MVC library also + increases application performance through its efficient data-binding, + caching, and query-optimization mechanisms. +

      +

      + Learn more at http://foamdev.com +

      +

      + You can get in contact with Kevin Greer on twitter, + @kgrgreer. +

      +
      +
      + + + +

      + An introduction to some basic issues with optimization of imperative + programs, by Sean Harrap +

      +
      + +

      + An introduction to some basic issues with optimization of imperative + programs by Sean Harrap, beginning with traditional methods such as tree + traversals. +

      +

      + This will be followed by a more powerful solution to these problems, + providing an overview of its mathematical foundations, and then + describing how it can be used to express optimizations simply and elegantly. +

      +

      + Some familiarity with the second year CS core (CS245, CS241, MATH239) + will be assumed. +

      +
      +
      + + + +

      + Learn how to use Git properly in an exciting talk by Charlie Wang! +

      +
      + +

      + git init, git add, git commit, git 'er done! +

      +

      + In Git 101, Charlie Wang will convince you to use Git for your projects and + show you a high level overview of how to use it properly. +

      +

      + This talk is recommended for CS 246 students. +

      +

      + Come for the tutorial, stay for the bad jokes. +

      +
      +
      + + + + Between walled gardens, surveillance agencies, and political opponents, + no matter who's winning the war on general purpose computing you're + losing. The Computer Science Club will be hosting Cory Doctorow's talk + in the Theatre of the Arts on October 16. + + +

      + No Matter Who's Winning the War on General Purpose Computing, You're Losing +

      +

      + If cyberwar were a hockey game, it'd be the end of the first period and + the score would be tied 500-500. All offense, no defense. +

      +

      + Meanwhile, a horrible convergence has occurred as everyone from car + manufacturers to insulin pump makers have adopted the inkjet printer + business model, insisting that only their authorized partners can make + consumables, software and replacement parts -- with the side-effect of + making it a felony to report showstopper, potentially fatal bugs in + technology that we live and die by. +

      +

      + And then there's the FBI and the UK's David Cameron, who've joined in + with the NSA and GCHQ in insisting that everyone must be vulnerable to + Chinese spies and identity thieves and pervert voyeurs so that the spy + agencies will always be able to spy on everyone and everything, everywhere. +

      +

      + It's been fifteen years since the copyright wars kicked off, and we're + still treating the Internet as a glorified video-on-demand service -- + when we're not treating it as a more perfect pornography distribution + system, or a jihadi recruitment tool. +

      +

      + It's all of those -- and more. Because it's the nervous system of the + 21st century. We've got to stop treating it like a political football. +

      +

      + Cory Doctorow will be talking on Friday October 16, 7pm in + the Theatre of the Arts. Admission is free, and + the talk will be open to the public. Doors open + at 6:30pm. Headsets will be provided for the hard of hearing, + email Patrick at pj2melan@uwaterloo.ca . The theatre is wheelchair accessible. +

      +

      + The following books written by Cory will be sold at the event: +

        +
      • Little Brother
      • +
      • Homeland
      • +
      • For the Win
      • +
      • Makers
      • +
      • Pirate Cinema
      • +
      • Information Doesn't want to be free
      • +
      • In Real Life
      • +
      +

      +
      +
      + + + + +

      Come out to a talk by Alfe Clemencio!

      +

      Many people want to make games as signified by all the game development + schools that are appearing everywhere. But how would you do it as a UW + student? This talk shares the experiences of how making Sakura River + Interactive was founded without any Angel/VC investment. +

      +
      + +

      Come out to a talk by Alfe Clemencio!

      +

      Many people want to make games as signified by all the game development + schools that are appearing everywhere. But how would you do it as a UW + student? This talk shares the experiences of how making Sakura River + Interactive was founded without any Angel/VC investment. +

      +

      The talk will start off with inspiration drawn of Co-op Japan, to it's + beginnings at Velocity. Then a reflection of how various game + development and business skills was obtained in the unexpected ways at + UW will follow. How the application of probabilities, theory of + computation, physical/psychological attraction theories was used in the + development of the company's first game. Finally how various Computer + Science theories helped evaluate feasibility of several potential + incoming business deals. +

      + From Sakura River interactive +
      +
      + + + +

      + Big-O, the Halting Problem, Finite State Machines, and more are concepts that get + even more interesting in the real world. Come and hear Tom Rathborne talk about how theory + hits reality (often with a bang!) at Booking.com. +

      +
      + +
        +
      • Data Structures
      • +
      • Finite State Machines
      • +
      • big-O
      • +
      • Queuing theory
      • +
      • Race conditions
      • +
      • Compilers
      • +
      • The Halting Problem
      • +
      • etc.
      • +
      +

      + These things get even more interesting in the real world. + Come and hear Tom Rathborne talk about how theory hits reality (often with a bang!) at + Booking.com, the biggest not-a-technology-company on the Internet. +

      +

      + Food and drinks will be provided! +

      +
      +
      + + + +

      + Back to back talks from John Stix and Francisco Dominguez on turning + a company's culture around and on Software Defined Networks! +

      +
      + +

      + Back to back talks from John Stix and Francisco Dominguez on turning + a company's culture around and on Software Defined Networks! +

      +

      + John Stix will be talking about how he turned around the corporate culture at Fibernetics Corporation. +

      +

      + Francisco Dominguez will be talking about Software Defined Networks, which + for example can turn multiple flakey internet connections into one reliable + one. +

      +

      + The speakers are: +

        +
      • John Stix - President, Fibernetics
      • +
      • Francisco Dominguez - CTO, Fibernetics
      • +
      +

      +

      + Food and drinks will be provided! +

      +
      +
      + + + +

      + The CSC is joining WiCS to host a career panel! Come hear from Waterloo + alumni as they speak about their time at Waterloo, experience with coop, + and life beyond the university. Please register at http://bit.ly/1OyJP6D +

      +
      + +

      + The CSC is joining WiCS to host a career panel! Come hear from Waterloo + alumni as they speak about their time at Waterloo, experience with coop, + and life beyond the university. A great chance to network and seek + advice! +

      +

      + The panelists are: +

        +
      • Joanne Mckinley - Software Engineer, Google
      • +
      • Carol Kilner - COO, BanaLogic Corporation
      • +
      • Harshal Jethwa - Consultant, Infusion
      • +
      • Dan Collens - CTO, Big Roads
      • +
      +

      +

      + Food and drinks will be provided! Please register + here +

      +
      +
      + + + +

      + The Computer Science Club has elected its executive for the term, and a new Office Manager and System Administrator have been appointed. +

      +

      + See inside for results. +

      +
      + +

      + The Computer Science Club has elected its executive for the term, and a new Office Manager and System Administrator have been appointed. + The quorum for elections had been reached, and voting members of the CSC voted for their President, Vice President, Treasurer, and Secretary from among many qualified candidates. + The new elected executive then proceeded to appoint a System Administrator (who became part of the executive ex officio) and an Office Manager. + + The appointment of a Librarian was delayed because no suitable and willing candidate was found. +

      +

      + The results of the elections are: +

        +
      • Simone Hu - President
      • +
      • Theo Belaire - Vice President
      • +
      • Jordan Upiter - Treasurer
      • +
      • Daniel Marin - Secretary
      • +
      • Jordan Pryde - System Administrator
      • +
      • Office Manager - Ilia Chtcherbakov
      • +
      +

      +
      +
      + + + + +

      + The Computer Science Club will be holding elections for the Fall 2015 + term on Tuesday, September 22nd in MC Comfy (MC 3001) at 19:00. During + the meeting, the president, vice-president, treasurer and secretary will + be elected, the sysadmin will be ratified, and the librarian and office + manager will be appointed. +

      +

      + See inside for nominations. +

      +
      + +

      + The Computer Science Club will be holding elections for the Fall 2015 + term on Tuesday, September 22nd in MC Comfy (MC 3001) at 19:00. During + the meeting, the president, vice-president, treasurer and secretary will + be elected, the sysadmin will be ratified, and the librarian and office + manager will be appointed. +

      +

      + If you'd like to run for any of these positions or nominate someone, you + can write your name on the board in the CSC office (MC 3036/3037) or + send me (Charlie) an email at cro@csclub.uwaterloo.ca. You can also + deposit nominations in the CSC mailbox in MathSoc or present them to me + in person. Nominations will close at 18:00 on Monday, September 21st. + All members are welcome to run! First-years are especially encouraged to + run for secretary, office manager, and librarian, but they are not + limited to those positions. +

      +
      +
      + + + +

      + Come for a talk from Rob Suderman on Cardboard, Google's recent + exploration in affordable, cereal box based Virtual Reality. +

      +
      + +

      + Come for a talk from Rob Suderman on Cardboard, Google's recent + exploration in affordable, cereal box based Virtual Reality. +

      +

      + Learn about the tools available to make your own application, some of + the pitfalls to avoid, and an overview of rendering virtual reality + content with some tips and tricks on high performance rendering. The + talk will contain content for everyone interested! +

      +
      +
      + + + + + +

      + Come to this exciting talk about path-finding algorithms which + is being presented by Professor Anna Lubiw. +

      +
      + +

      + Finding shortest paths is a problem that comes up in many applications: + Google maps, network routing, motion planning, connectivity in social + networks, and etc. + The domain may be a graph, either explicitly or implicitly represented, + or a geometric space. +

      +

      + Professor Lubiw will survey the field, from Dijkstra's foundational algorithm to + current results and open problems. + There will be lots of pictures and lots of ideas. +

      +

      + Click here to see the slides from the talk. +

      +

      + Click here for the recorded talk. +

      +
      +
      + + + +

      + Ambient infra sound surrounds us. Richard Mann presents his current + research and equipment on measuring infra sound, and samples of recorded + infra sound. +

      +
      + +

      + Infra sound refers to sound waves below the range of human hearing. + Infra sound comes from a number of natural phenomena including weather + changes, thunder, and ocean waves. Common man made sources include + heating and ventilation systems, industrial machinery, moving vehicle + cabins (air, trains, cars), and energy generation (wind turbines, gas + plants). +

      + In this talk Richard Mann will present equipment he has built to measure infra sound, and + analyse some of the infra sound he has recorded. +

      + Note: In Winter 2016 Richard Mann will be offering a new course, in Computer Sound. The + course will appear as CS489/CS689 ("Topics in Computer Science"). This + is a project-based course (60% assignments, 40% project, no final). + Details at his web page, + ~mannr. +

      +
      +
      + + + +

      Come hang out with the Women in Computer Science and the Computer Science Club! There will be s'mores and frozen yogurt. Also fire. And a creek. Let's enjoy the outdoors!

      +
      + +

      Come hang out with the Women in Computer Science and the Computer Science Club! There will be s'mores and frozen yogurt. Also fire. And a creek. Let's enjoy the outdoors!

      +
      +
      + + + +

      n things SCS hasn't told you about the shell

      +
      + +

      + This is a continuation of the Unix10X series of seminars that cover the use + of *nix environments, largely through interacting with a command line shell. In + this instalment we will be covering some of what the School of Computer + Science has left out of their introduction to the Command Line / Bash (from + cs246), as well as a brief introduction to having a useful prompt. +

      + Topics to be discussed include: +

        +
      • Lost Bash: fancy expansion, arrays, and shopt
      • +
      • The File System is scary: your file names contain white space and newlines
      • +
      • Where Am I: A brief introduction to prompt customization
      • +
      +

      +
      +
      + + + +

      + As there are vacancies in the executive council, there will be + by-election on May 22nd. The following positions are open for election: +

        +
      • Treasurer
      • +
      • Secretary
      • +
      +

      +

      + The executive are also looking for people who may be interested in the + following positions: +

        +
      • Systems Administrator
      • +
      • Office Manager
      • +
      • Librarian
      • +
      +

      +
      +
      + + + + + +

      + Derek Rayside presents current research on the field of microfluidics. + Microfluidics are currently developed mainly by trial and error. How can + this be improved? +

      +
      + +

      + Microfluidics is an exciting new area concerned with designing devices + that perform some medical diagnoses and chemical synthesis tasks orders + of magnitude faster and less expensively than traditional techniques. + However, microfluidic device design is currently a black art, akin to + how digital circuits were designed before 1980. +

      + We have developed a + hardware description language that is appropriate for the description + and synthesis of both single-phase and multi-phase microfluidic devices. + These are new results that have not yet been published. This is + collaborative work with other research groups in Mechanical Engineering, + Chemical Engineering, and Electrical Engineering. +

      +
      +
      + + + +

      + GM for the W2015 term, two main amendments to be discussed: Requiring + elections to be held within two weeks of the beginning of term and + adopting a club-wide code of conduct. +

      + Code Party 1 follows, we're doing timed code golf problems, T-shirts might + find themselves on people who do well on code golf. +

      +
      + +

      + GM for the W2015 term, two main amendments to be discussed: Requiring + elections to be held within two weeks of the beginning of term and + adopting a club-wide code of conduct. +

      + Code Party 1 follows, we're doing timed code golf problems, T-shirts might + find themselves on people who do well on code golf. +

      +
      +
      + + + +

      + Day 2 of Runtime Type Inference in Dynamic Languages with Kannan Vijayan +

      +
      + +

      + Day 2 of Runtime Type Inference in Dynamic Languages with Kannan Vijayan +

      +
      +
      + + + +

      + Javascript is fast. In some cases, very close to compiled-language fast. + How is this even possible? How do we know what types our variables have? + How can we optimize it well? Kannan Vijayan will be talking about the + historical advances in JIT-compilation of dynamically typed programs over + two days. Of course, both of those talks will have free food. +

      +
      + +

      + How do we make dynamic languages fast? Today, modern Javascript engines + have demonstrated that programs written in dynamically typed scripting lan- + guages can be executed close to the speed of programs written in languages + with static types. So how did we get here? How do we extract precious type + information from programs at runtime? If any variable can hold a value of any + type, then how can we optimize well? +

      + This talk covers a bit of the history of the techniques used in this space, and + tries to summarize, in broad strokes, how those techniques come together to + enable efficient jit-compilation of dynamically typed programs. + To do the topic justice, Kannan Vijayan will be talking the Monday and + Tuesday March 9th and 10th. +

      + Does that mean two consecutive days of free food? Yes it does. +

      +
      +
      + + + +

      + Murphy Berzish explains how to programmatically determine if a program is satisfiable, + and how to find a concrete counterexample if it is unsatisfiable. At the core + are SAT/SMT solvers. SAT theory deals with Boolean Satisfiability solvers, + while SMT theory--Satisfiability Modulo a Theory--allows SMT to be extended + to common data structures. Free food! +

      +
      + +

      + Does your program have an overflow error? Will it work with all inputs? How + do you know for sure? Test cases are the bread and butter of resilient design, + but bugs still sneak into software. What if we could prove our programs are + error-free? +

      + Boolean Satisfiability (SAT) solvers determine the ‘satisfiability’ of boolean + set of equations for a set of inputs. An SMT solver (Satisfiability Modulo + a Theory) applies SMT to bit-vectors, strings, arrays, and more. Together, + we can reduce a program and prove it is satisfiable, or provide a concrete + counter-example. The implications of this are computer-aided reasoning tools + for error-checking in addition to much more robust programs. +

      + In this talk Murphy Berzish will give an overview of SAT/SMT theory and + some real-world solution methods. He will also demonstrate applications of + SAT/SMT solvers in theorem proving, model checking, and program verification. +

      + What else? Oh yes, refreshments and drinks will be served. Come out! +

      +
      +
      + + + +

      + The first code party of Winter 2015, and we have something a litle different + this time. We're running a Code Retreat (coderetreat.org) with Boltmade. + The result of this is that you will be able to do a coding challenge, wherein + you implement Rule 110 (like the Game of Life). Of course, if you want to + work on whatever you can do that as well. Delicious free food, but RSVP! + bit.ly/code-party-0 +

      +
      + +

      + The first code party of Winter 2015, and we have something a litle different + this time. We're running a Code Retreat (coderetreat.org) with Boltmade. + The result of this is that you will be able to do a coding challenge, wherein + you implement Rule 110 (like the Game of Life). Of course, if you want to + work on whatever you can do that as well. Delicious free food, but RSVP! + bit.ly/code-party-0 +

      +
      +
      + + + +

      + Part of the Cheriton School of CS' Distinguished Lecture Series, MIT's Leslie Kaelbling will + discuss robotic AI applied to the messy real world. We make a number of + approximations during planning but regain robustness and effectiveness + through a continuous state estimation and replanning process. This allows + us to solve problems that would otherwise be intractable to solve optimally. +

      +
      + +

      + The fields of AI and robotics have made great improvements in many + individual subfields, including in motion planning, symbolic planning, + probabilistic reasoning, perception, and learning. Our goal is to + develop an integrated approach to solving very large problems that are + hopelessly intractable to solve optimally. We make a number of + approximations during planning, including serializing subtasks, + factoring distributions, and determinizing stochastic dynamics, but + regain robustness and effectiveness through a continuous state + estimation and replanning process. This approach is demonstrated in + three robotic domains, each of which integrates perception, estimation, + planning, and manipulation. +

      +
      +
      + + + +

      + Theo Belaire, a fourth-year CS student, will be talking about Racket's + match' function. Bug resistant, legible, and super powerful! Especially + useful for CS 241 in writing compilers, but all-round a joy to write. +

      +
      + +

      + Come learn how to use the power of the Racket match construct to make your + code easier to read, less bug-prone and overall more awesome! +

      +

      + Theo Belaire, + a fourth-year CS student, will show you the basics of how this amazing + function works, and help you get your feet wet with some code examples and + advanced use cases. +

      +

      + If you're interested in knowing about the more + powerful features of Racket, then this is the talk for you! The material + covered is especially useful for students in CS 241 who are writing their + compiler in Racket, or are just curious about what that might look like. +

      +
      +
      + + + +

      Alex Tsay from AeroFS will talk about the high availability distributed + file systems they develop. +

      +

      The CAP Theorem outlined the fundamental limitations of a distributed system. + When designing a distributed system, one has to constantly be aware of the + trade-off between consistency and availability. + + Most distributed systems are designed with consistency in mind. However, AeroFS + has decided to build a high-availability file system instead. + + In this tech talk, I'll be presenting an overview of AeroFS file system, + advantages and challenges of a high-availability file system, and examine the + inner workings of AeroFS's core syncing algorithm. +

      +
      + +

      Alex Tsay from AeroFS will talk about the high availability distributed + file systems they develop. +

      +

      The CAP Theorem outlined the fundamental limitations of a distributed system. + When designing a distributed system, one has to constantly be aware of the + trade-off between consistency and availability. + + Most distributed systems are designed with consistency in mind. However, AeroFS + has decided to build a high-availability file system instead. + + In this tech talk, I'll be presenting an overview of AeroFS file system, + advantages and challenges of a high-availability file system, and examine the + inner workings of AeroFS's core syncing algorithm. +

      +
      +
      + + + +

      Elections for Winter 2015 are being held! Submit a nomination and join + your fellow members in choosing this term's CSC executive. (Please note + the time change to 7PM.) +

      +
      + +

      The Computer Science Club will be holding its termly elections this + upcoming Thursday, Jan. 15 at 6PM in the Comfy Lounge (MC 3001). During + the election, the president, vice-president, treasurer and secretary will + be elected, the sysadmin will be ratified, and the librarian and office + manager will be appointed. +

      +

      Nominations are now closed. The candidates are:

      +
        +
      • President:
          +
        • Luke Franceschini (l3france)
        • +
        • Gianni Gambetti (glgambet)
        • +
        • Ford Peprah (hkpeprah)
        • +
        • Khashayar Pourdeilami (kpourdei)
        • +
      • +
      • Vice-President:
          +
        • Luke Franceschini (l3france)
        • +
        • Gianni Gambetti (glgambet)
        • +
        • Patrick Melanson (pj2melan)
        • +
        • Ford Peprah (hkpeprah)
        • +
        • Khashayar Pourdeilami (kpourdei)
        • +
      • +
      • Treasurer:
          +
        • Weitian Ding (wt2ding)
        • +
        • Aishwarya Gupta (a72gupta)
        • +
        • Edward Lee (e45lee)
        • +
      • +
      • Secretary:
          +
        • Ilia "itchy" Chtcherbakov (ischtche)
        • +
        • Luke Franceschini (l3france)
        • +
        • Patrick Melanson (pj2melan)
        • +
        • Ford Peprah (hkpeprah)
        • +
        • Khashayar Pourdeilami (kpourdei)
        • +
      • +
      +

      Voting will be heads-down, hands-up, restricted to MathSoc social + members. If you'd like to review the elections procedure, you can visit + our Constitution + page. +

      +
      +
      + + + +

      + Our speaker, Avery Pennarun, will share some not-very-secret secrets from + the team creating GFiber's open source router firmware, including some + discussion of wifi, marketing truthiness, the laws of physics, something + about coaxial cables, embedded ARM processors, queuing theory, signal + processing, hardware design, and kernel driver optimization. If you're lucky, + he may also rant about poor garbage collector implementations. Also, there + will be at least one slide containing one of those swooshy circle-and-arrow + lifecycle diagrams, we promise. +

      +

      + Please RSVP here: http://bit.ly/GoogleFiberTalk. +

      +
      + +

      + Google Fiber's Internet service offers 1000 Mbps internet to a few cities: + that's 100x faster than a typical home connection. The problem with going + so fast is it moves the bottleneck around: for the first time, your Internet + link may be faster than your computer, your wifi, or even your home LAN. +

      +

      + Our speaker, Avery Pennarun, will share some not-very-secret secrets from + the team creating GFiber's open source router firmware, including some + discussion of wifi, marketing truthiness, the laws of physics, something + about coaxial cables, embedded ARM processors, queuing theory, signal + processing, hardware design, and kernel driver optimization. If you're lucky, + he may also rant about poor garbage collector implementations. Also, there + will be at least one slide containing one of those swooshy circle-and-arrow + lifecycle diagrams, we promise. +

      +

      + About Avery Pennarun: + Avery graduated from the University of Waterloo in Computer Engineering, + started some startups and some open source projects, and now works at Google + Fiber on a small team building super fast wifi routers, TV settop boxes, and + the firmware that runs on them. He lives in New York. +

      +

      + Please RSVP here: http://bit.ly/GoogleFiberTalk. +

      +
      +
      + + + + + +

      + The network is unreliable. 3G networking is slow. Using WiFi drains your battery. + The NSA is spying on you. Different versions of HttpURLConnection have different bugs. +

      +

      + Jesse Wilson, a software developer at Square, will be talking about OkHttp, + a library that he maintains, and how to use it to make your app's networking work even + when conditions aren't ideal. He will talk about how to configure caching to improve behavior + and save resources. He will talk about crypto, and he will give advice on which libraries + to use to make good networking easy. +

      +

      + Please RSVP here: https://www.ticketfi.com/event/77/heroic-android-http. +

      +
      +
      + + + +

      C++ is an interesting study because it supports a large number of + powerful, abstract concepts, yet it operates very close to the + hardware compared to many modern programming languages. There are + also many implementations of C++ which must be made interoperable. + I will discuss some aspects of the Itanium 64 Application Binary + Interface (ABI) for C++, which is now the de facto standard across + Unix-like platforms of all architectures. In particular, I will + cover a number of aspects of the class system fundamental to C++: + data layout, polymorphic types, construction and destruction, and + dynamic casting. +

      +
      +
      + + + +

      + Why sleep when you could be hacking on $SIDE_PROJECT, or working on + $THE_NEXT_BIG_THING with some cool CSC/SE people? + Come when you want, hack on something cool, demo before you leave. +

      +

      + If you don't have a project, don't worry - we have a list of ideas, + and a lot of people will be looking for an extra helping hand on + their projects. +

      +

      + NOTE: Dinner and snacks will only be served to those working on + projects during the event. +

      +
      +
      + + + +

      + In the last few years, there has been breakthrough progress in pattern + recognition -- problems like computer vision and voice recognition. + This sudden progress has come from a powerful class of models called + deep neural networks. +

      +

      + This talk will explore what it means to do pattern recognition, why it + is a hard problem, and why deep neural networks are so effective. We + will also look at exciting and strange recent results, such as state + of the art object recognition in images, neural nets playing video + games, neural nets proving theorems, and neural nets learning to run + python programs! +

      +

      + Our speaker, Christopher Olah, is a math-obsessed and Haskell-loving + research intern from Google's Deep Learning group. He has a blog about + his research here: http://colah.github.io/. +

      +
      +
      + + + +

      + Kang, our guest speaker from Bloomberg, will illustrate some examples and + difficulties associated with working on some of the most fascinating technical + challenges in business and finance. + He will also show some of the machine learning applications at Bloomberg that are + useful in this environment. + Please show up early to ensure a spot (and dinner). +

      +
      +
      + + + +

      + From the massive supercomputer, to your laptop, to a Raspberry Pi: all + computing systems run on an operating system powered by a kernel. The kernel is + the most fundamental software running on your computer, enabling developers and + users to interact with its hardware at a higher level. +

      +

      + This talk will explore the process of writing a minimal kernel from + scratch, common kernel responsibilities, and explore of the challenges of + kernel development. +

      +
      +
      + + + +

      + Women in Computer Science (WiCS) and the Computer Science Club (CSC) will + meet up in the Comfy Lounge to watch a favourite cult classic: Hackers. + Join us as we relive our 90s teenage hacking fantasies and stuff our faces + with popcorn and junk food. +

      +

      + Hackers of the world, unite! +

      +
      +
      + + + +

      + Interested in Unix, but don't know where to start? Then Come learn some + basic topics with us including interaction with the shell, motivation + for using it, some simple commands, and more. +

      +
      +
      + + + +

      + Immediately after UNIX 101, we will be having our first annual code party. + Enjoy a free dinner, relax, and share ideas with your friends about + your favourite topics in computer science. Feel free to show up + with or without personal projects to work on, we've got lots of ideas + to get started with. +

      +
      +
      + + + +

      + The Travelling Salesman Problem is easy to state: given a number of +cities along with the cost of travel between each pair, find the cheapest way +to visit all of the cities and return to your starting point. However, TSP is very difficult to solve. +In this talk, Professor Bill Cook will discuss the history, applications, and computation of this +fascinating problem. +

      +
      + +

      + The Travelling Salesman Problem is easy to state: given a + number of cities along with the cost of travel between each + pair of them, find the cheapest way to visit them all and + return to your starting point. Easy to state, but + difficult to solve. Despite decades of research, in + general it is not known how to significantly improve upon + simple brute-force checking. It is a real possibility that + there may never exist an efficient method that is + guaranteed to solve every instance of the problem. This + is a deep mathematical question: Is there an efficient + solution method or not? The topic goes to the core of + complexity theory concerning the limits of feasible + computation and we may be far from seeing its + resolution. This is not to say, however, that the + research community has thus far come away + empty-handed. Indeed, the problem has led to a large + number of results and conjectures that are both + beautiful and deep, and on the practical side solution + methods are used to compute optimal or near-optimal tours + for a host of applied problems on a daily basis, from + genome sequencing to arranging music on iPods. In this + talk we discuss the history, applications, and + computation of this fascinating problem. +

      +
      + +
      + + + +

      + Come listen to a Google software engineer give a talk on building a + mobile platform for Android and iOS! + Wesley Tarle has been leading development at Google in Kitchener and + Mountain View, and building stuff for third-party developers on + Android and iOS. He's contributed to Google Play services since its + inception and continues to produce APIs and SDKs focused on mobile + startups. + RSVP at http://goo.gl/Pwc3m4. +

      +
      +
      + + + + + + +

      + Do you like going outside? Are you vitamin-D deficient from being in the + MC too long? Do you think s'mores and bonfire are a delicious + combination? If so, you should join us as the CSC is going outside again! + Around 7:30PM, we're going to Laurel Creek Fire Pit for some outdoor fun. + Come throw frisbees, relax and eat snacks in good company - even if you + aren't a fan of the outside or vitamin-D deficient! We'll also have + some sort of real food - probably pizza. +

      +
      +
      + + + + +

      + Learn about the real reasons you should be in school from David Wolever, + CTO of akindi and a director of PyCon Canada. +

      +
      + +

      + Hindsight is 20/20, and since leaving university I’ve had five years and three + startups to reflect on the most valuable things I have (and haven’t) taken away + from my time in school. + David studied computer science for three years at the University of Toronto + before leaving to be employee zero at a Waterloo-based startup. Since then + he has been a founder of two more startups, started PyCon Canada, and has + written hundreds of thousands of lines of code. He is currently CTO of Akindi, a + Toronto-based startup trying to make multiple choice testing a bit less terrible. + He’s best found on Twitter at http://twitter.com/wolever +

      +
      +
      + + + +

      + Learn how to host a website and spend the night hacking! +

      +
      + +

      + Did you know that by becoming a CSC member, you get 4GB of free webspace? + Join us in MC 3003 on Friday July 11 to learn how to use that space and + host content for the world to see! + + Afterwards we will be moving over to M3 1006 for a night of hacking and + snacking! Work on a personal project, open source software, or anything + you wish. Food will be provided for your hacking pleasure. + + Come join us for an evening of fun, learning, and food! +

      +
      +
      + + + +

      + Five slides. Five minutes. Pure fun. +

      +
      + +

      + Create an entertaining slideshow and present someone else's on the spot! + Join us in MC 2035 on Wednesday June 25 at 18:00 for a fun evening of + quick presentations of random slide decks. An example from last semester + can be found at tinyurl.com/battle-decks-example. Please e-mail your + battle deck to l3france@csclub.uwaterloo.ca. Snacks will be provided to + fuel your battle hunger! +

      +
      +
      + + + +

      + Learn how functional programming is used in the real world, while + enjoying free dinner, and free swag. +

      +
      + +

      + Enjoy a free dinner while Max Ransan, a lead developer at Bloomberg, + talks about the use of functional programming within a recently developed + product from Bloomberg. This includes UI generation, domain-specific + languages, and more! Free swag will also be provided. +

      +
      +
      + + + +

      + Come throw a frisbee, hang around a bonfire, and roast marshmellows! + This is a social event just for fun, so come relax and eat snacks in + good company! +

      +
      + +

      + Meet at the Laurel Creek Fire Pit (the one across Ring Road from EV3) + at 7:30 for a fun night of hanging out with friends. If you aren't sure + where it is, meet at the office ten minutes before hand, and we will + walk over together. We'll start the evening off with throwing around + a frisbee or two, and as the night goes on we'll light up the fire and + get some s'mores cooking! +

      +
      +
      + + + +

      + Interested in Unix, but don't know where to start? Then Come learn some + basic topics with us including interaction with the shell, motivation + for using it, some simple commands, and more. +

      +

      + Afterwards we will be moving over to the MC Comfy Lounge for a + fun night of hacking! The sysadmin position will also be ratified + during a general meeting of the membership at this time. Come join us + for an evening of fun, learning, and food! +

      +
      + +

      + Interested in Unix, but don't know where to start? Then start + in MC 3003 on Friday May 30 with basic topics including + interaction with the shell, motivation for using it, some simple + commands, and more. +

      +

      + Afterwards we will be moving over to the MC Comfy Lounge for a + fun night of hacking! Work on a personal project, open source + software, or anything you wish. Food will be available for your + hacking pleasure. The Sysadmin position will also be ratified + during a general meeting at this time. Come join us for an + evening of fun, learning, and food! +

      +
      +
      + + + +

      The Computer Science Club will soon be holding elections for this term's + executive. The president, vice president, treasurer, and secretary for the + spring 2014 term will be elected. The system administrator, office manager, + and librarian are also typically appointed here. +

      +
      + +

      Nominations are now closed. The candidates are:

      +
        +
      • President:
          +
        • Jinny Kim (yj7kim)
        • +
        • Matthew Thiffault (mthiffau)
        • +
        • Shane Creighton-Young (srcreigh)
        • +
        • Hayford Peprah (hkpeprah)
        • +
      • +
      • Vice-President:
          +
        • Luke Franceschini (l3france)
        • +
        • Jinny Kim (yj7kim)
        • +
        • Shane Creighton-Young (srcreigh)
        • +
        • Hayford Peprah (hkpeprah)
        • +
      • +
      • Treasurer:
          +
        • Luke Franceschini (l3france)
        • +
        • Matthew Thiffault (mthiffau)
        • +
        • Catherine Mercer (ccmercer)
        • +
        • Joseph Chouinard (jchouina)
        • +
      • +
      • Secretary:
          +
        • Luke Franceschini (l3france)
        • +
        • Catherine Mercer (ccmercer)
        • +
        • Joseph Chouinard (jchouina)
        • +
        • Ifaz Kabir (ikabir)
        • +
      • +
      +
      +
      + + + + + + + + +

      Work on a software project for 24 hours in teams of up to 4 members. Swag will be provided + by Facebook and Google. A Microsoft Surface Tablet will be awarded to the winning team. + Register and find out more at http://hack-waterloo.com.

      +
      + +

      Work on a software project for 24 hours in teams of up to 4 members. Swag will be provided + by Facebook and Google. A Microsoft Surface Tablet will be awarded to the winning team. + Register and find out more at http://hack-waterloo.com.

      +
      +
      + + + +

      Create a 5-slide PowerPoint presentation about a specific topic. Bring it with + you to the event (on a flash drive). Submit it into the lottery. Select a random + PowerPoint presentation from the lottery and talk about it on the spot. +

      +
      + +

      Create a 5-slide PowerPoint presentation about a specific topic. Bring it with + you to the event (on a flash drive). Submit it into the lottery. Select a random + PowerPoint presentation from the lottery and talk about it on the spot. +

      +
      +
      + + + +

      We will be having our 2nd code party this term. Enjoy a free dinner, relax, and + share ideas with your friends about your favourite topics in computer science. +

      +
      + +

      We will be having our 2nd code party this term. Enjoy a free dinner, relax, and + share ideas with your friends about your favourite topics in computer science. +

      +
      +
      + + +

      Learn the basics of using tools found commonly on UNIX-like operating systems. + For students new to this topic, knowledge gained from UNIX 101 would be useful in coursework.

      +
      +

      Learn the basics of using tools found commonly on UNIX-like operating systems. + For students new to this topic, knowledge gained from UNIX 101 would be useful in coursework.

      +
      +
      + + +

      Immediately after UNIX 101, we will be having our first annual code party. + Enjoy a free dinner, relax, and share ideas with your friends about + your favourite topics in computer science.

      +
      +

      Immediately after UNIX 101, we will be having our first annual code party. + Enjoy a free dinner, relax, and share ideas with your friends about + your favourite topics in computer science.

      +
      +
      + + + +

      + Bloomberg's Alex Scotti will be presenting a talk this Tuesday on concurrency control + implementations in relational databases. Free swag and dinner will be provided. +

      + +

      Join Alex Scotti of Bloomberg LP for a discussion of concurrency control + implementation in relational database systems. Focus will be placed on the + optimistic techniques as employed and developed inside Combdb2, Bloomberg's + database system.

      +

      Food will be served by Kismet!

      +
      +
      + + + +

      + Elections for Winter 2014 are being held! The Executive will be elected, + and the Office Manager and Librarian will be appointed by the new + executive. +

      + +

      It's elections time again! On Thursday, January 16 at 5:30PM, come to the Comfy Lounge + on the 3rd floor of the MC to vote in this term's President, Vice-President, Treasurer + and Secretary. The Sysadmin, Librarian, and Office Manager will also be chosen at this time.

      + +

      Nominations are open until 4:30PM on Wednesday, January 15, and can be written + on the CSC office whiteboard (yes, you can nominate yourself). Full CSC + members can vote and are invited to drop by. You may also send nominations to + the Chief Returning Officer by email.

      + +

      Nominations are now closed. The candidates are:

      +
        +
      • President:
          +
        • Jonathan Bailey (jj2baile)
        • +
        • Nicholas Black (nablack)
        • +
        • Bryan Coutts (b2coutts)
        • +
        • Annamaria Dosseva (mdosseva)
        • +
        • Youn Jin Kim (yj7kim)
        • +
        • Visha Vijayanand (vvijayan)
        • +
      • +
      • Vice-President:
          +
        • Nicholas Black (nablack)
        • +
        • Bryan Coutts (b2coutts)
        • +
        • Visha Vijayanand (vvijayan)
        • +
      • +
      • Treasurer:
          +
        • Jonathan Bailey (jj2baile)
        • +
        • Nicholas Black (nablack)
        • +
        • Marc Burns (m4burns)
        • +
        • Bryan Coutts (b2coutts)
        • +
      • +
      • Secretary:
          +
        • Jonathan Bailey (jj2baile)
        • +
        • Bryan Coutts (b2coutts)
        • +
        • Mark Farrell (m4farrel)
        • +
      • +
      +
      +
      + + + + +

      + The CSC has been invited to attend this Erlang conference in Toronto. If + you are interested in attending, please sign up on our web form. We have submitted a MEF proposal + to cover the transportation fees of up to 25 math undergraduates. +

      +

      + The CSC has been invited to attend this Erlang conference in Toronto. If you + are interested in attending, please sign up on our web form, so we can coordinate the group. + We have submitted a MEF proposal to cover the transportation fees of up to + 25 math undergraduates to attend. You will be responsible for your + conference fee and transportation, and if the MEF proposal is granted, you + can submit your bus tickets/mileage record and conference badge to MEF for + a reimbursement. From the conference + website:

      + +

      "Our first ever Toronto Erlang Factory Lite has been confirmed. Join us + on 23 November for a full day debate on Erlang as a powerful tool for + building innovative, scalable and fault tolerant applications. Our speakers + will showcase examples from their work experience and their personal success + stories, thus presenting how Erlang solves the problems related to + scalability and performance. At this event we will focus on what Erlang + brings to the table in the multicore era." +

      +
      + + +

      + Join us for a night of code, food, and caffeine! There will be plenty of + edibles and hacking for your enjoyment. If you are interested in getting + involved in Open Source, there will be mentors on hand to get you started. + Hope to see you there—bring your friends! +

      +

      + Join us for a night of code, food, and caffeine! There will be plenty of + edibles and hacking for your enjoyment, including a full catered dinner + courtesy of the Mathematics Society.

      + +

      There will be two Open Source projects featured at tonight's code + party, with mentors on hand for each. Here is a quick summary of each of + the projects available:

      + +

      OpenHatch: Not sure where to + start? Not to fear! OpenHatch is a project that seeks to introduce people + to Open Source for the first time and help you get involved. There will be + a presentation with an introduction to the tools and information you will + need, and mentors present to help you get set up to fix your first + bug.

      + +

      Social + Innovation Simulation Design Jam: The UWaterloo Games Institute and + SiG@Waterloo will be partnering with us tonight to kick off their weekend + hackathon Design Jam. They seek coders, artists, writers, database and + graphics people to help them out with their project. +

      +
      + + +

      + The last lecture of our security and privacy series. By MMath alumnus + Zak Blacher. +

      +

      + In Zak's talk, "Disk Encryption: Digital Forensic Analysis & Full + Volume Encryption", he aims to cover filesystem forensic analysis + and counter forensics by addressing the entire design stack; starting with + filesystem construction, design, and theory, and drilling down to the inner + workings of hard drives (modern platter hdds, as well as mlc-ssds). This + talk leads in to a discussion on full volume encryption, and how this helps + to protect one's data.

      + +

      The sixth and final lecture of our security and privacy series. +

      +
      + + +

      + This is the fifth lecture of six in the Security and Privacy Lecture + Series. By founding member of the Canadian Cybersecurity Institute and + employee of local ISP Sentex Sean Howard. +

      +

      + Bell's recent announcement of their use of Deep Packet Inspection (DPI) + brings to light a long-standing issue: your internet service provider (ISP) + pwns you. They control your IP allocation, your DNS, your ARP, the AS paths. + The question has never been about ability—it's about trust. Whether + Rogers, AT&T, Virgin, Telus, Vodafone or Wind, your onramp to the + internet is your first and most potent point of security failure.

      + +

      Founding member of the Canadian Cybersecurity Institute and employee of + local ISP Sentex Sean Howard will vividly demo the reasons you need to be + ble to trust your internet provider. Come for the talk, stay for the + pizza!

      + +

      This is the fifth lecture of six in the Security and Privacy Lecture + Series. +

      +
      + + + +

      + The fourth event in our security and privacy series. By undergraduate + students Murphy Berzish and Nick Guenther. +

      +

      +Nick Guenther and Murphy Berzish will be holding a hands-on seminar in the +Comfy to introduce you to public-private key crypto and how you can practically +use it, so bring your laptops! You will learn about PGP, an encryption protocol +that provides confidentiality and authenticity. At the seminar, you will learn +how to use PGP to send encrypted email and files, provably identify yourself to +others, and verify data. Bring a laptop so we can help help you generate your +first keypair and give you the chance to form a Web of Trust with your +peers.

      + +

      A GSIntroducer from www.GSWoT.org will be on +hand. If you are interested in obtaining an elevated level of trust, bring +government-issued photo-ID.

      + +

      There will also be balloons and cake. +

      +
      + + + +

      + The third lecture of our security and privacy series. By undergraduate + student Simon Gladstone. +

      +

      + An introduction to and overview of how to use the Tor Browser Bundle to + browse the "Deep Web" and increase security while browsing the Internet. Tor + is not the be all end all of Internet security, but it is definitely a step + up from using the more popular browsers such as Chrome, Firefox, or + Safari.

      + +

      The third lecture of our security and privacy series. By undergraduate + student Simon Gladstone. +

      +
      + + + +

      + The second lecture of our security and privacy series. By undergraduate student + Eric Dong. +

      +

      + In this talk, I will discuss censorship firewalls used in countries such as + China and Iran, and how to counteract them. The focus is on advanced + application-layer and Deep Packet Inspection firewalls, and unexpected hurdles + in overcoming censorship by these firewalls due to the need for very + unconventional adversary models. Approaches of the privacy tool Tor, popular + proprietary freeware Ultrasurf and Freegate, payware VPNs, and my own + experimental Kirisurf project are examined, where strengths and difficulties + with each system are noted.

      + +

      The second lecture of our security and privacy series. By undergraduate + student Eric Dong. +

      +
      + + + +

      + The first lecture of our security and privacy series. By PhD student Sarah + Harvey. +

      +

      + Recent media coverage has brought to light the presence of various government + agencies' surveillance programs, along with the possible interference of + governments in the establishment and development of standards and software. + This brings to question of just how much we need to be concerned about the + security and privacy of our information.

      + +

      In this talk we will discuss what all this means in technological and social + contexts, examine the status quo, and consider the long-standing implications. + This talk assumes no background knowledge of security or privacy, nor any + specific technical background. All students are welcome and encouraged to + attend.

      + +

      The first lecture of our security and privacy series. By PhD student + Sarah Harvey. +

      +
      + + + +

      + We will be showing GoingNative + lectures from some of the top individuals working on C++ + approximately biweekly on Thursdays at 6:30PM in the PHY 150 theatre. Every + lecture will be accompanied with free pizza and drinks! Dates are Oct. 3, 17, + 31 and Nov. 7 and 21. Please view this event in detail for more information. +

      +

      + If you're not familiar with the C++ GoingNative series, you can check them + out on the GoingNative + website.

      + +

      We will be showing lectures from some of the top individuals working on C++ + approximately biweekly on Thursdays in the PHY 150 theatre. Every lecture will + be accompanied with free pizza and drinks! Here is our schedule and the planned + showings:

      + +
        +
      • Thu. Oct. 3, 6:30PM: Stroustrup - The Essence of C++
      • +
      • Thu. Oct. 17, 6:30PM: Lavavej - Don't Help The Compiler
      • +
      • Thu. Oct. 31, 6:30PM: Meyers - An Effective C++ Sampler
      • +
      • Thu. Nov. 7, 6:30PM: Alexandrescu - Writing Quick C++ Code, Quickly
      • +
      • Thu. Nov. 21, 6:30PM: Parent - C++ Seasoning
      • +
      +
      +
      + + +

      + The second in a series of recorded talks from GoingNative 2013. Featuring +Stephan T. Lavavej. +

      +

      + The second in a series of recorded talks from GoingNative 2013. Featuring +Stephan T. Lavavej. +

      + C++ has powerful rules for dealing with low-level program structure. +Before a program is ever executed, the compiler determines valuable information +about every expression in the source code. The compiler understands exactly +how long each object's resources will be needed (lifetime), whether each +expression refers to an object that the program has no other way of accessing +(rvalueness), and what operations can be performed on each object (type). +Using examples from C++98 through C++14, this presentation will demonstrate how +to write code that works with the compiler's knowledge to increase robustness, +efficiency, and clarity. This presentation will also demonstrate the horrible +things that happen when programmers think they can do tasks that are better +left to compilers. +

      +
      + + + +

      + The third in a series of recorded talks from GoingNative 2013. Featuring +Scott Meyers. +

      +

      + The third in a series of recorded talks from GoingNative 2013. Featuring +Scott Meyers. +

      + After years of intensive study (first of C++0x, then of C++11, and most +recently of C++14), Scott thinks he finally has a clue. About the effective use +of C++11, that is (including C++14 revisions). At last year’s Going Native, +Herb Sutter predicted that Scott would produce a new version of Effective C++ +in the 2013-14 time frame, and Scott’s working on proving him almost right. +Rather than revise Effective C++, Scott decided to write a new book that +focuses exclusively on C++11/14: on the things the experts almost always do (or +almost always avoid doing) to produce clear, efficient, effective code. In this +presentation, Scott will present a taste of the Items he expects to include in +Effective C++11/14. +

      +
      + + + +

      + The fourth in a series of recorded talks from GoingNative 2013. Featuring +Andrei Alexandrescu. +

      +

      + The fourth in a series of recorded talks from GoingNative 2013. Featuring +Andrei Alexandrescu. +

      + Contemporary computer architectures make it possible for slow code to work +reasonably well. They also make it difficult to write really fast code that +exploits the CPU amenities to their fullest. And the smart money is on fast +code—we’re running out of cool things to do with slow code, and the battle will +be on doing really interesting and challenging things at the envelope of what +the computing fabric endures. +

      + So how to write quick code, quickly? Turns out it’s quite difficult because +today’s complex architectures defy simple rules to be applied everywhere. It is +not uncommon that innocuous high-level artifacts have a surprisingly high +impact on the bottom line of an application’s run time (and power consumed). +

      + This talk is an attempt to set forth a few pieces of tactical advice for +writing quick code in C++. Applying these is not guaranteed to produce optimal +code, but is likely to put it reasonably within the ballpark.

      + These tips are based on practical experience but also motivated by the +inner workings of modern CPUs. +

      +
      + + + +

      + The fifth in a series of recorded talks from GoingNative 2013. Featuring +Sean Parent. +

      +

      + The fifth in a series of recorded talks from GoingNative 2013. Featuring +Sean Parent. +

      + A look at many of the new features in C++ and a couple of old features you +may not have known about. With the goal of correctness in mind, we’ll see how +to utilize these features to create simple, clear, and beautiful code. Just a +little pinch can really spice things up. +

      +
      + + + +

      + All CSC members and their guests are invited for a night of free bowling at + Bingemans! Transportation will be provided. If you are interested in attending, + please RSVP using the online form by Oct. 18. You can find it by viewing this + event in detail. +

      +

      + We are pleased to kick off the term with free bowling for all interested + members at Bingemans! Transportation will be provided. If you are interested in + attending, please RSVP using this online + form by Oct. 18.

      + +

      Please note the event date change (Oct. 23 to Oct. 30). + The bus will be leaving from the Davis Center at 6:00PM sharp on the 30th. +

      +
      + + + +

      + Elections for Fall 2013 are being held! The Executive will be elected, + and the Office Manager and Librarian will be appointed by the new + executive. +

      + +

      It's elections time again! On Tuesday, Sept 17 at 4:30PM, come to the Comfy Lounge + on the 3rd floor of the MC to vote in this term's President, Vice-President, Treasurer + and Secretary. The Sysadmin, Librarian, and Office Manager will also be chosen at this time.

      + +

      Nominations are open until 4:30PM on Monday, Sept 16, and can be written + on the CSC office whiteboard (yes, you can nominate yourself). Full CSC + members can vote and are invited to drop by. You may also send nominations to + the Chief Returning Officer. A + full list of candidates will be posted when nominations close.

      + +

      Nominations are now closed. The candidates are:

      +
        +
      • President:
          +
        • Dominik Chłobowski (dchlobow)
        • +
        • Elana Hashman (ehashman)
        • +
        • Sean Hunt (scshunt)
        • +
        • Marc Burns (m4burns)
        • +
        • Matt Thiffault (mthiffau)
        • +
      • +
      • Vice-President:
          +
        • Dmitri Tkatch (dtkatch)
        • +
        • Marc Burns (m4burns)
        • +
        • Sean Hunt (scshunt)
        • +
        • Visha Vijayanand (vvijayan)
        • +
      • +
      • Treasurer:
          +
        • Bernice Herghiligiu (baherghi)
        • +
        • Dominik Chłobowski (dchlobow)
        • +
        • Jonathan Bailey (jj2baile)
        • +
        • Marc Burns (m4burns)
        • +
      • +
      • Secretary:
          +
        • Dominik Chłobowski (dchlobow)
        • +
        • Edward Lee (e45lee)
        • +
        • Marc Burns (m4burns)
        • +
      • +
      +
      +
      + + + +

      + Come out to the Code Party happening in the Comfy Lounge on July 26 at 7:00 PM! + Why sleep when you could be hacking on $your_favourite_project or doing + $something_classy in great company? Join us for a night of coding, snacks, + and camaraderie! +

      +

      + Come out to the Code Party happening in the Comfy Lounge on July 26 at 7:00 PM! + Why sleep when you could be hacking on $your_favourite_project or doing + $something_classy in great company? Join us for a night of coding, snacks, + and camaraderie! +

      +
      + + +

      + Convergence between CPU and GPU approaches to processing sets the stage for an + exciting transition to 3D rendering that takes place entirely in software. + TransGaming's Nicolas Capens and Gavriel State will speak about this convergence + and how it will influence the future of graphics. +

      +

      + For some time now, it has been clear that there is strong momentum for convergence + between CPU and GPU technologies. Initially, each technology used radically different + approaches to processing, but over time GPUs have evolved to support more general + purpose use while CPUs have evolved to include advanced vector processing and multiple + execution cores. At TransGaming, we believe that this convergence will continue to the + point where typical systems have only one type of processing unit, with large numbers + of cores and very wide vector execution units available for high performance parallel + execution. In this kind of environment, all graphics processing will ultimately take + place in software. +

      + In this talk, we will explore the converging nature of CPU and GPU approaches to + processing, how dynamic specialization allows CPUs to efficiently perform tasks usually + done by GPUs, and why we believe that the increased flexibility of more programmable + architectures will ultimately win out over fixed function hardware, even in areas such + as texture sampling. +

      + TransGaming Inc. works at the cutting edge of 3D graphics, building + technologies that bridge the gap between platform boundaries to allow games to be played + on a variety of devices and operating systems. TransGaming works with other industry + leaders to update established APIs such as OpenGL, while also breaking new ground in + software rendering technology, which we believe will become increasingly important as + CPU and GPU technologies converge. +

      + Nicolas Capens is the architect of SwiftShader, TransGaming's high + performance software renderer, and is also deeply involved in the ANGLE project, which + provides efficient translation from OpenGL ES to Direct3D APIs for implementing WebGL + on Windows. Nicolas received his MSci.Eng. degree in computer science from Ghent + University in 2007. +

      + Gavriel State (Gav) is TransGaming's Founder and CTO, and has worked in + graphics and portability for over 20 years on dozens of platforms and APIs. Gav wrote + his first software renderer when taking CS488 at UW, where he later graduated with a + B.A.Sc. in Systems Design Engineering. +

      +
      + + +

      + Do you love the combination of s'mores, burgers, and fire? Are you brave enough to + face the newly-grown geese? Do you want to play some Frisbee while listening to some + chill tunes? If so, come hang out with the CSC at the EV3 Fire Pit this Friday! + All are welcome for some outdoor food, games, and music. +

      +

      + Do you love the combination of s'mores, burgers, and fire? Are you brave enough to + face the newly-grown geese? Do you want to play some Frisbee while listening to some + chill tunes? If so, come hang out with the CSC at the EV3 Fire Pit this Friday! + All are welcome for some outdoor food, games, and music. +

      +
      + + +

      + As a follow on to last term's tutorial on building a ray-tracer from scratch, + this talk will be presenting the basic mechanics of how a bidirectional path-tracer + creates a globally illuminated scene, advantages and limitations of this approach over + other offline global illumination techniques along with a simple example path-tracer + written in C++, and opportunities for hardware acceleration on GPUs, time permitting. +

      +

      + As a follow on to last term's tutorial on building a ray-tracer from scratch, + this talk will be presenting the basic mechanics of how a bidirectional path-tracer + creates a globally illuminated scene, advantages and limitations of this approach over + other offline global illumination techniques along with a simple example path-tracer + written in C++, and opportunities for hardware acceleration on GPUs, time permitting. +

      +
      + + +

      + While humans started making 3D motion pictures in the 1800's, several technical and + artistic challenges prevented widespread interest in the medium. By investing heavily + in a computerized production pipeline, James Cameron's 2009 release of Avatar ushered + in an era of mainstream interest in 3D film. However, many technical and artistic + problems still find their way into otherwise-modern 3D movies. The talk explores some + of these problems while introducing the fundamentals of 3D film-making from a CS + perspective. +

      +

      + While humans started making 3D motion pictures in the 1800's, several technical and + artistic challenges prevented widespread interest in the medium. By investing heavily + in a computerized production pipeline, James Cameron's 2009 release of Avatar ushered + in an era of mainstream interest in 3D film. However, many technical and artistic + problems still find their way into otherwise-modern 3D movies. The talk explores some + of these problems while introducing the fundamentals of 3D film-making from a CS + perspective. +

      +
      + + + + +

      + We are offering a Unix tutorial on Friday, June 7th, 2013! Following the tutorial a code party will take place. + Bring your laptops and chargers for an awesome night of coding, hacking and learning. + All are welcome to join in the comfy lounge! +

      + +

      We are offering a Unix tutorial on Friday, June 7th, 2013 at 6:00pm! Following the tutorial a code party will take place. + Bring your laptops and chargers for an awesome night of coding, hacking and learning. + All are welcome to join in the comfy lounge!

      + +

      If you have any questions about Unix101/ Code Party 0 please contact exec@csclub.uwaterloo.ca.

      + +

      Hope to see you there!

      +
      +
      + + +

      + Elections for Spring 2013 are being held! The Executive will be elected, + and the Office Manager and Librarian will be appointed by the new + executive. +

      + +

      It's elections time again! On Wednesday, May 15 at 6:00PM, come to the Comfy Lounge + on the 3rd floor of the MC to vote in this term's President, Vice-President, Treasurer + and Secretary. The Sysadmin, Librarian, and Office Manager will also be chosen at this time.

      + +

      Nominations are open until 4:30PM on Tuesday, May 14, and can be written + on the CSC office whiteboard (yes, you can nominate yourself). Full CSC + members can vote and are invited to drop by. You may also send nominations to + the Chief Returning Officer. A + full list of candidates will be posted when nominations close, along with + instructions for voting remotely.

      + +

      Good luck to our candidates!

      +
      +
      + + + + +

      The Computer Science Club is running the second code party of the term! Come join us and hack on open source software, your own projects, or whatever comes up. Everyone is welcome; please bring your friends. There will be foodstuffs and sugary drinks available for your hacking pleasure.

      +
      + +

      The Computer Science Club is running the second code party of the term! Come join us and hack on open source software, your own projects, or whatever comes up. Everyone is welcome; please bring your friends. There will be foodstuffs and sugary drinks available for your hacking pleasure.

      +
      +
      + + + +

      by Calum T. Dalek. New to the Unix computing environment? If you seek an introduction, look no further. We will be holding a tutorial on using Unix this upcoming Monday. Topics that will be covered include basic interaction with the shell and use of myriad powerful tools.

      +
      + +

      New to the Unix computing environment? If you seek an introduction, look no further. We will be holding a tutorial on using Unix this upcoming Monday. Topics that will be covered include basic interaction with the shell and use of myriad powerful tools.

      +

      If you're interested in attending, make sure you can log into the Macs on the third floor, or show up to the CSC office (MC 3036) 20 minutes early for some help.

      +
      +
      + + + +

      Professor Gordon Cormack will be presenting a talk on using machine-learning based spam filters to accurately locate relevent electronic documents - a process which has typically been very manual, and very expensive.

      +
      + +

      In a lawsuit, each party is typically entitled to Discovery, in which the +other party is compelled to produce any "documents" in its possession that +may be pertinent to the case. Documents include not only traditional +paper documents, but email messages, text messages, computer files, and +other electronically stored information, or ESI. Suppose you were +compelled to produce every document in your possession pertaining to +software downloads or purchases? How would you do it? If you were a +large corporation, you would probably hire an army of lawyers to read all +your email, plus your assignments, and any other files on your UW account, +your laptop, your phone, and your tablet, at a cost of one dollar or more +per file. As a CSC member, you know there must be a better way. But what +is that better way, and how do you convince the court to let you use it?

      +

      It turns out that spam filters that employ machine learning can do this job +well -- better than that army of lawyers. But lawyers aren't happy about +this. This talk will outline how the technology works and how to prove +that it works, so as to convince scientists, lawyers, and judges.

      +
      +
      + + + +

      "Herb Sutter is a leading authority on software development. He is the best selling author of several books including Exceptional C++ and C++ Coding Standards, as well as hundreds of technical papers and articles [and] has served for a decade as chair of the ISO C++ standards committee." - http://herbsutter.com/about

      +
      + +

      High-level languages insulate the programmer from the machine. That's a +wonderful thing -- except when it obscures the answers to the fundamental +questions of "What does the program do?" and "How much does it cost?"

      +

      The C++ and C# programmer is less insulated than most, and still we find +that programmers are consistently surprised at what simple code actually +does and how expensive it can be -- not because of any complexity of a +language, but because of being unaware of the complexity of the machine on +which the program actually runs.

      +

      This talk examines the "real meanings" and "true costs" of the code we +write and run especially on commodity and server systems, by delving into +the performance effects of bandwidth vs. latency limitations, the +ever-deepening memory hierarchy, the changing costs arising from the +hardware concurrency explosion, memory model effects all the way from the +compiler to the CPU to the chipset to the cache, and more -- and what you +can do about them.

      +
      +
      + + + +

      CSC Elections have begun for the Winter 2013 term, nominations are open!

      +
      + +

      It's elections time again! On Wednesday January 16th at 4:00PM, come to the Comfy Lounge +on the 3rd floor of the MC to vote in this term's President, Vice-President, Treasurer +and Secretary. The sysadmin, librarian, and office manager will also be chosen at this time.

      + +

      Nominations are open until 4:00PM on Tuesday January 15th, and can be +written on the CSC office whiteboard (yes, you can nominate yourself). All CSC members +can vote and are invited to drop by. You may also send nominations to the + + Chief Returning Officer. A full list of candidates will be posted + when nominations close.

      + +

      Good luck to our candidates!

      +
      +
      + + + + + +

      The Computer Science Club is running our third, and last, code party of the term! Whether you're a hacking guru or a newbie to computer science, you're welcome to attend; there will be activities for all. Syed Albiz will be presenting a tutorial on implementing a ray-tracer in C and Scheme.

      +
      + +

      The Computer Science Club is running our third, and last, code party of the term! Whether you're a hacking guru or a newbie to computer science, you're welcome to attend; there will be activities for all. Syed Albiz will be presenting a tutorial on implementing a ray-tracer in C and Scheme. Everyone is welcome, so please bring your friends. There will be foodstuffs and sugary drinks available for your hacking pleasure.

      +
      +
      + + + +

      by PMC.The Pure Mathematics, Applied Mathematics, Combinatorics & Optimization Club is hosting the Fall 2012 Short Attention Span Math Seminars (SASMS).

      +
      + +

      The Pure Mathematics, Applied Mathematics, Combinatorics & Optimization Club is hosting the Fall 2012 Short Attention Span Math Seminars (SASMS).

      +

      All talks will be 25 minutes long, and everyone is welcome to give a talk. Applications for speaking are open until the day of the event. For event details, see the PMC event page.

      +
      +
      + + +

      by Calum T. Dalek. New to the Unix computing environment? If you seek an introduction, look no further. We will be holding a series of tutorials on using Unix, beginning with Unix 101 this upcoming Monday. Topics that will be covered include basic interaction with the shell and use of myriad powerful tools.

      +

      New to the Unix computing environment? If you seek an introduction, look no further. We will be holding a series of tutorials on using Unix, beginning with Unix 101 this upcoming Monday. Topics that will be covered include basic interaction with the shell and use of myriad powerful tools.

      +

      If you're interested in attending, make sure you can log into the Macs on the third floor, or show up to the CSC office (MC 3036) 20 minutes early for some help. If you're already familiar with these topics, don't hesitate to come to Unix 102, which will be held the week of the 26th.

      +
      +
      + + + +

      by Justin Wheeler.In his own words, this talk will cover the virtues + of Perl: CPAN, Moose, CPAN, Catalyst, CPAN, DBIx::Class, CPAN, + TMTOWTDI, and did I mention CPAN?

      +
      + +

      In his own words, this talk will cover the virtues + of Perl: CPAN, Moose, CPAN, Catalyst, CPAN, DBIx::Class, CPAN, + TMTOWTDI, and did I mention CPAN?

      +

      If you've never used Perl before, don't be scared away by the + jargon—the talk should be accessible to all CS students, and even if + you find it hard to follow, we will be serving pizza!

      +
      +
      + + + +

      We will be holding our second code party of the term. Watch for + further details, as we plan on working with some robots and Scala, + git, and Haskell.

      +
      + +

      We will be holding our second code party of the term. Watch for + further details, as we plan on working with some robots and Scala, + git, and Haskell.

      +
      +
      + + + +

      by Vitalik Buterin. In this talk, we will cover the + cryptographic and game-theory principles behind the currency, including + how the issues of double-spending, the "51% attack," and "mining" are + addressed, the game-theory incentives to use Bitcoins honestly, and + other issues being faced today in practice, such as implementation, + attacks, and future scalability.

      +
      + +

      by Vitalik Buterin. Interested in learning more about Bitcoin, + the independent digital cryptographic cash? Then this is the talk for + you!

      + +

      In his talk, Vitalik will cover the cryptographic and game-theory + principles behind the currency, including how the issues of + double-spending, the "51% attack," and "mining" are addressed, the + game-theory incentives to use Bitcoins honestly, and other issues being + faced today in practice, such as implementation, attacks, and future + scalability.

      + +

      Refreshments will be provided.

      +
      +
      + + + +

      ehashman's lousy frosh event naming scheme continues as we prepare for this week's movie night---a screening of the original TRON in PHY 150. Come watch the groundbreaking film that defined the role of computer graphics and the quality of special effects in modern cinema. And bring your friends!

      +
      + +

      ehashman's lousy frosh event naming scheme continues as we prepare for this week's movie night---a screening of the original TRON in PHY 150. Come watch the groundbreaking film that defined the role of computer graphics and the quality of special effects in modern cinema. And bring your friends!

      +
      +
      + + + +

      The Computer Science Club is running our first "welcome back" code party of the term! Whether you're a hacking guru or a newbie to computer science, you're welcome to attend; there will be activities for all! Our party is loosely themed as a Linux installfest, where we will have a team of members dedicated to helping individuals install and learn to use one of many flavours of Linux.

      +
      + +

      The Computer Science Club is running our first "welcome back" code party of the term! Whether you're a hacking guru or a newbie to computer science, you're welcome to attend; there will be activities for all! Our party is loosely themed as a Linux installfest, where we will have a team of members dedicated to helping individuals install and learn to use one of many flavours of Linux. Everyone is welcome, so please bring your friends. There will be foodstuffs and sugary drinks available for your hacking pleasure.

      +
      +
      + + + +

      CSC Elections have begun for the Fall 2012 term, nominations are open!

      +
      + +

      It's elections time again! On Tuesday September 18th at 4:00PM, come to the Comfy Lounge +on the 3rd floor of the MC to vote in this term's President, Vice-President, Treasurer +and Secretary. The sysadmin, librarian, and office manager will also be chosen at this time.

      + +

      Nominations are open until 4:00PM on Monday September 17th, and can be +written on the CSC office whiteboard (yes, you can nominate yourself). All CSC members +can vote and are invited to drop by. You may also send nominations to the + + Chief Returning Officer. A full list of candidates will be posted + when nominations close.

      + +

      Good luck to our candidates!

      +
      +
      + + + +

      The School of Computer Science is hosting a dinner event for incoming first-year students. You'll get to meet us, some of the faculty, and other new undergraduates. Food will be provided.

      +
      + +

      The School of Computer Science is hosting a dinner event for incoming first-year students. You'll get to meet us, some of the faculty, and other new undergraduates. Food will be provided.

      +
      +
      + + + + + +

      The Computer Science Club is running the first code party of the term! Come join us and hack on open source software, your own projects, or whatever comes up. Everyone is welcome; please bring your friends. There will be foodstuffs and sugary drinks available for your hacking pleasure.

      +
      + +

      +

      The Computer Science Club is running the first code party of the term! Come join us and hack on open source software, your own projects, or whatever comes up. Everyone is welcome; please bring your friends. There will be foodstuffs and sugary drinks available for your hacking pleasure.

      +
      +
      + + + +

      CSC Elections have begun for the Spring 2012 term, nominations are open!

      +
      + +

      It's elections time again! On Thursday May 10th at 4:30PM, come to the Comfy Lounge +on the 3rd floor of the MC to vote in this term's President, Vice-President, Treasurer +and Secretary. The sysadmin, librarian, and office manager will also be chosen at this time.

      + +

      Nominations are open until 4:30PM on Wednesday May 9th, and can be +written on the CSC office whiteboard (yes, you can nominate yourself). All CSC members +who have paid their Mathsoc fee can vote and are invited to drop by. +You may also send nominations to the + Chief Returning Officer. A full list of candidates will be posted + when nominations close.

      + +

      Good luck to our candidates!

      +
      +
      + + + +

      Palantir is a Palo Alto-based intelligence analysis software company that has partnered with the CSC to put on a tech talk and social. There will be free food, free drinks, and for one lucky winner, a free iPad, so why not come on out?

      +
      + +

      In the aftermath of the 2008 economic crisis, large banks have been saddled with the prospect of foreclosing on millions of distressed mortgages, at a financial cost of billions of dollars and an incalculable social cost. Crucial to solving this problem is the ability to model and analyze these millions of loans in real time, enabling lenders to price homes so that they can find effective and mutually beneficial alternatives to foreclosure.

      + +

      In this talk, we'll describe how engineers at Palantir are working on a calculation engine that supports such analyses. We'll outline our design goals of constructing a platform that supports queries against large sets of data at interactive speeds and exposes a high-level object-oriented interface that enables analysts to construct models intuitively without having to worry about the underlying implementation details. We'll describe the different architectures we explored in prototyping the system, demo how to use our product to analyze massive datasets, and discuss how we've ultimately deployed it in the field.

      +
      +
      + + + + + + +

      by Bill Cowan. Programming systems that obey hard real-time constraints is difficult. So is programming multiple CPUs that interact to solve a single problem. This talk will describe the nature of computation typical of real-time systems, architectural solutions currently employed in CS 452, and possible architectures for multi-CPU systems.

      +
      + +

      + Programming systems that obey hard real-time constraints is difficult. So is programming multiple CPUs that interact to solve a single problem. +

      +

      + On rare occasions it is possible to mix two difficult problems to create one easy problem and multi-CPU real-time is, on the face of it, just such an occasion. Give each deadline its own CPU and it will never be missed. This intuition is, unfortunately, incorrect, which does not, however, prevent it being tried in many real-time systems. +

      +

      + For three decades, fourth year students have been exploring this problem in CS452, using multiple tasks (virtual CPUs) running on a single CPU. It is now time to consider whether modern developments in CPU architecture make it possible to use multiple CPUs in CS452 given the practical constraint of a twelve week semester. +

      +

      + This talk will describe the nature of computation typical of real-time systems, architectural solutions currently employed in the course, and possible architectures for multi-CPU systems. +

      +
      +
      + + + +

      by Calum T. Dalek. The Computer Science Club will be running the +second installment of our introductory UNIX tutorials for the term. We +will be covering topics intended to show off the development-friendliness of +the UNIX computing environment: "real" document editors, development tools, +bash scripting, and version control. +

      +
      + +

      New to the UNIX computing environment? If you seek an introduction, look +no further. We will be covering more advanced topics in the second installment +of our introductory tutorials, that will help you become a more effective +developer. +

      +

      We will be introducing "real" document editors, bash scripting, and +version control. We'll prove to you how much more efficient you can develop +with these tools and teach you how to do it for yourself. It will save you hours +of work! +

      +
      +
      + + + +

      by Calum T. Dalek. The University of Waterloo Computer Science Club and AMD's OpenCL programming competition comes to a close, as the contest ends at midnight and prizes are awarded! Open submissions will be judged, so make sure to come out and watch. +

      +
      + +

      The University of Waterloo Computer Science Club and AMD's OpenCL programming competition comes to a close, as the contest ends at midnight and prizes are awarded! Open submissions will be judged, so make sure to come out and watch. +

      +
      +
      + + + +

      by Calum T. Dalek. Join the Computer Science Club and PhysClub every Wednesday evening for the rest of the term for our five screenings of the classic 1964 Messenger Lecture Series by Richard Feynman in PHY 150. Dinner provided! +

      +
      + +

      The Physics Club and the Computer Science Club are proud to present the 1964 Feynman Messenger Lecture Series in PHY 150 on Wednesday evenings at 5:30 PM. The screenings will be taking place as follows (please note times and dates):

      +
        +
      • Feb. 29, 5:30-6:30 PM: Law of Gravitation: An Example of Physical Law
      • +
      • Mar. 7, 5:30-7:30 PM: The Relation of Mathematics and Physics and The Great Conservation Principles (double feature)
      • +
      • Mar. 14, 5:30-6:30 PM: Symmetry in Physical Law
      • +
      • Mar. 21, 5:30-7:30 PM: The Distinction of Past and Future and Probability and Uncertainty: The Quantum Mechanical View (double feature)
      • +
      • Mar. 28, 5:30-6:30 PM: Seeking New Laws
      • +
      +

      Dinner will be provided, so come on out, relax in the comfy PHY 150 theatre, and enjoy. Hope to see you there!

      +
      +
      + + +

      by Calum T. Dalek. The University of Waterloo Computer Science Club and AMD are running an OpenCL programming competition. If you're interested in writing massively parallel software on the OpenCL platform, come out and join us for our introductory code party!

      +

      The University of Waterloo Computer Science Club and AMD are running an OpenCL programming competition. If you're interested in writing massively parallel software on the OpenCL platform, come out and join us for our introductory code party!

      +

      +
      +
      + + +

      by Calum T. Dalek. New to the Unix computing environment? If you seek an introduction, look no further. We will be holding a series of tutorials on using Unix, beginning with Unix 101 this upcoming Thursday. Topics that will be covered include basic interaction with the shell and the motivations behind using it, and an introduction to compilation. You'll have to learn this stuff in CS 246 anyways, so why not get a head start!

      +

      New to the Unix computing environment? If you seek an introduction, look no further. We will be holding a series of tutorials on using Unix, beginning with Unix 101 this upcoming Thursday. Topics that will be covered include basic interaction with the shell and the motivations behind using it, and an introduction to compilation. You'll have to learn this stuff in CS 246 anyways, so why not get a head start!

      +

      If you're interested in attending, make sure you can log into the Macs on the third floor, or show up to the CSC office (MC 3036) 20 minutes early for some help. If you're already familiar with these topics, don't hesitate to come to Unix 102, planned to be held after Reading Week.

      +
      +
      + + +

      by Victor Fan. Join Victor Fan for his talk, intended for all second-year math students with a solid first-year background. Even if you are a first-year or a seasoned veteran, you will probably still take home something new, so please come out to enjoy the talk! Refreshments will be served.

      +

      Are you interested in algorithms? What is an algorithm anyway? We will discuss two or three neat problems with very elegant answers. Some of these answers are actually fast, and some will result in a proof that the problem is NP-complete. (What does that mean?) We will also discuss the motivating thoughts that led us to the solutions.

      + +

      Join Victor Fan for his talk, intended for all second-year math students with a solid first-year background. Even if you are a first-year or a seasoned veteran, you will probably still take home something new, so please come out to enjoy the talk! Refreshments will be served.

      +
      + + +

      by Calum T. Dalek. The Computer Science Club is running the first code party of the term! Come join us and hack on open source software, your own projects, or whatever comes up. Everyone is welcome; please bring your friends. There will be foodstuffs and sugary drinks available for your hacking pleasure.

      +

      The Computer Science Club is running the first code party of the term! Come join us and hack on open source software, your own projects, or whatever comes up. Everyone is welcome; please bring your friends. There will be foodstuffs and sugary drinks available for your hacking pleasure.

      +
      + + + +

      CSC Elections have begun for the Winter 2012 term, nominations are open!

      +
      + +

      It's elections time again! On Thursday January 12th at 4:30PM, come to the Comfy Lounge +on the 3rd floor of the MC to vote in this term's President, Vice-President, Treasurer +and Secretary. The sysadmin, librarian and office manager will also be chosen at this time.

      + +

      Nominations are open until 4:30PM on Wednesday January 11th, and can be +written on the CSC office whiteboard (yes, you can nominate yourself). All CSC members +who have paid their Mathsoc fee can vote and are invited to drop by. +You may also send nominations to the + Chief Returning Officer. A full list of candidates will be posted + when nominations close.

      + +

      Good luck to our candidates!

      +
      +
      + + + +

      by Calum T. Dalek. The Computer Science Club is teaming up with the UW Open Data Initiative to bring you our third code party of the term! Everyone is welcome; please bring your friends. There will be foodstuffs and sugary drinks available for your hacking pleasure.

      +

      We're teaming up with the UW Open Data Initiative to host our next code party on Friday, November 18 at 7PM in the MC Comfy Lounge.

      + +

      As always, you're welcome to work on your own projects, but we'll be hacking on some open data related projects: +

        +
      1. Design and build UW APIs.
      2. + We're looking for API design experts to bring scalable API designs to the party. At the party, we'll work on implementing these designs. The APIs that you build will be used by everyone to access the university data made available by the Open Data Initiative. +
      3. Applications using university data that is currently available.
      4. +
      +

      +

      If you'd like to discuss your ideas for these proposed projects, check out the newsgroup, uw.csc

      +
      + + + +

      by Calum T. Dalek. The Computer Science Club has a limited number of tickets available for the Design Our Tomorrow Conference at the University of Toronto on Saturday, November 12, 10:00 - 16:30. See event information for ticket details.

      + +

      +The Computer Science Club has tickets available for the Design Our Tomorrow Conference at the University of Toronto on Saturday, November 12, 10:00 - 16:30, and would like to invite you to attend. The DOT Conference is a TED-style event geared towards students in high school, undergraduate, and graduate studies. The goal of the event is to inspire young people to create, innovate, better themselves, and in the process, better the world. The conference is free for students and is valued at $500 a ticket for non-students. For more details about the conference, visit http://designourtomorrow.com/.

      + +

      Tickets have been reserved for the CSC, and transportation to the conference has been funded by the David R. Cheriton School of Computer Science; a $5 deposit is required to secure a seat on the bus, which will be refunded to attendees upon departure. To sign up, visit the CSC office at MC 3036/3037 with exact change. You will need to provide your full name, e-mail, and student ID number. Please note that students who have already registered for the conference *should not* try to register through the CSC. For more details, visit the CSC website at http://csclub.uwaterloo.ca/.

      + +

      This event is not restricted to CSC members—any student is free to attend. Tickets are very limited, so please sign up as soon as possible.

      + +

      On the morning of November 12, attendees should meet in front of the Davis Center at 7:30 am. The bus will be leaving promptly at 8:00 am, so please arrive no later than 7:30 so we can process refunds and depart on time.

      + +

      We hope that you will join us. +

      + +
      + + +

      by Calum T. Dalek. The next installment in the CS Club's popular Unix tutorials UNIX 102 introduces powerful text editing tools for programming and document formatting. +

      + +

      Unix 102 is a follow up to Unix 101, requiring basic knowledge of the shell. If you missed Unix 101 but still know your way around you should be fine. Topics covered include: "real" editors, text processing, navigating a multiuser Unix environment, standard tools, and more. If you aren't interested or feel comfortable with these tasks, watch out for Unix 103 and 104 to get more depth in power programming tools on Unix.

      + +
      + + +

      by Calum T. Dalek. The Computer Science Club is having our second code party of the term! Everyone is welcome; please bring your friends. There will be foodstuffs and sugary drinks available for your hacking pleasure.

      +
      + +

      + The Computer Science Club is having our second code party of the term! Everyone is welcome; please bring your friends. There will be foodstuffs and sugary drinks available for your hacking pleasure. +

      + +

      + There will be 3 more code parties this term. +

      +
      +
      + + +

      by Ehsan Akhgari. Veteran Mozilla engineer Ehsan Akhgari will present a talk on the internals of web browsers. The material will range from the fundamentals of content rendering to the latest innovations in browser design. Click on the talk title for a full abstract.

      +
      + +

      +Web browsers have evolved. From their humble beginnings as simple HTML +rendering engines they have grown and evolved into rich application +platforms. This talk will start with the fundamentals: how a browser +creates an on-screen representation of the resources downloaded from +the network. (Boring, right? But we have to start somewhere.) From +there we'll get into the really exciting stuff: the latest innovations +in Web browsers and how those innovations enable — even encourage — +developers to build more complex applications than ever before. You'll +see real-world examples of people building technologies on top of +these "simple rendering engines" that seemed impossible a short time +ago. + +Bio of the speaker: +Ehsan Akhgari has contributed to the Mozilla project for more than 5 +years. He has worked on various parts of Firefox, including the user +interface and the rendering engine. He originally implemented Private +Browsing in Firefox. Right now he's focusing on the editor component +in the Firefox engine. +

      + +

      + There will be 4 more code parties this term. +

      +
      +
      + + +

      by Calum T. Dalek. The Computer Science Club is having our first code party of the term! The theme for this code party will be collaborative development. We'll present several ideas of small projects to work on for the unexperienced. Everyone is welcome; please bring your friends! There will be foodstuffs and sugary drinks available for your hacking pleasure.

      +
      + +

      + The Computer Science Club is having our first code party of the term! The theme for this code party will be collaborative development. We'll present several ideas of small projects to work on for the unexperienced. Everyone is welcome; please bring your friends! There will be foodstuffs and sugary drinks available for your hacking pleasure. +

      + +

      + There will be 4 more code parties this term. +

      +
      +
      + + +

      by Calum T. Dalek. New to Unix? No problem, we'll teach you to power use circles around your friends!

      +
      + +

      Unix 101 is the first in a series of tutorials on using Unix. This tutorial will present an introduction to the Unix shell environment, both on the student servers and on other Unix environments. Topics covered include: using the shell, both basic interaction and more advanced topics like scripting and job control, the filesystem and manipulating it, and secure shell. If you feel you're already familiar with these topics, don't hesitate to come to Unix 102 to learn about documents, editing, and other related tasks, or watch out for Unix 103, 104, and 201 that get much more in depth with power tools and software authoring on Unix.

      +
      +
      + + +

      + Club elections. See related news items for details. +

      +
      + + Club elections. See related news items for details. + +
      + + + + +

      + The end of another term is here, and so we're having our End-of-Term dinner. + + Everybody's welcome to come to CTRL-D. We are running this like a potluck, so bringing food is suggested. +

      +
      + + askhader's house is at:
      + 9 Cardill Cresent
      + Waterloo, ON
      +
      +
      + + +

      + The final Code Party of the term is here! Come hack on some code, + solve some puzzles, and have some fun. The event starts in the evening and will run + all night. You can show up for any portion of it. You should bring a laptop, and + probably have something in mind to work on, though you're welcome with neither. +

      +

      + Snacks will be provided. Everyone is welcome. +

      +

      + Please note this date is postponed from the originally scheduled date due to + conflicts with Kitchener Ribfest & Craft Beer Show +

      +
      +
      + + + +

      + As part of the CSC member talks series, Yomna Nasser will be presenting an introduction to steganography. + Steganography is the act of hiding information such that it can only be found by its intended recipient. + It has been practiced since ancient Greece, and is still in use today. +

      +

      + This talk will include an introduction to the area, history, and some basic techniques for hiding information + and detecting hidden data. There will be an overview of some of the mathematics involved, but nothing too + rigorous. +

      +
      +
      + + +

      Do you like going outside? Are you + vitamin-D deficient from being in the MC too long? Do you think + marshmallows, hotdogs, and fire are a delicious combination?

      + +

      If so, you should join us as the CSC is going outside!

      + +

      Around 4PM, we're going to Columbia Lake for some outdoor fun. + We'll have Frisbees, kites, snacks, and some drinks. We'll be + sticking around until dusk, when we're going to have a campfire + with marshmallows and hotdogs. We plan to be there until 10PM, but + of course you're welcome to come for any subinterval.

      +
      +
      + + +

      + A joint work between Professors Tim Brecht, Ashif Harji, and + Peter Buhr, this talk describes experiences using the Linux + kernel as a platform for conducting performance evaluations. +

      +
      + +

      + Linux provides researchers with a full-fledged operating system that is + widely used and open source. However, due to its complexity and rapid + development, care should be exercised when using Linux for performance + experiments, especially in systems research. The size and continual + evolution of the Linux code-base makes it difficult to understand, and + as a result, decipher and explain the reasons for performance + improvements. In addition, the rapid kernel development cycle means + that experimental results can be viewed as out of date, or meaningless, + very quickly. We demonstrate that this viewpoint is incorrect because + kernel changes can and have introduced both bugs and performance + degradations. +

      +

      + This talk describes some of our experiences using the Linux kernel as a + platform for conducting performance evaluations and some performance + regressions we have found. Our results show, these performance + regressions can be serious (e.g., repeating identical experiments + results in large variability in results) and long lived despite having + a large negative impact on performance (one problem appears to have + existed for more than 3 years). Based on these experiences, we argue + that it is often reasonable to use an older kernel version, + experimental results need careful analysis to explain why a change in + performance occurs, and publishing papers that validate prior research + is essential. +

      +

      + This is joint work with Ashif Harji and Peter Buhr. +

      +

      + This talk will be about 20-25 minutes long with lots of time for + questions and discussion afterwards. +

      +
      +
      + + +

      + The second Code Party of the term takes place this Friday! Come hack on some code, + solve some puzzles, and have some fun. The event starts in the evening and will run + all night. You can show up for any portion of it. You should bring a laptop, and + probably have something in mind to work on, though you're welcome with neither. +

      +

      + Snacks will be provided. +

      +
      +
      + + + Ever use software with 100s or 1000s of commands? Ever have a hard time + finding the right commands to perform your task? In this talk, we'll + present AdaptableGIMP, a new version of GIMP developed at Waterloo to + help simplify complex user interfaces. + + +

      + Ever use software with 100s or 1000s of commands? Ever have a hard time + finding the right commands to perform your task? We have. And we have + some new ideas on how to deal with software bloat. +

      +

      + In this talk, we'll present AdaptableGIMP, a new version of GIMP + developed by the HCI Lab here at the University of Watreloo. + AdaptableGIMP introduces the notion of crowdsourced interface + customizations: Any user of the application can customize the interface + for performing a particular task, with that customization instantly + shared with all other users through a wiki at adaptablegimp.org. In the + talk, we'll demo this new version of GIMP and show how it can help + people work faster by simplifying feature-rich, complex user + interfaces. +

      +
      +
      + + + In the first of our member talks for the term, Katie Hyatt will give a + short introduction to General Purpose Graphics Processing Unit + computing. This expanding field has many applications. The primary + focus of this talk will be nVidia's CUDA architecture. + + +

      This is the first of our member talks for the term, presented by + CSC member and Waterloo undergraduate student Katie Hyatt +

      +

      + GPGPU (general purpose graphics processing unit) computing is an + expanding area of interest, with applications in physics, chemistry, + applied math, finance, and other fields. nVidia has created an + architecture named CUDA to allow programmers to use graphics cards + without having to write PTX assembly or understand OpenGL. CUDA is + designed to allow for high-performance parallel computation controlled + from the CPU while granting the user fine control over the behaviour + and performance of the device. +

      + +

      + In this talk, I'll discuss the basics of nVidia's CUDA architecture + (with most emphasis on the CUDA C extensions), the GPGPU programming + environment, optimizing code written for the graphics card, algorithms + with noteworthy performance on GPU, libraries and tools available to + the GPGPU programmer, and some applications to condensed matter + physics. No physics background required! +

      +
      +
      + + + The Computer Science Club is having our first code party of the term. + The theme for this week's code party is personal projects. Come show us + what you've been working on! Of course, everybody is welcome, even if you + don't have a project. + + + The Computer Science Club is having our first code party of the term. + The theme for this week's code party is personal projects. Come show us + what you've been working on! Of course, everybody is welcome, even if you + don't have a project. + + Personal projects are a great way to flex your CS muscles, and learn interesting + and new things. Come out and have some fun! + + Two more are scheduled for later in the term. + + + + +

      CSC Elections, final list of nominations for Spring 2011

      +
      + +

      The nominations are: +

        +
      • President: jdonland, mimcpher, mthiffau
      • +
      • Vice-President: jdonland, mimcpher
      • +
      • Treasurer: akansong, kspaans
      • +
      • Secretary: akansong, jdonland
      • +
      +

      +
      +
      + + + +

      CSC Elections have begun for the Spring 2011 term, nominations are open!

      +
      + +

      It's time to elect your CSC executive for the Spring 2011 term. The + elections will be held on Monday May 9th at 5:30PM in the Comfy Lounge + on the 3rd floor of the MC. Nominations can be sent to the Chief + Returning Officer, cro@csclub.uwaterloo.ca. + Nominations will be open until 4:30PM on Monday May 9th. You can also stop by the office in + person to write your nominations on the white board.

      + +

      The executive positions open for nomination are: +

        +
      • President
      • +
      • Vice-President
      • +
      • Treasurer
      • +
      • Secretary
      • +
      + There are also numerous positions that will be appointed once the + executive are elected including systems administrator, office manager, + and librarian.

      + +

      Everyone is encouraged to run if they are interested, regardless of + program of study, age, or experience. If you can't make the election, + that's OK too! You can give the CRO a statement to read on your + behalf. If you can't make it or are out of town, your votes can be + sent to the CRO in advance of the elections. For the list of nominees, + watch the CSC website, or ask the CRO.

      + +

      Good luck to our candidates!

      +
      +
      + + + + +

      by Stanley Khaing. What are the requirements for obtaining a patent? Should software be patentable?

      + + +

      Stanley Khaing is a lawyer from Waterloo whose areas of practice are software and high technology. He will be discussing software patents. In particular, he will be addressing the following questions:

      +
        +
      • What are the requirements for obtaining a patent?
      • +
      • Should software be patentable?
      • +
      +
      + +
      + + + +

      by KW Perl Mongers. These talks are intended for programmers who are curious about the Swiss Army Chainsaw of languages, Perl.

      + + +

      Tyler Slijboom will present:

      + +
        +
      • Prototyping in Perl,
      • +
      • Perl Default Variables,
      • +
      • HOWTO on OO Programming, and
      • +
      • HOWTO on Installing and Using Modules from CPAN
      • +
      + +

      Daniel Allen will present:

      + +
        +
      • Coping with Other Peoples' Code
      • +
      + +

      Justin Wheeler will present:

      + +
        +
      • Moose: a Modern Perl Framework
      • +
      +
      + +
      + + + +

      by Calum T. Dalek. In this long-awaited third installment of the popular Unix Tutorials the friendly experts of the CSC will teach you the simple art of version control. +

      + +

      You will learn the purpose and use of two different Version Control Systems (git and subversion). This tutorial will advise you in the discipline of managing the source code of your projects and enable you to quickly learn new Version Control Systems in the work place -- a skill that is much sought after by employers.

      + +
      + + + +

      by Calum T. Dalek. Come one, come all to the Code Party happening in the Comfy Lounge this Friday. The event starts at 7:00PM and will run through the night.

      + +

      Why sleep when you could be hacking on $your_favourite_project or doing $something_classy in great company? Join us for a night of coding and comraderie! Food and caffeine will be provided.

      + +
      + + + +

      by Calum T. Dalek. The next installment in the CS Club's popular Unix tutorials UNIX 102 introduces powerful text editing tools for programming and document formatting. +

      + +

      Unix 102 is a follow up to Unix 101, requiring basic knowledge of the shell. If you missed Unix 101 but still know your way around you should be fine. Topics covered include: "real" editors, document typesetting with LaTeX (great for assignments!), bulk editing, spellchecking, and printing in the student environment and elsewhere. If you aren't interested or feel comfortable with these tasks, watch out for Unix 103 and 104 to get more depth in power programming tools on Unix.

      + +
      + + + +

      by Calum T. Dalek. New to Unix? No problem, we'll teach you to power use circles around your friends! +

      + + +

      This first tutorial is an introduction to the Unix shell environment, both on the student +servers and on other Unix environments. Topics covered include: using the shell, both basic +interaction and advanced topics like scripting and job control, the filesystem and manipulating +it, and ssh. If you feel you're already familiar with these topics don't hesitate to come +to Unix 102 to learn about documents, editing, and other related tasks, or watch out +for Unix 103 and 104 that get much more in depth into power programming tools on Unix. +

      + +
      + + + + + +

      by Dr. Craig S. Kaplan. In this talk, I discuss the role of the computer in the process of designing mazes. I present some well known algorithms for maze construction, and more recent research that attempts to novel mazes with non-trivial mathematical or aesthetic properties. +

      + + +

      For thousands of years, mazes and labyrinths have played +an important role in human culture and myth. Today, solving +mazes is a popular pastime, whether with pencil on paper +or by navigating through a cornfield. +

      The construction of compelling mazes encompasses a variety of +challenges in mathematics, algorithm design, and aesthetics. +The maze should be visually attractive, but it should also be +an engaging puzzle. Master designers balance these two goals +with wonderful results. +

      In this talk, I discuss the role of the computer in the process +of designing mazes. I present some well known algorithms for +maze construction, and more recent research that attempts to +novel mazes with non-trivial mathematical or aesthetic properties. +

      + +
      + + +

      The CSC is going to Toronto to visit UofT's CSSU, see what they do, and have beer with them. + If you would like to come along, please come by the office and sign up. The cost for the trip is $2 per member. + + The bus will be leaving from the Davis Center (DC) Saturday Nov. 13 at NOON (some people may have been told 1pm, this is an error). Please show up a few minutes early so we may + board.

      + +
      + + + +

      Come join the CSC for a night of code, music with only 8 bits, and comradarie. We will be in the C&D Lounge from 7pm until 7am working on personal projects, open source projects, and whatever else comes to mind. If you're interested in getting involved in free/open source development, some members will be on hand to guide you through the process. +

      + + +

      Come join the CSC for a night of code, music with only 8 bits, and comradarie. We will be +in the C&D Lounge from 7pm until 7am working on personal projects, open source projects, and +whatever else comes to mind. If you're interested in getting involved in free/open source development, +some members will be on hand to guide you through the process. +

      + +
      + + + +

      In this talk, we will give a few examples that illustrate the basic method and show how it can be used to prove the existence of objects with desirable combinatorial properties as well as produce them in expected polynomial time via randomized algorithms. Our main goal will be to present a very slick proof from 1995 due to Spencer on the performance of a randomized greedy algorithm for a set-packing problem. Spencer, for seemingly no reason, introduces a time variable into his greedy algorithm and treats set-packing as a Poisson process. Then, like magic, he is able to show that his greedy algorithm is very likely to produce a good result using basic properties of expected value. +

      + + +

      The probabilistic method is an extremely powerful tool in combinatorics that can be +used to prove many surprising results. The idea is the following: to prove that an +object with a certain property exists, we define a distribution of possible objects +and use show that, among objects in the distribution, the property holds with +non-zero probability. The key is that by using the tools and techniques of +probability theory, we can vastly simplify proofs that would otherwise require very +complicated combinatorial arguments. +

      As a technique, the probabilistic method developed rapidly during the latter half of +the 20th century due to the efforts of mathematicians like Paul Erdős and increasing +interest in the role of randomness in theoretical computer science. In essence, the +probabilistic method allows us to determine how good a randomized algorithm's output +is likely to be. Possibly applications range from graph property testing to +computational geometry, circuit complexity theory, game theory, and even statistical +physics. +

      In this talk, we will give a few examples that illustrate the basic method and show +how it can be used to prove the existence of objects with desirable combinatorial +properties as well as produce them in expected polynomial time via randomized +algorithms. Our main goal will be to present a very slick proof from 1995 due to +Spencer on the performance of a randomized greedy algorithm for a set-packing +problem. Spencer, for seemingly no reason, introduces a time variable into his +greedy algorithm and treats set-packing as a Poisson process. Then, like magic, +he is able to show that his greedy algorithm is very likely to produce a good +result using basic properties of expected value. +

      Properties of Poisson and Binomial distributions will be applied, but I'll remind +everyone of the needed background for the benefit of those who might be a bit rusty. +Stat 230 will be more than enough. Big O notation will be used, but not excessively. +

      + +
      + + + +

      by Dr. Shai Ben-David. +

      + + +

      +

      + +
      + + + +

      This installment in the CS Club's popular Unix tutorials UNIX 102 introduces powerful text editing tools for programming and document formatting. +

      + + +

      Unix 102 is a follow up to Unix 101, requiring basic knowledge of the shell. +If you missed Unix101 but still know your way around you should be fine. +Topics covered include: "real" editors, document typesetting with LaTeX +(great for assignments!), bulk editing, spellchecking, and printing in the +student environment and elsewhere. +

      + +
      + + +

      Unix 103 will cover version control systems and how to use them to manage your projects. Unix 101 would be helpful, but all that is needed is basic knowledge of the Unix command line (how to enter commands). +

      + + +

      Unix 103 will cover version control systems and how to use them to manage +your projects. Unix 101 would be helpful, but all that is needed is basic +knowledge of the Unix command line (how to enter commands). +

      + +
      + + + +

      By Dr. Chris Eliasmith. Theoretical neuroscience is a new discipline focused on constructing mathematical models of brain function. It has made significant headway in understanding aspects of the neural code. However, past work has largely focused on small numbers of neurons, and so the underlying representations are often simple. In this talk I demonstrate how the ideas underlying these simple forms of representation can underwrite a representational hierarchy that scales to support sophisticated, structure-sensitive representations. +

      + + +

      By Dr. Chris Eliasmith. Theoretical neuroscience is a new discipline focused on constructing +mathematical models of brain function. It has made significant +headway in understanding aspects of the neural code. However, +past work has largely focused on small numbers of neurons, and +so the underlying representations are often simple. In this +talk I demonstrate how the ideas underlying these simple forms of +representation can underwrite a representational hierarchy that +scales to support sophisticated, structure-sensitive +representations. I will present a general architecture, the semantic +pointer architecture (SPA), which is built on this hierarchy +and allows the manipulation, processing, and learning of structured +representations in neurally realistic models. I demonstrate the +architecture on Progressive Raven's Matrices (RPM), a test of +general fluid intelligence. +

      + +
      + + + +

      By Ian Seyler, Return to Infinity. BareMetal is a new 64-bit OS for x86-64 based computers. The OS is written entirely in Assembly, while applications can be written in Assembly or C/C++. High Performance Computing is the main target application. +

      + + +

      By Ian Seyler, Return to Infinity. BareMetal is a new 64-bit OS for x86-64 based computers. The OS is written entirely in Assembly, +while applications can be written in Assembly or C/C++. +High Performance Computing is the main target application. +

      + +
      + + + +

      By Peter Barfuss. In this talk, I will go over the concepts used in video encoding (such as motion estimation/compensation, inter- and intra- frame prediction, quantization and entropy encoding), and then demonstrate these concepts and algorithms in use in the MPEG-2 and the H.264 video codecs. In addition, some clever optimization tricks using SIMD/vectorization will be covered, assuming sufficient time to cover these topics. +

      + + +

      By Peter Barfuss. With the recent introduction of digital TV and the widespread success +of video sharing websites such as youtube, it is clear that the task +of lossily compressing video with good quality has become important. +Similarly, the complex algorithms involved require high amounts of +optimization in order to run fast, another important requirement for +any video codec that aims to be widely used/adopted. +

      In this talk, I +will go over the concepts used in video encoding (such as motion +estimation/compensation, inter- and intra- frame prediction, +quantization and entropy encoding), and then demonstrate these +concepts and algorithms in use in the MPEG-2 and the H.264 video +codecs. In addition, some clever optimization tricks using +SIMD/vectorization will be covered, assuming sufficient time to cover +these topics. +

      + +
      + + + +

      Come meet and greet your professors, advisors, and the heads of the school. Talk to the CSC executive and other upper year students about CS at Waterloo. Free food and beverages will also be available, so there is really no excuse to miss this. +

      + + +

      Come meet and greet your professors, advisors, and the heads of the school. +Talk to the CSC executive and other upper year students about CS at Waterloo. +Free food and beverages will also be available, so there is really no excuse +to miss this. +

      + +
      + + +

      Need to use the Unix environment for a course, want to overcome your fears of the command line, or just curious? Attend the first installment in the CSC's popular series of Unix tutorials to learn the basics of the shell and how to navigate the unix environment. By the end of the hands on workshop you will be able to work efficiently from the command line and power-use circles around your friends. +

      + + +

      Need to use the Unix environment for a course, want to overcome your fears of +the command line, or just curious? Attend the first installment in the CSC's +popular series of Unix tutorails to learn the basics of the shell and how to +navigate the unix environment. By the end of the hands on workshop you will +be able to work efficiently from the command line and power-use circles around +your friends. +

      + +
      + + + +

      The CSC is happy to be hosting Jeff Potter, author of "Cooking for Geeks" for a presentation on the finer arts of food science. Jeff's book has been featured on NPR, BBC and his presentations have wowed audiences of hackers & foodies alike. We're happy to have Jeff joining us for a hands on demonstration. +

      + + +

      The CSC is happy to be hosting Jeff Potter, author of "Cooking for Geeks" for a presentation on the finer arts of food science. +Jeff's book has been featured on NPR, BBC and his presentations have wowed audiences of hackers & foodies alike. +We're happy to have Jeff joining us for a hands on demonstration. +

      But you don't have to take our word for it... here's what Jeff has to say: +

      Hi! I'm Jeff Potter, author of Cooking for Geeks (O'Reilly Media, 2010), and I'm doing a "D.I.Y. Book Tour" to talk +about my just-released book. I'll talk about the food science behind what makes things yummy, giving you a quick +primer on how to go into the kitchen and have a fun time turning out a good meal. +Depending upon the space, I’ll also bring along some equipment or food that we can experiment with, and give you a chance to play with stuff and pester me with questions. +

      If you have a copy of the book, bring it! I’ll happily sign it. +

      + +
      + + +

      by Dr. Prabhakar Ragde, Cheriton School of Computer Science. I'll be workshopping some lecture ideas involving representations of + numbers, specification of computation in functional terms, reasoning about + such specifications, and comparing the strengths and weaknesses of different approaches. +

      + + +

      I'll be workshopping some lecture ideas involving representations + of numbers, specification of computation in + functional terms, reasoning about such specifications, and comparing the + strengths and weaknesses of + different approaches. No prior background is needed; the talk should be accessible + to anyone attending + the University of Waterloo and, I hope, interesting to both novices and experts. +

      + +
      + +

      Fall term executive elections and general meeting.

      +
      + + + + + +In this talk, we shall explore the incompressibility method---an interesting and +extremely powerful framework for determining the average-case runtime of +algorithms. Within the right background knowledge, the heapsort question can be +answered with an elegant 3-line proof. + + +

      Heapsort. It runs in $\Theta(n \log n)$ time in the worst case, and in $O(n)$ + time in the best case. Do you think that heapsort runs faster than $O(n + \log n)$ time on average? Could it be possible that on most inputs, + heapsort runs in $O(n)$ time, running more slowly only on a small fraction + of inputs?

      +

      Most students would say no. It "feels" intuitively obvious that heapsort + should take the full $n \log n$ steps on most inputs. However, proving this + rigourously with probabilistic arguments turns out to be very difficult. + Average case analysis of algorithms is one of those icky subjects that most + students don't want to touch with a ten foot pole; why should it be so + difficult if it is so intuitively obvious?

      +

      In this talk, we shall explore the incompressibility method---an interesting + and extremely powerful framework for determining the average-case runtime of + algorithms. Within the right background knowledge, the heapsort question + can be answered with an elegant 3-line proof.

      +

      The crucial fact is that an overwhelmingly large fraction of randomly + generated objects are incompressible. We can show that the inputs to + heapsort that run quickly correspond to inputs that can be compressed, + thereby proving that heapsort can't run quickly on average. Of course, + "compressible" is something that must be rigourously defined, and for this + we turn to the fascinating theory of Kolmogorov complexity.

      +

      In this talk, we'll briefly discuss the proof of the incompressibility + theorem and then see a number of applications. We won't dwell too much on + gruesome mathemtical details. No specific background is required, but + knowledge of some of the topics in CS240 will be helpful in understanding + some of the applications.

      +
      +
      + + +

      Edgar Bering will be giving a talk titled: Halftoning and Digital Art

      +

      Halftoning is the process of simulating a continuous tone image + with small dots or regions of one colour. Halftoned images may be seen + in older newspapers with a speckled appearance, and to this day colour + halftoning is used in printers to reproduce images. In this talk I will + present various algorithmic approaches to halftoning, with an eye not + toward exact image reproduction but non-photorealistic rendering and + art. Included in the talk will be an introduction to digital paper + cutting and a tutorial on how to use the CSC's paper cutter to render + creations. +

      +
      + + + +

      There is a CSC Code Party Friday starting at 7:00PM (1900) + until we get bored (likely in the early in morning). Come out for + fun hacking times. +

      +

      There is a CSC Code Party Friday starting at 7:00PM (1900) + until we get bored (likely in the early in morning). Come out for + fun hacking times. +

      +
      + + +

      Nomair Naeem, a P.H.D. Student at Waterloo, will be giving a talk about Dataflow Analysis

      +

      + After going through an introduction to Lattice Theory and a formal treatment to + Dataflow Analysis Frameworks, we will take an in-depth view of the + Interprocedural Finite Distributive Subset (IFDS) Algorithm which implements a + fully context-sensitive, inter-procedural static dataflow analysis. Then, using + a Variable Type Analysis as an example, I will outline recent extensions that we + have made to open up the analysis to a larger variety of static analysis + problems and making it more efficient. +

      + The talk is self-contained and no prior knowledge of program analysis is + necessary. +

      +
      + + +

      Professor Ragde will be giving the first of our Professor talks for the Spring 2010 term.

      +

      + Number theory was thought to be mathematically appealing but practically + useless until the RSA encryption algorithm demonstrated its considerable + utility. I'll outline how combinatory logic (dating back to 1920) has a + similarly unexpected application to efficient and effective compilation, + which directly catalyzed the development of lazy functional programming + languages such as Haskell. The talk is self-contained; no prior knowledge + of functional programming is necessary. +

      +
      + + +

      Why Programming is a Good Medium for Expressing Poorly Understood and Sloppily Formulated Ideas

      + Full details found here +
      + + +

      Public Reception

      + Full details found here +
      + + +

      The Art of the Propagator

      + Full details found here +
      + + +

      Spring term executive elections and general meeting.

      +
      + + + + +

      The last talk in the CS10 series will be presented by Jordan Saunders, in which he will discuss methods for processing brush-based constructive solid geometry. +

      + + +

      For some would-be graphics programmers, the biggest barrier-to-entry is getting data to render. This is why there exist so +many terrain renderers: by virtue of the fact that rendering height-fields tends to give pretty pictures from next to no +"created" information. However, it becomes more difficult when programmers want to do indoor rendering (in the style of the +Quake and Unreal games). Ripping map information from the Quake games is possible (and fairly simple), but their tool-chain +is fairly clumsy from the point of view of adding a conversion utility. +

      My talk is about Constructive Solid Geometry from a Brush-based perspective (nearly identical to Unreal's and still very similar +to Quake's). The basic idea is that there are brushes (convex volumes in 3-space) and they can either be additive (solid brushes) +or subtractive (hollow, or air brushes). The entire world starts off as an infinite solid lump and you can start removing sections +of it then adding them back in. The talk pertains to fast methods of taking the list of brushes and generating world geometry. I may +touch on interface problems with the editor, but the primary content will be the different ways I generated the geometry and what I found to be best. +

      + +
      + + +

      Get the opportunity to learn about Microsoft's Cloud Services Platform, Windows Azure. Attend this Hands-on-lab session sponsored by Microsoft. +

      + + +

      We are in the midst of an industry shift as developers and businesses embrace the Cloud. +Technical innovations in the cloud are dramatically changing the economics of computing +and reducing barriers that keep businesses from meeting the increasing demands of +today's customers. The cloud promises choice and enables scenarios that previously +were not economically practical. +

      Microsoft's Windows Azure is an internet-scale cloud computing services platform hosted +in Microsoft data centers. The Windows Azure platform, allows developers to build and +deploy production ready cloud services and applications. With the Windows Azure platform, +developers can take advantage of greater choice and flexibility in how they develop and +deploy applications, while using familiar tools and programming languages. +

      Get the opportunity to learn about Microsoft's Cloud Services Platform, Windows Azure. +Attend the Hands-on-lab session sponsored by Microsoft. +

      + +
      + + +

      Once again the CSC will be holding its traditional end of term dinner. It will be at the Vice President's house. If you don't know how to get there meet at the club office at 6:30 PM, a group will be leaving from the MC then. The dinner will be potluck style so bring a dish for 4-6 people, or some plates or pop or something. +

      + + +

      Once again the CSC will be holding its traditional end of term dinner. It will +be at the Vice President's house. If you don't know how to get there meet +at the club office at 6:30 PM, a group will be leaving from the MC then. The +dinner will be potluck style so bring a dish for 4-6 people, or some plates +or pop or something. +

      + +
      + + +

      Member Sam Pasupalak will present some of his ongoing work in Natural User Interfaces and Robotics in this sixth installment of CS10. +

      + + +

      Bill Gates in his article “A Robot in every home” in the Scientific American describes how the current +robotics industry resembles the 1970’s of the Personal Computer Industry. In fact it is not just +Microsoft which has already taken a step forward by starting the Microsoft Robotics studio, but robotics +researchers around the world believe that robotics and automation systems are going to be ubiquitous in +the next 10-20 years (similar to Mark Weiser’s analogy of Personal Computers 20 years ago). Natural User +Interfaces (NUIs) are going to revolutionize the way we interact with computers, cellular phones, household +appliances, automated systems in our daily lives. Just like the GUI made personal computing a reality, +I believe natural user interfaces will do the same for robotics. +

      During the presentation I will be presenting my ongoing software project on natural user interfaces as well +as sharing my goals for the future, one of which is to provide an NUI SDK and the other to provide a common +Robotics OS for every hardware vendor that will enable people to make applications without worrying about +underlying functionality. If time permits I would like to present a demo of my software prototype. +

      + +
      + + +

      There is a CSC/CMC Code Party Friday starting at 7:00PM (1900) until we get bored (likely in the early in morning). Come out for fun hacking times, spreading Intertube memes (optional), hacking on open source projects, doing some computational math, and other general classiness. There will be free energy drinks for everyone's enjoyment. This is the last of the term so don't miss out. +

      + + +

      There is a CSC/CMC Code Party Friday starting at 7:00PM (1900) until we +get bored (likely in the early in morning). Come out for fun hacking +times, spreading Intertube memes (optional), hacking on open source projects, +doing some computational math, and other +general classiness. There will be free energy drinks for everyone's +enjoyment. This is the last of the term so don't miss out. +

      + +
      + + +

      Despite it being 2010, code is still being exploited due to stack overflows, a 40+ year old class of security vulnerabilities. In this talk, I will go over several common methods of program exploitation, both on the stack and on the heap, as well as going over some of the current mitigation techniques (i.e. stack canaries, ASLR, etc.) for these holes, and similarly, how some of these can be bypassed as well. +

      + + +

      Despite it being 2010, code is still being exploited due to +stack overflows, a 40+ year old class of security vulnerabilities. In +this talk, I will go over several common methods of program +exploitation, both on the stack and on the heap, as well as going over +some of the current mitigation techniques (i.e. stack canaries, ASLR, +etc.) for these holes, and similarly, how some of these can be +bypassed as well. +

      + +
      + + +

      There is a CSC Code Party Friday starting at 7:00PM (1900) until we get bored (likely in the early in morning). Come out for fun hacking times, spreading Intertube memes (optional), hacking on the OpenMoko, creating music mixes, and other general classiness. There will be free energy drinks for everyone's enjoyment. +

      + + +

      There is a CSC Code Party Friday starting at 7:00PM (1900) until we +get bored (likely in the early in morning). Come out for fun hacking +times, spreading Intertube memes (optional), hacking on the OpenMoko, +creating music mixes, and other +general classiness. There will be free energy drinks for everyone's +enjoyment. +

      + +
      + + +

      The fifth installment in CS10: Undergraduate Seminars in CS, features CSC member Elyot Grant introducing the theory of approximation algorithms. Fun times and a lack of gruesome math are promised. +

      + + +

      The theory of NP-completeness suggests that some problems in CS are inherently hard—that is, +there is likely no possible algorithm that can efficiently solve them. Unfortunately, many of +these problems are ones that people in the real world genuinely want to solve! How depressing! +What can one do when faced with a real-life industrial optimization problem whose solution may +save millions of dollars but is probably impossible to determine without trillions of +years of computation time? +

      One strategy is to be content with an approximate (but provably "almost ideal") solution, and from +here arises the theory of approximation algorithms. However, this theory also has a depressing side, +as many well-known optimization problems have been shown to be provably hard to approximate well. +

      This talk shall focus on the depressing. We will prove that various optimization problems (such as +traveling salesman and max directed disjoint paths) are impossible to approximate well unless P=NP. +These proofs are easy to understand and are REALLY COOL thanks to their use of very slick reductions. +

      We shall explore many NP-hard optimization problems and state the performance of the best known +approximation algorithms and best known hardness results. Tons of open problems will be mentioned, +including the unique games conjecture, which, if proven true, implies the optimality of many of the +best known approximation algorithms for NP-complete problems like MAX-CUT and INDEPENDENT SET. +

      I promise fun times and no gruesome math. Basic knowledge of graph theory and computational +complexity might help but is not required. +

      + +
      + + +

      A fevered night of code, friends, fun, energy drinks, and the CSC. +

      + + +

      A fevered night of code, friends, fun, energy drinks, and the CSC. +

      Come join us for a night of coding. Get in touch with more experianced coders, +advertize for/bug squash on your favourite open source project, write that personal +project you were planning to do for a while but haven't found the time. Don't +have any ideas but want to sit and hack? We can find something for you to do. +

      + +
      + + + +

      The fourth Undergraduate Seminar in Computer Science will be presented by Brennan Taylor, a club member. He will be discussing various concurrent computing problems, and introducing Software Transactional Memory as a solution to them. +

      + + +

      Concurrency is hard. Well maybe not hard, but it sure is annoying to get right. Even the +simplest of synchronization tasks are hard to implement correctly when using synchronization +primitives such as locks and semaphores. +

      In this talk we explore what Software Transactional Memory (STM) is, what problems STM solves, +and how to use STM in Haskell. We explore a number of examples that show how easy STM is to use +and how expressive Haskell can be. The goal of this talk is to convince attendees that STM is +not only a viable synchronization solution, but superior to how synchronization is typically +done today. +

      + +
      + +

      The CSC is going bowling. $9.75 for shoes and two games. The bowling alley serves fried food and beer. Join us for + some or all of the above

      +
      + + + +

      Dr. John Watrous of the IQC will present his recent result "QIP=PSPACE". The talk will not assume any familiarity with quantum computing or complexity theory, and light refreshments will be provided. +

      + + +

      The interactive proof system model of computation is a cornerstone of +complexity theory, and its quantum computational variant has been +studied in quantum complexity theory for the past decade. In this +talk I will discuss an exact characterization of the power of quantum +interactive proof systems that I recently proved in collaboration with +Rahul Jain, Zhengfeng Ji, and Sarvagya Upadhyay. The characterization +states that the collection of computational problems having quantum +interactive proof systems consists precisely of those problems +solvable with an ordinary classical computer using a polynomial amount +of memory (or QIP = PSPACE in complexity-theoretic terminology). This +characterization implies the striking fact that quantum computing does +not provide any increase in computational power over classical +computing in the context of interactive proof systems. +

      I will not assume that the audience for this talk has any familiarity +with either quantum computing or complexity theory; and to be true to +the spirit of the interactive proof system model, I hope to make this +talk as interactive as possible -- I will be happy to explain anything +related to the talk that I can that people are interested in learning +about. +

      + +
      + +

      The contest is coming to a close tomorrow, so to finish it in style we will be having ice cream and code friday night. + It would be a shame if Waterloo lost (we're not on top of the leaderboard right now) so come out and hack for the home team.

      +
      + + + +

      Come to a town hall style meeting with the managers of CSCF to discuss how to improve the undergraduate (student.cs) computing environment. Have gripes? Suggestions? Requests? Now is the time to voice them. +

      + + +

      Come to a town hall style meeting with the managers of CSCF to discuss how +to improve the undergraduate (student.cs) computing environment. Have gripes? +Suggestions? Requests? Now is the time to voice them. +

      CSCF management (Bill Ince, Associate Director; Dave Gawley, Infrastructure Support; +Dawn Keenan, User Support; Lawrence Folland, Research Support) will be at the +meeting to listen to student concerns and suggestions. Information gathered from +the meeting will be summarized and taken to the CSCF advisory committee for +discussion and planning. +

      + +
      + + + +

      In this talk Nicholas Harvey discusses the prevalence of randomized algorithms and their application to solving optimization problems on graphs; with startling results compared to deterministic algorithms. +

      + + +

      For many problems, randomized algorithms are either the fastest algorithm or the simplest algorithm; +sometimes they even provide the only known algorithm. Randomized algorithms have become so prevalent +that deterministic algorithms could be viewed as a curious special case. In this talk I will describe +some startling examples of randomized algorithms for solving some optimization problems on graphs. +

      + +
      + + + +

      Cairo is an open source, cross platform, vector graphics library with the ability to output to many kinds of surfaces, including PDF, SVG and PNG surfaces, as well as X-Window, Win32 and Quartz 2D backends. Unlike the raster graphics used with programmes and libraries such as The Gimp and ImageMagick, vector graphics are not defined by grids of pixels, but rather by a collection of drawing operations. These operations detail how to draw lines, fill shapes, and even set text to create the desired image. This has the advantages of being infinitely scalable, smaller in file size, and simpler to express within a computer programme. This talk will be an introduction to the concepts and metaphors used by vector graphics libraries in general and Cairo in particular. +

      + + +

      Cairo is an open source, cross platform, vector graphics library with the ability to +output to many kinds of surfaces, including PDF, SVG and PNG surfaces, as well as +X-Window, Win32 and Quartz 2D backends. Unlike the raster graphics used with programmes +and libraries such as The Gimp and ImageMagick, vector graphics are not defined by grids +of pixels, but rather by a collection of drawing operations. These operations detail how to +draw lines, fill shapes, and even set text to create the desired image. This has the +advantages of being infinitely scalable, smaller in file size, and simpler to express within +a computer programme. This talk will be an introduction to the concepts and metaphors used +by vector graphics libraries in general and Cairo in particular. +

      + +
      + + + +

      New to Unix? No problem, we'll teach you to power use circles around your friends! The popular tutorial returns for a second session, in case you missed the first one. +

      + + +

      New to Unix? No problem, we'll teach you to power use circles around your friends! +The popular tutorial returns for a second session, in case you missed the first one. +

      This first tutorial is an introduction to the Unix shell environment, both on the student +servers and on other Unix environments. Topics covered include: using the shell, both basic +interaction and advanced topics like scripting and job control, the filesystem and manipulating +it, and ssh. If you feel you're already familiar with these topics don't hesitate to come +to Unix 102 to learn about documents, editing, and other related tasks, or watch out +for Unix 103 and 104 that get much more in depth into power programming tools on Unix. +

      + +
      + + +

      New to Unix? No problem, we'll teach you to power use circles around your friends! +

      + + +

      New to Unix? No problem, we'll teach you to power use circles around your friends! +

      This first tutorial is an introduction to the Unix shell environment, both on the student +servers and on other Unix environments. Topics covered include: using the shell, both basic +interaction and advanced topics like scripting and job control, the filesystem and manipulating +it, and ssh. If you feel you're already familiar with these topics don't hesitate to come +to Unix 102 to learn about documents, editing, and other related tasks, or watch out +for Unix 103 and 104 that get much more in depth into power programming tools on Unix. +

      + +
      + + +

      Paul Lutus describes his early Apple II software development days, conducted from the far end of a 1200-foot power cord, in a tiny Oregon cabin. Paul describes how he wrote a best-seller (Apple Writer) in assembly language, while dealing with power outages, lightning storms and the occasional curious bear. +

      + + +

      Paul Lutus describes his early Apple II software development days, conducted +from the far end of a 1200-foot power cord, in a tiny Oregon cabin. Paul +describes how he wrote a best-seller (Apple Writer) in assembly language, +while dealing with power outages, lightning storms and the occasional +curious bear. +

      Paul also describes his subsequent four-year solo around-the-world sail in a +31-foot boat. And be ready with your inquiries -- Paul will answer your +questions. +

      Paul Lutus has a wide background in science and technology. He designed spacecraft +components for the NASA Space Shuttle and created a mathematical model of the solar +system used during the Viking Mars lander program. Then, at the beginning of the +personal computer revolution, Lutus switched career paths and took up computer +science. His best-known program is "Apple Writer," an internationally successful +word processing program for the early Apple computers. +

      + +
      + + + +

      Geoffrey Hinton, from the University of Toronto and the Canadian Institute for Advanced Research, will discuss some of his latest work in learning networks and artificial intelligence. The talk will be accessable, so don't hesitate to come out. More information about Dr. Hinton's research can be found on his website. +

      + + +

      Deep networks can be learned efficiently from unlabeled data. The layers +of representation are learned one at a time using a simple learning +module, called a "Restricted Boltzmann Machine" that has only one layer +of latent variables. The values of the latent variables of one +module form the data for training the next module. Although deep +networks have been quite successful for tasks such as object +recognition, information retrieval, and modeling motion capture data, +the simple learning modules do not have multiplicative interactions which +are very useful for some types of data. +

      The talk will show how a third-order energy function can be factorized to +yield a simple learning module that retains advantageous properties of a +Restricted Boltzmann Machine such as very simple exact inference and a +very simple learning rule based on pair-wise statistics. The new module +contains multiplicative interactions that are useful for a variety of +unsupervised learning tasks. Researchers at the University of Toronto +have been using this type of module to extract oriented energy from image +patches and dense flow fields from image sequences. The new module can +also be used to allow motions of a particular style to be achieved by +blending autoregressive models of motion capture data. +

      + +
      + + + + +

      Come on out to the club's termly end of term dinner, details in the abstract

      +

      The dinner will be potluck style at the Vice President's house, please RSVP (respond swiftly to the vice president) + here if you plan on attending. If you don't know how to get there meet at the club + office at 6:30 PM, a group will be leaving to lead you there.

      +
      + + + +

      A fevered night of code, friends, fun, energy drinks, and the CSC. Facebook will be around to bring some food and hang out. +

      + + +

      Come join us for a night of coding. Get in touch with more experianced coders, +advertize for/bug squash on your favourite open source project, write that personal +project you were planning to do for a while but haven't found the time. Don't +have any ideas but want to sit and hack? Try your hand at the Facebook puzzles, +write a new app, or just chill and watch scifi. +

      + +
      + + + +

      To most CS students an OS kernel is pretty low level. But there is something even lower, the instructions that must be executed to get the CPU ready to accept a kernel. That is, if you look at any processor's reference manual there is a page or two describing the state of the CPU when it powered on. This talk describes what needs to happen next, up to the point where the first kernel instruction executes. +

      + + +

      To most CS students an OS kernel is pretty low level. But there is +something even lower, the instructions that must be executed to get the +CPU ready to accept a kernel. That is, if you look at any processor's +reference manual there is a page or two describing the state of the CPU +when it powered on. This talk describes what needs to happen next, +up to the point where the first kernel instruction executes. +

      This part of execution is extremely architecture-dependent. Those of +you who have any experience with this aspect of CS probably know the x86 +architecture, and think it's horrible, which it is. I am going to talk +about the ARM architecture, which is inside almost all mobile phones, +and which allows us to look at a simple implementation that includes +all the essentials. +

      + +
      + + + +

      We're going to Dooly's to play pool. What more do you want from us? Come to the Club office and we'll all bus there together. We've got discount tables for club members so be sure to be there. +

      + + +

      We're going to Dooly's to play pool. What more do you want from us? +Come to the Club office and we'll all bus there together. We've got +discount tables for club members so be sure to be there. +

      + +
      + + + +

      Come on out for a night of code, contests, and energy drinks. Join the Computer Scinece Club for the finale of the Google AI Challenge and an all night code party. Finish up your entry, or start it (its not too late). Not interested in the contest? Come out anyway for a night of coding and comradarie with us. +

      + + +

      Come on out for a night of code, contests, and energy drinks. Join the Computer +Scinece Club for the finale of the Google AI Challenge and an all night code party. +Finish up your entry, or start it (its not too late). Not interested in the contest? +Come out anyway for a night of coding and comradarie with us. +

      Included in the party will be the contest finale and awards cerimony, so if you've +entered be sure to stick arround to collect the spoils of victory, or see just who +that person you couldn't edge off is. +

      + +
      + + + +

      In this long-awaited third installment of the popular Unix Tutorials the friendly experts of the CSC will teach you the simple art of version control. You will learn the purpose and use of two different Version Control Systems (git and subversion). This tutorial will advise you in the discipline of managing the source code of your projects and enable you to quickly learn new Version Control Systems in the work place -- a skill that is much sought after by employers. +

      + + +

      In this long-awaited third installment of the popular Unix Tutorials the +friendly experts of the CSC will teach you the simple art of version control. +You will learn the purpose and use of two different Version Control Systems +(git and subversion). This tutorial will advise you in the discipline of +managing the source code of your projects and enable you to quickly learn new +Version Control Systems in the work place -- a skill that is much sought after +by employers. +

      + +
      + + +

      "Is Graduate School for You?" Get the answers to your grad school questions - and have a bite to eat, our treat

      +
      +

      Join Prof. Greg Wilson, faculty member in the Software Engineering research group in the UofT's Department of Computer Science, + as he gives insight into studying at the graduate level-what can be expected, what does UofT offer, is it right for you? Pizza and pop will + be served. Come see what grad school is all about!. All undergraduate students are welcome; registration is not required.

      +

      For any questions about the program, visit UofT's website. This + event is not run by the CS Club, and is announced here for the benefit of our members.

      +
      + + + +

      Interested in trying Linux but don't know where to start? + Come to the Linux install fest to demo Linux, get help installing it + on your computer, either stand alone or a dual boot, and help setting + up your fresh install. Have lunch and hang around if you like, or just come in for a CD. +

      + + +

      Interested in trying Linux but don't know where to start? +Come to the Linux install fest to demo Linux, get help installing it on +your computer, either stand alone or a dual boot, and help setting +up your fresh install. Have lunch and hang around if you like, or just +come in for a qick install. +

      + +
      + + + +

      The next installment in the CS Club's popular Unix tutorials UNIX 102 introduces powerful text editing tools for programming and document formatting. +

      + + +

      Unix 102 is a follow up to Unix 101, requiring basic knowledge of the shell. +If you missed Unix101 but still know your way around you should be fine. +Topics covered include: "real" editors, document typesetting with LaTeX +(great for assignments!), bulk editing, spellchecking, and printing in the +student environment and elsewhere. +

      If you aren't interested or feel comfortable with these taskes, watch out for +Unix 103 and 104 to get more depth in power programming tools on Unix. +

      + +
      + + + +

      Come learn how to write an intelligent game-playing program. + No past experience necessary. Submit your program using the online web interface + to watch it battle against other people's programs. Beginners and experts welcome! Prizes provided by google, + including the delivery of your resume to google recruiters. +

      + + +

      Come learn how to write an intelligent game-playing program. + No past experience necessary. Submit your program using the online + web interface to watch it battle against other people's programs. + Beginners and experts welcome! +

      The contest is sponsored by Google, so be sure to compete for a chance + to get noticed by them. +

      Prizes for the top programs: +

      • $100 in Cash Prizes
      • +
      • Google t-shirts
      • +
      • Fame and recognition
      • +
      • Your resume directly to a Google recruiter
      • +
      +

      + +
      + + +

      + New to Unix? No problem, we'll teach you to power use circles around your friends! +

      + + +

      + New to Unix? No problem, we'll teach you to power use circles around your friends! +

      + This first tutorial is an introduction to the Unix shell environment, both on the student + servers and on other Unix environments. Topics covered include: using the shell, both basic + interaction and advanced topics like scripting and job control, the filesystem and manipulating + it, and ssh. If you feel you're already familiar with these topics don't hesitate to come + to Unix 102 to learn about documents, editing, and other related tasks, or watch out + for Unix 103 and 104 that get much more in depth into power programming tools on Unix. +

      +
      + + +

      + Nominations are open now, either place your name on the nominees board or + e-mail the CRO + to nominate someone for a position. + Come to the Comfy Lounge to elect your fall term executive. Contact + the CRO if you have questions. +

      +
      + + + + +

      + In this long-awaited third installment of the popular Unix Tutorials the dark + mages of the CSC will train you in the not-so-arcane magick of version control. + You will learn the purpose and use of two different Version Control Systems + (git and subversion). This tutorial will advise you in the discipline of + managing the source code of your projects and enable you to quickly learn new + Version Control Systems in the work place -- a skill that is much sought after + by employers. +

      +
      + + +

      + Have an assignment or project you need to work on? We + will be coding from 7:00pm until 4:00am starting on Friday, July 17th + in the Comfy lounge. Join us! +

      +
      + + +

      + This talk provides a personal overview of the evolution of the + undergraduate computer science curriculum at UW over the past forty + years, concluding with an audience discussion of possible future + developments. +

      +
      + + +

      Come and drink tea and read an academic CS paper with + the Paper Club. We will be meeting from 4:30pm until 6:30pm on + Monday, June 22th on the 4th floor of the MC (exact room number + TBA). See http://csclub.uwaterloo.ca/~paper +

      +
      + + +

      + The CSC will be playing pool at Dooly's. Join us for only a few dollars. +

      +
      + + +

      + Have an assignment or project you need to work on? We + will be coding from 7:00pm until 7:00am starting on Friday, June 5th + in the Comfy lounge. Join us! +

      +
      + + +

      + Need to use the UNIX environment for a course, want to overcome your fears of + the command line, or just curious? Come and learn the arcane secrets of the + UNIX command line interface from CSC mages. After this tutorial you will be + comfortable with the essentials of navigating, manipulating and viewing files, + and processing data at the UNIX shell prompt. +

      +
      + + +

      PHP Programming Contest Info Session

      +

      + Port or create a new PHP web application and you could win a prize + of up to $10k. Microsoft is running a programming contest for PHP + developers willing to support the Windows platform. The contest is + ongoing; this will be a short introduction to it by + representatives of Microsoft and an opportunity to ask questions. + Pizza and pop will be provided. +

      +
      + + + + + +

      A talk by Craig S. Kaplan.

      + + +

      The combination of computer graphics, geometry, and rapid +prototyping technology has created a wide range of exciting +opportunities for using the computer as a medium for creative +expression. In this talk, I will describe the most popular +technologies for computer-aided manufacturing, discuss +applications of these devices in art and design, and survey +the work of contemporary artists working in the area (with a +focus on mathematical art). The talk will be primarily +non-technical, but I will mention some of the mathematical +and computational techniques that come into play. +

      + +
      + + +

      + Join the Club That Really Likes Dinner for the End Of Term + party! Inquire closer to the date for details. +

      +
      + +

      + This is not an official club event and receives no funding. + Bring food, drinks, deserts, etc. +

      +
      +
      + + + +

      + CSC Code Party! Same as always - no sleep, lots of caffeine, + and really nerdy entertainment. Bonus: Free Cake! +

      +
      + +

      + This code party will have the usual, plus it will double as the + closing of the programming contest. Our experts will be + available to help you polish off your submission. +

      +
      +
      + + + +

      + Come out and try your hand at writing a computer program that + plays Minesweeper Flags, a two-player variant of the classic + computer game, Minesweeper. Once you're done, your program + will compete head-to-head against the other entries in a + fierce Minesweeper Flags tournament. There will be a contest + kick-off session on Thursday March 19 at 4:30 PM in room + MC3036. Submissions will be accepted until Saturday March 28. +

      +
      + +

      + Come out and try your hand at writing a computer program that + plays Minesweeper Flags, a two-player variant of the classic + computer game, Minesweeper. Once you're done, your program + will compete head-to-head against the other entries in a + fierce Minesweeper Flags tournament. There will be a contest + kick-off session on Thursday March 19 at 4:30 PM in room + MC3036. Submissions will be accepted until Saturday March 28. +

      +
      +
      + + + +

      + Come out and watch the SIGGRAPH (Special Interest Group on + Graphics) conference video review. A video of insane, amazing, + and mind blowing computer graphics. . +

      +
      + +

      + The ACM SIGGRAPH (Special Interest Group on Graphics) hosts a + conference yearly in which the latest and greatest in computer + graphics premier. They record video and as a result produce a + very nice Video Review of the conference. Come join us watching + these videos, as well as a few professors from the UW Computer + Graphics Lab. There will be some kind of food and drink, and its + guranteed to be dazzling. +

      +
      +
      + + + +

      + See cutc.ca for more details. +

      +
      + +

      + The Canadian Undergraduate Technology Conference is Canada's + largest student-run conference. From humble roots it has emerged + as a venue that offers an environment for students to grow + socially, academically, and professionally. We target to exceed + our past record of 600 students from 47 respected institutions + nationwide. The event mingles ambitious as well as talented + students with leaders from academia and industry to offer + memorable experiences and valuable opportunities. +

      +
      +
      + + +

      + Functional Lexing and Parsing

      + +

      + This talk will describe a non-traditional functional approach + to the classical problems of lexing (breaking a stream of + characters into "words" or tokens) and parsing (identifying + tree structure in a stream of tokens based on a grammar, + e.g. for a programming language that needs to be compiled or + interpreted). The functional approach can clarify and organize + a number of algorithms that tend to be opaque in their + conventional imperative presentation. No prior background in + functional programming, lexing, or parsing is assumed. +

      +
      +
      + + + +

      + A brief intro to Quantum Computing and why it matters, + followed by a talk on programming quantum computers. Meet at + the CSC at 4:00PM for a guided walk to the RAC. +

      +
      + +

      + Raymond Laflamme is the director of the Institute for Quantum + Computing at the University of Waterloo and holds the Canada + Research Chair in Quantum Information. He will give a brief + introduction to quantum computing and why it matters, followed + by a talk on programming quantum computers. There will be + tours of the IQC labs at the end, and pizza will be provided + back at the CSC for all attendees. +

      +
      +
      + + +

      + Come join the CSC as we head to Dooly's.

      +

      + Meet us at the Club office as we head to Dooly's for cheap tables and good times.

      +
      + + +

      + Continuing the popular Unix Tutorials with a rerun of 101 and the debut of 102.

      +

      + Unix 101 is an introduction to the Unix shell environment, both on the student + servers and on other Unix environments. Topics covered include: using the shell, both basic + interaction and advanced topics like scripting and job control, the filesystem and manipulating + it, and ssh.

      + Unix 102 is a follow up to Unix 101, requiring basic knowledge of the shell. + If you missed Unix101 but still know your way around you should be fine. + Topics covered include: "real" editors, document typesetting with LaTeX + (great for assignments!), bulk editing, spellchecking, and printing in the + student environment and elsewhere.

      + If you aren't interested or feel comfortable with these taskes, watch out for + Unix 103 and 104 to get more depth in power programming tools on Unix.

      +
      + + + +

      New to Unix? No problem, we'll teach you to power use circles around your friends!

      +

      This first tutorial is an introduction to the Unix shell environment, both on the student + servers and on other Unix environments. Topics covered include: using the shell, both basic + interaction and advanced topics like scripting and job control, the filesystem and manipulating + it, and ssh. If you feel you're already familiar with these topics don't hesitate to come + to Unix 102 to learn about documents, editing, and other related tasks, or watch out + for Unix 103 and 104 that get much more in depth into power programming tools on Unix.

      +
      + + + +

      + There is a CSC Code Party starting at 7:00PM (19:00). Come out + and enjoy some good old programming and meet others interested + in writing code! Free energy drinks and snacks for all. Plus, + we have lots of things that need to be done if you're looking + for a project to work on! +

      +
      + +

      + Code Party. Awesome. Need we say more? +

      +
      +
      + + + +

      There is a CSC Code Party Tonight starting at 7:30PM + (1930) until we get bored (likely in the early in morning). Come + out for fun hacking times, spreading Intertube memes (optional), + hacking on the OpenMoko, creating music mixes, and other general + classyness. If we manage to swing it, there will be delicious + energy drinks for your consumption! Alternatively, if we don't we + will have each other as well as some delicious tea and + coffee. Perhaps a crumpet +

      + + +

      There is a CSC Code Party Tonight starting at 7:30PM + (1930) until we get bored (likely in the early in + morning). Come out for fun hacking times, spreading Intertube + memes (optional), hacking on the OpenMoko, creating music + mixes, and other general classyness. If we manage to swing it, + there will be delicious energy drinks for your consumption! + Alternatively, if we don't we will have each other as well as + some delicious tea and coffee. Perhaps a crumpet +

      + +
      + + +

      The Free Software Movement and the GNU/Linux Operating System

      +
      + +

      + Richard Stallman will speak about the Free Software Movement, which + campaigns for freedom so that computer users can cooperate to + control their own computing activities. The Free Software Movement + developed the GNU operating system, often erroneously referred to as + Linux, specifically to establish these freedoms.

      +

      About Richard Stallman: + Richard Stallman launched the development of the GNU operating system (see + www.gnu.org) in 1984. GNU is free + software: everyone has the freedom to copy it and redistribute it, + as well as to make changes either large or small. The GNU/Linux + system, basically the GNU operating system with Linux added, is used + on tens of millions of computers today. Stallman has received the + ACM Grace Hopper Award, a MacArthur Foundation fellowship, the + Electronic Frontier Foundation's Pioneer award, and the the Takeda + Award for Social/Economic Betterment, as well as several honorary + doctorates.

      +
      +
      + + +

      Joel Spolsky, of Joel on Software will be giving a talk entitled "Computer Science Education and the Software Industry".

      +
      +

      About Joel Spolsky: Joel Spolsky is a + globally-recognized expert on the software development process. His + website Joel on Software + (www.joelonsoftware.com) + is popular with software developers around the world and has been + translated into over thirty languages. As the founder + of Fog Creek Software in New + York City, he + created FogBugz, a + popular project management system for software teams. He is the + co-creator of Stack + Overflow, a programmer Q&A site. Joel has worked at + Microsoft, where he designed VBA as a member of the Excel team, and + at Juno Online Services, developing an Internet client used by + millions. He has + written four + books: User Interface Design for Programmers (Apress, + 2001), Joel on Software (Apress, 2004), More Joel on + Software (Apress, 2008), and Smart and Gets Things Done: + Joel Spolsky's Concise Guide to Finding the Best Technical + Talent (Apress, 2007). He also writes a monthly column + for Inc + Magazine. Joel holds a BS from Yale in Computer + Science. Before college he served in the Israeli Defense Forces as a + paratrooper, and he was one of the founders of Kibbutz Hanaton.

      +
      +
      + + +

      Winter Elections

      +
      +
      + + + + +

      Organized by Queen's students, Changing the World aims to bring together the world's greatest visionaries to inspire people to innovate and better our world. Among these speakers include Nobel Peace Prize winner, Eric Chivian. He was a recipient for his work on stopping nuclear war. +

      + + +

      Organized by Queen's students, Changing the World + aims to bring together the world's greatest visionaries to + inspire people to innovate and better our world. Among these + speakers include Nobel Peace Prize winner, Eric Chivian. He + was a recipient for his work on stopping nuclear war. +

      The conference is modeled after TED (Technology, + Entertainment, Design), an annual conference uniting the + world's most fascinating thinkers and doers, and like TED, + each speaker is given 18 minutes to give the talk of their + lives. +

      Specifically for students in CS/Math, 50 tickets have + been reserved (non-students: $500). For those who would like + to attend, please pick up your ticket in the Computer Science + Club office. The tickets are limited and they are first come + first serve. +

      + +
      + + + +

      Come join the CSC in celebrating the new releases of + Ubuntu Linux, Free BSD and Open BSD, and get a hand installing one + of them on your own system. +

      + + +

      Come join the CSC in celebrating the new releases of + Ubuntu Linux, Free BSD and Open BSD, and get a hand installing + one of them on your own system. +

      This is an event to celebrate the releases of new + versions of Ubuntu Linux, OpenBSD, and FreeBSD. CDs will be + available and everyone is invited to bring their PC or laptop + to get help installing any of these Free operating + systems. Knowledgeable CSC members will be available to help + with any installation troubles, or to troubleshooting any + existing problems that users may have. +

      This event will also promote gaming on Linux, as well as + FLOSS (Free/Libre and Open Source Software) in general. We may + also have a special guest (Ian Darwin, of OpenBSD and OpenMoko + fame). +

      +
      + + + +

      This talk will survey concepts, techniques, and + languages for functional programming from both historical and + contemporary perspectives, with reference to Lisp, Scheme, ML, + Haskell, and Erlang. No prior background is assumed. +

      + + +

      This talk will survey concepts, techniques, and + languages for functional programming from both historical and + contemporary perspectives, with reference to Lisp, Scheme, ML, +Haskell, and Erlang. No prior background is assumed. +

      + +
      + + +

      + Come join us for a night of coding. Get in touch with more experianced coders, + advertize for/bug squash on your favourite open source project, write that personal + project you were planning to do for a while but haven't found the time. Don't + have any ideas but want to sit and hack? We can find something for you to do. +

      +

      + A fevered night of code, friends, fun, free energy drinks, and the CSC. +

      +
      + + +

      + Come out and watch the SIGGRAPH (Special Interest Group on Graphics) conference video + review. A video of insane, amazing, and mind blowing computer graphics. +

      +

      + The ACM SIGGRAPH (Special Interest Group on Graphics) hosts a conference yearly + in which the latest and greatest in computer graphics premier. They record video + and as a result produce a very nice Video Review of the conference. Come join us + watching these videos, as well as a few professors from the UW Computer Graphics + Lab. There will be some kind of food and drink, and its guranteed to be dazzling. +

      +
      + + +

      + Come out and meet other CSC members, find out about the CSC, meet the executive + nominees, and join if you like what you see. Nominees should plan on attending. +

      +
      + + +

      + Elections are scheduled for Tues, Sep 16 @ 4:30 pm in the comfy lounge. + The nomination period closes on Mon, Sep 15 @ 4:30 pm. Nominations may be + sent to cro@csclub.uwaterloo.ca. Candidates should not engage in + campaigning after the nomination period has closed. +

      +
      + + +

      + New to Unix? No problem, we'll teach you to power use circles around your friends! +

      +

      + This first tutorial is an introduction to the Unix shell environment, both on the student + servers and on other Unix environments. Topics covered include: using the shell, both basic + interaction and advanced topics like scripting and job control, the filesystem and manipulating + it, and ssh. If you feel you're already familiar with these topics don't hesitate to come + to Unix 102 to learn about documents, editing, and other related tasks, or watch out + for Unix 103 and 104 that get much more in depth into power programming tools on Unix. +

      +
      + + +

      + New to Unix? No problem, we'll teach you to power use circles around your friends! +

      +

      + This first tutorial is an introduction to the Unix shell environment, both on the student + servers and on other Unix environments. Topics covered include: using the shell, both basic + interaction and advanced topics like scripting and job control, the filesystem and manipulating + it, and ssh. If you feel you're already familiar with these topics don't hesitate to come + to Unix 102 to learn about documents, editing, and other related tasks, or watch out + for Unix 103 and 104 that get much more in depth into power programming tools on Unix. +

      +
      + + +

      + Want more from Unix? No problem, we'll teach you to create and quickly edit high quality documents. +

      +

      + This is a follow up to Unix 101, requiring basic knowledge of the shell. If you missed + Unix101 but still know your way around you should be fine. Topics covered include: "real" editors, + document typesetting with LaTeX (great for assignments!), bulk editing, spellchecking, and printing + in the student environment and elsewhere. If you aren't interested or feel comfortable with these + taskes, watch out for Unix 103 and 104 to get more depth in power programming tools on Unix. If you + don't think you're ready go to Unix 101 on Tuesday to get familiarized with the shell environment. +

      +
      + + +

      Juancho Buchanan, CTO Relic Entertainment

      +

      + In this talk I will give an overview of the history of Relic and our + development philosophy. The Talk will then proceed to talk about work + that is being pursued in the area of early game prototyping with the + introduction of game sketching methodology. +

      +

      + Bio: + + Fired from his first job for playing Video Games Juancho Buchanan is + currently the director of Technology for Relic Entertainment. Juancho + Buchanan Wrote his first game in 1984 but then pursued other interests + which included a master's in Program Visualization, A Doctorate in + Computer Graphics, a stint as a professor at the University of Alberta + where he pioneered early work in Non photo realistic rendering, A stint + at Electronic Arts as Director, Advanced Technology, A stint at EA as + the University Liaison Dude, A stint at Carnegie Mellon University where + he researched the Game Sketching idea. His current role at Relic has + him working with the soon to be released Dawn of War II. +

      +
      + + + +

      + The second official general meeting of the terfm. Items on the adgenda are CSC Merch, + upcoming talks, and other possible planned events, as well as the announcement of + a librarian and planning of an office cleanout and a library organization day. +

      +
      + + + + + + + Tyler Lessard +

      +Tyler Lessard from RIM will present a brief history of BlackBerry +technology and will discuss how the evolution of BlackBerry as an +end-to-end hardware, software and services platform has been +instrumental to its success and growth in the market. Find out how the +BlackBerry service components integrate with wireless carrier networks +and get a sneak peek at where the wireless data market is going. +

      +
      + + + Raymond Laflamme +

      + Information processing devices are pervasive in our society; from the 5 + dollar watches to multi-billions satellite network. These devices have + allowed the information revolution which is developing around us. It has + transformed not only the way we communicate or entertain ourselves but + also the way we do science and even the way we think. All this + information is manipulated using the classical approximation to the laws + of physics, but we know that there is a better approximation: the + quantum mechanical laws. Would using quantum mechanics for information + processing be an impediment or could it be an advantage? This is the + fundamental question at the heart of quantum information processing + (QIP). QIP is a young field with an incredible potential impact reaching + from the way we understand fundamental physics to technological + applications. I will give an overview of the Institute for Quantum + Computing, comment on the effort in this field at Waterloo and in + Canada and, time permitted visit some of the IQC labs. +

      +
      + + + Yes, we know this is Valentine's Day. +

      + Contestants will be writing an artificial intelligence to play Risk. The + prize will be awarded to the intelligence which wins the most + head-to-head matches against competing entries. We're providing easy + APIs for several languages, as well as full documentation of the game + protocol so contestants can write wrappers for any additional language + they wish to work in. +

      +

      + We officially support entries in Scheme, Perl, Java, C, and C++. If you + would like help developing an API for some other language contact us + through the systems committee mailing list (we will require that your API + is made available to all entrants). +

      +

      + To kick off the contest we're hosting an in-house coding session starting + at 4:00PM on Thursday, February 14th in MC2061. Members of our contest + administration team will be available to help you work out the details of + our APIs, answer questions, and provide the necessities of life (ie, + pizza). Submissions will open no later than 5:00PM on February 14th + and will close no earlier than 12:00PM on February 17th. +

      +

      + Visit our contest site here! +

      +
      + + + + Elmer Horvath +

      + The problem: coordinating and communicating between multiple processors + in a distributed system (possibly containing heterogeneous elements) +

      + The open source TIPC (transparent interprocess communication) protocol + has been incorporated into the Linux kernel and is available in VxWorks + and, soon, other OSes. This emerging protocol has a number of + advantages in a clustered environment to simplify application + development while maintaining a familiar socket programming interface. + The service oriented capabilities of TIPC help in applications easily + finding required services in a system. The location transparent aspect + of TIPC allows services to be located anywhere in the system as well as + allowing redundant services for both load reduction and backup. + + Learn about the emerging cluster protocol. +

      +
      + + +

      + Elections are scheduled for Tues, Jan 15 @ 4:30 pm in the comfy lounge. + The nomination period closes on Mon, Jan 14 @ 4:30 pm. Candidates should + not engage in campaigning after the nomination period has closed. +

      +
      + + + + + + +

      + There is a general meeting scheduled for Friday, October 19, 2007 at 17:00. +

      +

      + This is a chance to bring out any ideas and concerns about CSC happenings into the open, as well as a chance to make sure all CSC staff is up to speed on current CSC doings. The current agenda can be found at http://wiki.csclub.uwaterloo.ca/wiki/Friday_19_October_2007. +

      +
      +
      + + + Susan Abramovitch + +

      + This talk is run by the School of Computer Science +

      +

      + How should virtual property created in games, such as weapons used in +games like Mir 3 and real estate or clothing created or acquired in +games like Second Life, be treated in law. Although the videogaming +industry continues to multiply in value, virtual property created in +virtual worlds has not been formally recognized by any North American +court or legislature. A bridge has been taking shape from gaming's +virtual economies to real world economies, for example, through +unauthorized copying of designer clothes sold on Second Life for in-game +cash, or real court damages awarded against deletion of player-earned +swords in Mir 3. The trading of virtual property is important to a +large number of people and property rights in virtual property are +currently being recognized by some foreign legal bodies. +

      +

      +Susan Abramovitch will explain the legal considerations in determining +how virtual property can or should be governed, and ways it can be +legally similar to tangible property. Virtual property can carry both +physical and intellectual property rights. Typically video game +developers retain these rights via online agreements, but Ms. +Abramovitch questions whether these rights are ultimately enforceable +and will describe policy issues that may impact law makers in deciding +how to treat virtual property under such agreements. +

      +
      +
      + + + Brennan Taylor + +

      A lecture on why functional languages are important, practical applications, and some neat examples. Starting with an introduction to +basic functional programming with ML syntax, continuing with the strengths of OCaml and F#, followed by some exciting examples. Examples include GUI +programming with F#, Web Crawlers with F#, and OpenGL/GTK programming with OCaml. This lecture aims to display how powerful functional languages can +be.

      +
      +
      + + Brennan Taylor + +

      + A lecture on the fundamentals of Pi-Calculus followed by an introduction +to Join-Calculus in JoCaml with some great examples. Various concurrent +control structures are explored, as well as the current limitations of +JoCaml. The examples section will mostly be concurrent programming, +however some basic distributed examples will be explored. This lecture +focuses on how easy concurrent programming can be. +

      +
      +
      + + + Ian Goldberg + +

      +Instant messaging (IM) is an increasingly popular mode of communication +on the Internet. Although it is used for personal and private +conversations, it is not at all a private medium. Not only are all of +the messages unencrypted and unauthenticated, but they are all +routedthrough a central server, forming a convenient interception point +for an attacker. Users would benefit from being able to have truly +private conversations over IM, combining the features of encryption, +authentication, deniability, and forward secrecy, while working within +their existing IM infrastructure. +

      +

      +In this talk, I will discuss "Off-the-Record Messaging" (OTR), a widely +used software tool for secure and private instant messaging. I will +outline the properties of Useful Security and Privacy Technologies that +motivated OTR's design, compare it to other IM security mechanisms, and +talk about its ongoing development directions. +

      +

      +Ian Goldberg is an Assistant Professor of Computer Science at the +University of Waterloo, where he is a founding member of the +Cryptography, Security, and Privacy (CrySP) research group. He holds a +Ph.D. from the University of California, Berkeley, where he discovered +serious weaknesses in a number of widely deployed security systems, +including those used by cellular phones and wireless networks. He also +studied systems for protecting the personal privacy of Internet users, +which led to his role as Chief Scientist at Zero-Knowledge Systems (now +known as Radialpoint), where he commercialized his research as the +Freedom Network. +

      +
      +
      + + + + Andrei Barbu + + + + + Andrei Barbu + +Haskell is a modern lazy, strongly typed functional language with type inferrence. This talk will focus on multiple monads, existential types, +lambda expressions, infix operators and more. Along the way we'll see a parser and interpreter for lambda calculus using monadic parsers. STM, +software transactional memory, a new approach to concurrency, will also be discussed. Before the end we'll also see the solution to an ACM problem +to get a hands on feeling for the language. Don't worry if you haven't seen the first talk, you should be fine for this one anyway! + + + + + + Brennan Taylor + +

      + A lecture on the fundamentals of Pi-Calculus followed by an introduction to Join-Calculus in JoCaml with some great examples. + Various concurrent control structures are explored, as well as the current limitations of JoCaml. The examples section will + mostly be concurrent programming, however some basic distributed examples will be explored. This lecture focuses on how easy + concurrent programming can be. +

      +
      +
      + + + David Tenty + +

      + With today's fast growing linux user base, a large porportion of legacy applications have established open-source equivalents or ports. + However, legacy games provided an intresting problem to gamers who might be inclinded to migrate to linux or other open platforms. + PE executable translation software will be presented that provides a solution to this dilema and will be contrasted with the windows compatiblity framwork Wine. + Postponed to a later date. +

      +
      +
      + + + Win Prizes! + +

      + The Computer Science club is holding a programming contest from 1:00 to 6:30 open to all! C++,C,Perl,Scheme are allowed. + Prizes totalling in value of $75 will be distributed. You can participate online! For more information, including source files visit http://www.csclub.uwaterloo.ca/contest +

      +

      + And Free Pizzaa for all who attend! +

      +
      +
      + + Multi-Player Gaming with Linux [Possibly Pizza!] + +

      + Come out for multi-player gaming on Linux. If you don't have linux on your machine, we will have LiveCDs available. + Lots of fun! Possible Pizzaa! +

      +
      +
      + + + Brennan Taylor + +

      + A quick introduction on the current state of distributed programming and various grid computing projects. Followed by some + history and features of the Erlang language and finishing with distributed examples including operating on a cluster. +

      +
      +
      + + + Holden Karau + +

      + An overview on Google Summer of Code 2007. This talk will look at some of the Summer of Code projects, the project organization, etc. +

      +

      + Holden Karau participated in Google Summer of Code 2007 as a student on the subversion team. He created a set of scheme bindings for the + subversion project. +

      +
      +
      + + + + + + + Bjarne Stroustrup +

      + A good programming language is far more than a simple collection of + features. My ideal is to provide a set of facilities that smoothly work + together to support design and programming styles of a generality beyond + my imagination. Here, I briefly outline rules of thumb (guidelines, + principles) that are being applied in the design of C++0x. Then, I + present the state of the standards process (we are aiming for C++09) and + give examples of a few of the proposals such as concepts, generalized + initialization, being considered in the ISO C++ standards committee. + Since there are far more proposals than could be presented in an hour, + I'll take questions. +

      +
      + + + Richard Stallman +

      + Copyright developed in the age of the printing press, and was designed + to fit with the system of centralized copying imposed by the printing + press. But the copyright system does not fit well with computer + networks, and only draconian punishments can enforce it. +

      + The global corporations that profit from copyright are lobbying for + draconian punishments, and to increase their copyright powers, while + suppressing public access to technology. But if we seriously hope to + serve the only legitimate purpose of copyright--to promote progress, for + the benefit of the public--then we must make changes in the other + direction. +

      + The CSC would like to thank MEF and Mathsoc for funding this talk. +

      + The Freedom Software Foundation's description
      + FSF's anti-DRM campaign
      + Why you shouldn't use Microsoft Vista
      + The GNU's Not Unix Project
      +

      +
      + + + A talk by Michael Terry +

      + What is the typical monitor resolution of a GIMP user? How many monitors + do they have? What size images do they work on? How many layers are in + their images? The answers to these questions are generally unknown: No + means currently exist for open source applications to collect usage + data. In this talk, I will present ingimp, a version of GIMP that has + been instrumented to automatically collect usage data from real-world + users. I will discuss ingimp's design, the type of data we collect, how + we make the data available on the web, and initial results that begin to + answer the motivating questions. +

      + ingimp can be found at http://www.ingimp.org. +

      +
      + + + Ken Ho +

      + E-mail transactions and confirmations have become commonplace and the + information therein can often be sensitive. We use email for purposes as + mundane as inbound marketing, to as sensitive as account passwords and + financial transactions. And nearly all our email is sent in clear text; + we trust only that others will not eavesdrop or modify our messages. But + why rely on the goodness or apathy of your fellow man when you can + ensure your message's confidentiality with encryption so strong not even + the NSA can break? Speaker (Kenneth Ho) will discuss email encryption, + and GNU Privacy Guard to ensure that your messages are sent, knowing + that only your intended recipient can receive it. +

      An optional code-signing party will be held immediately + afterwards; if you already have a PGP or GPG key and wish to + participate, please submit the public key to + + gpg-keys@csclub.uwaterloo.ca. +

      + Laptop users are invited also to participate in key-pair sharing + on-site, though it is preferable to send keys ahead of time. +

      +
      + + + Peter Macdonald +

      + The purpose of the talk is to address how students interact with the + internet, and possibilities for how they could do so more efficiently. + Information on events and happenings on UW campus is currently hosted + on a desperate, series of internet applications. Interactions with + WatSFIC is done over a Yahoo! mailing list, GLOW is organized through a + Facebook group, campus information at large comes from + imprint.uwaterloo.ca. There + has been historical pressures from various bodies, including some + thinkers in feds and the administration, to centralize these issues. To + create a one stop shop for students on campus. +

      + It is not through confining data in cages that we will finally link all + student activities together, instead it is by truly freeing it. When + data can be anywhere, then it will be everywhere students need it. This + is the underlying concept behind metadata, data that is freed from the + confines of it's technical imprisonment. Metadata is the extension of + people, organizations, and activities onto the internet in a way that is + above the traditional understanding of how people interact with their + networks. The talk will explore how Metadata can exist freely on the + internet, how this affects concepts like Web 3.0, and how the university + and the federation are poised to take advantage of this burgeoning new + technology through adoptions of portals which will allow students to + interact with a metaverse of data. +

      +
      + + + + + A talk by Richard M. Stallman (RMS) [CANCELLED] +

      + Richard Stallman has cancelled his trip to Canada. +

      +
      + + + A talk by Simina Branzei +

      + Abstract coming soon! +

      +
      + + + Bill Gates is coming to visit the CSClub + +

      + While reading Slashdot, Bill came across the recently digitized audio + recording of his 1989 talk at the Computer Science Club. As Bill has always + had a soft-spot for the Computer Science Club, he has decided to pay us a + surprise visit. +

      + Bill promises to give away free copies of Windows Vista Ultimate, because + frankly, nobody here (except j2simpso) wants to pay for a frisbee. Be sure + to bring your resumes kids, because Bill will be recruiting for some + exciting new positions at Microsoft, including Mindless Drone, Junior Code + Monkey, and Assistant Human Cannonball. +

      +
      +
      + + + A talk by David Tenty and Alex Parent + +

      + Coming Soon! +

      +
      +
      + + + + + A demo/introduction to a new source code search engine. A talk by Holden Karau + +

      +Source code search engines are a relatively new phenomenon . The general idea of most source code search engines is helping programmers find +pre-existing code. So if you were writing some code and you wanted to find a csv library, for example, you could search for csv. +All The Code is a +next generation source code search engine. Unlike earlier generations of source code search engines, it considers how code is used to help determine +relevance of code. +

      +

      +The talk will primarily be a demo of All The Code, +along with a brief discussion of some of the technology behind it. +

      +
      +
      + + + + A talk by Michael Biggs. This talk is RESCHEDULED due to unexpected + circumstances + +

      +I am going to take an intuitive, CS-style approach to a discussion about the +use of kernels in modern data analysis. This approach often lends us +efficient ways to consider a dataset under various choices of inner product, +which is roughly comparable to a measure of "similarity". Many new tools in +AI arise from kernel methods, such as the infamous Support Vector Machines for +classification, and kernel-PCA for nonlinear dimensionality reduction. I will +attempt to highlight, and provide visualization for some of the math involved +in these methods while keeping the material at an accessible, undergraduate +level. +

      +
      +
      + + + + + A talk by Alex Ionescu + +

      +The ReactOS operating system has been in development for over eight years and aims to provide users +with a fully functional and Windows-compatible distribution under the GPL license. ReactOS comes with +its own Windows 2003-based kernel and system utilities and applications, resulting in an environment +identical to Windows, both visually and internally. +

      +More than just an alternative to Windows, ReactOS is a powerful platform for academia, allowing +students to learn a variety of skills useful to software testing, development and management, as well as +providing a rich and clean implementation of Windows NT, with a kernel compatible to published +internals book on the subject. +

      +This talk will introduce the ReactOS project, as well as the various software engineering challenges +behind it. The building platform and development philosophies and utilities will be shown, and +attendees will grasp the vast amount of effort and organization that needs to go into building an +operating system or any other similarly large project. The speaker will gladly answer questions related to +his background, experience and interests and information on joining the project, as well as any other +related information. +

      +Speaker Bio +

      +Alex Ionescu is currently studying in Software Engineering at Concordia University in Montreal, Quebec +and is a Microsoft Technical Student Ambassador. He is the lead kernel developer of the ReactOS Project +and project leader of TinyKRNL. He regularly speaks at Linux and Open Source conferences around the +world and will be a lecturer at the 8th International Free Software Forum in Brazil this April, as well as +providing hands-on workshops and lectures on Windows NT internals and security to various companies. +

      +
      +
      + + + + A talk by James deBoer + +

      + +This talk will introduce the Haskell programming language and and walk +through building a recognizer for regular languages. The talk will +include a quick overview of regular expressions, an introduction to +Haskell and finally a line by line analysis of a regular language +recognizer. +

      +
      +
      + + + A talk by Chris "The Prof" Evensen + +

      + A talk for those interested in 3-dimensional graphics but unsure of where to + start. Covers the basic math and theory behind projecting 3-dimensional + polygons on screen, as well as simple cropping techniques to improve + efficiency. Translation and rotation of polygons will also be discussed. +

      +
      +
      + + + A talk by James Simpson + +

      +A common misconception amongst software developers is that top quality software +encompasses certain platforms, is driven by a particular new piece of +technology, or relies solely on a particular programming language. However as +developers we tend to miss the less hyped issues and techniques involved in +writing world class software. These techniques are universal to all +programming languages, platforms and deployed technologies but are often times +viewed as being so obvious that they are ignored by the typical developer. The +topics covered in this lecture will include: +

      +- Writing bug-free to extremely low bug count software in real-time
      +- The concept of single-source, universal platform software
      +- Programming language interoperability
      +
      +... and other less hyped yet vitally important concepts to writing +World Class Software +

      +
      +
      + + + A talk by Larry Smith + +

      + A discussion of software start-ups founded by UW students and what they did + that helped them grow and what failed to help. In order to share the most + insights and guard the confidences of the individuals involved, none of the + companies will be identified. +

      +
      +
      + + + + How a Waterloo software company is changing the way people program computers. + A talk by Stefanus Du Toit + +

      + For decades, mainstream parallel processing has been thought of as +inevitable. Up until recent years, however, improvements in +manufacturing processes and increases in clock speed have provided +software with free Moore's Law-scale performance improvements on +traditional single-core CPUs. As per-core CPU speed increases have +slowed to a halt, processor vendors are embracing parallelism by +multiplying the number of cores on CPUs, following what Graphics +Processing Unit (GPU) vendors have been doing for years. The Multi- +core revolution promises to provide unparalleled increases in +performance, but it comes with a catch: traditional serial +programming methods are not at all suited to programming these +processors and methods such as multi-threading are cumbersome and +rarely scale beyond a few cores. Learn how, with hundreds of cores in +desktop computers on the horizon, a local software company is looking +to revolutionize the way software is written to deliver on the +promise multi-core holds. +

      +

      + Refreshments (and possible pizza!) will be provided. +

      +
      +
      + + + + A talk by Reg Quinton + +

      + IST monitors the campus network for vulnerabilities and scans + systems for security problems. + This informal presentation will look behind the scenes to show the + strategies and technologies used and to show the problem magnitude. We + will review the IST Security web site with an emphasis on these pages +

      + http://ist.uwaterloo.ca/security/vulnerable/
      + http://ist.uwaterloo.ca/security/security-wg/reports/20061101.html
      + http://ist.uwaterloo.ca/security/position/20050524/
      +

      +
      +
      + + + + + + + + + + Come out for the Club that Really Likes Dinner + +

      +Summer: the sparrows whistle through the teapot-steam breeze. The +ubiquitous construction team tears the same pavement up for the third +time, hammering passers-by with dust and noise: our shirts, worn for +the third time, noisome from competing heat and shame. As Nature +continues her Keynesian rotation of policy, and as society decrees yet +another parting of ways, it is proper for the common victims to have +an evening to themselves, looking both back and ahead, imagining new +opportunities, and recognising those long since missed. God fucking +damn it. +

      +

      +This term's CTRL-D end-of-term dinner is taking place tomorrow +(Saturday) at 7:00 P.M. at East Side Mario's, in the plaza. Meet in +the C.S.C. fifteen minutes beforehand, so they don't take away our +seats or anything nasty like that. +

      +

      +A lot of people wanted to go to the Mongolian Grill, but I'm pretty +sure this place has a similar price-to-tasty ratio; what's more, +they'll actually grant us a reservation more than four nights a week. +I've confirmed that the crazy allergenic peanuts no longer exist +(sad), and they have a good vegetarian selection, which is likely +coincides with their kosher and halal menus. +

      +

      +Come out for the tasty and the awesome! If you pretend it's your +birthday, everyone's a loser! Tell your friends, because I told the +telephone I wanted to reserve for 10 to 12 people, and I don't wish to +sully Calum T. Dalek's good name! +

      +
      + +
      + + + + Come out for some retro Amiga-style Lemmings gaming action! + +

      + Does being in CS make you feel like a lemming? Is linear algebra driving you + into walls? Do you pace back and forth, constantly, regardless of whatever's + in your path? Then you should come out to CSC Lemmings Day. This time, we're + playing the pseudo-sequel: Oh No! More Lemmings! +

      +
        +
      • Old-skool retro gaming, Amiga-style (2 mice, 2 players!)
      • +
      • Projector screen: the pixels are man-sized!
      • +
      • Enjoy classic Lemmings tunes
      • +
      +
      + +
      + + A part of Linux Awareness Week + +

      + The Computer Science Club is once again stepping forward to fulfill its ancient duty to the people-this time by installing one of the many +fine distributions of Linux for you. +

      +

      + Ubuntu? Debian? Gentoo? Fedora? We might not have them all, but we seem to have an awful lot! Bring your boxen down to the D.C. Fishbowl for +the awesome! +

      +

      + Install Linux on your machine-install fear in your opponents! +

      +
      +
      + + + + or How communities of interest drive modern software development. + +

      + Simon Law leads the Quality teams for Ubuntu, a free-software operating + system built on Debian GNU/Linux. As such, he leads one of the largest + community-based testing efforts for a software product. This does get a + bit busy sometimes. +

      +

      + In this talk, we'll be exploring how the Internet is changing how + software is developed. Concepts like open source and technologies like + message forums are blurring the lines between producer and consumer. + And this melting pot of people is causing people to take note, and + changing the way they sling code. +

      +

      + Co-Sponsored with CS-Commons Committee +

      +
      +
      + + + The Computer Science Club will be showing March of the Penguins + +

      + March of the Penguins , an epic nature documentary, as dictated +by some guy with a funny voice is being shown by the Computer Science club because penguins are cute and were bored [that and the +whole Linux awareness week that forgot to tell people about]. +

      +
      +
      + + + + Albert O'Connor will be introducing the joys of programming in python + +

      + Albert O'Connor, a UW grad, will be giving a ~30 minute talk on introducing the joys of programming python. Python is an open source +object-oriented programming language which is most awesome. +

      +
      +
      + + + Alex Tsay will look at the common hack used to simulate multi-processing in a real time embedded environment. + +

      +In an embedded environment resources are fairly limited, especially. Typically an embedded system has strict time constraints in which it must +respond to hardware driven interrupts and do some processing of its own. A full fledged OS would consume most of the available resources, hence +crazy hacks must be used to get the benefits without paying the high costs. This talk will look at the common hack used to simulate multi-processing +in a real time embedded environment. +

      +
      +
      + + + + Simon Woodside, founder of Semacode, comes to discuss image what it is like to start a business and how imaging code works + +

      +Could you write a good image recognizer for a 100 MHz mobile phone +processor with 1 MB heap, 320x240 image, on a poorly-optimized Java +stack? It needs to locate and read two-dimensional barcodes made up of +square modules which might be no more than a few pixels in size. We +had to do that in order to establish Semacode, a local start up +company that makes a software barcode reader for cell phones. The +applications vary from ubiquitous computing to advertising. Simon +Woodside (founder) will discuss what it's like to start a business and +how the imaging code works. +

      +
      +
      + + + + + + + Come out to discuss current & future plans/projects for the Club + +

      + The Computer Science Club (CSClub) has "new" DEC Alphas which are most awesome. Come out, help take them part, put them back +together, solder, and eat free food (probably pizza). +

      +
      +
      + + + + Come out to discuss current & future plans/projects for the Club + +

      + The venue will include:

      +

        +
      • Computer usage agreement discussion (Holden has some changes he'd like to propose)

      • +
      • Web site - Juti is redesigning the web site (you can see a beta here - ideas are welcome.

      • +
      • Frosh Linux cd's that could be put in frosh math faculty kits.

      • +
      • VoIP "not phone services" ideas.

      • +
      • Ideas for talks (people, topics, etc...). We requested Steve Jobs and Steve Balmer, so no idea is too crazy.

      • +
      • Ideas for books.

      • +
      • General improvements/comments for the club.

      • +

      +

      + If you have ideas, but can't attend, please email them to president@csclub.uwaterloo.ca and they will be read them at the meeting. +

      +
      +
      + + + + Eighteen Years in the Software Tools Business at Microsoft, a talk by Rico Mariani, (BMath CS/EEE 1988) + +

      + Rico Mariani, (BMath CS/EEE 1988) now an (almost) 18 year Microsoft veteran but then a CSC president comes to talk to us about the +evolution of software tools for microcomputers. This talk promises to be a little bit about history and perspective (at least from +the Microsoft side of things) as well as the evolution of software engineers, different types of programmers and their needs, and what +it's like to try to make the software industry more effective at what it does, and sometimes succeed! +

      +

      +A video of the talk is available for download in our media section. +

      +
      +
      + + + Unix 101 and 102 recording + +

      + Have you heard of our famous Unix 101 and Unix 102 tutorials. We've decided to try + and put them on the web. This Sunday we will be doing a first take. + At the same time, we're going to be looking at adding new material + that we haven't covered in the past.

      +

      + Why should you come out? Not only will you get to hang out with a wonderful group of people, + you can help impart your knowledge to the world. Don't know anything about Unix? That's cool too, + we need people to make sure its easy to follow along and hopefully keep us from leaving something + out by mistake. +

      +
      +
      + + + We don't know enough about V4L + +

      + We don't know Video 4 Linux, but increasingly people are wanting to do interesting stuff with our webcam which +could benefit from a better understanding of Video 4 Linux. So, this Saturday a number of us will be trying to learn +as much as possible about Video 4 Linux and doing weird things with webcam(s). +

      +
      +
      + + + Come out and vote for the Spring 2006 executive! + +

      + The Computer Science Club will be holding its elections for the Spring 2006 + term on Monday, May 8th. The elections will be held at 4:30 PM in the + Comfy Lounge, on the 3rd floor of the MC. Please remember to come out and + vote! +

      +

      + We are accepting nominations for the following positions: President, + Vice-President, Treasurer, and Secretary. The nomination period continues + until 4:30 PM on Sunday, May 7th. If you are interested in running for + a position, or would like to nominate someone else, please email + cro@csclub.uwaterloo.ca before the deadline. +

      +
      +
      + + + + + A talk by Larry Smith + +

      + A discussion of how software creators can identify application opportunities + that offer the promise of great social and commercial significance. Particular + attention will be paid to the challenge of acquiring cross domain knowledge + and setting up effective collaboration. +

      +
      +
      + + + + Come out and meet your professors. Free food provided! + +

      Come out and meet your professors! This is a great opportunity to + mingle with your professors before midterms or find out who you might + have for future courses. All are welcome!

      + +

      Best of all, there will be free food!

      + +

      You can pick up invitations for your professors at the Computer Science + Club office in MC 3036.

      + +

      Pints with Profs will be held this term on Thursday, 9 February 2006 + from 5:30 to 8:00 PM in the Bombshelter.

      +
      +
      + + + + + Come out, program, and win shiny things! + +

      + The Computer Science club is holding a programming contest open to all students on Tuesday the 29th of November at 5:30PM. C++,C,Perl,Scheme* are allowed. Prizes totalling in value of $75 will be distributed. + +

      + +

      And best of all... free food!!!

      +
      +
      + + + + Get to know your profs and be the envy of your + friends! + +

      + Come out and meet your professors!! This is a great opportunity to + meet professors for Undergraduate Research jobs or to find out who + you might have for future courses. One and all are welcome! +

      + +

      And best of all... free food!!!

      +
      +
      + + + + You Too Can Be a Unix Taskmaster + +

      + This is the third in a series of seminars that cover the use of the + UNIX Operating System. UNIX is used in a variety of applications, both + in academia and industry. We will provide you with hands-on experience + with the Math Faculty's UNIX environment in this tutorial. +

      + Topics that will be discussed include: +

        +
      • Shell scripting
      • +
      • Searching through text files
      • +
      • Batch editing text files
      • +
      +

      + If you do not have a Math computer account, don't panic; one will be lent to + you for the duration of this class. +

      +
      +
      + + + + Fun with Unix + +

      + This is the second in a series of seminars that cover the use of the + Unix Operating System. Unix is used in a variety of + applications, both in academia and industry. We will provide you with hands-on + experience with the Math Faculty's Unix environment in this tutorial. +

      +

      + Topics that will be discussed include: +

        +
      • Interacting with Bourne and C shells
      • +
      • Editing text using the vi text editor
      • +
      • Editing text using the Emacs display editor
      • +
      • Multi-tasking and the screen multiplexer
      • +
      +

      +

      + If you do not have a Math computer account, don't panic; one will be lent to + you for the duration of this class. +

      +
      +
      + + + First UNIX tutorial + +

      + The CSC UNIX tutorials are intended to help first year CS and other + interested learn UNIX and the CS UNIX environment. +

      +

      + This is the first in a series of two or three tutorials. It will cover basic shell + use, and simple text editors. +

      +
      +
      + + + + + Shriram Krishnamurthi will be talking about continuations in Web Programming + +

      +Server-side Web applications have grown increasingly common, sometimes +even replacing brick and mortar as the principal interface of +corporations. Correspondingly, Web browsers grow ever more powerful, +empowering users to attach bookmarks, switch between pages, clone +windows, and so forth. As a result, Web interactions are not +straight-line dialogs but complex nets of interaction steps. +

      +

      +In practice, programmers are unaware of or are unable to handle these +nets of interaction, making the Web interfaces of even major +organizations buggy and thus unreliable. Even when programmers do +address these constraints, the resulting programs have a seemingly +mangled structure, making them difficult to develop and hard to +maintain. +

      +

      +In this talk, I will describe these interactions and then show how +programming language ideas can shed light on the resulting problems +and present solutions at various levels. I will also describe some +challenges these programs pose to computer-aided verification, and +present solutions to these problems. +

      +
      +
      + +Come out to here Prabhakar Ragde talk about our UW's CS curriculum + +

      +I'll survey the evolution of our computer science curriculum over the +past thirty-five years to try to convey the reasons (not always entirely +rational) behind our current mix of courses and their division into core +and optional. After some remarks about constraints and opportunities in +the near future, I'll open the floor to discussion, and hope to hear +some candid comments about the state of CS at UW and how it might be +improved. +

      +

      +About the speaker: +

      +

      +Prabhakar Ragde is a Professor in the School of Computer Science at UW. +He was Associate Chair for Curricula during the period that saw the +creation of the Bioinformatics and Software Engineering programs, the +creation of the BCS degree, and the strengthening of the BMath/CS degree. +

      +
      +
      + + + + Come out for some retro Amiga-style Lemmings gaming action! + +

      + Does being in CS make you feel like a lemming? Is linear algebra driving you + into walls? Do you pace back and forth, constantly, regardless of whatever's + in your path? Then you should come out to CSC Lemmings Day. This time, we're + playing the pseudo-sequel: Oh No! More Lemmings! +

      +
        +
      • Old-skool retro gaming, Amiga-style (2 mice, 2 players!)
      • +
      • Projector screen: the pixels are man-sized!
      • +
      • Live-Action Lemmings (the rules are better this time)
      • +
      • Lemmings look-alike contest
      • +
      • Enjoy classic Lemmings tunes
      • +
      +
      +
      + + + Fun with Unix + +

      + This is the second in a series of seminars that cover the use of the + Unix Operating System. Unix is used in a variety of + applications, both in academia and industry. We will provide you with hands-on + experience with the Math Faculty's Unix environment in this tutorial. +

      +

      + Topics that will be discussed include: +

        +
      • Interacting with Bourne and C shells
      • +
      • Editing text using the vi text editor
      • +
      • Editing text using the Emacs display editor
      • +
      • Multi-tasking and the screen multiplexer
      • +
      +

      +

      + If you do not have a Math computer account, don't panic; one will be lent to + you for the duration of this class. +

      +
      +
      + + + + First UNIX tutorial + +

      + The CSC UNIX tutorials are intended to help first year CS and other + interested learn UNIX and the CS UNIX environment. +

      +

      + This is the first in a series of two or three tutorials. It will cover basic shell + use, and simple text editors. +

      +
      +
      + + + + Come out and vote for the Winter 2005 executive! + +

      + The Computer Science Club will be holding its elections for the Winter 2005 + term on Thursday, January 13. The elections will be held at 4:30 PM in the + Comfy Lounge, on the 3rd floor of the MC. Please remember to come out and + vote! +

      +

      + We are accepting nominations for the following positions: President, + Vice-President, Treasurer, and Secretary. The nomination period continues + until 4:30 PM on Wednesday, January 12. If you are interested in running for + a position, or would like to nominate someone else, please email + cro@csclub.uwaterloo.ca before the deadline. +

      +
      +
      + + + + + + This semesters CTRL-D (or the club that really likes +dinner) is going to be at Mongolian grill. Be there or be square + +

      +Come to the end of term CTRL-D (club that really likes dinner) meeting. +Remember : food is good +

      +
      +
      + + + + In this talk, I'll study linkages (objects built from sticks that are connected with flexible joints), and explain some +interesting examples that can or cannot be straightened out + +

      + In this talk, I'll study linkages (objects built from sticks that are connected with flexible joints), and explain some +interesting examples that can or cannot be straightened out

      + +
      +
      + + + + How I Stopped Worrying and Learned to Love the IDE + +

      + How I stopped worrying and Learned to Love the IDE +

      +

      + Audience: anyone who as ever used the Java programming language to do anything. Especially if you don't like +the IDEs you've seen so far or still use (g)Vi(m) or (X)Emacs. +

      + +

      + I'll go through some of the coolest features of the best IDE (which stands for "IDEs Don't Eat" or +"Integrated Development Environment") I've seen. For the first year and seasoned almost-grad alike! +

      + +
      +
      + + + + Wiki software in PHP+MySQL + +

      + GracefulTavi is an open source wiki programmed by Net Integration + Technologies Inc. It is used internally by more than 25 people, and is + the primary internal wiki for NITI's R&D and QA. +

      +

      + I'll start with a very brief introduction to wikis in general, then + show off our special features: super-condensed formatting syntax, + hierarchy management, version control, highlighted diffs, SchedUlator, + the Table of Contents generator. As part of this, we'll explain the + simple plugin architecture and show people how to write a basic wiki + plugin. +

      + +

      + As well, I will show some of the "waterloo specific" macros that have + been coded, and explain future plans for GracefulTavi. +

      + +

      + If time permits, I will explain how gracefulTavi can be easily used + for a personal calendar and notepad system on your laptop. +

      +
      +
      + + + + + Everyone else is doing it! + +

      + Does being in CS make you feel like a lemming? Is linear algebra driving you into walls? Do you pace back and forth , constantly , +regardless of whatever's in your path? Then you should come out to CSC Lemmings Day! +

      +

        +
      • Play some old-skool Lemmings, Amiga-style
      • +
      • Live-action lemmings
      • +
      • Lemmings look-alike contest
      • +
      • Enjoy classic Lemmings tunes
      • +
      +

      + Everyone else is doing it! +

      +
      +
      + + + + CSC Programming Contest + +

      + The Computer Science Club will be hosting a programming competition. + You have the entire afternoon to design and implement an AI for a simple + game. The competition will run until 5pm. +

      +
      +
      + + + + You Too Can Be a Unix Taskmaster + +

      + This is the third in a series of seminars that cover the use of the + UNIX Operating System. UNIX is used in a variety of applications, both + in academia and industry. We will provide you with hands-on experience + with the Math Faculty's UNIX environment in this tutorial. +

      + Topics that will be discussed include: +

        +
      • Shell scripting
      • +
      • Searching through text files
      • +
      • Batch editing text files
      • +
      +

      + If you do not have a Math computer account, don't panic; one will be lent to + you for the duration of this class. +

      +
      +
      + + + Fun with Unix + +

      + This is the second in a series of seminars that cover the use of the + Unix Operating System. Unix is used in a variety of + applications, both in academia and industry. We will provide you with hands-on + experience with the Math Faculty's Unix environment in this tutorial. +

      +

      + Topics that will be discussed include: +

        +
      • Interacting with Bourne and C shells
      • +
      • Editing text using the vi text editor
      • +
      • Editing text using the Emacs display editor
      • +
      • Multi-tasking and the screen multiplexer
      • +
      +

      +

      + If you do not have a Math computer account, don't panic; one will be lent to + you for the duration of this class. +

      +
      +
      + + + + + First UNIX tutorial + +

      + The CSC UNIX tutorials are intended to help first year CS and other + interested learn UNIX and the CS UNIX environment. +

      +

      + This is the first in a series of three tutorials. It will cover basic shell + use, and simple text editors. +

      +
      +
      + + Come out and vote for the Fall 2004 executive! + +

      + The Computer Science Club will be holding its elections for the Fall 2004 + term on Friday, September 17. The elections will be held at 4:00 PM in the + Comfy Lounge, on the 3rd floor of the MC. Please remember to come out and + vote! +

      +

      + We are accepting nominations for the following positions: President, + Vice-President, Treasurer, and Secretary. The nomination period continues + until 4:30 PM on Thursday, September 16. If you are interested in running + for a position, or would like to nominate someone else, please email + cro@csclub.uwaterloo.ca before the deadline. +

      +
      +
      + + +Attention AI buffs: Game Complexity presentation + +

      +Why are some games hard to play well? The study of computational +complexity gives one answer: the games encode long computations.

      + +

      Any computation can be interpreted as an abstract game. Playing the +game perfectly requires performing the computation. Remarkably, some +natural games can encode these abstract games and thus simulate +general computations. The more complex the game, the more complex the +computations it can encode; games that can encode intractable problems +are themselves intractable.

      + +

      +I will describe how games can encode computations, and discuss some +examples of both provably hard games (checkers, chess, go, etc.) and +games that are believed to be hard (hex, jigsaw puzzles, etc.). +

      +
      +
      + + + Come and learn how to make your computer 1337! + +

      +Are you bored of beige?
      +Tired of an overheating computer?
      +Is your computer's noise level on par with a jet engine? +

      +

      +Got a nifty modded case?
      +Want one? +

      +

      +The Computer Science Club will be holding a Case Modding Workshop +to help answer these questions. +

      +

      +There will be demonstrations on how to make a case window, how +to paint your case, managing cables and keeping your computer +quiet and cool. +

      +

      +The event is FREE and there will be FREE PIZZA. All are welcome! +

      +

      +To help you on your way to getting a wicked computer case, we have a limited +number of "Case Modding Starters Kits" available. They come with an LED fan, +a fan grill, a sheet of Plexan, thumbscrews, wire ties, and more! They're +only $10 and will be on sale at the event. Here's a picture. +

      +

      +If you already have a modded case, we encourage you to bring it out +and show it off! There will be a prize for the best case!! +

      +

      +We hope to see you there! +

      +

      +This event is sponsored by Bigfoot Computers. +

      +
      +
      + + + A talk by Richard Mann; School of Computer Science + +

      +When an observer moves through a 3D scene, nearby surfaces move faster in the +image than do distant surfaces. This effect, called motion parallax, provides +an observer with information both about their own motion relative the scene, +and about the spatial layout and depth of surfaces in the scene. +

      +

      +Classical methods for measuring image motion by computer have concentrated on +the cases of optical flow in which the motion field is continuous, or layered +motion in which the motion field is piecewise continuous. Here we introduce a +third natural category which we call ``optical snow''. Optical snow arises in +many natural situations such as camera motion in a highly cluttered 3-D scene, +or a passive observer watching a snowfall. Optical snow yields dense motion +parallax with depth discontinuities occurring near all image points. As such, +constraints on smoothness or even smoothness in layers do not apply. +

      +

      +We present a Fourier analysis of optical snow. In particular we show that, +while such scenes appear complex in the time domain, there is a simple +structure in the frequency domain, and this may be used to determine the +direction of motion and the range of depths of objects in the scenes. Finally +we show how Fourier analysis of two or more image regions may be combined to +estimate heading direction. +

      +

      +This talk will present current research at the undergraduate level. All are +welcome to attend. +

      +
      +
      + + + + A talk by Larry Smith + +

      + Larry will challenge conventional assumptions about the directions of + computing and software. The role of AI, expert systems, communications + software and business applications will be presented both from a + functional and commercial point of view. The great gaps in the + marketplace will be highlighted, together with an indication of how + these vacant fields will become home to new empires. +

      +
      +
      + + Come out and vote for the Spring 2004 executive! + +

      + The Computer Science Club will be holding its elections for the Spring + 2004 term on Wednesday, May 12. The elections will be held at 4:30 PM in + the Comfy Lounge, on the 3rd floor of the MC. Please remember to come out + and vote! +

      +

      + We are accepting nominations for the following positions: President, + Vice-President, Treasurer, and Secretary. The nomination period continues + until 4:30 PM on Tuesday, May 11. If you are interested in running + for a position, or would like to nominate someone else, please email + cro@csclub.uwaterloo.ca before the deadline. +

      +
      +
      + + + + + A talk by Simon Law + +

      + The work report is a familiar chore for any co-op student. Not only is + there a report to write, but to add insult to injury, your report is + returned if you do not follow your departmental guidelines. +

      + +

      + Fear no more! In this talk, you will learn how to use LaTeX and a + specially developed class to automatically format your work reports. + This talk is especially useful to Mathematics, Computer Science, + Electrical & Computer Engineering, and Software Engineeering co-op + students about to go on work term. +

      +
      +
      + + + Get to know your profs and be the envy of your + friends! + +

      + Come out and meet your professors!! This is a great opportunity to + meet professors for Undergraduate Research jobs or to find out who + you might have for future courses. One and all are welcome! +

      + +

      And best of all... free food!!!

      +
      +
      + + + A talk by Simon Law + +

      + LaTeX is a document processing system. What this means is you describe + the structure of your document, and LaTeX typesets it appealingly. + However, LaTeX was developed in the late-80s and is now showing its age. +

      + +

      + How does it compete against modern systems? By being easily extensible, + of course. This talk will describe the fundamentals of typesetting in + LaTeX, and will then show you how to extend it with freely available + packages. You will learn how to teach yourself LaTeX and how to find + extensions that do what you want. +

      + +

      + As well, there will be a short introduction on creating your own + packages, for your own personal use. +

      +
      +
      + + + A talk by Simon Law + +

      + If you've ever worked with other group members, you know how difficult + it is to code simultaneously. You might be working on one part of your + assignment, and you need to send your source code to everyone else. Or + you might be fixing a bug in someone else's part, and need to merge in + the change. What a mess! +

      + +

      + This talk will explain some Best Practices for developing code in a + distributed fashion. Whether you're working side-by-side in the lab, or + developing from home, these methods can apply to your team. You will + learn how to apply these techniques in the Unix environment using GNU + Make, CVS, GNU diff and patch. +

      +
      +
      + + + A talk by James Morrison + +

      + Making a compiler? Bored? Think CISC sucks and RISC rules? +

      + +

      + This talk will run through the SPARC v8, IEEE-P1754, architecture. + Including all the fun that can be had with register windows and the + SPARC instruction set including the basic instructions, floating + point instructions, and vector instructions. +

      +
      +
      + + + A talk by Simon Law + +

      + If you have used Unix for a while, you know that you've created + configuration files, or dotfiles. Each program seems to want its own + particular settings, and you want to customize your environment. In a + power-user's directory, you could have hundreds of these files. +

      + +

      + Isn't it annoying to migrate your configuration if you login to another + machine? What if you build a new computer? Or perhaps you made a + mistake to one of your configuration files, and want to undo it? +

      + +

      + In this talk, I will show you how to manage your home directory using + CVS, the Concurrent Versions System. You can manage your files, revert + to old versions in the past, and even send them over the network to + another machine. I'll also discuss how to keep your configuration files + portable, so they'll work even on different Unices, with different + software installed. +

      +
      +
      + + + A talk by Simon Law + +

      + In today's world, people have hundreds of connexions. And you can + express these connexions with a graph. For instance, you may wish to + represent the network of your friends. +

      + +

      + Originally, webs-of-trust were directed acyclic graphs of people who had + identified each other. This way, if there was a path between you and + the person who want to identify, then you could assume that each person + along that path had verified the next person's identity. +

      + +

      + I will show you how to generate your own web-of-trust graph using Free + Software. Of course, you can also use this knowledge to graph anything + you like. +

      +
      +
      + + + Perl Modules: A look under the hood + + +

      In Perl, a module is the basic unit of code-reuse. The talk will be + mostly a look into GD::Text::Arc, a module written to draw TrueType text + around the edge of a circle. The talk will consider:

      + +
        +
      • using and writing object-oriented perl code
      • +
      • the Virtue of Laziness: or, reusing other peoples' code.
      • +
      • writing tests while coding
      • +
      • beer coasters
      • +
      + +
      +
      + + + Vote to change the CSC Constitution + + +

      During the General Meeting on 19 January 2004, a proposed constitution + change was passed around. This change is in response to a change in the + MathSoc Clubs Policy (Policy 4, Section 3, Sub-section f).

      + +

      This general meeting is called to vote on this proposed change. We must + have quorum of 15 Full Members vote on this change. The following text was + presented at the CSC Winter 2004 Elections.

      + +
      We propose to make a Constitutional change on this day, 19 January 2004.
      +The proposed change is to section 3.1 of the constitution which
      +currently reads:
      +
      +    In compliance with MathSoc regulations and in recognition of the
      +    club being primarily targeted at undergraduate students, full
      +    membership is open to all undergraduate students in the Faculty of
      +    Mathematics and restricted to the same.
      +
      +Since MathSoc has changed its requirements for club membership, we
      +propose that it be changed to:
      +
      +    In compliance with MathSoc regulations and in recognition of the
      +    club being primarily targeted at undergraduate students, full
      +    membership is open to all Social Members of the Mathematics Society
      +    and restricted to the same.
      +
      +
      + + + See http://uw-dig.uwaterloo.ca/installfest/ + + +

      An Installfest is an opportunity to install software on your computer. + People come with computers. Other people come with experience. The people + get together and (when all goes well) everybody leaves satisfied.

      + +

      You are invited to our first installfest of the year. Come to get some + software or to learn more about Open Source Software and why it is relevant + to your life. The event is free, but you may want to bring blank CDs and/or + money to purchase some open source action for your computer at home.

      + +

      See the UW-DIG + website for more details.

      + +
      +
      + + + + + Free and Open Source software has been around for a long + time, even longer then shrink-wrapped code. + +

      Free and Open Source software has been around for a long time, even +longer then shrink-wrapped code. It has a long and noble history in the annals +of education. Even more than ever, due to the drop of hardware prices and the +increase of worldwide communications, Free and Open Source can open new +avenues of teaching and doing research, not only in computer science, but in +other university fields as well.

      +

      Learn how Linux as an operating system can +run on anything from a PDA to a supercomputer, and how Linux is reducing the +cost of computing dramatically as the fastest growing operating system in the +world. Learn how other Free and Open Source projects, such as office suites, +audio and video editing and playing software, relational databases, etc. are +created and are freely available.

      + +

      Map and directions

      +

      Speaker's Biography

      +

      Jon "maddog" Hall is the Executive Director of Linux International, +a non-profit association of computer vendors who wish to support and promote +the Linux Operating System. During his career which spans over thirty years, +Mr. Hall has been a programmer, systems designer, systems administrator, +product manager, technical marketing manager and educator. He has +worked for such companies as Western Electric Corporation, Aetna Life and +Casualty, Bell Laboratories, Digital Equipment Corporation, VA Linux Systems, +and is currently funded by SGI.

      + +

      He has taught at Hartford State Technical College, Merrimack College and +Daniel Webster College. He still likes talking to students over pizza and beer +(the pizza can be optional).

      + +

      Mr. Hall is the author of numerous magazine and newspaper articles, many +presentations and one book, "Linux for Dummies".

      + +

      Mr. Hall serves on the boards of several companies, and several non-profit +organizations, including the USENIX Association.

      + +

      Mr. Hall has traveled the world speaking on the benefits of Open Source +Software, and received his BS in Commerce and Engineering from Drexel +University, and his MSCS from RPI in Troy, New York.

      + +

      In his spare time maddog is working on his retirement project:

      + +
      maddog's monastery for microcomputing and microbrewing
      + +
      +
      + + + Come have a pint with your favourite CS profs! + +

      Come meet CS profs in a relaxed atmosphere this Wednesday at + the Grad House (by South Campus Hall). This is your chance to meet those CS profs + you enjoyed in lectures in person, have a chat with them + and find out what they're doing outside the lecture halls.

      + +

      We'll be providing free food, including hamburgers and nachos, + and the Grad House offers a great selection of drinks.

      + +

      If you'd like to invite a particular prof, stop by on the third + floor of the MC (outside of the Comfy) to pick up an invitation.

      + +

      Persons of all ages are welcome!

      +
      +
      + + + + A talk by James Perry + + +

      .NET is Microsoft's new development platform, including amongst + other things a language called C# and a class library for various + operating system services. .NET aims to be portable, although it is + currently mostly only used on Windows systems.

      + +

      With the full backing of Microsoft, it seems unlikely that .NET + will disappear any time soon. There are several efforts underway to + bring .NET to the GNU/Linux platform. Hosted by the Computer Science + Club, this talk will discuss a number of the issues surrounding .NET + and Linux.

      + +
      +
      + + + Sh is a GPU metaprogramming language developed at the UW + Computer Graphics Lab + + +

      Sh is a GPU metaprogramming language developed at the University of + Waterloo Computer Graphics Lab. It allows graphics programmers to + write programs which run directly on the GPU (Graphics Processing + Unit) using familiar C++ syntax. Furthermore, it allows + metaprogramming of such programs, that is, writing programs which + generate other programs, in an easy and natural manner.

      + +

      This talk will give a brief overview of how Sh works, the design of + its intermediate representation and the (still somewhat simplistic) + optimizer that the current reference implementation has and problems + with applying traditional compiler optimizations.

      + +

      Stefanus Du Toit is an undergraduate student at the University of + Waterloo. He is also a Research Assistant for Michael McCool from the + University of Waterloo Graphics Lab. Over the Summer of 2003 Stefanus + reimplemented the Sh reference implementation and designed and + implemented the current Sh optimizer.

      +
      +
      + + + More free pizza from the Poster Team + +

      Are you interested in getting involved in the Computer Science + Club?

      + +

      Come on out to the second meeting of our Poster Team, a bunch of + students helping out with promotion for our events. The agenda for + this meeting will include painting posters, designing event + invitations, and organizing poster runs. Once again, we will be + serving free pizza!

      + +

      See you there!

      +
      +
      + + + GCC, GDB, Make + +

      This tutorial will provide you with a practical introduction to GNU + development tools on Unix such as the gcc compiler, the gdb debugger + and the GNU make build tool.

      + +

      This talk is geared primarily at those mostly unfamiliar with these + tools. Amongst other things we will introduce:

      + +
        +
      • gcc options, version differences, and peculiarities
      • +
      • using gdb to debug segfaults, set breakpoints and find out what's + wrong
      • +
      • tiny Makefiles that will compile all of your 2nd and 3rd year CS + projects.
      • +
      + +

      If you're in second year CS and unfamiliar with UNIX development it + is highly recommended you go to this talk. All are welcome, including + non-math students.

      + +

      Arrive early!

      +
      +
      + + + vi vs. emacs: The Ultimate Showdown + +

      +Have you ever wondered how those cryptic UNIX text editors work? Have you +ever woken up at night with a cold sweat wondering "Is it CTRL-A, or CTRL-X +CTRL-A?" Do you just hate pico with a passion?

      + +

      Then come to this tutorial and learn how to use vi and emacs!

      + +

      Basic UNIX commands will also be covered. This tutorial will be especially +useful for first and second year students.

      + +
      +
      + + + Join the Poster Team and get Free Pizza! + +
        +
      • Do you like computer science?
      • +
      • Do you like posters?
      • +
      • Do you like free pizza?
      • +
      +

      If the answer to one of these questions is yes, then come +out to the first meeting of the Computer Science Club Poster Team! The +CSC is looking for interested students to help out with promotion and +publicity for this term's events. We promise good times and free +pizza!

      +
      +
      + + + CSC Fall 2003 Elections + +

      Elections will be held on Wednesday, September 17, 2003 at 4:30 PM in the + + Comfy Lounge, MC3001.

      + +

      I invite you to nominate yourself or others for executive positions, + starting immediately. Simply e-mail me at cro@csclub.uwaterloo.ca + with the name of the person who is to be nominated and the position + they're nominated for.

      + +

      Nominees must be full-time undergraduate students in Math. Sorry!

      + +

      Positions open for elections are:

      + +
      • President: Organises the club, appoints committees, keeps everyone busy. + If you have lots of ideas about the club in general and like bossing + people around, go for it!
      • + +
      • Vice President: Organises events, acts as the president if he's not + available. If you have lots of ideas for events, and spare time, go + for it!
      • + +
      • Treasurer: Keeps track of the club's finances. Gets to sign cheques + and stuff. If you enjoy dealing with money and have ideas on how to + spend it, go for it!
      • + +
      • Secretary: Takes care of minutes and outside correspondence. If you + enjoy writing things down and want to use our nifty new letterhead + style, go for it!
      + +

      Nominations will be accepted until Tuesday, September 16 at 4:30 PM.

      + +

      Additionally, a Sysadmin will be appointed after the elections. If you + like working with Unix systems and have experience setting up and + maintaining them, go for it!

      + +

      I hope that lots of people will show up; hopefully we'll have a great + term with plenty of events. We always need other volunteers, so if you + want to get involved just talk to the new exec after the + meeting. Librarians, webmasters, poster runners, etc. are always + sought after!

      + +

      There will also be free pop.

      + +

      Memberships can be purchased at the elections or at least half an hour + prior to at the CSC. Only undergrad math members can vote, but anyone can + become a member.

      + +
      +
      + + + + Writing beautiful work reports + + +

      The work report is a familiar chore for any co-op student. Not only is + there a report to write, but to add insult to injury, your report is + returned if you do not follow your departmental guidelines.

      + +

      Fear no more! In this talk, you will learn how to use LaTeX and a + specially developed class to automatically format your work reports. + This talk is especially useful to Mathematics, Computer Science, + Electrical & Computer Engineering, and Software Engineeering co-op + students about to go on work term.

      + +

      http://www.eng.uwaterloo.ca/~sfllaw/programs/uw-wkrpt/

      + +
      +
      + + + It's not 6. + + +

      In 1976, a University of California Berkeley student by the name of + Bill Joy got sick of his text editor, ex. So he hacked it such that + he could read his document as he wrote it. The result was "vi", which + stands for VIsual editor. Today, it is shipped with every modern + Unix system, due to its global influence.

      + +

      In this talk, you will learn how to use vi to edit documents + quickly and efficiently. At the end, you should be able to:

      + +
        +
      • Navigate and search through documents
      • +
      • Cut, copy, and paste across documents
      • +
      • Search and replace regular expressions
      • +
      + +

      If you do not have a Math computer account, don't panic; one will be lent + to you for the duration of this class.

      + +
      +
      + + + See Abstract for minutes + +
      +--paying Simon for Sugar
      +-Unanimous yea.
      +-ACTION ITEM: Mark
      +	Expense this to MathSoc in lieu of foreign speaker.
      +
      +--We currently have (including CD-R and pop-income not
      +currently in safe) $972.85
      +-We have $359.02 on budget that we can expense to MathSoc.
      +
      +--We got MEF money for books and video card. Funding for
      +wireless microphone is dependent on whether MFCF is
      +willing to host it.
      +-Funding for casters was denied.
      +-Shopping for the Video card.
      +-Expecting it after August (Stefanus shopping for it.)
      +-Will have to hear back regarding the microphone, best to
      +delay that now, discuss it with MEF.
      +	-Better to do it this term, so it doesn't get lost.
      +	-Let MFCF know about this concern.
      +-Regarding books, can be done anytime before September.
      +
      +--Events feedback
      +	-Generally, Jim Eliot talk when really well.
      +		-Apparently he was generally offensive.
      +	-When was the LaTeX talk? End of the month.
      +	-Kegger at Jim's place on the 16th.
      +
      +--Getting people in on the 6th, 7th, 8th for csc commercials
      +filmed by Jason
      +	-Hang out in here, and he'll make a CSC commercial.
      +	-Co-ordinate when everyone should be in here, so we can email Jason.
      +
      +--CEO progress
      +	-CEO needs it's database changed to use ISBN as a primary key.
      +	-Needs functionality to take out/return books.
      +
      +--Mark just entered financial stuff into GNUcash
      +
      +--Choose CRO for next term.
      +-Stefanus has expressed desire not to be CRO.
      +-Gary Simmons was suggested (and he accepted)
      +-Unanimous yea
      +
      +--Mike Biggs has to get here naked.
      +	-Four unanimous votes.
      +	-Nakedness only applies to getting here, not being here.
      +
      +
      +From last meeting:
      +ACTION ITEM: Biggs and Cass
      +-get labelmaker tape, masking tape
      +whiteboard makers, coloured paper, CD sleeves
      +-keep receipts for CSC office expenses.
      +
      +How is the progress on allowing executives and voters to be non-math
      +members?
      +-The vote is coming up Monday.
      +-Proposal: Anyone who is a paying member can be a member
      +	-So you can either do two things:
      +	Pay MathSoc fees, or
      +	Get your faculty society to recognize CSC as a club.
      +
      +Stefanus wanted to mention that we should talk to Yolanda,
      +Craig or Louie about a EYT event for frosh week.
      +-Organized by Meg.
      +-Sugar Mountain trying to hook all the Frosh
      +ACTION ITEM: Jim
      +-Email Meg
      +
      +Reminder for Next Year's executive.
      +-September 16th @ 5:00pm, get a table for Clubs day, and 17th
      +and 18th, maintain the booth (full day events).
      +-Update pamphlets.
      +ACTION ITEM: Gary
      +-There should be executive before then
      +
      +Note: There needs to be a private section in the CSC Procedures Manual.
      +(Only accessible by shell)
      +ACTION ITEM: Simon
      +-Do it.
      +
      +ACTION ITEM: Mike
      +-Talk to Plantops about:
      +-Locks on doors
      +-Mounting corkboard.
      +-Talk about CSC Sign
      +  
      +
      + +
      + + SIGGRAPH Electronic Theatre Showing + +

      + SIGGRAPH is the ACM's Special Interest Group for Graphics and + simultaneously the world's largest graphics conference and + exhibition, where the cutting edge of graphics research is presented + every year. +

      + With support from UW's Computer Graphics Lab, the CSC invites you to + capture a glimpse of SIGGRAPH 2002. We will be presenting the + Electronic Theatre showings from 2002, demonstrating the best of the + animated, CG-produced movies presented at SIGGRAPH. +

      Don't miss this free showing!

      +
      +
      + + A talk by Jim Elliott. Jim is responsible for IBM's in Open Source + activities and IBM's mainframe operating systems for Canada and the + Carribbean. + +

      + Linux and Open Source have become a significant reality in the + working world of Information Technology. An indirect result has been a + "rebirth" of the mainframe as a strategic platform for enterprise + computing. In this session Jim Elliott, IBM's Linux Advocate, will provide + an overview of these technologies and an inside look at IBM's participation + in the community. Jim will examine Linux usage on the desktop, embedded + systems and servers, a reality check on the common misconceptions that + surround Linux and Open Source, and an overview of the history and current + design of IBM's mainframe servers.

      +

      + Jim Elliott is the Linux Advocate for IBM Canada. He is responsible + for IBM's participation in Linux and Open Source activities and IBM's + mainframe operating systems in Canada and the Caribbean. Jim is a popular + speaker on Linux and Open Source at conferences and user groups across the + Americas and Europe and has spoken to over 300 organizations over the past + three years. Over his 30 years with IBM he has been the co-author of over + 15 IBM publications and he also coordinated the launch of Linux on IBM + mainframes in the Americas. In his spare time, Jim is addicted to reading + historical mystery novels and travel to their locales. +

      +

      Slides +

      +
      +
      + + Come Visit the University of Guelph's Computer Science Club +

      + The University of Waterloo Computer Science Club is going to visit the + University of Guelph Computer Science Club. There will be a talk given + as well as dinner with a fun social atmosphere.

      Drivers Wanted

      +

      Cancelled -- sorry Guelph cancelled on us.

      +
      +
      + + Metaprogramming your way to stunning effects. + +

      + Modern graphics processors allow developers to upload small "shader + programs" to the GPU, which can be executed per-vertex or even + per-pixel during the rendering. Such shaders allow stunning effects to + be performed in real-time, but unfortunately aren't very easy to + program since one generally has to write them at the assembly level. +

      + Recently a few high-level languages for shader programming have become + available. Sh, a result of research at UW, is one such language. It + allows programming powerful shaders in simple and intuitive ways. Sh + is particularly interesting because of the way it is + implemented. Instead of coming up with a language grammar and writing + a full-fledged compiler, Sh is implemented as a C++ library, and + shader programs are effectively written in C++. The actual compilation + then takes place in a manner similar to JIT (Just-in-time) + compilers. This has many advantages over the traditional approach, + including C++'s familiar syntax for users, and much less work for the + Sh implementers. +

      + In this talk I will give an overview of GPUs and the Sh language as + well as some interesting details on how Sh was implemented. +

      + Stefanus Du Toit is a research assistant at the University of + Waterloo. He has implemented the current version of Sh from scratch + and is actively developing it under supervision of Michael McCool, the + original designer of the language. +

      +
      +
      + + It's not 6. + + +

      In 1976, a University of California Berkeley student by the name of + Bill Joy got sick of his text editor, ex. So he hacked it such that + he could read his document as he wrote it. The result was "vi", which + stands for VIsual editor. Today, it is shipped with every modern + Unix system, due to its global influence.

      + +

      In this talk, you will learn how to use vi to edit documents + quickly and efficiently. At the end, you should be able to:

      + +
        +
      • Navigate and search through documents
      • +
      • Cut, copy, and paste across documents
      • +
      • Search and replace regular expressions
      • +
      + +

      If you do not have a Math computer account, don't panic; one will be lent + to you for the duration of this class.

      + +
      +
      + + + Have an issue that should be brought up? We'd love to hear it! + +
      +
      +Budget: All the money we requested
      +	--No money from Pints from Profs
      +	--MathSoc has promised us $1250
      +
      +Feedback from Completed Events
      +	UNIX Talks: 17 people for first
      +			--12 people for second
      +			--Things going well
      +			--Last talk today
      +			--VI next week
      +	IPsec
      +	--Sparse crowd
      +	--People Jim didn't know talked to him for 1/2 hour
      +
      +	History of CSC talk went well
      +	--Good variety of people
      +
      +	Pints with Profs
      +	--NO CS Profs
      +	--Only 1 E& CE prof
      +	--Only 2 Math profs
      +	--Jim will harass the profs at the School of CS Council meeting.
      +
      +	We're starting to fall behind in planning
      +
      +	RoShamBo rules
      +	--Got a web site up
      +	--Might have to move RSB back
      +	--International site has a few test samples
      +	--Stefanus had some ideas
      +	--Coding will probably take an afternoon/evening
      +	--We need volunteers to run the competition
      +	--We have volunteers to code: Phil and Stefanus
      +
      +	ACTION ITEM: Phil and Stefanus
      +	--code whatever you volunteered to code for.
      +
      +	--Mike intends to visit classes and directly advertise
      +	--Email Christina Hotz
      +
      +	--GH guy: Mike has an abstract, will have posters by tomorrow
      +
      +	CSC Movie Night
      +	--Mathnet, Hackers, Wargames, Tron
      +	--Mike will get a room
      +	--Will be closed member
      +
      +	Mike McCool is offering rooms for showing SIGGRAPH
      +	ACTION ITEM: Jim
      +	-check with Mike McCool.
      +
      +	ACTION ITEM: Mike
      +	-Make posters for Movie Nights
      +
      +	When is other movie night? (Will plan some time in July)
      +
      +	Who is our foreign speaker?
      +	Action Item: jelliot@ca.ibm.com (Check name first) about
      +	getting a foreign speaker -- Note: Has already been contacted.
      +
      +	Simon got money from Engsoc
      +
      +	Cass needs coloured paper (CSC is out)
      +
      +	ACTION ITEM: Cass and Mark
      +	--get labelmaker tape, masking tape,
      +	whiteboard makers, coloured paper
      +	--keep receipts for CSC office expenses
      +
      +	NOTICE: Mike is now Imapd
      +
      +	Simon distributed budget list
      +	Mark got the money from Mathsoc for last budget, deposited it.
      +
      +	ACTION ITEM:Mark
      +	--Get MEF funding by July 4th (equipment)
      +	ACTION ITEM: Simon
      +	--Get WEEF funding by June 27th (book)
      +
      +	Jim still working on allowing executives and voters to be
      +	non-math members
      +
      +	We get free photocopying from MathSoc
      +	ACTION ITEM: Mike
      +	--write down code for free photocopying from MathSoc
      +
      +	Simon has been able to get into the cscdisk account, still
      +	looking into getting into the cscceo account.
      +
      +	Damien got an e-mail stating that the files for cscdisk are
      +	out of date.
      +
      +	ACTION ITEM: Simon
      +	--provide SSH key to Phil for getting into cscdisk, cscceo, etc...
      +	--Renumber bootup scripts for sugar and powerpc so that they
      +	boot up happily.
      +
      +	ACTION ITEM: Mike needs to do all the plantops stuff again.
      +
      +	ACTION ITEM: Mike -- "Stapler if you say please" sign.
      +
      +	CVS Tree for CEO has been exported.
      +	Damien has volunteered to finish CEO (found by Cass)
      +
      +	All books with barcodes have been scanned
      +	All books without barcodes need to be bar-coded.
      +
      +	ACTION ITEM: Mark
      +	--Find a Credit-card with a $500 or less limit.
      +
      +	Note: There needs to be a private section in the
      +	CSC Procedures Manual. (Only accessible by shell)
      +
      +	Stefanus Wanted to mention that we should talk to
      +	Yolanda, Craig or Louie about a EYT event for Frosh Week.
      +  
      +
      +
      + + + + +

      War, insanity, espionage, beauty, domination, sacrifice, and tragic +death... not what one might associate with the history of computer +science. In this talk I will focus on the origin of our discipline in +the fields of engineering, mathematics, and science, and on the +complicated personalities that shaped its evolution. No advanced +technical knowledge is required.

      + +
      +
      + + + Get to know your profs and be the envy of your friends! + + +

      Come out and meet your professors!! This is a great opportunity to +meet professors for Undergraduate Research jobs or to find out who you might +have for future courses. One and all are welcome!

      + +

      Best of all... free food!!!

      + +
      +
      + + + Learn Unix and be the envy of your friends! + + +

      This is the first in a series of seminars that cover the use of the + Unix Operating System. Unix is used in a variety of applications, both + in academia and industry. We will provide you with hands-on experience + with the Math Faculty's Unix environment in this seminar.

      + +

      Topics that will be discussed include:

      + +
        +
      • Navigating the Unix environment
      • +
      • Using common Unix commands
      • +
      • Using the PICO text editor
      • +
      • Reading electronic mail and news with PINE
      • +
      + +

      If you do not have a Math computer account, don't panic; one will be lent + to you for the duration of this class.

      + +
      +
      + + + Talking to your Unix can be fun and profitable + + +

      This is the second in a series of seminars that cover the use of the + Unix Operating System. Unix is used in a variety of applications, both in + academia and industry. We will provide you with hands-on experience with + the Math Faculty's Unix environment in this tutorial.

      + +

      Topics that will be discussed include:

      + +
        +
      • Interacting with Bourne and C shells
      • +
      • Editing text with the vi text editor
      • +
      • Editing text with the Emacs display editor
      • +
      • Multi-tasking and the screen multiplexer
      • +
      + +

      If you do not have a Math computer account, don't panic; one will be + lent to you for the duration of this class

      + +
      +
      + + + You too can be a Unix taskmaster + + +

      This is the third in a series of seminars that cover the use of the + Unix Operating System. Unix is used in a variety of applications, both in + academia and industry. We will provide you with hands-on experience with + the Math Faculty's Unix environment in this tutorial.

      + +

      Topics that will be discussed include:

      + +
        +
      • Shell scripting
      • +
      • Searching through text files
      • +
      • Batch editing text files
      • +
      + +

      If you do not have a Math computer account, don't panic; one will be + lent to you for the duration of this class

      + +
      +
      + + +The execs discuss what needs discussion + +
      +
      +Minutes for CSC Exec Meeting
      +May 22, 2003
      +
      +
      +* Add staff to burners group.
      +	-- Only office staff (people who do stuff) on burners list
      +  	-- No objections from executives
      +
      +* We still need a webmaster, imapd
      +	-- Action Item: Mike
      +		--Check for pop delivery services (Like Grocery Gateway)
      +		so that we can replace imapd with an automated cronjob
      +		-- If this gets implemented, we must make sure that
      +		someone is around to receive the pop whenever it is
      +		delivered.
      +
      +* Budgets
      +    	Action Item: Simon
      +		-- Make sure execs receive a copy of the proposed budget
      +	Action Item: Mark
      +		-- Look into claiming money from Mathsoc for the last
      +		term.
      +	--Will be looked over the week after next Monday at the Mathsoc
      +	Budget meeting.
      +	--June 27th is the WEF (Engineering Endowment Fund) deadline
      +	--EngSoc proposal for donations by the end of the month
      +	-- Around 15 events planned
      +		--Foreign Speaker
      +			--CS Departmant will pay for flight
      +			-- We can pay local expenses
      +		--Pints with Profs
      +		--Ro-Sham-Bo
      +
      +*Changes in the MathSoc Clubs Policy
      +	Action Item: Jim and Stefanus
      +		--Bring thus up with MathSoc
      +		--Might be good to talk to Bioinformatics about this, as
      +		they have science faculty members to take care of as well.
      +	--Major issue: People who revoke their Mathsoc fees can still be
      +	voting 	members
      +	--We want it so that only people who have paid dues to Mathsoc
      +	can vote.
      +	--Execs should not take back fees, as that is bad form.
      +	--All execs unanimously agreed with this proposal
      +
      +*Confirming that we have free printing and photocopying
      +	Action Item: Mark
      +		--Does Faculty of Math billing code apply to CSC
      +		(as Faculty of Math department?)
      +		-- Procedures manual has a billing code, but it should
      +		be confirmed.
      +		-- Ask MUO, then Shirley after that.
      +	Action Item: Simon
      +		--Apparently there is a special Watcard that provides
      +		free printing from MFCF
      +		--We do not know what account it is mapped to,
      +		or the password.
      +
      +* Getting csc_disk, csc, csc_ceo accounts on undergrad to work again.
      +	Action Item: Phil
      +		-- Get csc-disk back up for student use.
      +		-- What group permissions do we need?
      +		-- CSC-Disk should be used as a repository for custom
      +		window managers, Mozilla, etc... (selling factor for
      +		CSC accounts)
      +		-- We should also have an announcement (MOTD, perhaps?)
      +		that we are providing and supporting this software.
      +			--Consider: Having university-wide accessible
      +			binaries might be a pain, as different machines
      +			might require different compilations.
      +		-- CSC-Disk is full of user data. Should that be blown away?
      +
      +*Getting locker #7 from MathSoc (Don't we already have lockers 788 and
      +789?)
      +	--Why were the locks snipped? (Bring up at council meeting)
      +	--We would prefer one combo-lock and one key-lock.
      +
      +* Review of the CSC office organization
      +	Action Item: Damien
      +		--Give Mike sudo access for shutdown
      +			--Will be rewiring stuff on Saturday
      +				--involves re-plugging machines
      +	Action Item: Simon
      +		--Get rubber wheels for chairs
      +
      +	Action Item: Mike
      +		-- Ask PlantOps about:
      +			--Waxing floors
      +			--Installing Electronic Lock (asap)
      +				--According to Faculty of Math,
      +				we shouldn't need keys.
      +				--Currently, we still need keys
      +				--It is kosher to install Electronic lock
      +				--This provides access right control as
      +				compared to key-control.
      +				--Might be long term project.
      +				--Will green men do it?
      +			--Steam-clean chairs (at least once a term)
      +			--Cork-board
      +			--Making ugly wall prettier
      +				--PlantOps knows about office
      +				organization, making environment better.
      +	--Whiteboards need to be put up
      +	--Proposal: Cork-board on pillar (no objections)
      +	--Metal frames on Whiteboard will be in least annoying place
      +
      +*Do we provide public stapler access?
      +	--People are often unappreciative and rude
      +	--Sign -  "Stapler if you say please" -- Unanimously voted
      +						 stapler policy
      +
      +*MathSoc Sign
      +	--Action Item: Jim
      +		--Find out where to get CSC sign before Monday so we
      +		can claim it in old budget.
      +
      +* Librarian's Report
      +	--Action Item: Jim
      +		--Find perl volunteer to finish CEO
      +		--Force Stefanus to export CVS tree and put onto Peri
      +
      +	--Books were scanned into system with help of Mark
      +	--All books with valid barcodes entered into system on
      +	May 20th
      +	--Books without valid barcodes are not in system
      +		--Someone needs to do it
      +	--Plan is to implement Dewey decimal system
      +		--May be inefficient as all books are about CS
      +		--We will figure out a system later
      +	--No plans to purchase new books
      +	--Librarian's Request:	Office Staff should not lend out books
      +	that do not have barcodes (No objects to request)
      +	--We are still using /media/iso/request to track books
      +	--Should be charge late fees for books?
      +	--We should have money in budget for repairing,maintaining books
      +	--Before spending money on maintaining books, check if DC will
      +	do it
      +		--will it be cheaper/easier/better?
      +
      +*Setting up extra quota for fun and profit.
      +	-- We don't implement quota properly right now
      +	-- Low demand for extra quota
      +	-- Counterpoint: Old CSC made tons of money
      +	-- Counter-counter-point: It's not that necessary for extra
      +	quota nowadays.
      +	-- Executives voted against proposal.
      +
      +*Jim will spam with an update about the term
      +	--Consider making it opt-in
      +	--One email from a service you are using should be considered
      +	reasonable mass mailing
      +
      +*Should Jim bring anything up at the MathSoc meeting?**
      +	-- Has a list
      +
      +* Student branches for ACM and IEEE
      +	Action Item: Gaelan
      +		--Contact IEEE Computing Society in UW and ask if they want
      +		to merge or transfer society to us
      +	--Simon volunteers to be put down as exec for ACM
      +		--ACM rules state requirement that exec is a ACM member
      +	--Do we renew Calum's ACM membership?
      +		--Yes (3 Yes; 1 No; 1 Abstention)
      +	--ACM membership money in budget
      +	--ACM Student chapter form has not come in
      +
      +* What to do with the donated Procedures Manual?
      +	--Term Task for webpage:
      +		--Put procedures manual on web-page.
      +		--Merge with current manual
      +	--We don't have a hard copy
      +	--Would be a good thing to read.
      +	--Many parts need updating
      +
      +
      +
      +
      + + + Come on out and vote for your exec! + +

      Elections will be held on Wednesday, May 14, 2003 at 4:30 PM in the +Comfy Lounge, MC3001.

      + +

      I invite you to nominate yourself or others for executive positions, +starting immediately. Simply e-mail me at sjdutoit@uwaterloo.ca or +cro@csclub.uwaterloo.ca with the name of the person who is to be +nominated and the position they're nominated for.

      + +

      Nominees must be full-time undergraduate students in Math. Sorry!

      + +

      Positions open for elections are:

      + +
        +
      • +President: Organises the club, appoints committees, keeps everyone busy. +If you have lots of ideas about the club in general and like bossing +people around, go for it! +
      • + +
      • +Vice President: Organises events, acts as the president if he's not +available. If you have lots of ideas for events, and spare time, go +for it! +
      • + +
      • +Treasurer: Keeps track of the club's finances. Gets to sign cheques +and stuff. If you enjoy dealing with money and have ideas on how to +spend it, go for it! +
      • + +
      • +Secretary: Takes care of minutes and outside correspondence. If you +enjoy writing things down and want to use our nifty new letterhead +style, go for it! +
      • +
      + +

      Nominations will be accepted until Tuesday, May 13 at 4:30 PM.

      + +

      Additionally, a Sysadmin will be appointed after the elections. If you +like working with Unix systems and have experience setting up and +maintaining them, go for it!

      + +

      I hope that lots of people will show up; hopefully we'll have a great +term with plenty of events. We always need other volunteers, so if you +want to get involved just talk to the new exec after the +meeting. Librarians, webmasters, poster runners, etc. are always +sought after!

      + +

      There will also be free pop, and if I remember, timbits :).

      + +

      Memberships can be purchased at the elections. Only undergrad math +members can vote, but anyone can become a member.

      + +

      Don't forget! Mark it on your calendar/wrist watch/PDA/brain implant!

      + +
      +
      + + + + + Learn Unix and be the envy of your friends! + + +

      This is the first in a series of seminars that cover the use of the + UNIX Operating System. UNIX is used in a variety of applications, both + in academia and industry. We will provide you with hands-on experience + with the Math Faculty's UNIX environment in this seminar.

      + +

      Topics that will be discussed include:

      + +
        +
      • Navigating the UNIX environment
      • +
      • Using common UNIX commands
      • +
      • Using the PICO text editor
      • +
      • Reading electronic mail and news with PINE
      • +
      + +

      If you do not have a Math computer account, don't panic; one will be lent + to you for the duration of this class.

      + +
      +
      + + + Learn more Unix and be the envy of your friends! + + +

      Abstract to come soon.

      + +
      +
      + + + Learn more Unix and be the envy of your friends! + + +

      Abstract to come soon.

      + +
      +
      + + + Come out and vote for the new exec! + + +

      This term's elections will take place on Monday, January 13 at 6:00 PM in the +MC "comfy lounge" (MC3001). Nominations are open from now on (Thursday, +January 2) until 4:30 PM of the day before elections (Sunday, January 12). +In order to nominate someone you can either e-mail me directly, by depositing +a form with the required information in the CSC mailbox in the Mathsoc office +or by writing the nomination and clearly marking it as such on the large +whiteboard in the CSC office. E-mail is probably the best choice. +Please include the name of the person to be nominated as well as the position +you wish to nominate them for.

      + +

      Candidates must be full members of the club. This means they must have paid +their membership for the given term and (due to recent changes in the +constitution) must be full-time undergraduate math students. +The same requirements hold for those voting. Please bring your Watcard to +the elections so that I can verify this. I will have a list of members with +me also.

      + +

      The positions open are:

      + +

      President -- appoints all committees of the club, calls and presides at all +meetings of the club and audits the club's financial records. Really, this +is the person in charge.

      + +

      Vice President -- assumes President's duties in case he/she is absent, +plans and coordinates events with the programmes committee and assumes any +other duties delegated by the President. +This is a really fun job if you enjoy coordinating events!

      + +

      Secretary -- keeps minutes of the meetings and cares for any correspondence. +A fairly light job, good choice if you just want to see what being an exec +is all about.

      + +

      Treasurer -- maintains all the finances of the club. +If you like money and keeping records, this is the job for you!

      + +

      Additionally a Systems Administrator will be picked by the new executive.

      + +

      Last term was a great term for the CSC -- many events, some office renovations +and a much improved image were all part of it. I hope to see the next term's +exec continue this. If you're interested in seeing this happen, do consider +going for a position, or helping out as office staff or on one of the +committees.

      + +

      Anyways, hopefully I'll see many of you at the elections. +Remember: Monday, January 13, 6:00 PM, MC3001/Comfy Lounge.

      + +

      If you have any further questions don't hesitate to contact the CRO, + Stefanus Du Toit by e-mail.

      +
      +
      + + + Find your perfect match + + +

      Stephen Kleene developed regular expressions to describe what he + called the algebra of regular sets. Since he was a pioneering + theorist in computer science, Kleene's regular expressions soon made + it into searching algorithms and from there to everyday tools.

      + +

      Regular expressions can be powerful tools to manipulate text. + You will be introduced to them in this talk. As well, we will go + further than the rigid mathematical definition of regular + expressions, and delve into POSIX regular expressions which are + typically available in most Unix tools.

      + +
      +
      + + + Unix text editing + + +

      sed is the Unix stream editor. A powerful way to + automatically edit a large batch of text. awk is a + programming language that allows you to manipulate structured data + into formatted reports.

      + +

      Both of these tools come from early Unix, and both are still + useful today. Although modern programming languages such as Perl, + Python, and Ruby have largely replaced the humble sed and + awk, they still have their place in every Unix user's + toolkit.

      + +
      +
      + + + Typesetting beautiful text + + +

      Unix was one of the first electronic typesetting platforms. The + innovative AT&T troff system allowed researches at Bell + Labs to generate high quality camera-ready proofs for their papers. + Later, Donald Knuth invented a typesetting system called + TEX, which was far superior to other typesetting + systems in the 1980s. However, it was still a typesetting language, + where one had to specify exactly how text was to be set.

      + +

      LATEX is a macro package + for the TEX system that allows an author to describe + his document's function, thereby typesetting the text in an + attractive and correct way. In addition, one can define semantic + tags to a document, in order to describe the meaning of the + document; rather than the layout.

      + +
      +
      + + + Writing reports that look good. + + +

      Work term reports, papers, and other technical documents can be + typeset in LATEX to great + effect. In this session, I will provide examples on how to typeset + tables, figures, and references. You will also learn how to make + tables of contents, bibliographies, and how to create footnotes.

      + +

      I will also examine various packages of + LATEX that can help you + meet requirements set by users of inferior typesetting systems. + These include double-spacing, hyphenation and specific margin + sizes.

      + +
      +
      + + + LaTeX => fun + + +

      It is widely acknowledged that the best system by which to + typeset beautiful mathematics is through the TE + typesetting system, written by Donald Knuth in the early 1980s.

      + +

      In this talk, I will demonstrate + LATEX and how to typeset + elegant mathematical expressions.

      + +
      +
      + + + Free for all + + +

      Before the GNU project ever existed, before the phrase + "Free Software" was ever coined, students and researchers + at the University of California, Berkeley were already + practising it. They had acquired the source code to a + little-known operating system developed at AT&T + Bell Laboratories, and were creating improvements at a + ferocious rate.

      + +

      These improvements were sent back to Bell Labs, and + shared to other Universities. Each of them were licensed + under what is now known as the "Original BSD license". Find + out what this license means, its implications, and what are + its descendents by attending this short talk.

      + +
      +
      + + + The teeth of Free Software + + +
      + The licenses for most software are designed to take away your + freedom to share and change it. By contrast, the GNU General + Public License is intended to guarantee your freedom to share and + change free software---to make sure the software is free for all + its users. +
      +
      --- Excerpt from the GNU GPL
      +
      + +

      The GNU General Public License is one of the most influential + software licenses in this day. Written by Richard Stallman for the + GNU Project, it is used by software developers around the world to + protect their work.

      + +

      Unfortunately, software developers do not read licenses + thoroughly, nor well. In this talk, we will read the entire GNU GPL + and explain the implications of its passages. Along the way, we + will debunk some myths and clarify common misunderstandings.

      + +

      After this session, you ought to understand what the GNU GPL + means, how to use it, and when you cannot use it. This session + should also give you some insight into the social implications of + this work.

      + +
      +
      + + + Give your documents more markup + + +

      XML is the eXtensible Markup Language, a standard + maintained by the World Wide Web Consortium. A descendant of IBM's + SGML. It is a metalanguage which can be used to define markup + languages for semantically describing a document.

      + +

      This talk will describe how to generate correct XML documents, + and auxiliary technologies that work with XML.

      + +
      +
      + + + Transforming your documents + + +

      XSLT is the eXtended Stylesheet Language Transformations, + a language for transforming XML documents into other XML + documents.

      + +

      XSLT is used to manipulate XML documents into other forms: a sort + of glue between data formats. It can turn an XML document into an + XHTML document, or even an HTML document. With a little bit of + hackery, it can even be convinced to spit out non-XML conforming + documents.

      + +
      +
      + + + Held in co-operation with the UW Cognitive Science Club + + +

      A lot of claims have been made lately about the intelligence of + computers. Some researchers say that computers will eventually attain + super-human intelligence. Others call these claims... um, poppycock. + Oddly enough, in the search for the truth of the matter, both camps + have overlooked an obvious strategy: interviewing a computer and asking + her opinion.

      + +

      "Judy is as much fun as a barrel of wind-up cymbal-monkeys, and + lots more entertaining." --- Bill Rodriguez, Providence Phoenix

      + +

      "Tom Sgouros's witty play, co-starring the charming robot Judy, is an + imagination stretcher that delights while it exercises your mind. If you + think you can't imagine a conscious robot, you're wrong---you can, + especially once you've met Judy." --- Daniel C. Dennett, + author of Consciousness Explained, Brainchildren, + &c.

      + +

      "...an engrossing evening... Real questions about + consciousness, freedom to act, the relationship between the creator + and the created are woven into a bravura performance." --- Will + Stackman, Aislesay.com

      + +

      Sponsored by the Mathematics Society, the Federation of Students, the + Arts Student Union, the Graduate Student Association, and the Department of + Philosophy. Tickets available at the Humanities box office (888-4908) and + the offices of the Psychology Society and the Computer Science Club for + $5.50. For + more information: http://www.csclub.uwaterloo.ca/cogsci.

      + +
      +
      + + + A talk by Assistant Professor Michael McCool + + +

      Stream processing is an enhanced version of SIMD processing that + permits efficient execution of conditionals and iteration. Stream + processors have many similarities to GPUs, and a hardware prototype, + the Imagine processor, has been used to implement both OpenGL and + Renderman.

      + +

      It is possible that GPUs will acquire certain properties + of stream processors in the future, which should make them easier + to use and more efficient for general-purpose computation that includes + data-dependent iteration and conditionals.

      + +
      +
      + + + Abusing template metaprogramming in C++ + + +

      Templates are a useful feature in C++ when it comes to writing + type-independent data structures and algorithms. But that's not all + they can be used for. Essentially, it is possible to write certain + programs in C++ that execute completely at compile-time rather + than run-time. Combined with some optimisations this is an interesting + twist on regular C++ programming.

      + +

      This talk will give a short overview of the features of templates + and then go on to describe how to "abuse" templates to perform complex + computations at compile time. The speaker will present three programs of + increasing complexity which execute at compile time. First a factorial + listing program, then a prime listing program will be presented. Finally + the talk will conclude with the presentation of a Mandelbrot + generator running at compile time.

      + +

      Some basic knowledge of C++ will be assumed.

      + +
      +
      + + + Once more into the breach + + +

      The Secure Shell (SSH) has now replaced traditional remote login + tools such as rsh, rlogin, rexec and + telnet. It is used to provide secure, authenticated, + encrypted communications between remote systems. However, the SSH + protocol provides for much more than this.

      + +

      In this talk, we will discuss using SSH to its full extent. Topics + to be covered include:

      +
        +
      • Remote logins
      • +
      • Remote execution
      • +
      • Password-free authentication
      • +
      • X11 forwarding
      • +
      • TCP forwarding
      • +
      • SOCKS tunnelling
      • +
      + +
      +
      + + + + + No description available. + + +

      + The first of this term's CSC social events, we will be going to see + the movie ``Brainstorm'' at the Princess Cinema. This outing is + intended primarily for the new first-year students. +

      +

      + The Princess Cinema is Waterloo's repertoire theatre. This month + and next, they are featuring a ``Cyber Film Festival''. Upcoming + films include: +

      +
        +
      • Brazil
      • +
      • Bladerunner (director's cut)
      • +
      • 2001: A Space Odyssey
      • +
      • Naked Lunch
      • +
      +

      + Admission is $4.25 for a Princess member, $7.50 for a non-member. + Membership to the Princess is $7.00 per year. +

      +
      +
      + + No description available + No abstract available + + + No description available + No abstract available + + + No description available + No abstract available + + + No description available + No abstract available + + + No description available + No abstract available + + + No description available + +

      + What is the next step in the evolution of computer languages? + Intelligent agents? Distributed objects? or visual languages? +

      +

      + Visual languages overcome many of the drawbacks and limitations + of the textual languages that software development is based on + today. Do you think about programming in a linear fashion? Or do + you draw a mental picture of your algorithm and then linearize it + for the benefit of your compiler? Wouldn't it be nice if you could + code the same way you think? +

      +

      + Visual C++ and Visual BASIC aren't visual languages, but Prograph + is. Prograph is a commercially available, visual, object-oriented, + data-flow language. It is well suited to graphical user interface + development, but is as powerful for general-purpose programming as + any textual language. +

      +

      + The talk will comprise a discussion of the problems of textual + languages that visual languages solve, a live demonstration of + Prograph, and some of my observations of the applications of + Prograph to software development. +

      +
      +
      + + No description available + +

      Big Money and Prizes!

      +

      + So you think you're a pretty good programmer? Pit your skills + against others on campus in this triannual event! Contestants will + have three hours to solve five programming problems in either C or + Pascal. +

      +

      + Last fall's winners went on to the International Finals and came + first overall! You could be there, too! +

      +
      +
      + + No description available + +

      Need something to do between assignments/beers?

      +

      + Did you know that your undergrad account at Waterloo gives you + access to the world's largest computer network? With thousands + of discussion groups, gigabytes of files to download, multimedia + information browsers, even on-line entertainment? +

      +

      + The resources available on the Internet are vast and wondrous, but + the tools for navigating it are sometimes confusing and arcane. In + this hands-on tutorial you will get the chance to get your feet wet + with the world's most mind-bogglingly big computer network, the + protocols and programs used, and how to use them responsibly and + effectively. +

      +
      +
      + + No description available + +

      From the Minimax Theorem, through Alpha-Beta, and beyond...

      +

      + This will be a discussion of the pitfalls of using mathematics and + algorithms to play classical board games. Thorough descriptions + shall be presented of the simple techniques used as the building + blocks that make all modern computer game players. I will use + tic-tac-toe as a control for my arguments. Other games such as + Chess, Othello and Go shall be the be a greater measure of progress; + and more importantly the targets of our dreams. +

      +

      + To enhance the discussion of the future, Barney Pell's Metagamer + shall be introduced. His work in define classes of games is + important in identifying the features necessary for analysis. +

      +
      +
      + + + + + By Blair MacIntyre and Elizabeth Mynatt + +

      by Blair MacIntyre and Elizabeth Mynatt

      +

      The Future Computing Environments (FCE) Group at Georgia Tech + is a collection of faculty and students that share a desire to + understand the partnership between humans and technology that + arises as computation and sensing become ubiquitous. With + expertise covering the breadth of Computer Science, but + focusing on HCI, Computational Perception, and Machine + Learning, the individual research agendas of the FCE faculty + are grounded in a number of shared "living laboratories" where + their research is applied to everyday life in the classroom + (Classroom 2000), the home (the Aware Home), the office + (Augmented Offices), and on one's person. Professors + MacIntyre and Mynatt will discuss a variety of these projects, + with an emphasis on the HCI and Computer Science aspects of + the FCE work. +

      +

      + In addition to their affiliation with the FCE group, + Professors Mynatt and MacIntyre are both members of the + Graphics, Visualization and Usability Center (GVU) at Georgia + Tech. This interdisciplinary center brings together research + in computer science, psychology, industrial engineering, + architecture and media design by examining the role of + computation in our everyday lives. During the talk, they will + touch on some of the research and educational opportunities + available at both GVU and the College of Computing. +

      +
      +
      + + + No description available. + +

      + Debugging can be the most difficult and time consuming part of + any program's life-cycle. Far from an exact science, it's more + of an art ... and close to some kind of dark magic. Cryptic + error messages, lousy error checking, and icky things like + implicit casts can make it nearly impossible to know what's + going on inside your program. +

      +

      + Several tools are available to help automate your + debugging. GDB and Purify are among the most powerful + debugging tools available in a UNIX environment. GDB is an + interactive debugger, allowing you to `step' through + a program, examine function calls, variable contents, stack + traces and let you look at the state of a program after it + crashes. Purify is a commercial program designed to help find + and remove memory leaks from programs written in languages + without automatic garbage collection. +

      +

      + This talk will cover how to compile your C and C++ programs + for use with GDB and Purify, as well as how to use the + available X interfaces. If a purify license is available on + undergrad at the time of the talk, we will cover how to use it + during runtime. +

      +
      +
      + + + By Jan Gray + +

      by Jan Gray

      + +

      With the advent of large inexpensive field-programmable gate + arrays and tools it is now practical for anyone to design and + build custom processors and systems-on-a-chip. Jan will discuss + designing with FPGAs, and present the design and implementation + of xr16, yet another FPGA-based RISC computer system with + integrated peripherals.

      + +

      Jan is a past CSC pres., B.Math. CS/EEE '87, and wrote + compilers, tools, and middleware at Microsoft from 1987-1998. He + built the first 32-bit FPGA CPU and system-on-a-chip in + 1995.

      +
      +
      + + + End-of-term dinner + + No abstract available. + + + + + By Edgar Dijkstra + +

      By Edgar Dijkstra

      + +

      This talk will use partial orders, lattice theory, and, if + time permits, the Galois connection as carriers to illustrate + the use of calculi in mathematics. We hope to show the brevity + of many calculations (in order to fight the superstition that + formal proofs are necessarily impractically long), and the + strong heuristic guidance that is available for their + design.

      + +

      Dijkstra is known for early graph-theoretical algorithms, + the first implementation of ALGOL 60, the first operating system + composed of explicitly synchronized processes, the invention of + guarded commands and of predicate transformers as a means for + defining semantics, and programming methodology in the broadest + sense of the word.

      + +

      His current research interests focus on the formal + derivation of proofs and programs, and the streamlining of the + mathematical argument in general.

      + +

      Dijkstra held the Schlumberger Centennial Chair in Computer + Sciences at The University of Texas at Austin until retiring in + October.

      + +
      +
      + + + By Edsger Dijkstra + +

      This talk will show the use of programs for the proving of + theorems. Its purpose is to show how our experience gained in + the derivations of programs might be transferred to the + derivation of proofs in general. The examples will go beyond the + (traditional) existence theorems.

      + +

      Dijkstra is known for early graph-theoretical algorithms, + the first implementation of ALGOL 60, the first operating system + composed of explicitly synchronized processes, the invention of + guarded commands and of predicate transformers as a means for + defining semantics, and programming methodology in the broadest + sense of the word.

      + +

      His current research interests focus on the formal + derivation of proofs and programs, and the streamlining of the + mathematical argument in general.

      + +

      Dijkstra held the Schlumberger Centennial Chair in Computer + Sciences at The University of Texas at Austin until retiring in + October.

      + +
      +
      + + + By Edsger Dijkstra + No description available. + + + + + + No description available. + +

      by Floyd Marinescu +

      + +

      + The first talk will be an introduction to the Enterprise Java + API's: Servlets, JSP, EJB, and how to use them to build + eCommerce sites. +

      + +

      + The second talk will be about how these technologies were used + to implement a real world portal. The talk will include an + overview of the design patterns used and will feature + architectural information about the yet to be release portal + (which I am one of the developers) called theserverside.com. +

      +
      +
      + + + No description available. + +

      Real World J2EE - Design Patterns and architecture behind the + yet to be released J2EE portal: theserverside.com

      + +

      This talk will feature an exclusive look at the architecture + behind the new J2EE portal: theserverside.com. Join Floyd + Marinescu in a walk-through of the back-end of the portal, + while learning about J2EE and its real world patterns, + applications, problems and benefits.

      +
      +
      + + + + + End-of-term dinner + No abstract available. + + + + + + Fall 2000 Elections for the CSC. + +

      + Would you like to get involved in the CSC? Would you like to have a + say in what the CSC does this term? Come out to the CSC Elections! + In addition to electing the executive for the Fall term, we will be + appointing office staff and other positions. Look for details in + uw.csc. +

      + +

      Nominations for all positions are being taken in the CSC office, MC + 3036.

      +
      +
      + + + SIGGraph Video Night Featuring some truly awesome computer + animations from Siggraph '99. + +

      Interested in Computer Graphics? +

      + +

      Enjoy watching state-of-the-art Animation? +

      + +

      Looking for a cheap place to take a date? +

      + +

      SIGGraph Video Night - + Featuring some truly awesome computer animations from Siggraph '99. +

      + +

      Come out for the Computer Science Club general elections at 6:00 + pm, right before SIGGraph!

      +
      +
      + + + By Frank Clegg of Microsoft Canada + +

      Vitals

      +
      +
      By
      +
      Frank Clegg
      +
      President, Microsoft Canada
      +
      Date
      + +
      Monday, September 25, 2000
      +
      Time
      +
      14:30 - 16:00
      +
      Place
      +
      DC 1302
      +
      (Davis Centre, Room 1302, University of Waterloo)
      + +
      Cost
      +
      $0.00
      +
      Pre-registration
      +
      Recommended
      +
      http://infranet.uwaterloo.ca:81/infranet/semform.htm
      +
      (519) 888-4004
      + +
      + +

      Abstract

      +

      The Internet and the Web have revolutionized our communications, our access +to information and our business methods. However, there is still much room +for improvement. Frank Clegg will discuss Microsoft's vision for what is +beyond browsing and the dotcom. Microsoft .NET (pronounced "dot-net") is a +new platform, user experience and set of advanced software services planned +to make all devices work together and connect seamlessly. With this next +generation of software, Microsoft's goal is to make Internet-based +computing and communications easier to use, more personalized, and more +productive for businesses and consumers. In his new position of president +of Microsoft Canada Co., Frank Clegg will be responsible for leading the +organization toward the delivery of Microsoft .NET. He will speak about +this new platform and the next generation Internet, how software developers +and businesses will be able to take advantage of it, and what the .NET +experience will look like for consumers and business users.

      + +

      The Speaker

      +

      Frank Clegg was appointed president of Microsoft Canada Co. this month. +Prior to his new position, Mr. Clegg was vice-president, Central Region, +Microsoft Corp. from 1996 to 2000. In this capacity, he was responsible for +sales, support and marketing activities in 15 U.S. states. Mr. Clegg joined +Microsoft Corp. in 1991 and headed the Canadian subsidiary until 1996. +During that time, Mr. Clegg was instrumental in introducing several key +initiatives to improve company efficiency, growth and market share. Mr. +Clegg graduated from the University of Waterloo in 1977 with a B. Math.

      + +

      For More Information

      +
      +Shirley Fenton
      +The infraNET Project
      +University of Waterloo
      +519-888-4567 ext. 5611
      +http://infranet.uwaterloo.ca/ +
      +
      +
      + + + + + + Winter 2001 CSC Elections. + +

      Would you like to get involved in the CSC? Would you like to + have a say in what the CSC does this term? Come out to the CSC + Elections! In addition to electing the executive for the + Winter term, we will be appointing office staff and other + positions. Look for details in uw.csc. +

      +

      + Nominations for all positions are being taken in the CSC + office, MC 3036. +

      +
      +
      + + Second CSC meeting for Winter 2001. + +

      Proposed agenda

      +
      +
      Book purchases
      +
      +

      They haven't been done in 2 terms. + We have an old list of books to buy. + Any suggestions from uw.csc are welcome.

      +
      +
      CD Burner
      + +
      +

      For doing Linux burns. It was allocated money on the budget + request - about $300. We should be able to get a decent 12x + burner with that (8x rewrite).

      +

      The obvious things to sell are Linux Distros and BSD variants. + Are there any other software that we can legally burn and sell + to students?

      +
      +
      Unix talks
      +
      +

      Just a talk of the topics to be covered, when, where, whatnot. + Mike was right on this one, this should have been done earlier + in the term. Oh well, maybe we can fix this for next fall term.

      + +
      +
      Game Contest
      +
      +

      We already put a bit of work into planning the Othello contest + before I read Mike's post. I still think it's viable. I've got + at least 2 people interested in writing entries for it. This + will be talked about more on Monday. Hopefully, Rory and I will + be able to present a basic outline of how the contest is going + to be run at that time.

      +
      +
      Peri's closet cleaning
      +
      + +

      Current sysadmin (jmbeverl) and I (kvijayan) and + President (geduggan) had a nice conversation about this 2 + days ago, having to do with completely erasing all of + peri, installing a clean stable potato debian on it, and + priming it for being a gradual replacement to calum. We'll + probably discuss how much we want to get done on this + front on Monday.

      +
      +
      + +

      Any comments from the newsgroup are welcome.

      +
      +
      + + + Practice for the ACM international programming + contest + +

      Our ACM-Style practice contests involve answering five questions in three +hours. Solutions are written in Pascal, C or C++. Seven years in a row, +Waterloo's teams have been in the top ten at the world finals. +For more information, see +the contest web page.

      + +

      Easy Question:

      +

      A palindrome is a sequence of letters that reads the same backwards and +forwards, such as ``Madam, I'm Adam'' (note that case doesn't matter and +only letters are important). Your task is to find the longest palindrome in +a line of text (if there is a tie, print the leftmost one).

      +
      +Input:                              Output:
      +
      +asfgjh12dsfgg kj0ab12321BA wdDwkj   abBA
      +abcbabCdcbaqwerewq                  abCdcba
      +
      + +

      Hard Question:

      +

      An anagram is a word formed by reordering the letters of another word. +Find all sets of anagrams that exist within a large dictionary. The +input will be a sorted list of words (up to 4000 words), one per line. +Output each set of anagrams on a separate line. Each set should be +in alphabetical order, and all lines of sets should be in alphabetical +order. A word with no anagrams is a set of anagrams itself, and should +be displayed with no modifications.

      + +
      +Input:      Output:
      +
      +post        post pots stop
      +pots        start
      +start
      +stop
      +
      +
      +
      + + + No description available. + No abstract available. + + + + No description available. + No abstract available. + + + + No description available. + No abstract available. + + + + + + Practice for the ACM international programming + contest + +

      Our ACM-Style practice contests involve answering five questions in three +hours. Solutions are written in Pascal, C or C++. Seven years in a row, +Waterloo's teams have been in the top ten at the world finals. +For more information, see +the contest web page.

      + +

      Easy Question:

      +

      A palindrome is a sequence of letters that reads the same backwards and +forwards, such as ``Madam, I'm Adam'' (note that case doesn't matter and +only letters are important). Your task is to find the longest palindrome in +a line of text (if there is a tie, print the leftmost one).

      +
      +Input:                              Output:
      +
      +asfgjh12dsfgg kj0ab12321BA wdDwkj   abBA
      +abcbabCdcbaqwerewq                  abCdcba
      +
      + +

      Hard Question:

      +

      An anagram is a word formed by reordering the letters of another word. +Find all sets of anagrams that exist within a large dictionary. The +input will be a sorted list of words (up to 4000 words), one per line. +Output each set of anagrams on a separate line. Each set should be +in alphabetical order, and all lines of sets should be in alphabetical +order. A word with no anagrams is a set of anagrams itself, and should +be displayed with no modifications.

      + +
      +Input:      Output:
      +
      +post        post pots stop
      +pots        start
      +start
      +stop
      +
      +
      +
      + + + + + + Bored of GNU/Linux? Try this experimental operating + system! + +

      GNU Hurd is an operating system kernel based on the microkernel +architecture design. It was the original GNU kernel, predating Linux, +and is still being actively developed by many volunteers.

      +

      The Toronto-area Hurd Users Group, in co-operation with the Computer +Science Club, is hosting an afternoon to show the Hurd to anyone +interested. Jeff Bailey, a Hurd developer, will give a presentation on +the Hurd, followed by a GnuPG/PGP keysigning party. To finish it off, +James Morrison, also a Hurd developer, will be hosting a Debian +GNU/Hurd installation session.

      +

      All interested are invited to attend. Bring your GnuPG/PGP fingerprint +and mail your key to sjdutoit@uwaterloo.ca with the subject +``keysigning'' (see separate announcement).

      +

      Questions? Suggestions? Contact James Morrison.

      +
      +
      + + Get more signatures on your key! + +

      + GnuPG and PGP provide public-key based encryption for e-mail and + other electronic communication. In addition to preventing others + from reading your private e-mail, this allows you to verify that an + e-mail or file was indeed written by its perceived author. +

      +

      + In order to make sure a GnuPG/PGP key belongs to the respective + person, the key must be signed by someone who has checked the + user's key fingerprint and verified the user's identification. +

      +

      + A keysigning party is an ideal occasion to have your key signed by + many people, thus strengthening the authority of your key. Everyone + showing up exchanges key signatures after verifying ID and + fingerprints. The Computer Science Club will be hosting such a + keysigning party together with the Hurd presentation by THUG (see + separate announcement). See + the + keysigning party homepage for more information. +

      +

      + Before attending it is important that you mail your key to + sjdutoit@uwaterloo.ca with the subject ``keysigning.'' Also make + sure to bring photo ID and a copy of your GnuPG/PGP fingerprint on + a sheet of paper to the event. +

      +
      +
      + + + This is the first in a series of seminars that cover the use of + the UNIX Operating System. UNIX is used in a variety of + applications, both in academia and industry. We will be covering + the basics of the UNIX environment, as well as the use of PINE, an + electronic mail and news reader. + + + + Billy Biggs will be holding a talk on DVD technology + (in particular, CSS and playback issues) under Linux, giving some + technical details as well as an overview of the current status of + Free Software efforts. All are welcome. + +

      DVD copy protection: Content Scrambling System (CSS)

      +
        +
      • A technical introduction to CSS and an overview of the ongoing + legal battle to allow distribution of non-commercial DVD + players
      • +
      • The current Linux software efforts and open issues
      • +
      • How applications and Linux distributions are handling the + legal issues involved
      • +
      +

      DVD-Video specifics: Menus and navigation

      +
        +
      • An overview of the DVD-Video standard
      • +
      • Reverse engineering efforts and their implementation status
      • +
      • Progress of integration into Linux media players
      • +
      +
      +
      + + This the second in a series of UNIX tutorials. Simon Law and + James Perry will be presenting some more advanced UNIX + techniques. All are welcome. Accounts will be provided for those + needing them. + +

      + This is the second in a series of seminars that cover the use of + the UNIX Operating System. UNIX is used in a variety of + applications, both in academia and industry. We will provide you + with hands-on experience with the Math Faculty's UNIX environment + in this tutorial. +

      +

      Topics that will be discussed include:

      +
        +
      • Interacting with Bourne and C shells
      • +
      • Editing text using the vi text editor
      • +
      • Editing text using the Emacs display editor
      • +
      • Multi-tasking and the screen multiplexer
      • +
      +

      + If you do not have a Math computer account, don't panic; one will + be lent to you for the duration of this class. +

      +
      +
      + + Thomas Wolf from Brock University will be holding a talk on + the Asian game of Go. All are welcome. + +

      + The Asian game go is unique in a number of ways. It is the oldest + board game known. It is a strategy game with very simple + rules. Computer programs are very weak despite huge efforts and + prizes of US$ > 1.5M for a program beating professional + players. The talk will quickly explain the rules of go, compare go + and chess, mention various attempts to program go and describe our + own efforts in this field. Students will have an opportunity to + solve computer generated go problems. Prizes will be available. +

      +
      +
      + + + + + Come and vote for this term's exec + +

      + Vote for the exec this term. Meet at the CSC office. +

      +
      +
      + + + + + + Come and vote for this term's exec + +

      + Vote for the exec this term. Meet at the comfy + lounge. There will be an opportunity to obtain or renew + memberships. This term's CRO is Siyan Li + (s8li@csclub.uwaterloo.ca). +

      +
      +
      + + + Vote on a constitutional change. + +

      + The executive has unanimously decided to try to change our +constitution to comply with MathSoc policy. The clause we are trying +to change is the membership clause. The following is the proposed new +reading of the clause. +

      +

      + In compliance with MathSoc regulations and in recognition of +the club being primarily targeted at undergraduate students, full +membership is open to all undergraduate students in the Faculty of +Mathematics and restricted to the same. +

      + +

      + The proposed change is illustrated on + a web page. +

      + +

      + There will be a business meeting on 30 Sept 2002 at 18:30 in + the comfy lounge, MC 3001. Please come and vote +

      +
      +
      + + + First Steps with UNIX + +

      + Get to know UNIX and be the envy of your friends! +

      +

      + This is the first in a series of seminars that cover the use + of the UNIX Operating System. UNIX is used in a variety of + applications, both in academia and industry. We will provide + you with hands-on experience with the Math Faculty's UNIX + environment in this seminar. +

      +

      + Topics that will be discussed include: +

      +
        +
      • Navigating the UNIX environment
      • +
      • Using common UNIX commands
      • +
      • Using the PICO text editor
      • +
      • Reading electronic mail and news with PINE
      • +
      +

      + If you do not have a Math computer account, don't panic; one will be +lent to you for the duration of this class. +

      +
      +
      + + + Get to know your profs and be the envy of your friends! + +

      Come out and meet your professors. This is a great opportunity to +meet professors for Undergraduate Research jobs or to find out who you might +have for future courses.

      + +

      Profs who have confirmed their attendance are:

      +
        +
      • Troy Vasiga, School of Computer Science
      • +
      • J.P. Pretti, St. Jerome's and School of Computer Science
      • +
      • Michael McCool, School of Computer Science, CGL
      • +
      • Martin Karsten, School of Computer Science, BBCR
      • +
      • Gisli Hjaltason, School of Computer Science, DB
      • +
      + +

      There will also be...

      +
        +
      • Free Food
      • +
      • Free Food
      • +
      • Free Food
      • +
      +
      +
      + + + Talking to your UNIX can be fun and profitable. + +

      This is the second in a series of seminars that cover the use of +the UNIX Operating System. UNIX is used in a variety of applications, +both in academia and industry. We will provide you with hands-on +experience with the Math Faculty's UNIX environment in this +tutorial.

      + +

      Topics that will be discussed include:

      +
      • Interacting with Bourne and C shells
      • +
      • Editing text using the vi text editor
      • +
      • Editing text using the Emacs display editor
      • +
      • Multi-tasking and the screen multiplexer
      • +
      + +

      If you do not have a Math computer account, don't panic; one will be +lent to you for the duration of this class.

      + +
      +
      + + + A talk by Filip Spacek, KGI developer + + Linux has proven itself as a reliable operating system but arguably, + it still lacks in support of high performance graphics + acceleration. This talk will describe basic components of a PC video + card and the design and limitations the current Linux display driver + architecture. Finally a an overview of a new architecture, the Kernel + Graphics Interface (KGI), will be given. KGI attempts to solve the + shortcomings of the current design, and provide a lightweight and + portable interface to the display subsystem. + + + + + + No abstract available yet. + + + + Abusing template metaprogramming in C++; aka. writing a + Mandelbrot generator that runs at compile time + +

      Templates are a useful feature in C++ when it comes to writing + type-independent data structures and algorithms. Relatively soon + after their appearance it was realised that they could be used to + do much more than this. Essentially it is possible to write + certain programs in C++ that execute completely at compile + time rather than run time. Combined with constant-expression + optimisation this is an interesting twist on regular C++ + programming.

      +

      This talk will give a short overview of the features of + templates and then go on to describe how to "abuse" + templates to perform complex computations at compile time. The + speaker will present three programs of increasing complexity which + execute at compile time. First a factorial listing program, then a + prime listing program will be presented. Finally the talk will + conclude with the presentation of a Mandelbrot generator running + at compile time.

      + +

      If you are interested in programming for the fun of it, the C++ + language or silly tricks to do with languages, this talk is for + you. No C++ knowledge should be necessary to enjoy this talk, but + programming experience will make it more worthwile for you.

      + +
      + + + Bring over your computer and we'll help you install GNU/Linux + +

      The CSC, the KW-Linux User Group, and the UW Debian Interest Group + are jointly hosting a GNU/Linux InstallFest. GNU/Linux is a + powerful, free operating system for your computer. It is mostly + written by talented volunteers who like to share their efforts + and help each other.

      + +

      Perhaps you have are you interested in installing GNU/Linux. + If so, bring your computer, monitor and keyboard; and we will + help you install GNU/Linux on your machine. You can also find + knowledgeable people who can answer your questions about + GNU/Linux.

      + +
      + +

      Frequently Asked Questions

      + +

      Q: What is GNU/Linux?
      +A: GNU/Linux is a free operating system for your computer. It is mostly + written by talented volunteers who like to share their efforts. +

      + +

      Q: Free?
      +A: GNU/Linux is available for zero-cost. As well, it allows you such + freedom to share it with your friends, or to modify the software to + your own needs and share that with your friends. It's very friendly. +

      + +

      Q: What is an InstallFest?
      +A: An InstallFest is a meeting where volunteers help people install + GNU/Linux on their computers. It's also a place to meet users, and + talk to them about running GNU/Linux. +

      + +

      Q: What kind of computer do I need to use GNU/Linux?
      +A: Almost any recent computer will do. If you have an old machine + kicking around, you can install GNU/Linux on it as well. If it is + at least 5 years old, it should be good enough. +

      + +

      Q: Can I have Windows and GNU/Linux on the same computer?
      +A: If you can run Windows now, and you have an extra gigabyte (GB) of + disk space to spare; then it should be possible. +

      + +

      Q: What should I bring if I want to install GNU/Linux?
      +A: You will want to bring:

      +
        +
      1. Computer
      2. +
      3. Monitor and monitor cable
      4. +
      5. Power cords
      6. +
      7. Keyboard and mouse
      8. +
      + +
      +
      + + + The teeth of Free Software + +

      +

      + +The licenses for most software are designed to take away your freedom +to share and change it. By contrast, the GNU General Public License +is intended to guarantee your freedom to share and change free +software---to make sure the software is free for all its users. +
      --- Excerpt from the GNU GPL +
      +

      +

      The GNU General Public License is one of the most influential +software licenses in this day. Written by Richard Stallman for the +GNU Project, it is used by software developers around the world to +protect their work. +

      +

      +Unfortunately, software developers do not read licenses thoroughly, nor +well. In this talk, we will read the entire GNU GPL and explain the +implications of its passages. Along the way, we will debunk some myths +and clarify common misunderstandings. +

      +

      +After this session, you ought to understand what the GNU GPL means, how +to use it, and when you cannot use it. This session should also give +you some insight into the social implications of this work. +

      +
      +
      + + + A talk by Michael McCool of the Computer Graphics Lab. + +

      +Modern graphics accelerators, or "GPUs", have embedded high-performance +programmable components in the form of vertex and fragment shading units. +Recently, these units have evolved from 8-bit computations to floating-point, +and other operations provide array gather, scatter, and summation. +These capabilities make GPUs akin to array processors of the +past, but with a difference: every PC now has one! I am interested +in finding the best way to exploit this computational capacity for not +only graphics but for general-purpose computation. +

      +Current APIs permit specification of the programs for GPUs +using an assembly-language level interface. Compilers for high-level +shading languages are available, such as NVIDIA's Cg, and OpenGL 2.0 and +DirectX will also include standardized shading languages. This talk will +review these. However, compilers for these languages read in an external +string specification, which can be inconvenient. +

      +However, it is possible, using standard C++, to define a high-level +shading language directly in the API. Such a language can be nearly +indistinguishable from a special-purpose programming language, yet +permits more direct interaction with the specification of textures +(arrays) and parameters, simplifies implementation, and enables +on-the-fly generation, manipulation, and specialization of shader programs. +A shading language built into the API also permits the lifting of +C++ host language type, modularity, and scoping constructs into the shading +language without any additional implementation effort. Such an +embedded language could be used to program other embedded processors +(such as DSP chips in sound cards) or even to generate machine language +on the fly for the host CPU. +

      +
      +
      + + + Going to visit the York University Computer Club +

      YUCC and the UW CSC have having a join meeting at York +University. Dave Makalsky, the President of YUCC, will be giving a talk on +Design-by-contract and Eiffel. Stefanus Du Toit, Vice-President of the UW +CSC, will be giving a talk on the evil depths of the black art known as C++. +

      Schedule

      +
      • 1:30pm: Leave UW
      • +
      • 3:00pm: Arrive at York University.
      • +
      • 3:30pm: The Evil side of C++
      • +
      • 4:30pm: Design-by-Contract and Eiffel
      • +
      • 6:00pm: Dinner
      • +
      • 9:00pm: Arrive back at UW
      • +
      +
      +
      + + + A talk by Simon Law + +

      + Perl, the Practical Extraction and Reporting Language can only + be described as an eclectic language, invented and refined by + a deranged system administrator, who was trained as a + linguist. This man, however, has declared: +

      +
      + + Perl 5 was my rewrite of Perl. + I want Perl 6 to be the community's rewrite of Perl and of the + community. +
      --- Larry Wall +
      +

      + Whenever a language is designed by a committee, it is common + wisdom to avoid it. Not so with Perl, for it cannot get + worse. However strange these Perl people seem, Perl 6 is a + good thing coming. In this talk, I will demonstrate some Perl + 5 programs, and talk about their Perl 6 counterparts, to show + you that Perl 6 will be cleaner, friendlier, and prettier. +

      +
      +
      + + + A talk by Dan Brovkovich, Mathsoc's Computing Director +

      +Samba is a free implementation of the Server Message Block (SMB) +protocol. It also implements the Common Internet File System (CIFS) +protocol, used by Microsoft Windows 95/98/ME/2000/XP to share files and +printers.

      +SMB was originally developed in the early to mid-80's by IBM and was +further improved by Microsoft, Intel, SCO, Network Appliances, Digital +and many others over a period of 15 years. It has now morphed into CIFS, +a form strongly influenced by Microsoft.

      +Samba is considered to be one of the key projects for the acceptance of +GNU/Linux and other Free operating systems (e.g. FreeBSD) in the +corporate world: a traditional Windows NT/2000 stronghold.

      +We will talk about interfacing Samba servers and desktops with the +Windows world. From a simple GNU/Linux desktop in your home to the +corporate server that provides collaborative file/printer sharing, +logons and home directories to hundreds of users a day.

      +
      +
      + + + Carlos O'Donnell talks about "the last of the legacy processors to fall before the barbarian horde" + +

      This whirlwind talk is aimed at providing an overview of the +GNU/Linux port for the HP PARISC processor. The talk will focus on +the "intricacies" of the processor, and in particular the +implementations of the Linux kernel and GNU Libc. After the talk +you should be acutely aware of how little code needs to be written +to support a new architecture! Carlos has been working on the port +for two years, and enjoying the fruits of his labour on a 46-node +PARISC cluster.

      + +
      +

      +Carlos is currently in his 5th year of study at the University +of Western Ontario. This is his last year in a concurrent +Computer Engineering and Computer Science degree. His research +interest range from distributed and parallel systems to low +level optimized hardware design. He likes playing guitar and +just bought a Cort NTL-20, jumbo body, solid spruce top with +a mahogany back. Carlos hacks on the PARISC Linux kernel, GNU libc, +GNU Debugger, GNU Binutils and various Debian packages. +

      + + +
      +
      + + + Marcus Brinkmann, a GNU Hurd developer, talks about the Hurd server interfaces, at the heart of a GNU/Hurd system + +

      The Hurd server interfaces are at the heart of the Hurd system. They + define the remote procedure calls (RPCs) that are used by the servers, the + GNU C library and the utility programs to communicate with the Hurd system + and to implement the POSIX personality of the Hurd as well as other + features.

      + +

      This talk is a walk through the Hurd RPCs, and will give an overview of how + they are used to implement the system. Individual RPCs will be used to + illustrate important or exciting features of the Hurd system in general, + and it will be shown how those features are accessible to the user at the + command line, too.

      + +
      + +

      Marcus Brinkmann is a math student at the Ruhr-Universitaet Bochum in + Germany. He is one of maintainers of the GNU Hurd project and the + initiator of the Debian GNU/Hurd binary distribution. He designed and + implemented the console subsystem of the Hurd, wrote the FAT filesystem + server, and fixed a lot of bugs, thus increasing the stability and + usability of the system.

      + +
      +
      + + + Neal Walfield, a GNU Hurd developer, talks about a possible Virtual Memory Management subsystem for the GNU Hurd + +

      Virtual memory management is one of the cornerstones of multiuser +operating systems. Most systems available today place all of the +policy in a monolithic virtual memory manager, VMM, isolated from the +rest of the system. Although secure and lightweight, users have no +way to communicate their anticipated memory needs and usage to the +system pager. As a result, the VMM can only implement a global paging +policy (typically, an approximation of LRU) which may be good on +average but is best for nobody.

      + +

      With the port of Hurd to the L4 microkernel, this situation is being +readdressed. Due to its more distributed nature, a centralized +resource manager is not only more difficult to implement efficiently +but also contrary to the philosophy of the rest of the system. We are +currently exploring a model whereby each program is fully self-paged +and all compete for memory from a physical memory server. This talk +will first discuss how paging currently works in Mach and other +systems. An argument for an external paging policy will then be +presented followed by the requirements of such a design and the design +itself.

      + +
      + +

      Neal Walfield, a GNU Hurd developer, is from the University of Massachusetts +Lowell. Neal spent the summer of 2002 at University of Karlsruhe working +on porting the GNU Hurd to L4.

      + +
      +
      + + + A talk by Simon Law + +

      The Debian Project produces a "Universal Operating System" that is +comprised entirely of Free Software. This talk focuses on using Debian +GNU/Linux in an enterprise environment. This includes:

      +
        +
      • Where Debian can be deployed
      • +
      • Strategic advantages of Debian
      • +
      • Ways for business to give back to Debian
      • +
      +
      +
      + + + A talk by James A. Morrison + +

      + Do you ever wonder what java is doing while you wait? Have you ever used +Modula-3? Do you wonder how lazily you can Mark and Sweep? Would you like to +know how to Stop-and-Copy? +

      + Come out to this talk and learn these things and more. No prior knowledge of +Garbage Collection or memory management is needed. +

      +
      +
      + -- 2.39.2 From 0549ed1d78f199586bee914c7f4a2a1d1a09285f Mon Sep 17 00:00:00 2001 From: Jared He <66887902+jaredjhe@users.noreply.github.com> Date: Sun, 13 Jun 2021 21:40:44 -0500 Subject: [PATCH 12/41] Add todos --- .gitignore | 3 + node_modules/.bin/acorn | 12 + node_modules/.bin/acorn.cmd | 17 + node_modules/.bin/acorn.ps1 | 28 + node_modules/.bin/detect-libc | 12 + node_modules/.bin/detect-libc.cmd | 17 + node_modules/.bin/detect-libc.ps1 | 28 + node_modules/.bin/escodegen | 12 + node_modules/.bin/escodegen.cmd | 17 + node_modules/.bin/escodegen.ps1 | 28 + node_modules/.bin/esgenerate | 12 + node_modules/.bin/esgenerate.cmd | 17 + node_modules/.bin/esgenerate.ps1 | 28 + node_modules/.bin/esparse | 12 + node_modules/.bin/esparse.cmd | 17 + node_modules/.bin/esparse.ps1 | 28 + node_modules/.bin/esvalidate | 12 + node_modules/.bin/esvalidate.cmd | 17 + node_modules/.bin/esvalidate.ps1 | 28 + node_modules/.bin/mkdirp | 12 + node_modules/.bin/mkdirp.cmd | 17 + node_modules/.bin/mkdirp.ps1 | 28 + node_modules/.bin/needle | 12 + node_modules/.bin/needle.cmd | 17 + node_modules/.bin/needle.ps1 | 28 + node_modules/.bin/node-pre-gyp | 12 + node_modules/.bin/node-pre-gyp.cmd | 17 + node_modules/.bin/node-pre-gyp.ps1 | 28 + node_modules/.bin/nopt | 12 + node_modules/.bin/nopt.cmd | 17 + node_modules/.bin/nopt.ps1 | 28 + node_modules/.bin/rc | 12 + node_modules/.bin/rc.cmd | 17 + node_modules/.bin/rc.ps1 | 28 + node_modules/.bin/rimraf | 12 + node_modules/.bin/rimraf.cmd | 17 + node_modules/.bin/rimraf.ps1 | 28 + node_modules/.bin/semver | 12 + node_modules/.bin/semver.cmd | 17 + node_modules/.bin/semver.ps1 | 28 + node_modules/.package-lock.json | 619 + .../@tootallnate/once/dist/index.d.ts | 14 + node_modules/@tootallnate/once/dist/index.js | 39 + .../@tootallnate/once/dist/index.js.map | 1 + node_modules/@tootallnate/once/package.json | 45 + node_modules/abab/CHANGELOG.md | 45 + node_modules/abab/LICENSE.md | 13 + node_modules/abab/README.md | 51 + node_modules/abab/index.d.ts | 2 + node_modules/abab/index.js | 9 + node_modules/abab/lib/atob.js | 97 + node_modules/abab/lib/btoa.js | 58 + node_modules/abab/package.json | 42 + node_modules/acorn-globals/LICENSE | 19 + node_modules/acorn-globals/README.md | 81 + node_modules/acorn-globals/index.js | 179 + .../acorn-globals/node_modules/.bin/acorn | 12 + .../acorn-globals/node_modules/.bin/acorn.cmd | 17 + .../acorn-globals/node_modules/.bin/acorn.ps1 | 28 + .../node_modules/acorn/CHANGELOG.md | 620 + .../acorn-globals/node_modules/acorn/LICENSE | 21 + .../node_modules/acorn/README.md | 269 + .../node_modules/acorn/bin/acorn | 4 + .../node_modules/acorn/dist/acorn.d.ts | 209 + .../node_modules/acorn/dist/acorn.js | 5186 +++++ .../node_modules/acorn/dist/acorn.js.map | 1 + .../node_modules/acorn/dist/acorn.mjs | 5155 +++++ .../node_modules/acorn/dist/acorn.mjs.d.ts | 2 + .../node_modules/acorn/dist/acorn.mjs.map | 1 + .../node_modules/acorn/dist/bin.js | 64 + .../node_modules/acorn/package.json | 35 + node_modules/acorn-globals/package.json | 35 + node_modules/acorn-walk/CHANGELOG.md | 131 + node_modules/acorn-walk/LICENSE | 19 + node_modules/acorn-walk/README.md | 126 + node_modules/acorn-walk/dist/walk.d.ts | 112 + node_modules/acorn-walk/dist/walk.js | 463 + node_modules/acorn-walk/dist/walk.js.map | 1 + node_modules/acorn-walk/dist/walk.mjs | 443 + node_modules/acorn-walk/dist/walk.mjs.map | 1 + node_modules/acorn-walk/package.json | 34 + node_modules/acorn/CHANGELOG.md | 732 + node_modules/acorn/LICENSE | 21 + node_modules/acorn/README.md | 276 + node_modules/acorn/bin/acorn | 4 + node_modules/acorn/dist/acorn.d.ts | 210 + node_modules/acorn/dist/acorn.js | 5515 +++++ node_modules/acorn/dist/acorn.mjs | 5484 +++++ node_modules/acorn/dist/acorn.mjs.d.ts | 2 + node_modules/acorn/dist/bin.js | 65 + node_modules/acorn/package.json | 46 + node_modules/agent-base/README.md | 145 + node_modules/agent-base/dist/src/index.d.ts | 78 + node_modules/agent-base/dist/src/index.js | 203 + node_modules/agent-base/dist/src/index.js.map | 1 + .../agent-base/dist/src/promisify.d.ts | 4 + node_modules/agent-base/dist/src/promisify.js | 18 + .../agent-base/dist/src/promisify.js.map | 1 + node_modules/agent-base/package.json | 64 + node_modules/agent-base/src/index.ts | 345 + node_modules/agent-base/src/promisify.ts | 33 + node_modules/asynckit/LICENSE | 21 + node_modules/asynckit/README.md | 233 + node_modules/asynckit/bench.js | 76 + node_modules/asynckit/index.js | 6 + node_modules/asynckit/lib/abort.js | 29 + node_modules/asynckit/lib/async.js | 34 + node_modules/asynckit/lib/defer.js | 26 + node_modules/asynckit/lib/iterate.js | 75 + .../asynckit/lib/readable_asynckit.js | 91 + .../asynckit/lib/readable_parallel.js | 25 + node_modules/asynckit/lib/readable_serial.js | 25 + .../asynckit/lib/readable_serial_ordered.js | 29 + node_modules/asynckit/lib/state.js | 37 + node_modules/asynckit/lib/streamify.js | 141 + node_modules/asynckit/lib/terminator.js | 29 + node_modules/asynckit/package.json | 63 + node_modules/asynckit/parallel.js | 43 + node_modules/asynckit/serial.js | 17 + node_modules/asynckit/serialOrdered.js | 75 + node_modules/asynckit/stream.js | 21 + node_modules/browser-process-hrtime/LICENSE | 9 + node_modules/browser-process-hrtime/README.md | 27 + .../browser-process-hrtime/index.d.ts | 4 + node_modules/browser-process-hrtime/index.js | 28 + .../browser-process-hrtime/package.json | 15 + node_modules/combined-stream/License | 19 + node_modules/combined-stream/Readme.md | 138 + .../combined-stream/lib/combined_stream.js | 208 + node_modules/combined-stream/package.json | 25 + node_modules/combined-stream/yarn.lock | 17 + node_modules/cssom/LICENSE.txt | 20 + node_modules/cssom/README.mdown | 67 + node_modules/cssom/lib/CSSDocumentRule.js | 39 + node_modules/cssom/lib/CSSFontFaceRule.js | 36 + node_modules/cssom/lib/CSSHostRule.js | 37 + node_modules/cssom/lib/CSSImportRule.js | 132 + node_modules/cssom/lib/CSSKeyframeRule.js | 37 + node_modules/cssom/lib/CSSKeyframesRule.js | 39 + node_modules/cssom/lib/CSSMediaRule.js | 41 + node_modules/cssom/lib/CSSOM.js | 3 + node_modules/cssom/lib/CSSRule.js | 43 + node_modules/cssom/lib/CSSStyleDeclaration.js | 148 + node_modules/cssom/lib/CSSStyleRule.js | 190 + node_modules/cssom/lib/CSSStyleSheet.js | 88 + node_modules/cssom/lib/CSSSupportsRule.js | 36 + node_modules/cssom/lib/CSSValue.js | 43 + node_modules/cssom/lib/CSSValueExpression.js | 344 + node_modules/cssom/lib/MatcherList.js | 62 + node_modules/cssom/lib/MediaList.js | 61 + node_modules/cssom/lib/StyleSheet.js | 17 + node_modules/cssom/lib/clone.js | 71 + node_modules/cssom/lib/index.js | 21 + node_modules/cssom/lib/parse.js | 463 + node_modules/cssom/package.json | 18 + node_modules/cssstyle/LICENSE | 20 + node_modules/cssstyle/README.md | 15 + .../cssstyle/lib/CSSStyleDeclaration.js | 260 + .../cssstyle/lib/CSSStyleDeclaration.test.js | 556 + .../cssstyle/lib/allExtraProperties.js | 67 + node_modules/cssstyle/lib/allProperties.js | 462 + .../cssstyle/lib/allWebkitProperties.js | 194 + node_modules/cssstyle/lib/constants.js | 6 + .../cssstyle/lib/implementedProperties.js | 90 + node_modules/cssstyle/lib/named_colors.json | 152 + node_modules/cssstyle/lib/parsers.js | 722 + node_modules/cssstyle/lib/parsers.test.js | 139 + node_modules/cssstyle/lib/properties.js | 1833 ++ .../cssstyle/lib/properties/azimuth.js | 67 + .../cssstyle/lib/properties/background.js | 19 + .../lib/properties/backgroundAttachment.js | 24 + .../lib/properties/backgroundColor.js | 36 + .../lib/properties/backgroundImage.js | 32 + .../lib/properties/backgroundPosition.js | 58 + .../lib/properties/backgroundRepeat.js | 32 + .../cssstyle/lib/properties/border.js | 33 + .../cssstyle/lib/properties/borderBottom.js | 17 + .../lib/properties/borderBottomColor.js | 16 + .../lib/properties/borderBottomStyle.js | 21 + .../lib/properties/borderBottomWidth.js | 16 + .../cssstyle/lib/properties/borderCollapse.js | 26 + .../cssstyle/lib/properties/borderColor.js | 30 + .../cssstyle/lib/properties/borderLeft.js | 17 + .../lib/properties/borderLeftColor.js | 16 + .../lib/properties/borderLeftStyle.js | 21 + .../lib/properties/borderLeftWidth.js | 16 + .../cssstyle/lib/properties/borderRight.js | 17 + .../lib/properties/borderRightColor.js | 16 + .../lib/properties/borderRightStyle.js | 21 + .../lib/properties/borderRightWidth.js | 16 + .../cssstyle/lib/properties/borderSpacing.js | 41 + .../cssstyle/lib/properties/borderStyle.js | 38 + .../cssstyle/lib/properties/borderTop.js | 17 + .../cssstyle/lib/properties/borderTopColor.js | 16 + .../cssstyle/lib/properties/borderTopStyle.js | 21 + .../cssstyle/lib/properties/borderTopWidth.js | 17 + .../cssstyle/lib/properties/borderWidth.js | 46 + .../cssstyle/lib/properties/bottom.js | 14 + node_modules/cssstyle/lib/properties/clear.js | 16 + node_modules/cssstyle/lib/properties/clip.js | 47 + node_modules/cssstyle/lib/properties/color.js | 14 + .../cssstyle/lib/properties/cssFloat.js | 12 + node_modules/cssstyle/lib/properties/flex.js | 45 + .../cssstyle/lib/properties/flexBasis.js | 28 + .../cssstyle/lib/properties/flexGrow.js | 19 + .../cssstyle/lib/properties/flexShrink.js | 19 + node_modules/cssstyle/lib/properties/float.js | 12 + .../cssstyle/lib/properties/floodColor.js | 14 + node_modules/cssstyle/lib/properties/font.js | 43 + .../cssstyle/lib/properties/fontFamily.js | 33 + .../cssstyle/lib/properties/fontSize.js | 38 + .../cssstyle/lib/properties/fontStyle.js | 18 + .../cssstyle/lib/properties/fontVariant.js | 18 + .../cssstyle/lib/properties/fontWeight.js | 33 + .../cssstyle/lib/properties/height.js | 24 + node_modules/cssstyle/lib/properties/left.js | 14 + .../cssstyle/lib/properties/lightingColor.js | 14 + .../cssstyle/lib/properties/lineHeight.js | 26 + .../cssstyle/lib/properties/margin.js | 68 + .../cssstyle/lib/properties/marginBottom.js | 13 + .../cssstyle/lib/properties/marginLeft.js | 13 + .../cssstyle/lib/properties/marginRight.js | 13 + .../cssstyle/lib/properties/marginTop.js | 13 + .../cssstyle/lib/properties/opacity.js | 14 + .../cssstyle/lib/properties/outlineColor.js | 14 + .../cssstyle/lib/properties/padding.js | 61 + .../cssstyle/lib/properties/paddingBottom.js | 13 + .../cssstyle/lib/properties/paddingLeft.js | 13 + .../cssstyle/lib/properties/paddingRight.js | 13 + .../cssstyle/lib/properties/paddingTop.js | 13 + node_modules/cssstyle/lib/properties/right.js | 14 + .../cssstyle/lib/properties/stopColor.js | 14 + .../lib/properties/textLineThroughColor.js | 14 + .../lib/properties/textOverlineColor.js | 14 + .../lib/properties/textUnderlineColor.js | 14 + node_modules/cssstyle/lib/properties/top.js | 14 + .../lib/properties/webkitBorderAfterColor.js | 14 + .../lib/properties/webkitBorderBeforeColor.js | 14 + .../lib/properties/webkitBorderEndColor.js | 14 + .../lib/properties/webkitBorderStartColor.js | 14 + .../lib/properties/webkitColumnRuleColor.js | 14 + .../webkitMatchNearestMailBlockquoteColor.js | 14 + .../lib/properties/webkitTapHighlightColor.js | 14 + .../lib/properties/webkitTextEmphasisColor.js | 14 + .../lib/properties/webkitTextFillColor.js | 14 + .../lib/properties/webkitTextStrokeColor.js | 14 + node_modules/cssstyle/lib/properties/width.js | 24 + node_modules/cssstyle/lib/utils/colorSpace.js | 21 + .../lib/utils/getBasicPropertyDescriptor.js | 14 + .../cssstyle/node_modules/cssom/LICENSE.txt | 20 + .../cssstyle/node_modules/cssom/README.mdown | 67 + .../node_modules/cssom/lib/CSSDocumentRule.js | 39 + .../node_modules/cssom/lib/CSSFontFaceRule.js | 36 + .../node_modules/cssom/lib/CSSHostRule.js | 37 + .../node_modules/cssom/lib/CSSImportRule.js | 132 + .../node_modules/cssom/lib/CSSKeyframeRule.js | 37 + .../cssom/lib/CSSKeyframesRule.js | 39 + .../node_modules/cssom/lib/CSSMediaRule.js | 41 + .../cssstyle/node_modules/cssom/lib/CSSOM.js | 3 + .../node_modules/cssom/lib/CSSRule.js | 43 + .../cssom/lib/CSSStyleDeclaration.js | 148 + .../node_modules/cssom/lib/CSSStyleRule.js | 190 + .../node_modules/cssom/lib/CSSStyleSheet.js | 88 + .../node_modules/cssom/lib/CSSSupportsRule.js | 36 + .../node_modules/cssom/lib/CSSValue.js | 43 + .../cssom/lib/CSSValueExpression.js | 344 + .../node_modules/cssom/lib/MatcherList.js | 62 + .../node_modules/cssom/lib/MediaList.js | 61 + .../node_modules/cssom/lib/StyleSheet.js | 17 + .../cssstyle/node_modules/cssom/lib/clone.js | 82 + .../cssstyle/node_modules/cssom/lib/index.js | 21 + .../cssstyle/node_modules/cssom/lib/parse.js | 464 + .../cssstyle/node_modules/cssom/package.json | 18 + node_modules/cssstyle/package.json | 72 + node_modules/data-urls/LICENSE.txt | 7 + node_modules/data-urls/README.md | 64 + node_modules/data-urls/lib/parser.js | 74 + node_modules/data-urls/lib/utils.js | 23 + node_modules/data-urls/package.json | 53 + node_modules/debug/LICENSE | 19 + node_modules/debug/README.md | 455 + node_modules/debug/package.json | 59 + node_modules/debug/src/browser.js | 269 + node_modules/debug/src/common.js | 261 + node_modules/debug/src/index.js | 10 + node_modules/debug/src/node.js | 263 + node_modules/decimal.js/CHANGELOG.md | 213 + node_modules/decimal.js/LICENCE.md | 23 + node_modules/decimal.js/README.md | 244 + node_modules/decimal.js/decimal.d.ts | 295 + node_modules/decimal.js/decimal.global.d.ts | 316 + node_modules/decimal.js/decimal.js | 4877 +++++ node_modules/decimal.js/decimal.min.js | 2 + node_modules/decimal.js/decimal.min.js.map | 1 + node_modules/decimal.js/decimal.mjs | 4841 +++++ node_modules/decimal.js/doc/API.html | 2686 +++ node_modules/decimal.js/package.json | 36 + node_modules/deep-is/.npmignore | 1 + node_modules/deep-is/.travis.yml | 6 + node_modules/deep-is/LICENSE | 22 + node_modules/deep-is/README.markdown | 70 + node_modules/deep-is/example/cmp.js | 11 + node_modules/deep-is/index.js | 102 + node_modules/deep-is/package.json | 61 + node_modules/deep-is/test/NaN.js | 16 + node_modules/deep-is/test/cmp.js | 23 + node_modules/deep-is/test/neg-vs-pos-0.js | 15 + node_modules/delayed-stream/.npmignore | 1 + node_modules/delayed-stream/License | 19 + node_modules/delayed-stream/Makefile | 7 + node_modules/delayed-stream/Readme.md | 141 + .../delayed-stream/lib/delayed_stream.js | 107 + node_modules/delayed-stream/package.json | 27 + node_modules/domexception/LICENSE.txt | 21 + node_modules/domexception/README.md | 31 + node_modules/domexception/index.js | 7 + .../domexception/lib/DOMException-impl.js | 22 + node_modules/domexception/lib/DOMException.js | 205 + .../domexception/lib/legacy-error-codes.json | 27 + node_modules/domexception/lib/utils.js | 115 + .../webidl-conversions/LICENSE.md | 12 + .../node_modules/webidl-conversions/README.md | 79 + .../webidl-conversions/lib/index.js | 361 + .../webidl-conversions/package.json | 30 + node_modules/domexception/package.json | 42 + .../domexception/webidl2js-wrapper.js | 15 + node_modules/escodegen/LICENSE.BSD | 21 + node_modules/escodegen/README.md | 84 + node_modules/escodegen/bin/escodegen.js | 77 + node_modules/escodegen/bin/esgenerate.js | 64 + node_modules/escodegen/escodegen.js | 2647 +++ node_modules/escodegen/package.json | 62 + node_modules/esprima/ChangeLog | 235 + node_modules/esprima/LICENSE.BSD | 21 + node_modules/esprima/README.md | 46 + node_modules/esprima/bin/esparse.js | 139 + node_modules/esprima/bin/esvalidate.js | 236 + node_modules/esprima/dist/esprima.js | 6709 ++++++ node_modules/esprima/package.json | 112 + node_modules/estraverse/.jshintrc | 16 + node_modules/estraverse/LICENSE.BSD | 19 + node_modules/estraverse/README.md | 153 + node_modules/estraverse/estraverse.js | 801 + node_modules/estraverse/gulpfile.js | 70 + node_modules/estraverse/package.json | 40 + node_modules/esutils/LICENSE.BSD | 19 + node_modules/esutils/README.md | 174 + node_modules/esutils/lib/ast.js | 144 + node_modules/esutils/lib/code.js | 135 + node_modules/esutils/lib/keyword.js | 165 + node_modules/esutils/lib/utils.js | 33 + node_modules/esutils/package.json | 44 + node_modules/fast-levenshtein/LICENSE.md | 25 + node_modules/fast-levenshtein/README.md | 104 + node_modules/fast-levenshtein/levenshtein.js | 136 + node_modules/fast-levenshtein/package.json | 39 + node_modules/form-data/License | 19 + node_modules/form-data/README.md.bak | 356 + node_modules/form-data/Readme.md | 356 + node_modules/form-data/index.d.ts | 62 + node_modules/form-data/lib/browser.js | 2 + node_modules/form-data/lib/form_data.js | 498 + node_modules/form-data/lib/populate.js | 10 + node_modules/form-data/package.json | 68 + .../html-encoding-sniffer/LICENSE.txt | 7 + node_modules/html-encoding-sniffer/README.md | 38 + .../lib/html-encoding-sniffer.js | 295 + .../html-encoding-sniffer/package.json | 30 + node_modules/http-proxy-agent/README.md | 74 + node_modules/http-proxy-agent/dist/agent.d.ts | 32 + node_modules/http-proxy-agent/dist/agent.js | 145 + .../http-proxy-agent/dist/agent.js.map | 1 + node_modules/http-proxy-agent/dist/index.d.ts | 21 + node_modules/http-proxy-agent/dist/index.js | 14 + .../http-proxy-agent/dist/index.js.map | 1 + node_modules/http-proxy-agent/package.json | 57 + node_modules/https-proxy-agent/README.md | 137 + .../https-proxy-agent/dist/agent.d.ts | 30 + node_modules/https-proxy-agent/dist/agent.js | 180 + .../https-proxy-agent/dist/agent.js.map | 1 + .../https-proxy-agent/dist/index.d.ts | 23 + node_modules/https-proxy-agent/dist/index.js | 14 + .../https-proxy-agent/dist/index.js.map | 1 + .../dist/parse-proxy-response.d.ts | 7 + .../dist/parse-proxy-response.js | 66 + .../dist/parse-proxy-response.js.map | 1 + node_modules/https-proxy-agent/package.json | 56 + node_modules/iconv-lite/Changelog.md | 162 + node_modules/iconv-lite/LICENSE | 21 + node_modules/iconv-lite/README.md | 156 + .../iconv-lite/encodings/dbcs-codec.js | 555 + .../iconv-lite/encodings/dbcs-data.js | 176 + node_modules/iconv-lite/encodings/index.js | 22 + node_modules/iconv-lite/encodings/internal.js | 188 + .../iconv-lite/encodings/sbcs-codec.js | 72 + .../encodings/sbcs-data-generated.js | 451 + .../iconv-lite/encodings/sbcs-data.js | 174 + .../encodings/tables/big5-added.json | 122 + .../iconv-lite/encodings/tables/cp936.json | 264 + .../iconv-lite/encodings/tables/cp949.json | 273 + .../iconv-lite/encodings/tables/cp950.json | 177 + .../iconv-lite/encodings/tables/eucjp.json | 182 + .../encodings/tables/gb18030-ranges.json | 1 + .../encodings/tables/gbk-added.json | 55 + .../iconv-lite/encodings/tables/shiftjis.json | 125 + node_modules/iconv-lite/encodings/utf16.js | 177 + node_modules/iconv-lite/encodings/utf7.js | 290 + node_modules/iconv-lite/lib/bom-handling.js | 52 + node_modules/iconv-lite/lib/extend-node.js | 217 + node_modules/iconv-lite/lib/index.d.ts | 24 + node_modules/iconv-lite/lib/index.js | 153 + node_modules/iconv-lite/lib/streams.js | 121 + node_modules/iconv-lite/package.json | 46 + .../LICENSE-MIT.txt | 20 + .../README.md | 40 + .../is-potential-custom-element-name/index.js | 9 + .../package.json | 35 + node_modules/jsdom/Changelog.md | 1879 ++ node_modules/jsdom/LICENSE.txt | 22 + node_modules/jsdom/README.md | 522 + node_modules/jsdom/lib/api.js | 333 + .../jsdom/lib/jsdom/browser/Window.js | 933 + .../lib/jsdom/browser/default-stylesheet.js | 789 + .../jsdom/lib/jsdom/browser/js-globals.json | 307 + .../lib/jsdom/browser/not-implemented.js | 13 + .../jsdom/lib/jsdom/browser/parser/html.js | 223 + .../jsdom/lib/jsdom/browser/parser/index.js | 37 + .../jsdom/lib/jsdom/browser/parser/xml.js | 202 + .../browser/resources/async-resource-queue.js | 114 + .../resources/no-op-resource-loader.js | 8 + .../resources/per-document-resource-loader.js | 95 + .../browser/resources/request-manager.js | 33 + .../browser/resources/resource-loader.js | 142 + .../jsdom/browser/resources/resource-queue.js | 142 + node_modules/jsdom/lib/jsdom/level2/style.js | 57 + node_modules/jsdom/lib/jsdom/level3/xpath.js | 1874 ++ .../living/aborting/AbortController-impl.js | 17 + .../jsdom/living/aborting/AbortSignal-impl.js | 48 + .../jsdom/lib/jsdom/living/attributes.js | 312 + .../lib/jsdom/living/attributes/Attr-impl.js | 60 + .../living/attributes/NamedNodeMap-impl.js | 78 + .../DefaultConstraintValidation-impl.js | 75 + .../ValidityState-impl.js | 66 + .../jsdom/living/cssom/StyleSheetList-impl.js | 38 + .../CustomElementRegistry-impl.js | 265 + .../jsdom/lib/jsdom/living/documents.js | 15 + .../jsdom/living/domparsing/DOMParser-impl.js | 58 + .../jsdom/living/domparsing/InnerHTML-impl.js | 29 + .../living/domparsing/XMLSerializer-impl.js | 18 + .../parse5-adapter-serialization.js | 63 + .../jsdom/living/domparsing/serialization.js | 45 + .../jsdom/living/events/CloseEvent-impl.js | 10 + .../living/events/CompositionEvent-impl.js | 20 + .../jsdom/living/events/CustomEvent-impl.js | 21 + .../jsdom/living/events/ErrorEvent-impl.js | 14 + .../lib/jsdom/living/events/Event-impl.js | 197 + .../living/events/EventModifierMixin-impl.js | 18 + .../jsdom/living/events/EventTarget-impl.js | 403 + .../jsdom/living/events/FocusEvent-impl.js | 9 + .../living/events/HashChangeEvent-impl.js | 14 + .../jsdom/living/events/InputEvent-impl.js | 11 + .../jsdom/living/events/KeyboardEvent-impl.js | 29 + .../jsdom/living/events/MessageEvent-impl.js | 25 + .../jsdom/living/events/MouseEvent-impl.js | 49 + .../living/events/PageTransitionEvent-impl.js | 20 + .../jsdom/living/events/PopStateEvent-impl.js | 9 + .../jsdom/living/events/ProgressEvent-impl.js | 14 + .../jsdom/living/events/StorageEvent-impl.js | 26 + .../jsdom/living/events/TouchEvent-impl.js | 14 + .../lib/jsdom/living/events/UIEvent-impl.js | 59 + .../jsdom/living/events/WheelEvent-impl.js | 12 + .../lib/jsdom/living/fetch/Headers-impl.js | 165 + .../lib/jsdom/living/fetch/header-list.js | 54 + .../lib/jsdom/living/fetch/header-types.js | 103 + .../lib/jsdom/living/file-api/Blob-impl.js | 93 + .../lib/jsdom/living/file-api/File-impl.js | 12 + .../jsdom/living/file-api/FileList-impl.js | 15 + .../jsdom/living/file-api/FileReader-impl.js | 130 + .../jsdom/living/generated/AbortController.js | 130 + .../lib/jsdom/living/generated/AbortSignal.js | 154 + .../jsdom/living/generated/AbstractRange.js | 162 + .../generated/AddEventListenerOptions.js | 44 + .../living/generated/AssignedNodesOptions.js | 28 + .../jsdom/lib/jsdom/living/generated/Attr.js | 215 + .../lib/jsdom/living/generated/BarProp.js | 118 + .../lib/jsdom/living/generated/BinaryType.js | 12 + .../jsdom/lib/jsdom/living/generated/Blob.js | 198 + .../jsdom/living/generated/BlobCallback.js | 34 + .../jsdom/living/generated/BlobPropertyBag.js | 42 + .../jsdom/living/generated/CDATASection.js | 114 + .../living/generated/CanPlayTypeResult.js | 12 + .../jsdom/living/generated/CharacterData.js | 436 + .../lib/jsdom/living/generated/CloseEvent.js | 164 + .../jsdom/living/generated/CloseEventInit.js | 56 + .../lib/jsdom/living/generated/Comment.js | 122 + .../living/generated/CompositionEvent.js | 217 + .../living/generated/CompositionEventInit.js | 32 + .../generated/CustomElementConstructor.js | 38 + .../living/generated/CustomElementRegistry.js | 242 + .../lib/jsdom/living/generated/CustomEvent.js | 200 + .../jsdom/living/generated/CustomEventInit.js | 32 + .../living/generated/DOMImplementation.js | 232 + .../lib/jsdom/living/generated/DOMParser.js | 140 + .../jsdom/living/generated/DOMStringMap.js | 322 + .../jsdom/living/generated/DOMTokenList.js | 531 + .../lib/jsdom/living/generated/Document.js | 3322 +++ .../living/generated/DocumentFragment.js | 325 + .../living/generated/DocumentReadyState.js | 12 + .../jsdom/living/generated/DocumentType.js | 246 + .../lib/jsdom/living/generated/Element.js | 1609 ++ .../generated/ElementCreationOptions.js | 26 + .../generated/ElementDefinitionOptions.js | 26 + .../lib/jsdom/living/generated/EndingType.js | 12 + .../lib/jsdom/living/generated/ErrorEvent.js | 186 + .../jsdom/living/generated/ErrorEventInit.js | 80 + .../jsdom/lib/jsdom/living/generated/Event.js | 390 + .../living/generated/EventHandlerNonNull.js | 40 + .../lib/jsdom/living/generated/EventInit.js | 52 + .../jsdom/living/generated/EventListener.js | 35 + .../living/generated/EventListenerOptions.js | 28 + .../living/generated/EventModifierInit.js | 188 + .../lib/jsdom/living/generated/EventTarget.js | 252 + .../lib/jsdom/living/generated/External.js | 129 + .../jsdom/lib/jsdom/living/generated/File.js | 176 + .../lib/jsdom/living/generated/FileList.js | 305 + .../jsdom/living/generated/FilePropertyBag.js | 30 + .../lib/jsdom/living/generated/FileReader.js | 440 + .../lib/jsdom/living/generated/FocusEvent.js | 142 + .../jsdom/living/generated/FocusEventInit.js | 36 + .../lib/jsdom/living/generated/FormData.js | 421 + .../lib/jsdom/living/generated/Function.js | 46 + .../living/generated/GetRootNodeOptions.js | 28 + .../living/generated/HTMLAnchorElement.js | 915 + .../jsdom/living/generated/HTMLAreaElement.js | 739 + .../living/generated/HTMLAudioElement.js | 115 + .../jsdom/living/generated/HTMLBRElement.js | 153 + .../jsdom/living/generated/HTMLBaseElement.js | 188 + .../jsdom/living/generated/HTMLBodyElement.js | 808 + .../living/generated/HTMLButtonElement.js | 487 + .../living/generated/HTMLCanvasElement.js | 291 + .../jsdom/living/generated/HTMLCollection.js | 358 + .../living/generated/HTMLDListElement.js | 156 + .../jsdom/living/generated/HTMLDataElement.js | 153 + .../living/generated/HTMLDataListElement.js | 128 + .../living/generated/HTMLDetailsElement.js | 156 + .../living/generated/HTMLDialogElement.js | 156 + .../living/generated/HTMLDirectoryElement.js | 156 + .../jsdom/living/generated/HTMLDivElement.js | 153 + .../lib/jsdom/living/generated/HTMLElement.js | 2269 ++ .../living/generated/HTMLEmbedElement.js | 346 + .../living/generated/HTMLFieldSetElement.js | 315 + .../jsdom/living/generated/HTMLFontElement.js | 226 + .../jsdom/living/generated/HTMLFormElement.js | 457 + .../living/generated/HTMLFrameElement.js | 459 + .../living/generated/HTMLFrameSetElement.js | 683 + .../jsdom/living/generated/HTMLHRElement.js | 300 + .../jsdom/living/generated/HTMLHeadElement.js | 115 + .../living/generated/HTMLHeadingElement.js | 153 + .../jsdom/living/generated/HTMLHtmlElement.js | 153 + .../living/generated/HTMLIFrameElement.js | 621 + .../living/generated/HTMLImageElement.js | 789 + .../living/generated/HTMLInputElement.js | 1696 ++ .../jsdom/living/generated/HTMLLIElement.js | 194 + .../living/generated/HTMLLabelElement.js | 175 + .../living/generated/HTMLLegendElement.js | 164 + .../jsdom/living/generated/HTMLLinkElement.js | 496 + .../jsdom/living/generated/HTMLMapElement.js | 166 + .../living/generated/HTMLMarqueeElement.js | 509 + .../living/generated/HTMLMediaElement.js | 802 + .../jsdom/living/generated/HTMLMenuElement.js | 156 + .../jsdom/living/generated/HTMLMetaElement.js | 261 + .../living/generated/HTMLMeterElement.js | 338 + .../jsdom/living/generated/HTMLModElement.js | 202 + .../living/generated/HTMLOListElement.js | 266 + .../living/generated/HTMLObjectElement.js | 839 + .../living/generated/HTMLOptGroupElement.js | 192 + .../living/generated/HTMLOptionElement.js | 351 + .../living/generated/HTMLOptionsCollection.js | 533 + .../living/generated/HTMLOutputElement.js | 371 + .../living/generated/HTMLParagraphElement.js | 153 + .../living/generated/HTMLParamElement.js | 261 + .../living/generated/HTMLPictureElement.js | 115 + .../jsdom/living/generated/HTMLPreElement.js | 158 + .../living/generated/HTMLProgressElement.js | 209 + .../living/generated/HTMLQuoteElement.js | 166 + .../living/generated/HTMLScriptElement.js | 424 + .../living/generated/HTMLSelectElement.js | 957 + .../jsdom/living/generated/HTMLSlotElement.js | 188 + .../living/generated/HTMLSourceElement.js | 310 + .../jsdom/living/generated/HTMLSpanElement.js | 115 + .../living/generated/HTMLStyleElement.js | 200 + .../generated/HTMLTableCaptionElement.js | 153 + .../living/generated/HTMLTableCellElement.js | 635 + .../living/generated/HTMLTableColElement.js | 339 + .../living/generated/HTMLTableElement.js | 725 + .../living/generated/HTMLTableRowElement.js | 386 + .../generated/HTMLTableSectionElement.js | 329 + .../living/generated/HTMLTemplateElement.js | 126 + .../living/generated/HTMLTextAreaElement.js | 1088 + .../jsdom/living/generated/HTMLTimeElement.js | 153 + .../living/generated/HTMLTitleElement.js | 152 + .../living/generated/HTMLTrackElement.js | 334 + .../living/generated/HTMLUListElement.js | 192 + .../living/generated/HTMLUnknownElement.js | 114 + .../living/generated/HTMLVideoElement.js | 310 + .../jsdom/living/generated/HashChangeEvent.js | 153 + .../living/generated/HashChangeEventInit.js | 44 + .../lib/jsdom/living/generated/Headers.js | 379 + .../lib/jsdom/living/generated/History.js | 256 + .../lib/jsdom/living/generated/InputEvent.js | 164 + .../jsdom/living/generated/InputEventInit.js | 59 + .../jsdom/living/generated/KeyboardEvent.js | 413 + .../living/generated/KeyboardEventInit.js | 104 + .../lib/jsdom/living/generated/Location.js | 370 + .../jsdom/living/generated/MessageEvent.js | 301 + .../living/generated/MessageEventInit.js | 94 + .../lib/jsdom/living/generated/MimeType.js | 151 + .../jsdom/living/generated/MimeTypeArray.js | 330 + .../lib/jsdom/living/generated/MouseEvent.js | 463 + .../jsdom/living/generated/MouseEventInit.js | 108 + .../living/generated/MutationCallback.js | 38 + .../living/generated/MutationObserver.js | 171 + .../living/generated/MutationObserverInit.js | 103 + .../jsdom/living/generated/MutationRecord.js | 216 + .../jsdom/living/generated/NamedNodeMap.js | 522 + .../lib/jsdom/living/generated/Navigator.js | 297 + .../jsdom/lib/jsdom/living/generated/Node.js | 736 + .../lib/jsdom/living/generated/NodeFilter.js | 74 + .../jsdom/living/generated/NodeIterator.js | 196 + .../lib/jsdom/living/generated/NodeList.js | 309 + .../OnBeforeUnloadEventHandlerNonNull.js | 46 + .../generated/OnErrorEventHandlerNonNull.js | 60 + .../living/generated/PageTransitionEvent.js | 146 + .../generated/PageTransitionEventInit.js | 32 + .../lib/jsdom/living/generated/Performance.js | 145 + .../lib/jsdom/living/generated/Plugin.js | 361 + .../lib/jsdom/living/generated/PluginArray.js | 340 + .../jsdom/living/generated/PopStateEvent.js | 142 + .../living/generated/PopStateEventInit.js | 32 + .../living/generated/ProcessingInstruction.js | 125 + .../jsdom/living/generated/ProgressEvent.js | 166 + .../living/generated/ProgressEventInit.js | 56 + .../jsdom/lib/jsdom/living/generated/Range.js | 619 + .../living/generated/SVGAnimatedString.js | 143 + .../living/generated/SVGBoundingBoxOptions.js | 64 + .../lib/jsdom/living/generated/SVGElement.js | 1986 ++ .../living/generated/SVGGraphicsElement.js | 144 + .../lib/jsdom/living/generated/SVGNumber.js | 130 + .../jsdom/living/generated/SVGSVGElement.js | 681 + .../jsdom/living/generated/SVGStringList.js | 504 + .../jsdom/living/generated/SVGTitleElement.js | 114 + .../lib/jsdom/living/generated/Screen.js | 173 + .../jsdom/living/generated/ScrollBehavior.js | 12 + .../living/generated/ScrollIntoViewOptions.js | 45 + .../living/generated/ScrollLogicalPosition.js | 12 + .../jsdom/living/generated/ScrollOptions.js | 30 + .../living/generated/ScrollRestoration.js | 12 + .../lib/jsdom/living/generated/Selection.js | 527 + .../jsdom/living/generated/SelectionMode.js | 12 + .../lib/jsdom/living/generated/ShadowRoot.js | 185 + .../jsdom/living/generated/ShadowRootInit.js | 30 + .../jsdom/living/generated/ShadowRootMode.js | 12 + .../lib/jsdom/living/generated/StaticRange.js | 126 + .../jsdom/living/generated/StaticRangeInit.js | 66 + .../lib/jsdom/living/generated/Storage.js | 389 + .../jsdom/living/generated/StorageEvent.js | 305 + .../living/generated/StorageEventInit.js | 93 + .../jsdom/living/generated/StyleSheetList.js | 307 + .../jsdom/living/generated/SupportedType.js | 18 + .../jsdom/lib/jsdom/living/generated/Text.js | 169 + .../jsdom/living/generated/TextTrackKind.js | 12 + .../lib/jsdom/living/generated/TouchEvent.js | 208 + .../jsdom/living/generated/TouchEventInit.js | 89 + .../lib/jsdom/living/generated/TreeWalker.js | 236 + .../lib/jsdom/living/generated/UIEvent.js | 235 + .../lib/jsdom/living/generated/UIEventInit.js | 59 + .../jsdom/living/generated/ValidityState.js | 228 + .../jsdom/living/generated/VisibilityState.js | 12 + .../jsdom/living/generated/VoidFunction.js | 30 + .../lib/jsdom/living/generated/WebSocket.js | 444 + .../lib/jsdom/living/generated/WheelEvent.js | 183 + .../jsdom/living/generated/WheelEventInit.js | 68 + .../lib/jsdom/living/generated/XMLDocument.js | 114 + .../jsdom/living/generated/XMLHttpRequest.js | 617 + .../generated/XMLHttpRequestEventTarget.js | 341 + .../generated/XMLHttpRequestResponseType.js | 12 + .../living/generated/XMLHttpRequestUpload.js | 114 + .../jsdom/living/generated/XMLSerializer.js | 133 + .../jsdom/lib/jsdom/living/generated/utils.js | 141 + .../lib/jsdom/living/helpers/agent-factory.js | 15 + .../lib/jsdom/living/helpers/binary-data.js | 9 + .../jsdom/living/helpers/create-element.js | 320 + .../living/helpers/create-event-accessor.js | 188 + .../jsdom/living/helpers/custom-elements.js | 270 + .../jsdom/living/helpers/dates-and-times.js | 270 + .../jsdom/lib/jsdom/living/helpers/details.js | 15 + .../jsdom/living/helpers/document-base-url.js | 54 + .../jsdom/lib/jsdom/living/helpers/events.js | 24 + .../lib/jsdom/living/helpers/focusing.js | 104 + .../lib/jsdom/living/helpers/form-controls.js | 313 + .../jsdom/living/helpers/html-constructor.js | 78 + .../lib/jsdom/living/helpers/http-request.js | 254 + .../living/helpers/internal-constants.js | 12 + .../jsdom/living/helpers/iterable-weak-set.js | 48 + .../jsdom/lib/jsdom/living/helpers/json.js | 12 + .../living/helpers/mutation-observers.js | 198 + .../lib/jsdom/living/helpers/namespaces.js | 15 + .../jsdom/lib/jsdom/living/helpers/node.js | 68 + .../living/helpers/number-and-date-inputs.js | 195 + .../lib/jsdom/living/helpers/ordered-set.js | 104 + .../living/helpers/runtime-script-errors.js | 76 + .../lib/jsdom/living/helpers/selectors.js | 47 + .../lib/jsdom/living/helpers/shadow-dom.js | 285 + .../jsdom/lib/jsdom/living/helpers/strings.js | 148 + .../lib/jsdom/living/helpers/style-rules.js | 110 + .../lib/jsdom/living/helpers/stylesheets.js | 113 + .../jsdom/living/helpers/svg/basic-types.js | 41 + .../lib/jsdom/living/helpers/svg/render.js | 46 + .../jsdom/lib/jsdom/living/helpers/text.js | 19 + .../lib/jsdom/living/helpers/traversal.js | 72 + .../jsdom/living/helpers/validate-names.js | 75 + .../jsdom/living/hr-time/Performance-impl.js | 25 + .../jsdom/lib/jsdom/living/interfaces.js | 217 + .../MutationObserver-impl.js | 95 + .../mutation-observer/MutationRecord-impl.js | 37 + .../jsdom/living/named-properties-window.js | 141 + .../jsdom/living/navigator/MimeType-impl.js | 3 + .../living/navigator/MimeTypeArray-impl.js | 21 + .../jsdom/living/navigator/Navigator-impl.js | 29 + .../NavigatorConcurrentHardware-impl.js | 8 + .../living/navigator/NavigatorCookies-impl.js | 7 + .../living/navigator/NavigatorID-impl.js | 37 + .../navigator/NavigatorLanguage-impl.js | 9 + .../living/navigator/NavigatorOnLine-impl.js | 7 + .../living/navigator/NavigatorPlugins-impl.js | 8 + .../lib/jsdom/living/navigator/Plugin-impl.js | 3 + .../living/navigator/PluginArray-impl.js | 23 + .../jsdom/living/node-document-position.js | 10 + .../jsdom/lib/jsdom/living/node-type.js | 16 + node_modules/jsdom/lib/jsdom/living/node.js | 331 + .../jsdom/living/nodes/CDATASection-impl.js | 16 + .../jsdom/living/nodes/CharacterData-impl.js | 118 + .../lib/jsdom/living/nodes/ChildNode-impl.js | 80 + .../lib/jsdom/living/nodes/Comment-impl.js | 20 + .../living/nodes/DOMImplementation-impl.js | 120 + .../jsdom/living/nodes/DOMStringMap-impl.js | 64 + .../jsdom/living/nodes/DOMTokenList-impl.js | 171 + .../lib/jsdom/living/nodes/Document-impl.js | 946 + .../living/nodes/DocumentFragment-impl.js | 44 + .../living/nodes/DocumentOrShadowRoot-impl.js | 28 + .../jsdom/living/nodes/DocumentType-impl.js | 24 + .../lib/jsdom/living/nodes/Element-impl.js | 576 + .../nodes/ElementCSSInlineStyle-impl.js | 25 + .../nodes/ElementContentEditable-impl.js | 7 + .../living/nodes/GlobalEventHandlers-impl.js | 95 + .../living/nodes/HTMLAnchorElement-impl.js | 50 + .../living/nodes/HTMLAreaElement-impl.js | 43 + .../living/nodes/HTMLAudioElement-impl.js | 9 + .../jsdom/living/nodes/HTMLBRElement-impl.js | 9 + .../living/nodes/HTMLBaseElement-impl.js | 27 + .../living/nodes/HTMLBodyElement-impl.js | 17 + .../living/nodes/HTMLButtonElement-impl.js | 79 + .../living/nodes/HTMLCanvasElement-impl.js | 130 + .../jsdom/living/nodes/HTMLCollection-impl.js | 96 + .../living/nodes/HTMLDListElement-impl.js | 9 + .../living/nodes/HTMLDataElement-impl.js | 9 + .../living/nodes/HTMLDataListElement-impl.js | 20 + .../living/nodes/HTMLDetailsElement-impl.js | 35 + .../living/nodes/HTMLDialogElement-impl.js | 9 + .../living/nodes/HTMLDirectoryElement-impl.js | 9 + .../jsdom/living/nodes/HTMLDivElement-impl.js | 9 + .../jsdom/living/nodes/HTMLElement-impl.js | 160 + .../living/nodes/HTMLEmbedElement-impl.js | 8 + .../living/nodes/HTMLFieldSetElement-impl.js | 43 + .../living/nodes/HTMLFontElement-impl.js | 9 + .../living/nodes/HTMLFormElement-impl.js | 226 + .../living/nodes/HTMLFrameElement-impl.js | 261 + .../living/nodes/HTMLFrameSetElement-impl.js | 17 + .../jsdom/living/nodes/HTMLHRElement-impl.js | 9 + .../living/nodes/HTMLHeadElement-impl.js | 9 + .../living/nodes/HTMLHeadingElement-impl.js | 9 + .../living/nodes/HTMLHtmlElement-impl.js | 9 + .../nodes/HTMLHyperlinkElementUtils-impl.js | 371 + .../living/nodes/HTMLIFrameElement-impl.js | 9 + .../living/nodes/HTMLImageElement-impl.js | 132 + .../living/nodes/HTMLInputElement-impl.js | 1128 + .../jsdom/living/nodes/HTMLLIElement-impl.js | 9 + .../living/nodes/HTMLLabelElement-impl.js | 94 + .../living/nodes/HTMLLegendElement-impl.js | 18 + .../living/nodes/HTMLLinkElement-impl.js | 101 + .../jsdom/living/nodes/HTMLMapElement-impl.js | 13 + .../living/nodes/HTMLMarqueeElement-impl.js | 9 + .../living/nodes/HTMLMediaElement-impl.js | 138 + .../living/nodes/HTMLMenuElement-impl.js | 9 + .../living/nodes/HTMLMetaElement-impl.js | 9 + .../living/nodes/HTMLMeterElement-impl.js | 180 + .../jsdom/living/nodes/HTMLModElement-impl.js | 9 + .../living/nodes/HTMLOListElement-impl.js | 22 + .../living/nodes/HTMLObjectElement-impl.js | 26 + .../living/nodes/HTMLOptGroupElement-impl.js | 9 + .../living/nodes/HTMLOptionElement-impl.js | 146 + .../nodes/HTMLOptionsCollection-impl.js | 110 + .../living/nodes/HTMLOrSVGElement-impl.js | 85 + .../living/nodes/HTMLOutputElement-impl.js | 88 + .../living/nodes/HTMLParagraphElement-impl.js | 9 + .../living/nodes/HTMLParamElement-impl.js | 9 + .../living/nodes/HTMLPictureElement-impl.js | 9 + .../jsdom/living/nodes/HTMLPreElement-impl.js | 9 + .../living/nodes/HTMLProgressElement-impl.js | 74 + .../living/nodes/HTMLQuoteElement-impl.js | 9 + .../living/nodes/HTMLScriptElement-impl.js | 265 + .../living/nodes/HTMLSelectElement-impl.js | 283 + .../living/nodes/HTMLSlotElement-impl.js | 59 + .../living/nodes/HTMLSourceElement-impl.js | 8 + .../living/nodes/HTMLSpanElement-impl.js | 9 + .../living/nodes/HTMLStyleElement-impl.js | 74 + .../nodes/HTMLTableCaptionElement-impl.js | 9 + .../living/nodes/HTMLTableCellElement-impl.js | 73 + .../living/nodes/HTMLTableColElement-impl.js | 9 + .../living/nodes/HTMLTableElement-impl.js | 236 + .../living/nodes/HTMLTableRowElement-impl.js | 88 + .../nodes/HTMLTableSectionElement-impl.js | 61 + .../living/nodes/HTMLTemplateElement-impl.js | 67 + .../living/nodes/HTMLTextAreaElement-impl.js | 244 + .../living/nodes/HTMLTimeElement-impl.js | 9 + .../living/nodes/HTMLTitleElement-impl.js | 18 + .../living/nodes/HTMLTrackElement-impl.js | 13 + .../living/nodes/HTMLUListElement-impl.js | 9 + .../living/nodes/HTMLUnknownElement-impl.js | 9 + .../living/nodes/HTMLVideoElement-impl.js | 17 + .../lib/jsdom/living/nodes/LinkStyle-impl.js | 2 + .../jsdom/lib/jsdom/living/nodes/Node-impl.js | 1165 ++ .../lib/jsdom/living/nodes/NodeList-impl.js | 43 + .../nodes/NonDocumentTypeChildNode-impl.js | 28 + .../living/nodes/NonElementParentNode-impl.js | 11 + .../lib/jsdom/living/nodes/ParentNode-impl.js | 91 + .../nodes/ProcessingInstruction-impl.js | 22 + .../lib/jsdom/living/nodes/SVGElement-impl.js | 64 + .../living/nodes/SVGGraphicsElement-impl.js | 16 + .../jsdom/living/nodes/SVGSVGElement-impl.js | 42 + .../lib/jsdom/living/nodes/SVGTests-impl.js | 42 + .../living/nodes/SVGTitleElement-impl.js | 9 + .../lib/jsdom/living/nodes/ShadowRoot-impl.js | 40 + .../lib/jsdom/living/nodes/Slotable-impl.js | 48 + .../jsdom/lib/jsdom/living/nodes/Text-impl.js | 96 + .../living/nodes/WindowEventHandlers-impl.js | 52 + .../jsdom/living/nodes/XMLDocument-impl.js | 4 + .../jsdom/lib/jsdom/living/post-message.js | 39 + .../jsdom/living/range/AbstractRange-impl.js | 43 + .../lib/jsdom/living/range/Range-impl.js | 889 + .../jsdom/living/range/StaticRange-impl.js | 39 + .../lib/jsdom/living/range/boundary-point.js | 47 + .../jsdom/living/selection/Selection-impl.js | 342 + .../living/svg/SVGAnimatedString-impl.js | 38 + .../jsdom/lib/jsdom/living/svg/SVGListBase.js | 195 + .../lib/jsdom/living/svg/SVGNumber-impl.js | 48 + .../jsdom/living/svg/SVGStringList-impl.js | 16 + .../living/traversal/NodeIterator-impl.js | 127 + .../jsdom/living/traversal/TreeWalker-impl.js | 217 + .../lib/jsdom/living/traversal/helpers.js | 44 + .../websockets/WebSocket-impl-browser.js | 175 + .../jsdom/living/websockets/WebSocket-impl.js | 328 + .../jsdom/living/webstorage/Storage-impl.js | 102 + .../lib/jsdom/living/window/BarProp-impl.js | 10 + .../lib/jsdom/living/window/External-impl.js | 9 + .../lib/jsdom/living/window/History-impl.js | 134 + .../lib/jsdom/living/window/History.webidl | 14 + .../lib/jsdom/living/window/Location-impl.js | 238 + .../lib/jsdom/living/window/Screen-impl.js | 13 + .../lib/jsdom/living/window/SessionHistory.js | 163 + .../lib/jsdom/living/window/navigation.js | 84 + .../lib/jsdom/living/xhr/FormData-impl.js | 176 + .../jsdom/living/xhr/XMLHttpRequest-impl.js | 1023 + .../xhr/XMLHttpRequestEventTarget-impl.js | 17 + .../living/xhr/XMLHttpRequestUpload-impl.js | 4 + .../lib/jsdom/living/xhr/xhr-sync-worker.js | 60 + .../jsdom/lib/jsdom/living/xhr/xhr-utils.js | 438 + .../lib/jsdom/named-properties-tracker.js | 158 + node_modules/jsdom/lib/jsdom/utils.js | 165 + .../jsdom/lib/jsdom/virtual-console.js | 34 + node_modules/jsdom/lib/jsdom/vm-shim.js | 106 + node_modules/jsdom/package.json | 116 + node_modules/levn/LICENSE | 22 + node_modules/levn/README.md | 196 + node_modules/levn/lib/cast.js | 298 + node_modules/levn/lib/coerce.js | 285 + node_modules/levn/lib/index.js | 22 + node_modules/levn/lib/parse-string.js | 113 + node_modules/levn/lib/parse.js | 102 + node_modules/levn/package.json | 47 + node_modules/lodash/LICENSE | 47 + node_modules/lodash/README.md | 39 + node_modules/lodash/_DataView.js | 7 + node_modules/lodash/_Hash.js | 32 + node_modules/lodash/_LazyWrapper.js | 28 + node_modules/lodash/_ListCache.js | 32 + node_modules/lodash/_LodashWrapper.js | 22 + node_modules/lodash/_Map.js | 7 + node_modules/lodash/_MapCache.js | 32 + node_modules/lodash/_Promise.js | 7 + node_modules/lodash/_Set.js | 7 + node_modules/lodash/_SetCache.js | 27 + node_modules/lodash/_Stack.js | 27 + node_modules/lodash/_Symbol.js | 6 + node_modules/lodash/_Uint8Array.js | 6 + node_modules/lodash/_WeakMap.js | 7 + node_modules/lodash/_apply.js | 21 + node_modules/lodash/_arrayAggregator.js | 22 + node_modules/lodash/_arrayEach.js | 22 + node_modules/lodash/_arrayEachRight.js | 21 + node_modules/lodash/_arrayEvery.js | 23 + node_modules/lodash/_arrayFilter.js | 25 + node_modules/lodash/_arrayIncludes.js | 17 + node_modules/lodash/_arrayIncludesWith.js | 22 + node_modules/lodash/_arrayLikeKeys.js | 49 + node_modules/lodash/_arrayMap.js | 21 + node_modules/lodash/_arrayPush.js | 20 + node_modules/lodash/_arrayReduce.js | 26 + node_modules/lodash/_arrayReduceRight.js | 24 + node_modules/lodash/_arraySample.js | 15 + node_modules/lodash/_arraySampleSize.js | 17 + node_modules/lodash/_arrayShuffle.js | 15 + node_modules/lodash/_arraySome.js | 23 + node_modules/lodash/_asciiSize.js | 12 + node_modules/lodash/_asciiToArray.js | 12 + node_modules/lodash/_asciiWords.js | 15 + node_modules/lodash/_assignMergeValue.js | 20 + node_modules/lodash/_assignValue.js | 28 + node_modules/lodash/_assocIndexOf.js | 21 + node_modules/lodash/_baseAggregator.js | 21 + node_modules/lodash/_baseAssign.js | 17 + node_modules/lodash/_baseAssignIn.js | 17 + node_modules/lodash/_baseAssignValue.js | 25 + node_modules/lodash/_baseAt.js | 23 + node_modules/lodash/_baseClamp.js | 22 + node_modules/lodash/_baseClone.js | 166 + node_modules/lodash/_baseConforms.js | 18 + node_modules/lodash/_baseConformsTo.js | 27 + node_modules/lodash/_baseCreate.js | 30 + node_modules/lodash/_baseDelay.js | 21 + node_modules/lodash/_baseDifference.js | 67 + node_modules/lodash/_baseEach.js | 14 + node_modules/lodash/_baseEachRight.js | 14 + node_modules/lodash/_baseEvery.js | 21 + node_modules/lodash/_baseExtremum.js | 32 + node_modules/lodash/_baseFill.js | 32 + node_modules/lodash/_baseFilter.js | 21 + node_modules/lodash/_baseFindIndex.js | 24 + node_modules/lodash/_baseFindKey.js | 23 + node_modules/lodash/_baseFlatten.js | 38 + node_modules/lodash/_baseFor.js | 16 + node_modules/lodash/_baseForOwn.js | 16 + node_modules/lodash/_baseForOwnRight.js | 16 + node_modules/lodash/_baseForRight.js | 15 + node_modules/lodash/_baseFunctions.js | 19 + node_modules/lodash/_baseGet.js | 24 + node_modules/lodash/_baseGetAllKeys.js | 20 + node_modules/lodash/_baseGetTag.js | 28 + node_modules/lodash/_baseGt.js | 14 + node_modules/lodash/_baseHas.js | 19 + node_modules/lodash/_baseHasIn.js | 13 + node_modules/lodash/_baseInRange.js | 18 + node_modules/lodash/_baseIndexOf.js | 20 + node_modules/lodash/_baseIndexOfWith.js | 23 + node_modules/lodash/_baseIntersection.js | 74 + node_modules/lodash/_baseInverter.js | 21 + node_modules/lodash/_baseInvoke.js | 24 + node_modules/lodash/_baseIsArguments.js | 18 + node_modules/lodash/_baseIsArrayBuffer.js | 17 + node_modules/lodash/_baseIsDate.js | 18 + node_modules/lodash/_baseIsEqual.js | 28 + node_modules/lodash/_baseIsEqualDeep.js | 83 + node_modules/lodash/_baseIsMap.js | 18 + node_modules/lodash/_baseIsMatch.js | 62 + node_modules/lodash/_baseIsNaN.js | 12 + node_modules/lodash/_baseIsNative.js | 47 + node_modules/lodash/_baseIsRegExp.js | 18 + node_modules/lodash/_baseIsSet.js | 18 + node_modules/lodash/_baseIsTypedArray.js | 60 + node_modules/lodash/_baseIteratee.js | 31 + node_modules/lodash/_baseKeys.js | 30 + node_modules/lodash/_baseKeysIn.js | 33 + node_modules/lodash/_baseLodash.js | 10 + node_modules/lodash/_baseLt.js | 14 + node_modules/lodash/_baseMap.js | 22 + node_modules/lodash/_baseMatches.js | 22 + node_modules/lodash/_baseMatchesProperty.js | 33 + node_modules/lodash/_baseMean.js | 20 + node_modules/lodash/_baseMerge.js | 42 + node_modules/lodash/_baseMergeDeep.js | 94 + node_modules/lodash/_baseNth.js | 20 + node_modules/lodash/_baseOrderBy.js | 49 + node_modules/lodash/_basePick.js | 19 + node_modules/lodash/_basePickBy.js | 30 + node_modules/lodash/_baseProperty.js | 14 + node_modules/lodash/_basePropertyDeep.js | 16 + node_modules/lodash/_basePropertyOf.js | 14 + node_modules/lodash/_basePullAll.js | 51 + node_modules/lodash/_basePullAt.js | 37 + node_modules/lodash/_baseRandom.js | 18 + node_modules/lodash/_baseRange.js | 28 + node_modules/lodash/_baseReduce.js | 23 + node_modules/lodash/_baseRepeat.js | 35 + node_modules/lodash/_baseRest.js | 17 + node_modules/lodash/_baseSample.js | 15 + node_modules/lodash/_baseSampleSize.js | 18 + node_modules/lodash/_baseSet.js | 51 + node_modules/lodash/_baseSetData.js | 17 + node_modules/lodash/_baseSetToString.js | 22 + node_modules/lodash/_baseShuffle.js | 15 + node_modules/lodash/_baseSlice.js | 31 + node_modules/lodash/_baseSome.js | 22 + node_modules/lodash/_baseSortBy.js | 21 + node_modules/lodash/_baseSortedIndex.js | 42 + node_modules/lodash/_baseSortedIndexBy.js | 67 + node_modules/lodash/_baseSortedUniq.js | 30 + node_modules/lodash/_baseSum.js | 24 + node_modules/lodash/_baseTimes.js | 20 + node_modules/lodash/_baseToNumber.js | 24 + node_modules/lodash/_baseToPairs.js | 18 + node_modules/lodash/_baseToString.js | 37 + node_modules/lodash/_baseTrim.js | 19 + node_modules/lodash/_baseUnary.js | 14 + node_modules/lodash/_baseUniq.js | 72 + node_modules/lodash/_baseUnset.js | 20 + node_modules/lodash/_baseUpdate.js | 18 + node_modules/lodash/_baseValues.js | 19 + node_modules/lodash/_baseWhile.js | 26 + node_modules/lodash/_baseWrapperValue.js | 25 + node_modules/lodash/_baseXor.js | 36 + node_modules/lodash/_baseZipObject.js | 23 + node_modules/lodash/_cacheHas.js | 13 + node_modules/lodash/_castArrayLikeObject.js | 14 + node_modules/lodash/_castFunction.js | 14 + node_modules/lodash/_castPath.js | 21 + node_modules/lodash/_castRest.js | 14 + node_modules/lodash/_castSlice.js | 18 + node_modules/lodash/_charsEndIndex.js | 19 + node_modules/lodash/_charsStartIndex.js | 20 + node_modules/lodash/_cloneArrayBuffer.js | 16 + node_modules/lodash/_cloneBuffer.js | 35 + node_modules/lodash/_cloneDataView.js | 16 + node_modules/lodash/_cloneRegExp.js | 17 + node_modules/lodash/_cloneSymbol.js | 18 + node_modules/lodash/_cloneTypedArray.js | 16 + node_modules/lodash/_compareAscending.js | 41 + node_modules/lodash/_compareMultiple.js | 44 + node_modules/lodash/_composeArgs.js | 39 + node_modules/lodash/_composeArgsRight.js | 41 + node_modules/lodash/_copyArray.js | 20 + node_modules/lodash/_copyObject.js | 40 + node_modules/lodash/_copySymbols.js | 16 + node_modules/lodash/_copySymbolsIn.js | 16 + node_modules/lodash/_coreJsData.js | 6 + node_modules/lodash/_countHolders.js | 21 + node_modules/lodash/_createAggregator.js | 23 + node_modules/lodash/_createAssigner.js | 37 + node_modules/lodash/_createBaseEach.js | 32 + node_modules/lodash/_createBaseFor.js | 25 + node_modules/lodash/_createBind.js | 28 + node_modules/lodash/_createCaseFirst.js | 33 + node_modules/lodash/_createCompounder.js | 24 + node_modules/lodash/_createCtor.js | 37 + node_modules/lodash/_createCurry.js | 46 + node_modules/lodash/_createFind.js | 25 + node_modules/lodash/_createFlow.js | 78 + node_modules/lodash/_createHybrid.js | 92 + node_modules/lodash/_createInverter.js | 17 + node_modules/lodash/_createMathOperation.js | 38 + node_modules/lodash/_createOver.js | 27 + node_modules/lodash/_createPadding.js | 33 + node_modules/lodash/_createPartial.js | 43 + node_modules/lodash/_createRange.js | 30 + node_modules/lodash/_createRecurry.js | 56 + .../lodash/_createRelationalOperation.js | 20 + node_modules/lodash/_createRound.js | 35 + node_modules/lodash/_createSet.js | 19 + node_modules/lodash/_createToPairs.js | 30 + node_modules/lodash/_createWrap.js | 106 + .../lodash/_customDefaultsAssignIn.js | 29 + node_modules/lodash/_customDefaultsMerge.js | 28 + node_modules/lodash/_customOmitClone.js | 16 + node_modules/lodash/_deburrLetter.js | 71 + node_modules/lodash/_defineProperty.js | 11 + node_modules/lodash/_equalArrays.js | 84 + node_modules/lodash/_equalByTag.js | 112 + node_modules/lodash/_equalObjects.js | 90 + node_modules/lodash/_escapeHtmlChar.js | 21 + node_modules/lodash/_escapeStringChar.js | 22 + node_modules/lodash/_flatRest.js | 16 + node_modules/lodash/_freeGlobal.js | 4 + node_modules/lodash/_getAllKeys.js | 16 + node_modules/lodash/_getAllKeysIn.js | 17 + node_modules/lodash/_getData.js | 15 + node_modules/lodash/_getFuncName.js | 31 + node_modules/lodash/_getHolder.js | 13 + node_modules/lodash/_getMapData.js | 18 + node_modules/lodash/_getMatchData.js | 24 + node_modules/lodash/_getNative.js | 17 + node_modules/lodash/_getPrototype.js | 6 + node_modules/lodash/_getRawTag.js | 46 + node_modules/lodash/_getSymbols.js | 30 + node_modules/lodash/_getSymbolsIn.js | 25 + node_modules/lodash/_getTag.js | 58 + node_modules/lodash/_getValue.js | 13 + node_modules/lodash/_getView.js | 33 + node_modules/lodash/_getWrapDetails.js | 17 + node_modules/lodash/_hasPath.js | 39 + node_modules/lodash/_hasUnicode.js | 26 + node_modules/lodash/_hasUnicodeWord.js | 15 + node_modules/lodash/_hashClear.js | 15 + node_modules/lodash/_hashDelete.js | 17 + node_modules/lodash/_hashGet.js | 30 + node_modules/lodash/_hashHas.js | 23 + node_modules/lodash/_hashSet.js | 23 + node_modules/lodash/_initCloneArray.js | 26 + node_modules/lodash/_initCloneByTag.js | 77 + node_modules/lodash/_initCloneObject.js | 18 + node_modules/lodash/_insertWrapDetails.js | 23 + node_modules/lodash/_isFlattenable.js | 20 + node_modules/lodash/_isIndex.js | 25 + node_modules/lodash/_isIterateeCall.js | 30 + node_modules/lodash/_isKey.js | 29 + node_modules/lodash/_isKeyable.js | 15 + node_modules/lodash/_isLaziable.js | 28 + node_modules/lodash/_isMaskable.js | 14 + node_modules/lodash/_isMasked.js | 20 + node_modules/lodash/_isPrototype.js | 18 + node_modules/lodash/_isStrictComparable.js | 15 + node_modules/lodash/_iteratorToArray.js | 18 + node_modules/lodash/_lazyClone.js | 23 + node_modules/lodash/_lazyReverse.js | 23 + node_modules/lodash/_lazyValue.js | 69 + node_modules/lodash/_listCacheClear.js | 13 + node_modules/lodash/_listCacheDelete.js | 35 + node_modules/lodash/_listCacheGet.js | 19 + node_modules/lodash/_listCacheHas.js | 16 + node_modules/lodash/_listCacheSet.js | 26 + node_modules/lodash/_mapCacheClear.js | 21 + node_modules/lodash/_mapCacheDelete.js | 18 + node_modules/lodash/_mapCacheGet.js | 16 + node_modules/lodash/_mapCacheHas.js | 16 + node_modules/lodash/_mapCacheSet.js | 22 + node_modules/lodash/_mapToArray.js | 18 + .../lodash/_matchesStrictComparable.js | 20 + node_modules/lodash/_memoizeCapped.js | 26 + node_modules/lodash/_mergeData.js | 90 + node_modules/lodash/_metaMap.js | 6 + node_modules/lodash/_nativeCreate.js | 6 + node_modules/lodash/_nativeKeys.js | 6 + node_modules/lodash/_nativeKeysIn.js | 20 + node_modules/lodash/_nodeUtil.js | 30 + node_modules/lodash/_objectToString.js | 22 + node_modules/lodash/_overArg.js | 15 + node_modules/lodash/_overRest.js | 36 + node_modules/lodash/_parent.js | 16 + node_modules/lodash/_reEscape.js | 4 + node_modules/lodash/_reEvaluate.js | 4 + node_modules/lodash/_reInterpolate.js | 4 + node_modules/lodash/_realNames.js | 4 + node_modules/lodash/_reorder.js | 29 + node_modules/lodash/_replaceHolders.js | 29 + node_modules/lodash/_root.js | 9 + node_modules/lodash/_safeGet.js | 21 + node_modules/lodash/_setCacheAdd.js | 19 + node_modules/lodash/_setCacheHas.js | 14 + node_modules/lodash/_setData.js | 20 + node_modules/lodash/_setToArray.js | 18 + node_modules/lodash/_setToPairs.js | 18 + node_modules/lodash/_setToString.js | 14 + node_modules/lodash/_setWrapToString.js | 21 + node_modules/lodash/_shortOut.js | 37 + node_modules/lodash/_shuffleSelf.js | 28 + node_modules/lodash/_stackClear.js | 15 + node_modules/lodash/_stackDelete.js | 18 + node_modules/lodash/_stackGet.js | 14 + node_modules/lodash/_stackHas.js | 14 + node_modules/lodash/_stackSet.js | 34 + node_modules/lodash/_strictIndexOf.js | 23 + node_modules/lodash/_strictLastIndexOf.js | 21 + node_modules/lodash/_stringSize.js | 18 + node_modules/lodash/_stringToArray.js | 18 + node_modules/lodash/_stringToPath.js | 27 + node_modules/lodash/_toKey.js | 21 + node_modules/lodash/_toSource.js | 26 + node_modules/lodash/_trimmedEndIndex.js | 19 + node_modules/lodash/_unescapeHtmlChar.js | 21 + node_modules/lodash/_unicodeSize.js | 44 + node_modules/lodash/_unicodeToArray.js | 40 + node_modules/lodash/_unicodeWords.js | 69 + node_modules/lodash/_updateWrapDetails.js | 46 + node_modules/lodash/_wrapperClone.js | 23 + node_modules/lodash/add.js | 22 + node_modules/lodash/after.js | 42 + node_modules/lodash/array.js | 67 + node_modules/lodash/ary.js | 29 + node_modules/lodash/assign.js | 58 + node_modules/lodash/assignIn.js | 40 + node_modules/lodash/assignInWith.js | 38 + node_modules/lodash/assignWith.js | 37 + node_modules/lodash/at.js | 23 + node_modules/lodash/attempt.js | 35 + node_modules/lodash/before.js | 40 + node_modules/lodash/bind.js | 57 + node_modules/lodash/bindAll.js | 41 + node_modules/lodash/bindKey.js | 68 + node_modules/lodash/camelCase.js | 29 + node_modules/lodash/capitalize.js | 23 + node_modules/lodash/castArray.js | 44 + node_modules/lodash/ceil.js | 26 + node_modules/lodash/chain.js | 38 + node_modules/lodash/chunk.js | 50 + node_modules/lodash/clamp.js | 39 + node_modules/lodash/clone.js | 36 + node_modules/lodash/cloneDeep.js | 29 + node_modules/lodash/cloneDeepWith.js | 40 + node_modules/lodash/cloneWith.js | 42 + node_modules/lodash/collection.js | 30 + node_modules/lodash/commit.js | 33 + node_modules/lodash/compact.js | 31 + node_modules/lodash/concat.js | 43 + node_modules/lodash/cond.js | 60 + node_modules/lodash/conforms.js | 35 + node_modules/lodash/conformsTo.js | 32 + node_modules/lodash/constant.js | 26 + node_modules/lodash/core.js | 3877 ++++ node_modules/lodash/core.min.js | 29 + node_modules/lodash/countBy.js | 40 + node_modules/lodash/create.js | 43 + node_modules/lodash/curry.js | 57 + node_modules/lodash/curryRight.js | 54 + node_modules/lodash/date.js | 3 + node_modules/lodash/debounce.js | 191 + node_modules/lodash/deburr.js | 45 + node_modules/lodash/defaultTo.js | 25 + node_modules/lodash/defaults.js | 64 + node_modules/lodash/defaultsDeep.js | 30 + node_modules/lodash/defer.js | 26 + node_modules/lodash/delay.js | 28 + node_modules/lodash/difference.js | 33 + node_modules/lodash/differenceBy.js | 44 + node_modules/lodash/differenceWith.js | 40 + node_modules/lodash/divide.js | 22 + node_modules/lodash/drop.js | 38 + node_modules/lodash/dropRight.js | 39 + node_modules/lodash/dropRightWhile.js | 45 + node_modules/lodash/dropWhile.js | 45 + node_modules/lodash/each.js | 1 + node_modules/lodash/eachRight.js | 1 + node_modules/lodash/endsWith.js | 43 + node_modules/lodash/entries.js | 1 + node_modules/lodash/entriesIn.js | 1 + node_modules/lodash/eq.js | 37 + node_modules/lodash/escape.js | 43 + node_modules/lodash/escapeRegExp.js | 32 + node_modules/lodash/every.js | 56 + node_modules/lodash/extend.js | 1 + node_modules/lodash/extendWith.js | 1 + node_modules/lodash/fill.js | 45 + node_modules/lodash/filter.js | 52 + node_modules/lodash/find.js | 42 + node_modules/lodash/findIndex.js | 55 + node_modules/lodash/findKey.js | 44 + node_modules/lodash/findLast.js | 25 + node_modules/lodash/findLastIndex.js | 59 + node_modules/lodash/findLastKey.js | 44 + node_modules/lodash/first.js | 1 + node_modules/lodash/flake.lock | 40 + node_modules/lodash/flake.nix | 20 + node_modules/lodash/flatMap.js | 29 + node_modules/lodash/flatMapDeep.js | 31 + node_modules/lodash/flatMapDepth.js | 31 + node_modules/lodash/flatten.js | 22 + node_modules/lodash/flattenDeep.js | 25 + node_modules/lodash/flattenDepth.js | 33 + node_modules/lodash/flip.js | 28 + node_modules/lodash/floor.js | 26 + node_modules/lodash/flow.js | 27 + node_modules/lodash/flowRight.js | 26 + node_modules/lodash/forEach.js | 41 + node_modules/lodash/forEachRight.js | 31 + node_modules/lodash/forIn.js | 39 + node_modules/lodash/forInRight.js | 37 + node_modules/lodash/forOwn.js | 36 + node_modules/lodash/forOwnRight.js | 34 + node_modules/lodash/fp.js | 2 + node_modules/lodash/fp/F.js | 1 + node_modules/lodash/fp/T.js | 1 + node_modules/lodash/fp/__.js | 1 + node_modules/lodash/fp/_baseConvert.js | 569 + node_modules/lodash/fp/_convertBrowser.js | 18 + node_modules/lodash/fp/_falseOptions.js | 7 + node_modules/lodash/fp/_mapping.js | 358 + node_modules/lodash/fp/_util.js | 16 + node_modules/lodash/fp/add.js | 5 + node_modules/lodash/fp/after.js | 5 + node_modules/lodash/fp/all.js | 1 + node_modules/lodash/fp/allPass.js | 1 + node_modules/lodash/fp/always.js | 1 + node_modules/lodash/fp/any.js | 1 + node_modules/lodash/fp/anyPass.js | 1 + node_modules/lodash/fp/apply.js | 1 + node_modules/lodash/fp/array.js | 2 + node_modules/lodash/fp/ary.js | 5 + node_modules/lodash/fp/assign.js | 5 + node_modules/lodash/fp/assignAll.js | 5 + node_modules/lodash/fp/assignAllWith.js | 5 + node_modules/lodash/fp/assignIn.js | 5 + node_modules/lodash/fp/assignInAll.js | 5 + node_modules/lodash/fp/assignInAllWith.js | 5 + node_modules/lodash/fp/assignInWith.js | 5 + node_modules/lodash/fp/assignWith.js | 5 + node_modules/lodash/fp/assoc.js | 1 + node_modules/lodash/fp/assocPath.js | 1 + node_modules/lodash/fp/at.js | 5 + node_modules/lodash/fp/attempt.js | 5 + node_modules/lodash/fp/before.js | 5 + node_modules/lodash/fp/bind.js | 5 + node_modules/lodash/fp/bindAll.js | 5 + node_modules/lodash/fp/bindKey.js | 5 + node_modules/lodash/fp/camelCase.js | 5 + node_modules/lodash/fp/capitalize.js | 5 + node_modules/lodash/fp/castArray.js | 5 + node_modules/lodash/fp/ceil.js | 5 + node_modules/lodash/fp/chain.js | 5 + node_modules/lodash/fp/chunk.js | 5 + node_modules/lodash/fp/clamp.js | 5 + node_modules/lodash/fp/clone.js | 5 + node_modules/lodash/fp/cloneDeep.js | 5 + node_modules/lodash/fp/cloneDeepWith.js | 5 + node_modules/lodash/fp/cloneWith.js | 5 + node_modules/lodash/fp/collection.js | 2 + node_modules/lodash/fp/commit.js | 5 + node_modules/lodash/fp/compact.js | 5 + node_modules/lodash/fp/complement.js | 1 + node_modules/lodash/fp/compose.js | 1 + node_modules/lodash/fp/concat.js | 5 + node_modules/lodash/fp/cond.js | 5 + node_modules/lodash/fp/conforms.js | 1 + node_modules/lodash/fp/conformsTo.js | 5 + node_modules/lodash/fp/constant.js | 5 + node_modules/lodash/fp/contains.js | 1 + node_modules/lodash/fp/convert.js | 18 + node_modules/lodash/fp/countBy.js | 5 + node_modules/lodash/fp/create.js | 5 + node_modules/lodash/fp/curry.js | 5 + node_modules/lodash/fp/curryN.js | 5 + node_modules/lodash/fp/curryRight.js | 5 + node_modules/lodash/fp/curryRightN.js | 5 + node_modules/lodash/fp/date.js | 2 + node_modules/lodash/fp/debounce.js | 5 + node_modules/lodash/fp/deburr.js | 5 + node_modules/lodash/fp/defaultTo.js | 5 + node_modules/lodash/fp/defaults.js | 5 + node_modules/lodash/fp/defaultsAll.js | 5 + node_modules/lodash/fp/defaultsDeep.js | 5 + node_modules/lodash/fp/defaultsDeepAll.js | 5 + node_modules/lodash/fp/defer.js | 5 + node_modules/lodash/fp/delay.js | 5 + node_modules/lodash/fp/difference.js | 5 + node_modules/lodash/fp/differenceBy.js | 5 + node_modules/lodash/fp/differenceWith.js | 5 + node_modules/lodash/fp/dissoc.js | 1 + node_modules/lodash/fp/dissocPath.js | 1 + node_modules/lodash/fp/divide.js | 5 + node_modules/lodash/fp/drop.js | 5 + node_modules/lodash/fp/dropLast.js | 1 + node_modules/lodash/fp/dropLastWhile.js | 1 + node_modules/lodash/fp/dropRight.js | 5 + node_modules/lodash/fp/dropRightWhile.js | 5 + node_modules/lodash/fp/dropWhile.js | 5 + node_modules/lodash/fp/each.js | 1 + node_modules/lodash/fp/eachRight.js | 1 + node_modules/lodash/fp/endsWith.js | 5 + node_modules/lodash/fp/entries.js | 1 + node_modules/lodash/fp/entriesIn.js | 1 + node_modules/lodash/fp/eq.js | 5 + node_modules/lodash/fp/equals.js | 1 + node_modules/lodash/fp/escape.js | 5 + node_modules/lodash/fp/escapeRegExp.js | 5 + node_modules/lodash/fp/every.js | 5 + node_modules/lodash/fp/extend.js | 1 + node_modules/lodash/fp/extendAll.js | 1 + node_modules/lodash/fp/extendAllWith.js | 1 + node_modules/lodash/fp/extendWith.js | 1 + node_modules/lodash/fp/fill.js | 5 + node_modules/lodash/fp/filter.js | 5 + node_modules/lodash/fp/find.js | 5 + node_modules/lodash/fp/findFrom.js | 5 + node_modules/lodash/fp/findIndex.js | 5 + node_modules/lodash/fp/findIndexFrom.js | 5 + node_modules/lodash/fp/findKey.js | 5 + node_modules/lodash/fp/findLast.js | 5 + node_modules/lodash/fp/findLastFrom.js | 5 + node_modules/lodash/fp/findLastIndex.js | 5 + node_modules/lodash/fp/findLastIndexFrom.js | 5 + node_modules/lodash/fp/findLastKey.js | 5 + node_modules/lodash/fp/first.js | 1 + node_modules/lodash/fp/flatMap.js | 5 + node_modules/lodash/fp/flatMapDeep.js | 5 + node_modules/lodash/fp/flatMapDepth.js | 5 + node_modules/lodash/fp/flatten.js | 5 + node_modules/lodash/fp/flattenDeep.js | 5 + node_modules/lodash/fp/flattenDepth.js | 5 + node_modules/lodash/fp/flip.js | 5 + node_modules/lodash/fp/floor.js | 5 + node_modules/lodash/fp/flow.js | 5 + node_modules/lodash/fp/flowRight.js | 5 + node_modules/lodash/fp/forEach.js | 5 + node_modules/lodash/fp/forEachRight.js | 5 + node_modules/lodash/fp/forIn.js | 5 + node_modules/lodash/fp/forInRight.js | 5 + node_modules/lodash/fp/forOwn.js | 5 + node_modules/lodash/fp/forOwnRight.js | 5 + node_modules/lodash/fp/fromPairs.js | 5 + node_modules/lodash/fp/function.js | 2 + node_modules/lodash/fp/functions.js | 5 + node_modules/lodash/fp/functionsIn.js | 5 + node_modules/lodash/fp/get.js | 5 + node_modules/lodash/fp/getOr.js | 5 + node_modules/lodash/fp/groupBy.js | 5 + node_modules/lodash/fp/gt.js | 5 + node_modules/lodash/fp/gte.js | 5 + node_modules/lodash/fp/has.js | 5 + node_modules/lodash/fp/hasIn.js | 5 + node_modules/lodash/fp/head.js | 5 + node_modules/lodash/fp/identical.js | 1 + node_modules/lodash/fp/identity.js | 5 + node_modules/lodash/fp/inRange.js | 5 + node_modules/lodash/fp/includes.js | 5 + node_modules/lodash/fp/includesFrom.js | 5 + node_modules/lodash/fp/indexBy.js | 1 + node_modules/lodash/fp/indexOf.js | 5 + node_modules/lodash/fp/indexOfFrom.js | 5 + node_modules/lodash/fp/init.js | 1 + node_modules/lodash/fp/initial.js | 5 + node_modules/lodash/fp/intersection.js | 5 + node_modules/lodash/fp/intersectionBy.js | 5 + node_modules/lodash/fp/intersectionWith.js | 5 + node_modules/lodash/fp/invert.js | 5 + node_modules/lodash/fp/invertBy.js | 5 + node_modules/lodash/fp/invertObj.js | 1 + node_modules/lodash/fp/invoke.js | 5 + node_modules/lodash/fp/invokeArgs.js | 5 + node_modules/lodash/fp/invokeArgsMap.js | 5 + node_modules/lodash/fp/invokeMap.js | 5 + node_modules/lodash/fp/isArguments.js | 5 + node_modules/lodash/fp/isArray.js | 5 + node_modules/lodash/fp/isArrayBuffer.js | 5 + node_modules/lodash/fp/isArrayLike.js | 5 + node_modules/lodash/fp/isArrayLikeObject.js | 5 + node_modules/lodash/fp/isBoolean.js | 5 + node_modules/lodash/fp/isBuffer.js | 5 + node_modules/lodash/fp/isDate.js | 5 + node_modules/lodash/fp/isElement.js | 5 + node_modules/lodash/fp/isEmpty.js | 5 + node_modules/lodash/fp/isEqual.js | 5 + node_modules/lodash/fp/isEqualWith.js | 5 + node_modules/lodash/fp/isError.js | 5 + node_modules/lodash/fp/isFinite.js | 5 + node_modules/lodash/fp/isFunction.js | 5 + node_modules/lodash/fp/isInteger.js | 5 + node_modules/lodash/fp/isLength.js | 5 + node_modules/lodash/fp/isMap.js | 5 + node_modules/lodash/fp/isMatch.js | 5 + node_modules/lodash/fp/isMatchWith.js | 5 + node_modules/lodash/fp/isNaN.js | 5 + node_modules/lodash/fp/isNative.js | 5 + node_modules/lodash/fp/isNil.js | 5 + node_modules/lodash/fp/isNull.js | 5 + node_modules/lodash/fp/isNumber.js | 5 + node_modules/lodash/fp/isObject.js | 5 + node_modules/lodash/fp/isObjectLike.js | 5 + node_modules/lodash/fp/isPlainObject.js | 5 + node_modules/lodash/fp/isRegExp.js | 5 + node_modules/lodash/fp/isSafeInteger.js | 5 + node_modules/lodash/fp/isSet.js | 5 + node_modules/lodash/fp/isString.js | 5 + node_modules/lodash/fp/isSymbol.js | 5 + node_modules/lodash/fp/isTypedArray.js | 5 + node_modules/lodash/fp/isUndefined.js | 5 + node_modules/lodash/fp/isWeakMap.js | 5 + node_modules/lodash/fp/isWeakSet.js | 5 + node_modules/lodash/fp/iteratee.js | 5 + node_modules/lodash/fp/join.js | 5 + node_modules/lodash/fp/juxt.js | 1 + node_modules/lodash/fp/kebabCase.js | 5 + node_modules/lodash/fp/keyBy.js | 5 + node_modules/lodash/fp/keys.js | 5 + node_modules/lodash/fp/keysIn.js | 5 + node_modules/lodash/fp/lang.js | 2 + node_modules/lodash/fp/last.js | 5 + node_modules/lodash/fp/lastIndexOf.js | 5 + node_modules/lodash/fp/lastIndexOfFrom.js | 5 + node_modules/lodash/fp/lowerCase.js | 5 + node_modules/lodash/fp/lowerFirst.js | 5 + node_modules/lodash/fp/lt.js | 5 + node_modules/lodash/fp/lte.js | 5 + node_modules/lodash/fp/map.js | 5 + node_modules/lodash/fp/mapKeys.js | 5 + node_modules/lodash/fp/mapValues.js | 5 + node_modules/lodash/fp/matches.js | 1 + node_modules/lodash/fp/matchesProperty.js | 5 + node_modules/lodash/fp/math.js | 2 + node_modules/lodash/fp/max.js | 5 + node_modules/lodash/fp/maxBy.js | 5 + node_modules/lodash/fp/mean.js | 5 + node_modules/lodash/fp/meanBy.js | 5 + node_modules/lodash/fp/memoize.js | 5 + node_modules/lodash/fp/merge.js | 5 + node_modules/lodash/fp/mergeAll.js | 5 + node_modules/lodash/fp/mergeAllWith.js | 5 + node_modules/lodash/fp/mergeWith.js | 5 + node_modules/lodash/fp/method.js | 5 + node_modules/lodash/fp/methodOf.js | 5 + node_modules/lodash/fp/min.js | 5 + node_modules/lodash/fp/minBy.js | 5 + node_modules/lodash/fp/mixin.js | 5 + node_modules/lodash/fp/multiply.js | 5 + node_modules/lodash/fp/nAry.js | 1 + node_modules/lodash/fp/negate.js | 5 + node_modules/lodash/fp/next.js | 5 + node_modules/lodash/fp/noop.js | 5 + node_modules/lodash/fp/now.js | 5 + node_modules/lodash/fp/nth.js | 5 + node_modules/lodash/fp/nthArg.js | 5 + node_modules/lodash/fp/number.js | 2 + node_modules/lodash/fp/object.js | 2 + node_modules/lodash/fp/omit.js | 5 + node_modules/lodash/fp/omitAll.js | 1 + node_modules/lodash/fp/omitBy.js | 5 + node_modules/lodash/fp/once.js | 5 + node_modules/lodash/fp/orderBy.js | 5 + node_modules/lodash/fp/over.js | 5 + node_modules/lodash/fp/overArgs.js | 5 + node_modules/lodash/fp/overEvery.js | 5 + node_modules/lodash/fp/overSome.js | 5 + node_modules/lodash/fp/pad.js | 5 + node_modules/lodash/fp/padChars.js | 5 + node_modules/lodash/fp/padCharsEnd.js | 5 + node_modules/lodash/fp/padCharsStart.js | 5 + node_modules/lodash/fp/padEnd.js | 5 + node_modules/lodash/fp/padStart.js | 5 + node_modules/lodash/fp/parseInt.js | 5 + node_modules/lodash/fp/partial.js | 5 + node_modules/lodash/fp/partialRight.js | 5 + node_modules/lodash/fp/partition.js | 5 + node_modules/lodash/fp/path.js | 1 + node_modules/lodash/fp/pathEq.js | 1 + node_modules/lodash/fp/pathOr.js | 1 + node_modules/lodash/fp/paths.js | 1 + node_modules/lodash/fp/pick.js | 5 + node_modules/lodash/fp/pickAll.js | 1 + node_modules/lodash/fp/pickBy.js | 5 + node_modules/lodash/fp/pipe.js | 1 + node_modules/lodash/fp/placeholder.js | 6 + node_modules/lodash/fp/plant.js | 5 + node_modules/lodash/fp/pluck.js | 1 + node_modules/lodash/fp/prop.js | 1 + node_modules/lodash/fp/propEq.js | 1 + node_modules/lodash/fp/propOr.js | 1 + node_modules/lodash/fp/property.js | 1 + node_modules/lodash/fp/propertyOf.js | 5 + node_modules/lodash/fp/props.js | 1 + node_modules/lodash/fp/pull.js | 5 + node_modules/lodash/fp/pullAll.js | 5 + node_modules/lodash/fp/pullAllBy.js | 5 + node_modules/lodash/fp/pullAllWith.js | 5 + node_modules/lodash/fp/pullAt.js | 5 + node_modules/lodash/fp/random.js | 5 + node_modules/lodash/fp/range.js | 5 + node_modules/lodash/fp/rangeRight.js | 5 + node_modules/lodash/fp/rangeStep.js | 5 + node_modules/lodash/fp/rangeStepRight.js | 5 + node_modules/lodash/fp/rearg.js | 5 + node_modules/lodash/fp/reduce.js | 5 + node_modules/lodash/fp/reduceRight.js | 5 + node_modules/lodash/fp/reject.js | 5 + node_modules/lodash/fp/remove.js | 5 + node_modules/lodash/fp/repeat.js | 5 + node_modules/lodash/fp/replace.js | 5 + node_modules/lodash/fp/rest.js | 5 + node_modules/lodash/fp/restFrom.js | 5 + node_modules/lodash/fp/result.js | 5 + node_modules/lodash/fp/reverse.js | 5 + node_modules/lodash/fp/round.js | 5 + node_modules/lodash/fp/sample.js | 5 + node_modules/lodash/fp/sampleSize.js | 5 + node_modules/lodash/fp/seq.js | 2 + node_modules/lodash/fp/set.js | 5 + node_modules/lodash/fp/setWith.js | 5 + node_modules/lodash/fp/shuffle.js | 5 + node_modules/lodash/fp/size.js | 5 + node_modules/lodash/fp/slice.js | 5 + node_modules/lodash/fp/snakeCase.js | 5 + node_modules/lodash/fp/some.js | 5 + node_modules/lodash/fp/sortBy.js | 5 + node_modules/lodash/fp/sortedIndex.js | 5 + node_modules/lodash/fp/sortedIndexBy.js | 5 + node_modules/lodash/fp/sortedIndexOf.js | 5 + node_modules/lodash/fp/sortedLastIndex.js | 5 + node_modules/lodash/fp/sortedLastIndexBy.js | 5 + node_modules/lodash/fp/sortedLastIndexOf.js | 5 + node_modules/lodash/fp/sortedUniq.js | 5 + node_modules/lodash/fp/sortedUniqBy.js | 5 + node_modules/lodash/fp/split.js | 5 + node_modules/lodash/fp/spread.js | 5 + node_modules/lodash/fp/spreadFrom.js | 5 + node_modules/lodash/fp/startCase.js | 5 + node_modules/lodash/fp/startsWith.js | 5 + node_modules/lodash/fp/string.js | 2 + node_modules/lodash/fp/stubArray.js | 5 + node_modules/lodash/fp/stubFalse.js | 5 + node_modules/lodash/fp/stubObject.js | 5 + node_modules/lodash/fp/stubString.js | 5 + node_modules/lodash/fp/stubTrue.js | 5 + node_modules/lodash/fp/subtract.js | 5 + node_modules/lodash/fp/sum.js | 5 + node_modules/lodash/fp/sumBy.js | 5 + node_modules/lodash/fp/symmetricDifference.js | 1 + .../lodash/fp/symmetricDifferenceBy.js | 1 + .../lodash/fp/symmetricDifferenceWith.js | 1 + node_modules/lodash/fp/tail.js | 5 + node_modules/lodash/fp/take.js | 5 + node_modules/lodash/fp/takeLast.js | 1 + node_modules/lodash/fp/takeLastWhile.js | 1 + node_modules/lodash/fp/takeRight.js | 5 + node_modules/lodash/fp/takeRightWhile.js | 5 + node_modules/lodash/fp/takeWhile.js | 5 + node_modules/lodash/fp/tap.js | 5 + node_modules/lodash/fp/template.js | 5 + node_modules/lodash/fp/templateSettings.js | 5 + node_modules/lodash/fp/throttle.js | 5 + node_modules/lodash/fp/thru.js | 5 + node_modules/lodash/fp/times.js | 5 + node_modules/lodash/fp/toArray.js | 5 + node_modules/lodash/fp/toFinite.js | 5 + node_modules/lodash/fp/toInteger.js | 5 + node_modules/lodash/fp/toIterator.js | 5 + node_modules/lodash/fp/toJSON.js | 5 + node_modules/lodash/fp/toLength.js | 5 + node_modules/lodash/fp/toLower.js | 5 + node_modules/lodash/fp/toNumber.js | 5 + node_modules/lodash/fp/toPairs.js | 5 + node_modules/lodash/fp/toPairsIn.js | 5 + node_modules/lodash/fp/toPath.js | 5 + node_modules/lodash/fp/toPlainObject.js | 5 + node_modules/lodash/fp/toSafeInteger.js | 5 + node_modules/lodash/fp/toString.js | 5 + node_modules/lodash/fp/toUpper.js | 5 + node_modules/lodash/fp/transform.js | 5 + node_modules/lodash/fp/trim.js | 5 + node_modules/lodash/fp/trimChars.js | 5 + node_modules/lodash/fp/trimCharsEnd.js | 5 + node_modules/lodash/fp/trimCharsStart.js | 5 + node_modules/lodash/fp/trimEnd.js | 5 + node_modules/lodash/fp/trimStart.js | 5 + node_modules/lodash/fp/truncate.js | 5 + node_modules/lodash/fp/unapply.js | 1 + node_modules/lodash/fp/unary.js | 5 + node_modules/lodash/fp/unescape.js | 5 + node_modules/lodash/fp/union.js | 5 + node_modules/lodash/fp/unionBy.js | 5 + node_modules/lodash/fp/unionWith.js | 5 + node_modules/lodash/fp/uniq.js | 5 + node_modules/lodash/fp/uniqBy.js | 5 + node_modules/lodash/fp/uniqWith.js | 5 + node_modules/lodash/fp/uniqueId.js | 5 + node_modules/lodash/fp/unnest.js | 1 + node_modules/lodash/fp/unset.js | 5 + node_modules/lodash/fp/unzip.js | 5 + node_modules/lodash/fp/unzipWith.js | 5 + node_modules/lodash/fp/update.js | 5 + node_modules/lodash/fp/updateWith.js | 5 + node_modules/lodash/fp/upperCase.js | 5 + node_modules/lodash/fp/upperFirst.js | 5 + node_modules/lodash/fp/useWith.js | 1 + node_modules/lodash/fp/util.js | 2 + node_modules/lodash/fp/value.js | 5 + node_modules/lodash/fp/valueOf.js | 5 + node_modules/lodash/fp/values.js | 5 + node_modules/lodash/fp/valuesIn.js | 5 + node_modules/lodash/fp/where.js | 1 + node_modules/lodash/fp/whereEq.js | 1 + node_modules/lodash/fp/without.js | 5 + node_modules/lodash/fp/words.js | 5 + node_modules/lodash/fp/wrap.js | 5 + node_modules/lodash/fp/wrapperAt.js | 5 + node_modules/lodash/fp/wrapperChain.js | 5 + node_modules/lodash/fp/wrapperLodash.js | 5 + node_modules/lodash/fp/wrapperReverse.js | 5 + node_modules/lodash/fp/wrapperValue.js | 5 + node_modules/lodash/fp/xor.js | 5 + node_modules/lodash/fp/xorBy.js | 5 + node_modules/lodash/fp/xorWith.js | 5 + node_modules/lodash/fp/zip.js | 5 + node_modules/lodash/fp/zipAll.js | 5 + node_modules/lodash/fp/zipObj.js | 1 + node_modules/lodash/fp/zipObject.js | 5 + node_modules/lodash/fp/zipObjectDeep.js | 5 + node_modules/lodash/fp/zipWith.js | 5 + node_modules/lodash/fromPairs.js | 28 + node_modules/lodash/function.js | 25 + node_modules/lodash/functions.js | 31 + node_modules/lodash/functionsIn.js | 31 + node_modules/lodash/get.js | 33 + node_modules/lodash/groupBy.js | 41 + node_modules/lodash/gt.js | 29 + node_modules/lodash/gte.js | 30 + node_modules/lodash/has.js | 35 + node_modules/lodash/hasIn.js | 34 + node_modules/lodash/head.js | 23 + node_modules/lodash/identity.js | 21 + node_modules/lodash/inRange.js | 55 + node_modules/lodash/includes.js | 53 + node_modules/lodash/index.js | 1 + node_modules/lodash/indexOf.js | 42 + node_modules/lodash/initial.js | 22 + node_modules/lodash/intersection.js | 30 + node_modules/lodash/intersectionBy.js | 45 + node_modules/lodash/intersectionWith.js | 41 + node_modules/lodash/invert.js | 42 + node_modules/lodash/invertBy.js | 56 + node_modules/lodash/invoke.js | 24 + node_modules/lodash/invokeMap.js | 41 + node_modules/lodash/isArguments.js | 36 + node_modules/lodash/isArray.js | 26 + node_modules/lodash/isArrayBuffer.js | 27 + node_modules/lodash/isArrayLike.js | 33 + node_modules/lodash/isArrayLikeObject.js | 33 + node_modules/lodash/isBoolean.js | 29 + node_modules/lodash/isBuffer.js | 38 + node_modules/lodash/isDate.js | 27 + node_modules/lodash/isElement.js | 25 + node_modules/lodash/isEmpty.js | 77 + node_modules/lodash/isEqual.js | 35 + node_modules/lodash/isEqualWith.js | 41 + node_modules/lodash/isError.js | 36 + node_modules/lodash/isFinite.js | 36 + node_modules/lodash/isFunction.js | 37 + node_modules/lodash/isInteger.js | 33 + node_modules/lodash/isLength.js | 35 + node_modules/lodash/isMap.js | 27 + node_modules/lodash/isMatch.js | 36 + node_modules/lodash/isMatchWith.js | 41 + node_modules/lodash/isNaN.js | 38 + node_modules/lodash/isNative.js | 40 + node_modules/lodash/isNil.js | 25 + node_modules/lodash/isNull.js | 22 + node_modules/lodash/isNumber.js | 38 + node_modules/lodash/isObject.js | 31 + node_modules/lodash/isObjectLike.js | 29 + node_modules/lodash/isPlainObject.js | 62 + node_modules/lodash/isRegExp.js | 27 + node_modules/lodash/isSafeInteger.js | 37 + node_modules/lodash/isSet.js | 27 + node_modules/lodash/isString.js | 30 + node_modules/lodash/isSymbol.js | 29 + node_modules/lodash/isTypedArray.js | 27 + node_modules/lodash/isUndefined.js | 22 + node_modules/lodash/isWeakMap.js | 28 + node_modules/lodash/isWeakSet.js | 28 + node_modules/lodash/iteratee.js | 53 + node_modules/lodash/join.js | 26 + node_modules/lodash/kebabCase.js | 28 + node_modules/lodash/keyBy.js | 36 + node_modules/lodash/keys.js | 37 + node_modules/lodash/keysIn.js | 32 + node_modules/lodash/lang.js | 58 + node_modules/lodash/last.js | 20 + node_modules/lodash/lastIndexOf.js | 46 + node_modules/lodash/lodash.js | 17209 ++++++++++++++++ node_modules/lodash/lodash.min.js | 140 + node_modules/lodash/lowerCase.js | 27 + node_modules/lodash/lowerFirst.js | 22 + node_modules/lodash/lt.js | 29 + node_modules/lodash/lte.js | 30 + node_modules/lodash/map.js | 53 + node_modules/lodash/mapKeys.js | 36 + node_modules/lodash/mapValues.js | 43 + node_modules/lodash/matches.js | 46 + node_modules/lodash/matchesProperty.js | 44 + node_modules/lodash/math.js | 17 + node_modules/lodash/max.js | 29 + node_modules/lodash/maxBy.js | 34 + node_modules/lodash/mean.js | 22 + node_modules/lodash/meanBy.js | 31 + node_modules/lodash/memoize.js | 73 + node_modules/lodash/merge.js | 39 + node_modules/lodash/mergeWith.js | 39 + node_modules/lodash/method.js | 34 + node_modules/lodash/methodOf.js | 33 + node_modules/lodash/min.js | 29 + node_modules/lodash/minBy.js | 34 + node_modules/lodash/mixin.js | 74 + node_modules/lodash/multiply.js | 22 + node_modules/lodash/negate.js | 40 + node_modules/lodash/next.js | 35 + node_modules/lodash/noop.js | 17 + node_modules/lodash/now.js | 23 + node_modules/lodash/nth.js | 29 + node_modules/lodash/nthArg.js | 32 + node_modules/lodash/number.js | 5 + node_modules/lodash/object.js | 49 + node_modules/lodash/omit.js | 57 + node_modules/lodash/omitBy.js | 29 + node_modules/lodash/once.js | 25 + node_modules/lodash/orderBy.js | 47 + node_modules/lodash/over.js | 24 + node_modules/lodash/overArgs.js | 61 + node_modules/lodash/overEvery.js | 34 + node_modules/lodash/overSome.js | 37 + node_modules/lodash/package.json | 17 + node_modules/lodash/pad.js | 49 + node_modules/lodash/padEnd.js | 39 + node_modules/lodash/padStart.js | 39 + node_modules/lodash/parseInt.js | 43 + node_modules/lodash/partial.js | 50 + node_modules/lodash/partialRight.js | 49 + node_modules/lodash/partition.js | 43 + node_modules/lodash/pick.js | 25 + node_modules/lodash/pickBy.js | 37 + node_modules/lodash/plant.js | 48 + node_modules/lodash/property.js | 32 + node_modules/lodash/propertyOf.js | 30 + node_modules/lodash/pull.js | 29 + node_modules/lodash/pullAll.js | 29 + node_modules/lodash/pullAllBy.js | 33 + node_modules/lodash/pullAllWith.js | 32 + node_modules/lodash/pullAt.js | 43 + node_modules/lodash/random.js | 82 + node_modules/lodash/range.js | 46 + node_modules/lodash/rangeRight.js | 41 + node_modules/lodash/rearg.js | 33 + node_modules/lodash/reduce.js | 51 + node_modules/lodash/reduceRight.js | 36 + node_modules/lodash/reject.js | 46 + node_modules/lodash/release.md | 48 + node_modules/lodash/remove.js | 53 + node_modules/lodash/repeat.js | 37 + node_modules/lodash/replace.js | 29 + node_modules/lodash/rest.js | 40 + node_modules/lodash/result.js | 56 + node_modules/lodash/reverse.js | 34 + node_modules/lodash/round.js | 26 + node_modules/lodash/sample.js | 24 + node_modules/lodash/sampleSize.js | 37 + node_modules/lodash/seq.js | 16 + node_modules/lodash/set.js | 35 + node_modules/lodash/setWith.js | 32 + node_modules/lodash/shuffle.js | 25 + node_modules/lodash/size.js | 46 + node_modules/lodash/slice.js | 37 + node_modules/lodash/snakeCase.js | 28 + node_modules/lodash/some.js | 51 + node_modules/lodash/sortBy.js | 48 + node_modules/lodash/sortedIndex.js | 24 + node_modules/lodash/sortedIndexBy.js | 33 + node_modules/lodash/sortedIndexOf.js | 31 + node_modules/lodash/sortedLastIndex.js | 25 + node_modules/lodash/sortedLastIndexBy.js | 33 + node_modules/lodash/sortedLastIndexOf.js | 31 + node_modules/lodash/sortedUniq.js | 24 + node_modules/lodash/sortedUniqBy.js | 26 + node_modules/lodash/split.js | 52 + node_modules/lodash/spread.js | 63 + node_modules/lodash/startCase.js | 29 + node_modules/lodash/startsWith.js | 39 + node_modules/lodash/string.js | 33 + node_modules/lodash/stubArray.js | 23 + node_modules/lodash/stubFalse.js | 18 + node_modules/lodash/stubObject.js | 23 + node_modules/lodash/stubString.js | 18 + node_modules/lodash/stubTrue.js | 18 + node_modules/lodash/subtract.js | 22 + node_modules/lodash/sum.js | 24 + node_modules/lodash/sumBy.js | 33 + node_modules/lodash/tail.js | 22 + node_modules/lodash/take.js | 37 + node_modules/lodash/takeRight.js | 39 + node_modules/lodash/takeRightWhile.js | 45 + node_modules/lodash/takeWhile.js | 45 + node_modules/lodash/tap.js | 29 + node_modules/lodash/template.js | 272 + node_modules/lodash/templateSettings.js | 67 + node_modules/lodash/throttle.js | 69 + node_modules/lodash/thru.js | 28 + node_modules/lodash/times.js | 51 + node_modules/lodash/toArray.js | 58 + node_modules/lodash/toFinite.js | 42 + node_modules/lodash/toInteger.js | 36 + node_modules/lodash/toIterator.js | 23 + node_modules/lodash/toJSON.js | 1 + node_modules/lodash/toLength.js | 38 + node_modules/lodash/toLower.js | 28 + node_modules/lodash/toNumber.js | 64 + node_modules/lodash/toPairs.js | 30 + node_modules/lodash/toPairsIn.js | 30 + node_modules/lodash/toPath.js | 33 + node_modules/lodash/toPlainObject.js | 32 + node_modules/lodash/toSafeInteger.js | 37 + node_modules/lodash/toString.js | 28 + node_modules/lodash/toUpper.js | 28 + node_modules/lodash/transform.js | 65 + node_modules/lodash/trim.js | 47 + node_modules/lodash/trimEnd.js | 41 + node_modules/lodash/trimStart.js | 43 + node_modules/lodash/truncate.js | 111 + node_modules/lodash/unary.js | 22 + node_modules/lodash/unescape.js | 34 + node_modules/lodash/union.js | 26 + node_modules/lodash/unionBy.js | 39 + node_modules/lodash/unionWith.js | 34 + node_modules/lodash/uniq.js | 25 + node_modules/lodash/uniqBy.js | 31 + node_modules/lodash/uniqWith.js | 28 + node_modules/lodash/uniqueId.js | 28 + node_modules/lodash/unset.js | 34 + node_modules/lodash/unzip.js | 45 + node_modules/lodash/unzipWith.js | 39 + node_modules/lodash/update.js | 35 + node_modules/lodash/updateWith.js | 33 + node_modules/lodash/upperCase.js | 27 + node_modules/lodash/upperFirst.js | 22 + node_modules/lodash/util.js | 34 + node_modules/lodash/value.js | 1 + node_modules/lodash/valueOf.js | 1 + node_modules/lodash/values.js | 34 + node_modules/lodash/valuesIn.js | 32 + node_modules/lodash/without.js | 31 + node_modules/lodash/words.js | 35 + node_modules/lodash/wrap.js | 30 + node_modules/lodash/wrapperAt.js | 48 + node_modules/lodash/wrapperChain.js | 34 + node_modules/lodash/wrapperLodash.js | 147 + node_modules/lodash/wrapperReverse.js | 44 + node_modules/lodash/wrapperValue.js | 21 + node_modules/lodash/xor.js | 28 + node_modules/lodash/xorBy.js | 39 + node_modules/lodash/xorWith.js | 34 + node_modules/lodash/zip.js | 22 + node_modules/lodash/zipObject.js | 24 + node_modules/lodash/zipObjectDeep.js | 23 + node_modules/lodash/zipWith.js | 32 + node_modules/mime-db/HISTORY.md | 480 + node_modules/mime-db/LICENSE | 22 + node_modules/mime-db/README.md | 100 + node_modules/mime-db/db.json | 8379 ++++++++ node_modules/mime-db/index.js | 11 + node_modules/mime-db/package.json | 59 + node_modules/mime-types/HISTORY.md | 371 + node_modules/mime-types/LICENSE | 23 + node_modules/mime-types/README.md | 113 + node_modules/mime-types/index.js | 188 + node_modules/mime-types/package.json | 44 + node_modules/ms/index.js | 162 + node_modules/ms/license.md | 21 + node_modules/ms/package.json | 37 + node_modules/ms/readme.md | 60 + node_modules/nwsapi/LICENSE | 22 + node_modules/nwsapi/README.md | 132 + node_modules/nwsapi/dist/lint.log | 0 node_modules/nwsapi/package.json | 38 + .../nwsapi/src/modules/nwsapi-jquery.js | 135 + .../nwsapi/src/modules/nwsapi-traversal.js | 90 + node_modules/nwsapi/src/nwsapi.js | 1800 ++ node_modules/optionator/CHANGELOG.md | 56 + node_modules/optionator/LICENSE | 22 + node_modules/optionator/README.md | 238 + node_modules/optionator/lib/help.js | 260 + node_modules/optionator/lib/index.js | 465 + node_modules/optionator/lib/util.js | 54 + node_modules/optionator/package.json | 44 + node_modules/parse5/LICENSE | 19 + node_modules/parse5/README.md | 38 + node_modules/parse5/lib/common/doctype.js | 162 + node_modules/parse5/lib/common/error-codes.js | 65 + .../parse5/lib/common/foreign-content.js | 265 + node_modules/parse5/lib/common/html.js | 272 + node_modules/parse5/lib/common/unicode.js | 109 + .../extensions/error-reporting/mixin-base.js | 43 + .../error-reporting/parser-mixin.js | 52 + .../error-reporting/preprocessor-mixin.js | 24 + .../error-reporting/tokenizer-mixin.js | 17 + .../location-info/open-element-stack-mixin.js | 35 + .../extensions/location-info/parser-mixin.js | 223 + .../location-info/tokenizer-mixin.js | 146 + .../position-tracking/preprocessor-mixin.js | 64 + node_modules/parse5/lib/index.js | 29 + .../lib/parser/formatting-element-list.js | 181 + node_modules/parse5/lib/parser/index.js | 2956 +++ .../parse5/lib/parser/open-element-stack.js | 482 + node_modules/parse5/lib/serializer/index.js | 176 + node_modules/parse5/lib/tokenizer/index.js | 2196 ++ .../parse5/lib/tokenizer/named-entity-data.js | 5 + .../parse5/lib/tokenizer/preprocessor.js | 159 + .../parse5/lib/tree-adapters/default.js | 221 + .../parse5/lib/utils/merge-options.js | 13 + node_modules/parse5/lib/utils/mixin.js | 39 + node_modules/parse5/package.json | 35 + node_modules/prelude-ls/CHANGELOG.md | 99 + node_modules/prelude-ls/LICENSE | 22 + node_modules/prelude-ls/README.md | 15 + node_modules/prelude-ls/lib/Func.js | 65 + node_modules/prelude-ls/lib/List.js | 686 + node_modules/prelude-ls/lib/Num.js | 130 + node_modules/prelude-ls/lib/Obj.js | 154 + node_modules/prelude-ls/lib/Str.js | 92 + node_modules/prelude-ls/lib/index.js | 178 + node_modules/prelude-ls/package.json | 52 + node_modules/psl/LICENSE | 9 + node_modules/psl/README.md | 215 + node_modules/psl/browserstack-logo.svg | 90 + node_modules/psl/data/rules.json | 8834 ++++++++ node_modules/psl/dist/psl.js | 9645 +++++++++ node_modules/psl/dist/psl.min.js | 1 + node_modules/psl/index.js | 269 + node_modules/psl/package.json | 44 + node_modules/punycode/LICENSE-MIT.txt | 20 + node_modules/punycode/README.md | 122 + node_modules/punycode/package.json | 58 + node_modules/punycode/punycode.es6.js | 441 + node_modules/punycode/punycode.js | 440 + node_modules/safer-buffer/LICENSE | 21 + node_modules/safer-buffer/Porting-Buffer.md | 268 + node_modules/safer-buffer/Readme.md | 156 + node_modules/safer-buffer/dangerous.js | 58 + node_modules/safer-buffer/package.json | 34 + node_modules/safer-buffer/safer.js | 77 + node_modules/safer-buffer/tests.js | 406 + node_modules/sax/LICENSE | 41 + node_modules/sax/README.md | 225 + node_modules/sax/lib/sax.js | 1565 ++ node_modules/sax/package.json | 25 + node_modules/saxes/README.md | 323 + node_modules/saxes/package.json | 70 + node_modules/saxes/saxes.d.ts | 635 + node_modules/saxes/saxes.js | 2064 ++ node_modules/saxes/saxes.js.map | 1 + node_modules/source-map/CHANGELOG.md | 301 + node_modules/source-map/LICENSE | 28 + node_modules/source-map/README.md | 742 + .../source-map/dist/source-map.debug.js | 3234 +++ node_modules/source-map/dist/source-map.js | 3233 +++ .../source-map/dist/source-map.min.js | 2 + .../source-map/dist/source-map.min.js.map | 1 + node_modules/source-map/lib/array-set.js | 121 + node_modules/source-map/lib/base64-vlq.js | 140 + node_modules/source-map/lib/base64.js | 67 + node_modules/source-map/lib/binary-search.js | 111 + node_modules/source-map/lib/mapping-list.js | 79 + node_modules/source-map/lib/quick-sort.js | 114 + .../source-map/lib/source-map-consumer.js | 1145 + .../source-map/lib/source-map-generator.js | 425 + node_modules/source-map/lib/source-node.js | 413 + node_modules/source-map/lib/util.js | 488 + node_modules/source-map/package.json | 73 + node_modules/source-map/source-map.d.ts | 98 + node_modules/source-map/source-map.js | 8 + node_modules/symbol-tree/LICENSE | 21 + node_modules/symbol-tree/README.md | 545 + node_modules/symbol-tree/lib/SymbolTree.js | 838 + .../symbol-tree/lib/SymbolTreeNode.js | 54 + node_modules/symbol-tree/lib/TreeIterator.js | 69 + node_modules/symbol-tree/lib/TreePosition.js | 11 + node_modules/symbol-tree/package.json | 47 + node_modules/tough-cookie/LICENSE | 12 + node_modules/tough-cookie/README.md | 582 + node_modules/tough-cookie/lib/cookie.js | 1671 ++ node_modules/tough-cookie/lib/memstore.js | 190 + node_modules/tough-cookie/lib/pathMatch.js | 61 + .../tough-cookie/lib/permuteDomain.js | 70 + .../tough-cookie/lib/pubsuffix-psl.js | 38 + node_modules/tough-cookie/lib/store.js | 76 + node_modules/tough-cookie/lib/version.js | 2 + node_modules/tough-cookie/package.json | 109 + node_modules/tr46/LICENSE.md | 21 + node_modules/tr46/README.md | 72 + node_modules/tr46/index.js | 297 + node_modules/tr46/lib/mappingTable.json | 1 + node_modules/tr46/lib/regexes.js | 29 + node_modules/tr46/lib/statusMapping.js | 11 + node_modules/tr46/package.json | 46 + node_modules/type-check/LICENSE | 22 + node_modules/type-check/README.md | 210 + node_modules/type-check/lib/check.js | 126 + node_modules/type-check/lib/index.js | 16 + node_modules/type-check/lib/parse-type.js | 196 + node_modules/type-check/package.json | 40 + node_modules/universalify/LICENSE | 20 + node_modules/universalify/README.md | 76 + node_modules/universalify/index.js | 25 + node_modules/universalify/package.json | 34 + node_modules/w3c-hr-time/CHANGELOG.md | 19 + node_modules/w3c-hr-time/LICENSE.md | 21 + node_modules/w3c-hr-time/README.md | 130 + node_modules/w3c-hr-time/index.js | 11 + .../w3c-hr-time/lib/calculate-clock-offset.js | 39 + .../w3c-hr-time/lib/clock-is-accurate.js | 61 + .../w3c-hr-time/lib/global-monotonic-clock.js | 10 + node_modules/w3c-hr-time/lib/performance.js | 53 + node_modules/w3c-hr-time/lib/utils.js | 11 + node_modules/w3c-hr-time/package.json | 26 + node_modules/w3c-xmlserializer/LICENSE.md | 25 + node_modules/w3c-xmlserializer/README.md | 41 + .../w3c-xmlserializer/lib/attributes.js | 128 + .../w3c-xmlserializer/lib/constants.js | 44 + .../w3c-xmlserializer/lib/serialize.js | 371 + node_modules/w3c-xmlserializer/package.json | 32 + node_modules/webidl-conversions/LICENSE.md | 12 + node_modules/webidl-conversions/README.md | 101 + node_modules/webidl-conversions/lib/index.js | 489 + node_modules/webidl-conversions/package.json | 30 + node_modules/whatwg-encoding/LICENSE.txt | 7 + node_modules/whatwg-encoding/README.md | 50 + .../whatwg-encoding/lib/labels-to-names.json | 207 + .../whatwg-encoding/lib/supported-names.json | 37 + .../whatwg-encoding/lib/whatwg-encoding.js | 47 + node_modules/whatwg-encoding/package.json | 29 + node_modules/whatwg-mimetype/LICENSE.txt | 7 + node_modules/whatwg-mimetype/README.md | 101 + node_modules/whatwg-mimetype/lib/mime-type.js | 191 + node_modules/whatwg-mimetype/lib/parser.js | 124 + .../whatwg-mimetype/lib/serializer.js | 25 + node_modules/whatwg-mimetype/lib/utils.js | 25 + node_modules/whatwg-mimetype/package.json | 43 + node_modules/whatwg-url/LICENSE.txt | 21 + node_modules/whatwg-url/README.md | 104 + node_modules/whatwg-url/dist/Function.js | 46 + node_modules/whatwg-url/dist/URL-impl.js | 217 + node_modules/whatwg-url/dist/URL.js | 417 + .../whatwg-url/dist/URLSearchParams-impl.js | 122 + .../whatwg-url/dist/URLSearchParams.js | 457 + node_modules/whatwg-url/dist/VoidFunction.js | 30 + node_modules/whatwg-url/dist/encoding.js | 26 + node_modules/whatwg-url/dist/infra.js | 26 + .../whatwg-url/dist/percent-encoding.js | 141 + .../whatwg-url/dist/url-state-machine.js | 1207 ++ node_modules/whatwg-url/dist/urlencoded.js | 103 + node_modules/whatwg-url/dist/utils.js | 141 + node_modules/whatwg-url/index.js | 24 + node_modules/whatwg-url/package.json | 59 + node_modules/whatwg-url/webidl2js-wrapper.js | 7 + node_modules/word-wrap/LICENSE | 21 + node_modules/word-wrap/README.md | 182 + node_modules/word-wrap/index.d.ts | 50 + node_modules/word-wrap/index.js | 46 + node_modules/word-wrap/package.json | 77 + node_modules/ws/LICENSE | 21 + node_modules/ws/README.md | 496 + node_modules/ws/browser.js | 8 + node_modules/ws/index.js | 10 + node_modules/ws/lib/buffer-util.js | 129 + node_modules/ws/lib/constants.js | 10 + node_modules/ws/lib/event-target.js | 184 + node_modules/ws/lib/extension.js | 223 + node_modules/ws/lib/limiter.js | 55 + node_modules/ws/lib/permessage-deflate.js | 517 + node_modules/ws/lib/receiver.js | 507 + node_modules/ws/lib/sender.js | 405 + node_modules/ws/lib/stream.js | 165 + node_modules/ws/lib/validation.js | 104 + node_modules/ws/lib/websocket-server.js | 418 + node_modules/ws/lib/websocket.js | 942 + node_modules/ws/package.json | 56 + node_modules/xml-name-validator/LICENSE.txt | 176 + node_modules/xml-name-validator/README.md | 36 + .../lib/generated-parser.js | 504 + .../xml-name-validator/lib/grammar.pegjs | 35 + .../lib/xml-name-validator.js | 17 + node_modules/xml-name-validator/package.json | 28 + node_modules/xml2js/LICENSE | 19 + node_modules/xml2js/README.md | 488 + node_modules/xml2js/lib/bom.js | 12 + node_modules/xml2js/lib/builder.js | 127 + node_modules/xml2js/lib/defaults.js | 72 + node_modules/xml2js/lib/parser.js | 381 + node_modules/xml2js/lib/processors.js | 34 + node_modules/xml2js/lib/xml2js.js | 39 + node_modules/xml2js/package.json | 92 + node_modules/xmlbuilder/CHANGELOG.md | 470 + node_modules/xmlbuilder/LICENSE | 21 + node_modules/xmlbuilder/README.md | 86 + node_modules/xmlbuilder/appveyor.yml | 20 + node_modules/xmlbuilder/lib/Derivation.js | 10 + .../xmlbuilder/lib/DocumentPosition.js | 12 + node_modules/xmlbuilder/lib/NodeType.js | 23 + node_modules/xmlbuilder/lib/OperationType.js | 11 + node_modules/xmlbuilder/lib/Utility.js | 83 + node_modules/xmlbuilder/lib/WriterState.js | 10 + node_modules/xmlbuilder/lib/XMLAttribute.js | 108 + node_modules/xmlbuilder/lib/XMLCData.js | 36 + .../xmlbuilder/lib/XMLCharacterData.js | 79 + node_modules/xmlbuilder/lib/XMLComment.js | 36 + .../xmlbuilder/lib/XMLDOMConfiguration.js | 64 + .../xmlbuilder/lib/XMLDOMErrorHandler.js | 16 + .../xmlbuilder/lib/XMLDOMImplementation.js | 32 + .../xmlbuilder/lib/XMLDOMStringList.js | 28 + node_modules/xmlbuilder/lib/XMLDTDAttList.js | 55 + node_modules/xmlbuilder/lib/XMLDTDElement.js | 38 + node_modules/xmlbuilder/lib/XMLDTDEntity.js | 97 + node_modules/xmlbuilder/lib/XMLDTDNotation.js | 52 + node_modules/xmlbuilder/lib/XMLDeclaration.js | 43 + node_modules/xmlbuilder/lib/XMLDocType.js | 186 + node_modules/xmlbuilder/lib/XMLDocument.js | 242 + node_modules/xmlbuilder/lib/XMLDocumentCB.js | 528 + .../xmlbuilder/lib/XMLDocumentFragment.js | 24 + node_modules/xmlbuilder/lib/XMLDummy.js | 31 + node_modules/xmlbuilder/lib/XMLElement.js | 298 + .../xmlbuilder/lib/XMLNamedNodeMap.js | 58 + node_modules/xmlbuilder/lib/XMLNode.js | 785 + node_modules/xmlbuilder/lib/XMLNodeFilter.js | 48 + node_modules/xmlbuilder/lib/XMLNodeList.js | 28 + .../lib/XMLProcessingInstruction.js | 49 + node_modules/xmlbuilder/lib/XMLRaw.js | 35 + .../xmlbuilder/lib/XMLStreamWriter.js | 176 + .../xmlbuilder/lib/XMLStringWriter.js | 35 + node_modules/xmlbuilder/lib/XMLStringifier.js | 240 + node_modules/xmlbuilder/lib/XMLText.js | 69 + node_modules/xmlbuilder/lib/XMLTypeInfo.js | 21 + .../xmlbuilder/lib/XMLUserDataHandler.js | 16 + node_modules/xmlbuilder/lib/XMLWriterBase.js | 428 + node_modules/xmlbuilder/lib/index.js | 65 + node_modules/xmlbuilder/package.json | 39 + node_modules/xmlbuilder/typings/index.d.ts | 153 + node_modules/xmlchars/LICENSE | 18 + node_modules/xmlchars/README.md | 33 + node_modules/xmlchars/package.json | 51 + node_modules/xmlchars/xml/1.0/ed4.d.ts | 31 + node_modules/xmlchars/xml/1.0/ed4.js | 44 + node_modules/xmlchars/xml/1.0/ed4.js.map | 1 + node_modules/xmlchars/xml/1.0/ed5.d.ts | 51 + node_modules/xmlchars/xml/1.0/ed5.js | 105 + node_modules/xmlchars/xml/1.0/ed5.js.map | 1 + node_modules/xmlchars/xml/1.1/ed2.d.ts | 73 + node_modules/xmlchars/xml/1.1/ed2.js | 145 + node_modules/xmlchars/xml/1.1/ed2.js.map | 1 + node_modules/xmlchars/xmlchars.d.ts | 170 + node_modules/xmlchars/xmlchars.js | 191 + node_modules/xmlchars/xmlchars.js.map | 1 + node_modules/xmlchars/xmlns/1.0/ed3.d.ts | 28 + node_modules/xmlchars/xmlns/1.0/ed3.js | 65 + node_modules/xmlchars/xmlns/1.0/ed3.js.map | 1 + package-lock.json | 1082 + package.json | 6 + scripts/mdx-scripts/event-conversion.js | 14 +- 2246 files changed, 296060 insertions(+), 2 deletions(-) create mode 100644 node_modules/.bin/acorn create mode 100644 node_modules/.bin/acorn.cmd create mode 100644 node_modules/.bin/acorn.ps1 create mode 100644 node_modules/.bin/detect-libc create mode 100644 node_modules/.bin/detect-libc.cmd create mode 100644 node_modules/.bin/detect-libc.ps1 create mode 100644 node_modules/.bin/escodegen create mode 100644 node_modules/.bin/escodegen.cmd create mode 100644 node_modules/.bin/escodegen.ps1 create mode 100644 node_modules/.bin/esgenerate create mode 100644 node_modules/.bin/esgenerate.cmd create mode 100644 node_modules/.bin/esgenerate.ps1 create mode 100644 node_modules/.bin/esparse create mode 100644 node_modules/.bin/esparse.cmd create mode 100644 node_modules/.bin/esparse.ps1 create mode 100644 node_modules/.bin/esvalidate create mode 100644 node_modules/.bin/esvalidate.cmd create mode 100644 node_modules/.bin/esvalidate.ps1 create mode 100644 node_modules/.bin/mkdirp create mode 100644 node_modules/.bin/mkdirp.cmd create mode 100644 node_modules/.bin/mkdirp.ps1 create mode 100644 node_modules/.bin/needle create mode 100644 node_modules/.bin/needle.cmd create mode 100644 node_modules/.bin/needle.ps1 create mode 100644 node_modules/.bin/node-pre-gyp create mode 100644 node_modules/.bin/node-pre-gyp.cmd create mode 100644 node_modules/.bin/node-pre-gyp.ps1 create mode 100644 node_modules/.bin/nopt create mode 100644 node_modules/.bin/nopt.cmd create mode 100644 node_modules/.bin/nopt.ps1 create mode 100644 node_modules/.bin/rc create mode 100644 node_modules/.bin/rc.cmd create mode 100644 node_modules/.bin/rc.ps1 create mode 100644 node_modules/.bin/rimraf create mode 100644 node_modules/.bin/rimraf.cmd create mode 100644 node_modules/.bin/rimraf.ps1 create mode 100644 node_modules/.bin/semver create mode 100644 node_modules/.bin/semver.cmd create mode 100644 node_modules/.bin/semver.ps1 create mode 100644 node_modules/.package-lock.json create mode 100644 node_modules/@tootallnate/once/dist/index.d.ts create mode 100644 node_modules/@tootallnate/once/dist/index.js create mode 100644 node_modules/@tootallnate/once/dist/index.js.map create mode 100644 node_modules/@tootallnate/once/package.json create mode 100644 node_modules/abab/CHANGELOG.md create mode 100644 node_modules/abab/LICENSE.md create mode 100644 node_modules/abab/README.md create mode 100644 node_modules/abab/index.d.ts create mode 100644 node_modules/abab/index.js create mode 100644 node_modules/abab/lib/atob.js create mode 100644 node_modules/abab/lib/btoa.js create mode 100644 node_modules/abab/package.json create mode 100644 node_modules/acorn-globals/LICENSE create mode 100644 node_modules/acorn-globals/README.md create mode 100644 node_modules/acorn-globals/index.js create mode 100644 node_modules/acorn-globals/node_modules/.bin/acorn create mode 100644 node_modules/acorn-globals/node_modules/.bin/acorn.cmd create mode 100644 node_modules/acorn-globals/node_modules/.bin/acorn.ps1 create mode 100644 node_modules/acorn-globals/node_modules/acorn/CHANGELOG.md create mode 100644 node_modules/acorn-globals/node_modules/acorn/LICENSE create mode 100644 node_modules/acorn-globals/node_modules/acorn/README.md create mode 100644 node_modules/acorn-globals/node_modules/acorn/bin/acorn create mode 100644 node_modules/acorn-globals/node_modules/acorn/dist/acorn.d.ts create mode 100644 node_modules/acorn-globals/node_modules/acorn/dist/acorn.js create mode 100644 node_modules/acorn-globals/node_modules/acorn/dist/acorn.js.map create mode 100644 node_modules/acorn-globals/node_modules/acorn/dist/acorn.mjs create mode 100644 node_modules/acorn-globals/node_modules/acorn/dist/acorn.mjs.d.ts create mode 100644 node_modules/acorn-globals/node_modules/acorn/dist/acorn.mjs.map create mode 100644 node_modules/acorn-globals/node_modules/acorn/dist/bin.js create mode 100644 node_modules/acorn-globals/node_modules/acorn/package.json create mode 100644 node_modules/acorn-globals/package.json create mode 100644 node_modules/acorn-walk/CHANGELOG.md create mode 100644 node_modules/acorn-walk/LICENSE create mode 100644 node_modules/acorn-walk/README.md create mode 100644 node_modules/acorn-walk/dist/walk.d.ts create mode 100644 node_modules/acorn-walk/dist/walk.js create mode 100644 node_modules/acorn-walk/dist/walk.js.map create mode 100644 node_modules/acorn-walk/dist/walk.mjs create mode 100644 node_modules/acorn-walk/dist/walk.mjs.map create mode 100644 node_modules/acorn-walk/package.json create mode 100644 node_modules/acorn/CHANGELOG.md create mode 100644 node_modules/acorn/LICENSE create mode 100644 node_modules/acorn/README.md create mode 100644 node_modules/acorn/bin/acorn create mode 100644 node_modules/acorn/dist/acorn.d.ts create mode 100644 node_modules/acorn/dist/acorn.js create mode 100644 node_modules/acorn/dist/acorn.mjs create mode 100644 node_modules/acorn/dist/acorn.mjs.d.ts create mode 100644 node_modules/acorn/dist/bin.js create mode 100644 node_modules/acorn/package.json create mode 100644 node_modules/agent-base/README.md create mode 100644 node_modules/agent-base/dist/src/index.d.ts create mode 100644 node_modules/agent-base/dist/src/index.js create mode 100644 node_modules/agent-base/dist/src/index.js.map create mode 100644 node_modules/agent-base/dist/src/promisify.d.ts create mode 100644 node_modules/agent-base/dist/src/promisify.js create mode 100644 node_modules/agent-base/dist/src/promisify.js.map create mode 100644 node_modules/agent-base/package.json create mode 100644 node_modules/agent-base/src/index.ts create mode 100644 node_modules/agent-base/src/promisify.ts create mode 100644 node_modules/asynckit/LICENSE create mode 100644 node_modules/asynckit/README.md create mode 100644 node_modules/asynckit/bench.js create mode 100644 node_modules/asynckit/index.js create mode 100644 node_modules/asynckit/lib/abort.js create mode 100644 node_modules/asynckit/lib/async.js create mode 100644 node_modules/asynckit/lib/defer.js create mode 100644 node_modules/asynckit/lib/iterate.js create mode 100644 node_modules/asynckit/lib/readable_asynckit.js create mode 100644 node_modules/asynckit/lib/readable_parallel.js create mode 100644 node_modules/asynckit/lib/readable_serial.js create mode 100644 node_modules/asynckit/lib/readable_serial_ordered.js create mode 100644 node_modules/asynckit/lib/state.js create mode 100644 node_modules/asynckit/lib/streamify.js create mode 100644 node_modules/asynckit/lib/terminator.js create mode 100644 node_modules/asynckit/package.json create mode 100644 node_modules/asynckit/parallel.js create mode 100644 node_modules/asynckit/serial.js create mode 100644 node_modules/asynckit/serialOrdered.js create mode 100644 node_modules/asynckit/stream.js create mode 100644 node_modules/browser-process-hrtime/LICENSE create mode 100644 node_modules/browser-process-hrtime/README.md create mode 100644 node_modules/browser-process-hrtime/index.d.ts create mode 100644 node_modules/browser-process-hrtime/index.js create mode 100644 node_modules/browser-process-hrtime/package.json create mode 100644 node_modules/combined-stream/License create mode 100644 node_modules/combined-stream/Readme.md create mode 100644 node_modules/combined-stream/lib/combined_stream.js create mode 100644 node_modules/combined-stream/package.json create mode 100644 node_modules/combined-stream/yarn.lock create mode 100644 node_modules/cssom/LICENSE.txt create mode 100644 node_modules/cssom/README.mdown create mode 100644 node_modules/cssom/lib/CSSDocumentRule.js create mode 100644 node_modules/cssom/lib/CSSFontFaceRule.js create mode 100644 node_modules/cssom/lib/CSSHostRule.js create mode 100644 node_modules/cssom/lib/CSSImportRule.js create mode 100644 node_modules/cssom/lib/CSSKeyframeRule.js create mode 100644 node_modules/cssom/lib/CSSKeyframesRule.js create mode 100644 node_modules/cssom/lib/CSSMediaRule.js create mode 100644 node_modules/cssom/lib/CSSOM.js create mode 100644 node_modules/cssom/lib/CSSRule.js create mode 100644 node_modules/cssom/lib/CSSStyleDeclaration.js create mode 100644 node_modules/cssom/lib/CSSStyleRule.js create mode 100644 node_modules/cssom/lib/CSSStyleSheet.js create mode 100644 node_modules/cssom/lib/CSSSupportsRule.js create mode 100644 node_modules/cssom/lib/CSSValue.js create mode 100644 node_modules/cssom/lib/CSSValueExpression.js create mode 100644 node_modules/cssom/lib/MatcherList.js create mode 100644 node_modules/cssom/lib/MediaList.js create mode 100644 node_modules/cssom/lib/StyleSheet.js create mode 100644 node_modules/cssom/lib/clone.js create mode 100644 node_modules/cssom/lib/index.js create mode 100644 node_modules/cssom/lib/parse.js create mode 100644 node_modules/cssom/package.json create mode 100644 node_modules/cssstyle/LICENSE create mode 100644 node_modules/cssstyle/README.md create mode 100644 node_modules/cssstyle/lib/CSSStyleDeclaration.js create mode 100644 node_modules/cssstyle/lib/CSSStyleDeclaration.test.js create mode 100644 node_modules/cssstyle/lib/allExtraProperties.js create mode 100644 node_modules/cssstyle/lib/allProperties.js create mode 100644 node_modules/cssstyle/lib/allWebkitProperties.js create mode 100644 node_modules/cssstyle/lib/constants.js create mode 100644 node_modules/cssstyle/lib/implementedProperties.js create mode 100644 node_modules/cssstyle/lib/named_colors.json create mode 100644 node_modules/cssstyle/lib/parsers.js create mode 100644 node_modules/cssstyle/lib/parsers.test.js create mode 100644 node_modules/cssstyle/lib/properties.js create mode 100644 node_modules/cssstyle/lib/properties/azimuth.js create mode 100644 node_modules/cssstyle/lib/properties/background.js create mode 100644 node_modules/cssstyle/lib/properties/backgroundAttachment.js create mode 100644 node_modules/cssstyle/lib/properties/backgroundColor.js create mode 100644 node_modules/cssstyle/lib/properties/backgroundImage.js create mode 100644 node_modules/cssstyle/lib/properties/backgroundPosition.js create mode 100644 node_modules/cssstyle/lib/properties/backgroundRepeat.js create mode 100644 node_modules/cssstyle/lib/properties/border.js create mode 100644 node_modules/cssstyle/lib/properties/borderBottom.js create mode 100644 node_modules/cssstyle/lib/properties/borderBottomColor.js create mode 100644 node_modules/cssstyle/lib/properties/borderBottomStyle.js create mode 100644 node_modules/cssstyle/lib/properties/borderBottomWidth.js create mode 100644 node_modules/cssstyle/lib/properties/borderCollapse.js create mode 100644 node_modules/cssstyle/lib/properties/borderColor.js create mode 100644 node_modules/cssstyle/lib/properties/borderLeft.js create mode 100644 node_modules/cssstyle/lib/properties/borderLeftColor.js create mode 100644 node_modules/cssstyle/lib/properties/borderLeftStyle.js create mode 100644 node_modules/cssstyle/lib/properties/borderLeftWidth.js create mode 100644 node_modules/cssstyle/lib/properties/borderRight.js create mode 100644 node_modules/cssstyle/lib/properties/borderRightColor.js create mode 100644 node_modules/cssstyle/lib/properties/borderRightStyle.js create mode 100644 node_modules/cssstyle/lib/properties/borderRightWidth.js create mode 100644 node_modules/cssstyle/lib/properties/borderSpacing.js create mode 100644 node_modules/cssstyle/lib/properties/borderStyle.js create mode 100644 node_modules/cssstyle/lib/properties/borderTop.js create mode 100644 node_modules/cssstyle/lib/properties/borderTopColor.js create mode 100644 node_modules/cssstyle/lib/properties/borderTopStyle.js create mode 100644 node_modules/cssstyle/lib/properties/borderTopWidth.js create mode 100644 node_modules/cssstyle/lib/properties/borderWidth.js create mode 100644 node_modules/cssstyle/lib/properties/bottom.js create mode 100644 node_modules/cssstyle/lib/properties/clear.js create mode 100644 node_modules/cssstyle/lib/properties/clip.js create mode 100644 node_modules/cssstyle/lib/properties/color.js create mode 100644 node_modules/cssstyle/lib/properties/cssFloat.js create mode 100644 node_modules/cssstyle/lib/properties/flex.js create mode 100644 node_modules/cssstyle/lib/properties/flexBasis.js create mode 100644 node_modules/cssstyle/lib/properties/flexGrow.js create mode 100644 node_modules/cssstyle/lib/properties/flexShrink.js create mode 100644 node_modules/cssstyle/lib/properties/float.js create mode 100644 node_modules/cssstyle/lib/properties/floodColor.js create mode 100644 node_modules/cssstyle/lib/properties/font.js create mode 100644 node_modules/cssstyle/lib/properties/fontFamily.js create mode 100644 node_modules/cssstyle/lib/properties/fontSize.js create mode 100644 node_modules/cssstyle/lib/properties/fontStyle.js create mode 100644 node_modules/cssstyle/lib/properties/fontVariant.js create mode 100644 node_modules/cssstyle/lib/properties/fontWeight.js create mode 100644 node_modules/cssstyle/lib/properties/height.js create mode 100644 node_modules/cssstyle/lib/properties/left.js create mode 100644 node_modules/cssstyle/lib/properties/lightingColor.js create mode 100644 node_modules/cssstyle/lib/properties/lineHeight.js create mode 100644 node_modules/cssstyle/lib/properties/margin.js create mode 100644 node_modules/cssstyle/lib/properties/marginBottom.js create mode 100644 node_modules/cssstyle/lib/properties/marginLeft.js create mode 100644 node_modules/cssstyle/lib/properties/marginRight.js create mode 100644 node_modules/cssstyle/lib/properties/marginTop.js create mode 100644 node_modules/cssstyle/lib/properties/opacity.js create mode 100644 node_modules/cssstyle/lib/properties/outlineColor.js create mode 100644 node_modules/cssstyle/lib/properties/padding.js create mode 100644 node_modules/cssstyle/lib/properties/paddingBottom.js create mode 100644 node_modules/cssstyle/lib/properties/paddingLeft.js create mode 100644 node_modules/cssstyle/lib/properties/paddingRight.js create mode 100644 node_modules/cssstyle/lib/properties/paddingTop.js create mode 100644 node_modules/cssstyle/lib/properties/right.js create mode 100644 node_modules/cssstyle/lib/properties/stopColor.js create mode 100644 node_modules/cssstyle/lib/properties/textLineThroughColor.js create mode 100644 node_modules/cssstyle/lib/properties/textOverlineColor.js create mode 100644 node_modules/cssstyle/lib/properties/textUnderlineColor.js create mode 100644 node_modules/cssstyle/lib/properties/top.js create mode 100644 node_modules/cssstyle/lib/properties/webkitBorderAfterColor.js create mode 100644 node_modules/cssstyle/lib/properties/webkitBorderBeforeColor.js create mode 100644 node_modules/cssstyle/lib/properties/webkitBorderEndColor.js create mode 100644 node_modules/cssstyle/lib/properties/webkitBorderStartColor.js create mode 100644 node_modules/cssstyle/lib/properties/webkitColumnRuleColor.js create mode 100644 node_modules/cssstyle/lib/properties/webkitMatchNearestMailBlockquoteColor.js create mode 100644 node_modules/cssstyle/lib/properties/webkitTapHighlightColor.js create mode 100644 node_modules/cssstyle/lib/properties/webkitTextEmphasisColor.js create mode 100644 node_modules/cssstyle/lib/properties/webkitTextFillColor.js create mode 100644 node_modules/cssstyle/lib/properties/webkitTextStrokeColor.js create mode 100644 node_modules/cssstyle/lib/properties/width.js create mode 100644 node_modules/cssstyle/lib/utils/colorSpace.js create mode 100644 node_modules/cssstyle/lib/utils/getBasicPropertyDescriptor.js create mode 100644 node_modules/cssstyle/node_modules/cssom/LICENSE.txt create mode 100644 node_modules/cssstyle/node_modules/cssom/README.mdown create mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSDocumentRule.js create mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSFontFaceRule.js create mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSHostRule.js create mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSImportRule.js create mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSKeyframeRule.js create mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSKeyframesRule.js create mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSMediaRule.js create mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSOM.js create mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSRule.js create mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSStyleDeclaration.js create mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSStyleRule.js create mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSStyleSheet.js create mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSSupportsRule.js create mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSValue.js create mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSValueExpression.js create mode 100644 node_modules/cssstyle/node_modules/cssom/lib/MatcherList.js create mode 100644 node_modules/cssstyle/node_modules/cssom/lib/MediaList.js create mode 100644 node_modules/cssstyle/node_modules/cssom/lib/StyleSheet.js create mode 100644 node_modules/cssstyle/node_modules/cssom/lib/clone.js create mode 100644 node_modules/cssstyle/node_modules/cssom/lib/index.js create mode 100644 node_modules/cssstyle/node_modules/cssom/lib/parse.js create mode 100644 node_modules/cssstyle/node_modules/cssom/package.json create mode 100644 node_modules/cssstyle/package.json create mode 100644 node_modules/data-urls/LICENSE.txt create mode 100644 node_modules/data-urls/README.md create mode 100644 node_modules/data-urls/lib/parser.js create mode 100644 node_modules/data-urls/lib/utils.js create mode 100644 node_modules/data-urls/package.json create mode 100644 node_modules/debug/LICENSE create mode 100644 node_modules/debug/README.md create mode 100644 node_modules/debug/package.json create mode 100644 node_modules/debug/src/browser.js create mode 100644 node_modules/debug/src/common.js create mode 100644 node_modules/debug/src/index.js create mode 100644 node_modules/debug/src/node.js create mode 100644 node_modules/decimal.js/CHANGELOG.md create mode 100644 node_modules/decimal.js/LICENCE.md create mode 100644 node_modules/decimal.js/README.md create mode 100644 node_modules/decimal.js/decimal.d.ts create mode 100644 node_modules/decimal.js/decimal.global.d.ts create mode 100644 node_modules/decimal.js/decimal.js create mode 100644 node_modules/decimal.js/decimal.min.js create mode 100644 node_modules/decimal.js/decimal.min.js.map create mode 100644 node_modules/decimal.js/decimal.mjs create mode 100644 node_modules/decimal.js/doc/API.html create mode 100644 node_modules/decimal.js/package.json create mode 100644 node_modules/deep-is/.npmignore create mode 100644 node_modules/deep-is/.travis.yml create mode 100644 node_modules/deep-is/LICENSE create mode 100644 node_modules/deep-is/README.markdown create mode 100644 node_modules/deep-is/example/cmp.js create mode 100644 node_modules/deep-is/index.js create mode 100644 node_modules/deep-is/package.json create mode 100644 node_modules/deep-is/test/NaN.js create mode 100644 node_modules/deep-is/test/cmp.js create mode 100644 node_modules/deep-is/test/neg-vs-pos-0.js create mode 100644 node_modules/delayed-stream/.npmignore create mode 100644 node_modules/delayed-stream/License create mode 100644 node_modules/delayed-stream/Makefile create mode 100644 node_modules/delayed-stream/Readme.md create mode 100644 node_modules/delayed-stream/lib/delayed_stream.js create mode 100644 node_modules/delayed-stream/package.json create mode 100644 node_modules/domexception/LICENSE.txt create mode 100644 node_modules/domexception/README.md create mode 100644 node_modules/domexception/index.js create mode 100644 node_modules/domexception/lib/DOMException-impl.js create mode 100644 node_modules/domexception/lib/DOMException.js create mode 100644 node_modules/domexception/lib/legacy-error-codes.json create mode 100644 node_modules/domexception/lib/utils.js create mode 100644 node_modules/domexception/node_modules/webidl-conversions/LICENSE.md create mode 100644 node_modules/domexception/node_modules/webidl-conversions/README.md create mode 100644 node_modules/domexception/node_modules/webidl-conversions/lib/index.js create mode 100644 node_modules/domexception/node_modules/webidl-conversions/package.json create mode 100644 node_modules/domexception/package.json create mode 100644 node_modules/domexception/webidl2js-wrapper.js create mode 100644 node_modules/escodegen/LICENSE.BSD create mode 100644 node_modules/escodegen/README.md create mode 100644 node_modules/escodegen/bin/escodegen.js create mode 100644 node_modules/escodegen/bin/esgenerate.js create mode 100644 node_modules/escodegen/escodegen.js create mode 100644 node_modules/escodegen/package.json create mode 100644 node_modules/esprima/ChangeLog create mode 100644 node_modules/esprima/LICENSE.BSD create mode 100644 node_modules/esprima/README.md create mode 100644 node_modules/esprima/bin/esparse.js create mode 100644 node_modules/esprima/bin/esvalidate.js create mode 100644 node_modules/esprima/dist/esprima.js create mode 100644 node_modules/esprima/package.json create mode 100644 node_modules/estraverse/.jshintrc create mode 100644 node_modules/estraverse/LICENSE.BSD create mode 100644 node_modules/estraverse/README.md create mode 100644 node_modules/estraverse/estraverse.js create mode 100644 node_modules/estraverse/gulpfile.js create mode 100644 node_modules/estraverse/package.json create mode 100644 node_modules/esutils/LICENSE.BSD create mode 100644 node_modules/esutils/README.md create mode 100644 node_modules/esutils/lib/ast.js create mode 100644 node_modules/esutils/lib/code.js create mode 100644 node_modules/esutils/lib/keyword.js create mode 100644 node_modules/esutils/lib/utils.js create mode 100644 node_modules/esutils/package.json create mode 100644 node_modules/fast-levenshtein/LICENSE.md create mode 100644 node_modules/fast-levenshtein/README.md create mode 100644 node_modules/fast-levenshtein/levenshtein.js create mode 100644 node_modules/fast-levenshtein/package.json create mode 100644 node_modules/form-data/License create mode 100644 node_modules/form-data/README.md.bak create mode 100644 node_modules/form-data/Readme.md create mode 100644 node_modules/form-data/index.d.ts create mode 100644 node_modules/form-data/lib/browser.js create mode 100644 node_modules/form-data/lib/form_data.js create mode 100644 node_modules/form-data/lib/populate.js create mode 100644 node_modules/form-data/package.json create mode 100644 node_modules/html-encoding-sniffer/LICENSE.txt create mode 100644 node_modules/html-encoding-sniffer/README.md create mode 100644 node_modules/html-encoding-sniffer/lib/html-encoding-sniffer.js create mode 100644 node_modules/html-encoding-sniffer/package.json create mode 100644 node_modules/http-proxy-agent/README.md create mode 100644 node_modules/http-proxy-agent/dist/agent.d.ts create mode 100644 node_modules/http-proxy-agent/dist/agent.js create mode 100644 node_modules/http-proxy-agent/dist/agent.js.map create mode 100644 node_modules/http-proxy-agent/dist/index.d.ts create mode 100644 node_modules/http-proxy-agent/dist/index.js create mode 100644 node_modules/http-proxy-agent/dist/index.js.map create mode 100644 node_modules/http-proxy-agent/package.json create mode 100644 node_modules/https-proxy-agent/README.md create mode 100644 node_modules/https-proxy-agent/dist/agent.d.ts create mode 100644 node_modules/https-proxy-agent/dist/agent.js create mode 100644 node_modules/https-proxy-agent/dist/agent.js.map create mode 100644 node_modules/https-proxy-agent/dist/index.d.ts create mode 100644 node_modules/https-proxy-agent/dist/index.js create mode 100644 node_modules/https-proxy-agent/dist/index.js.map create mode 100644 node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts create mode 100644 node_modules/https-proxy-agent/dist/parse-proxy-response.js create mode 100644 node_modules/https-proxy-agent/dist/parse-proxy-response.js.map create mode 100644 node_modules/https-proxy-agent/package.json create mode 100644 node_modules/iconv-lite/Changelog.md create mode 100644 node_modules/iconv-lite/LICENSE create mode 100644 node_modules/iconv-lite/README.md create mode 100644 node_modules/iconv-lite/encodings/dbcs-codec.js create mode 100644 node_modules/iconv-lite/encodings/dbcs-data.js create mode 100644 node_modules/iconv-lite/encodings/index.js create mode 100644 node_modules/iconv-lite/encodings/internal.js create mode 100644 node_modules/iconv-lite/encodings/sbcs-codec.js create mode 100644 node_modules/iconv-lite/encodings/sbcs-data-generated.js create mode 100644 node_modules/iconv-lite/encodings/sbcs-data.js create mode 100644 node_modules/iconv-lite/encodings/tables/big5-added.json create mode 100644 node_modules/iconv-lite/encodings/tables/cp936.json create mode 100644 node_modules/iconv-lite/encodings/tables/cp949.json create mode 100644 node_modules/iconv-lite/encodings/tables/cp950.json create mode 100644 node_modules/iconv-lite/encodings/tables/eucjp.json create mode 100644 node_modules/iconv-lite/encodings/tables/gb18030-ranges.json create mode 100644 node_modules/iconv-lite/encodings/tables/gbk-added.json create mode 100644 node_modules/iconv-lite/encodings/tables/shiftjis.json create mode 100644 node_modules/iconv-lite/encodings/utf16.js create mode 100644 node_modules/iconv-lite/encodings/utf7.js create mode 100644 node_modules/iconv-lite/lib/bom-handling.js create mode 100644 node_modules/iconv-lite/lib/extend-node.js create mode 100644 node_modules/iconv-lite/lib/index.d.ts create mode 100644 node_modules/iconv-lite/lib/index.js create mode 100644 node_modules/iconv-lite/lib/streams.js create mode 100644 node_modules/iconv-lite/package.json create mode 100644 node_modules/is-potential-custom-element-name/LICENSE-MIT.txt create mode 100644 node_modules/is-potential-custom-element-name/README.md create mode 100644 node_modules/is-potential-custom-element-name/index.js create mode 100644 node_modules/is-potential-custom-element-name/package.json create mode 100644 node_modules/jsdom/Changelog.md create mode 100644 node_modules/jsdom/LICENSE.txt create mode 100644 node_modules/jsdom/README.md create mode 100644 node_modules/jsdom/lib/api.js create mode 100644 node_modules/jsdom/lib/jsdom/browser/Window.js create mode 100644 node_modules/jsdom/lib/jsdom/browser/default-stylesheet.js create mode 100644 node_modules/jsdom/lib/jsdom/browser/js-globals.json create mode 100644 node_modules/jsdom/lib/jsdom/browser/not-implemented.js create mode 100644 node_modules/jsdom/lib/jsdom/browser/parser/html.js create mode 100644 node_modules/jsdom/lib/jsdom/browser/parser/index.js create mode 100644 node_modules/jsdom/lib/jsdom/browser/parser/xml.js create mode 100644 node_modules/jsdom/lib/jsdom/browser/resources/async-resource-queue.js create mode 100644 node_modules/jsdom/lib/jsdom/browser/resources/no-op-resource-loader.js create mode 100644 node_modules/jsdom/lib/jsdom/browser/resources/per-document-resource-loader.js create mode 100644 node_modules/jsdom/lib/jsdom/browser/resources/request-manager.js create mode 100644 node_modules/jsdom/lib/jsdom/browser/resources/resource-loader.js create mode 100644 node_modules/jsdom/lib/jsdom/browser/resources/resource-queue.js create mode 100644 node_modules/jsdom/lib/jsdom/level2/style.js create mode 100644 node_modules/jsdom/lib/jsdom/level3/xpath.js create mode 100644 node_modules/jsdom/lib/jsdom/living/aborting/AbortController-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/aborting/AbortSignal-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/attributes.js create mode 100644 node_modules/jsdom/lib/jsdom/living/attributes/Attr-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/attributes/NamedNodeMap-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/constraint-validation/DefaultConstraintValidation-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/constraint-validation/ValidityState-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/cssom/StyleSheetList-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/custom-elements/CustomElementRegistry-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/documents.js create mode 100644 node_modules/jsdom/lib/jsdom/living/domparsing/DOMParser-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/domparsing/InnerHTML-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/domparsing/XMLSerializer-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/domparsing/parse5-adapter-serialization.js create mode 100644 node_modules/jsdom/lib/jsdom/living/domparsing/serialization.js create mode 100644 node_modules/jsdom/lib/jsdom/living/events/CloseEvent-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/events/CompositionEvent-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/events/CustomEvent-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/events/ErrorEvent-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/events/Event-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/events/EventModifierMixin-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/events/FocusEvent-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/events/HashChangeEvent-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/events/InputEvent-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/events/KeyboardEvent-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/events/MessageEvent-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/events/MouseEvent-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/events/PageTransitionEvent-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/events/PopStateEvent-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/events/ProgressEvent-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/events/StorageEvent-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/events/TouchEvent-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/events/UIEvent-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/events/WheelEvent-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/fetch/Headers-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/fetch/header-list.js create mode 100644 node_modules/jsdom/lib/jsdom/living/fetch/header-types.js create mode 100644 node_modules/jsdom/lib/jsdom/living/file-api/Blob-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/file-api/File-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/file-api/FileList-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/file-api/FileReader-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/AbortController.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/AbortSignal.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/AbstractRange.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/AddEventListenerOptions.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/AssignedNodesOptions.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Attr.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/BarProp.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/BinaryType.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Blob.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/BlobCallback.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/BlobPropertyBag.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CDATASection.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CanPlayTypeResult.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CharacterData.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CloseEvent.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CloseEventInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Comment.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CompositionEvent.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CompositionEventInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CustomElementConstructor.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CustomElementRegistry.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CustomEvent.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CustomEventInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/DOMImplementation.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/DOMParser.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/DOMStringMap.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/DOMTokenList.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Document.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/DocumentFragment.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/DocumentReadyState.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/DocumentType.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Element.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ElementCreationOptions.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ElementDefinitionOptions.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/EndingType.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ErrorEvent.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ErrorEventInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Event.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/EventHandlerNonNull.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/EventInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/EventListener.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/EventListenerOptions.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/EventModifierInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/External.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/File.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/FileList.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/FilePropertyBag.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/FileReader.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/FocusEvent.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/FocusEventInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/FormData.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Function.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/GetRootNodeOptions.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLAnchorElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLAreaElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLAudioElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLBRElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLBaseElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLBodyElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLButtonElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLCanvasElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLCollection.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLDListElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLDataElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLDataListElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLDetailsElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLDialogElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLDirectoryElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLDivElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLEmbedElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLFieldSetElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLFontElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLFormElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLFrameElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLFrameSetElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLHRElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLHeadElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLHeadingElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLHtmlElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLIFrameElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLImageElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLInputElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLLIElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLLabelElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLLegendElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLLinkElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLMapElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLMarqueeElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLMediaElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLMenuElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLMetaElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLMeterElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLModElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLOListElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLObjectElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLOptGroupElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLOptionElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLOptionsCollection.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLOutputElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLParagraphElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLParamElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLPictureElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLPreElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLProgressElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLQuoteElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLScriptElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLSelectElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLSlotElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLSourceElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLSpanElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLStyleElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTableCaptionElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTableCellElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTableColElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTableElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTableRowElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTableSectionElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTemplateElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTextAreaElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTimeElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTitleElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTrackElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLUListElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLUnknownElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLVideoElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HashChangeEvent.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HashChangeEventInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Headers.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/History.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/InputEvent.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/InputEventInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/KeyboardEvent.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/KeyboardEventInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Location.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MessageEvent.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MessageEventInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MimeType.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MimeTypeArray.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MouseEvent.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MouseEventInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MutationCallback.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MutationObserver.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MutationObserverInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MutationRecord.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/NamedNodeMap.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Navigator.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Node.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/NodeFilter.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/NodeIterator.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/NodeList.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/OnBeforeUnloadEventHandlerNonNull.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/OnErrorEventHandlerNonNull.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/PageTransitionEvent.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/PageTransitionEventInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Performance.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Plugin.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/PluginArray.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/PopStateEvent.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/PopStateEventInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ProcessingInstruction.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ProgressEvent.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ProgressEventInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Range.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGAnimatedString.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGBoundingBoxOptions.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGGraphicsElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGNumber.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGSVGElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGStringList.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGTitleElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Screen.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ScrollBehavior.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ScrollIntoViewOptions.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ScrollLogicalPosition.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ScrollOptions.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ScrollRestoration.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Selection.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SelectionMode.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ShadowRoot.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ShadowRootInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ShadowRootMode.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/StaticRange.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/StaticRangeInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Storage.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/StorageEvent.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/StorageEventInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/StyleSheetList.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SupportedType.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Text.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/TextTrackKind.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/TouchEvent.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/TouchEventInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/TreeWalker.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/UIEvent.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/UIEventInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ValidityState.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/VisibilityState.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/VoidFunction.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/WebSocket.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/WheelEvent.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/WheelEventInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/XMLDocument.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequest.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequestEventTarget.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequestResponseType.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequestUpload.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/XMLSerializer.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/utils.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/agent-factory.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/binary-data.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/create-element.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/create-event-accessor.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/custom-elements.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/dates-and-times.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/details.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/document-base-url.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/events.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/focusing.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/form-controls.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/html-constructor.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/http-request.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/internal-constants.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/iterable-weak-set.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/json.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/namespaces.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/node.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/number-and-date-inputs.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/ordered-set.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/selectors.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/shadow-dom.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/strings.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/style-rules.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/stylesheets.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/svg/render.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/text.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/traversal.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/validate-names.js create mode 100644 node_modules/jsdom/lib/jsdom/living/hr-time/Performance-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/interfaces.js create mode 100644 node_modules/jsdom/lib/jsdom/living/mutation-observer/MutationObserver-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/mutation-observer/MutationRecord-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/named-properties-window.js create mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/MimeType-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/MimeTypeArray-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/Navigator-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/NavigatorConcurrentHardware-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/NavigatorCookies-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/NavigatorID-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/NavigatorLanguage-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/NavigatorOnLine-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/NavigatorPlugins-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/Plugin-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/PluginArray-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/node-document-position.js create mode 100644 node_modules/jsdom/lib/jsdom/living/node-type.js create mode 100644 node_modules/jsdom/lib/jsdom/living/node.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/CDATASection-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/CharacterData-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/ChildNode-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/Comment-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/DOMImplementation-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/DOMStringMap-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/DOMTokenList-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/DocumentFragment-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/DocumentOrShadowRoot-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/DocumentType-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/Element-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/ElementCSSInlineStyle-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/ElementContentEditable-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/GlobalEventHandlers-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLAnchorElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLAreaElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLAudioElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLBRElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLBaseElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLBodyElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLButtonElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLCanvasElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLCollection-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLDListElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLDataElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLDataListElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLDetailsElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLDialogElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLDirectoryElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLDivElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLEmbedElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLFieldSetElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLFontElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLFormElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLFrameElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLFrameSetElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLHRElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLHeadElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLHeadingElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLHtmlElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLHyperlinkElementUtils-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLIFrameElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLImageElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLInputElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLLIElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLLabelElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLLegendElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLLinkElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLMapElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLMarqueeElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLMediaElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLMenuElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLMetaElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLMeterElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLModElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLOListElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLObjectElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLOptGroupElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLOptionElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLOptionsCollection-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLOrSVGElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLOutputElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLParagraphElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLParamElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLPictureElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLPreElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLProgressElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLQuoteElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLScriptElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLSelectElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLSlotElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLSourceElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLSpanElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLStyleElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableCaptionElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableCellElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableColElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableRowElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableSectionElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTemplateElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTextAreaElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTimeElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTitleElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTrackElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLUListElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLUnknownElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLVideoElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/LinkStyle-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/Node-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/NodeList-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/NonDocumentTypeChildNode-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/NonElementParentNode-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/ParentNode-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/ProcessingInstruction-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/SVGElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/SVGGraphicsElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/SVGSVGElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/SVGTests-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/SVGTitleElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/ShadowRoot-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/Slotable-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/Text-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/WindowEventHandlers-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/XMLDocument-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/post-message.js create mode 100644 node_modules/jsdom/lib/jsdom/living/range/AbstractRange-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/range/Range-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/range/StaticRange-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/range/boundary-point.js create mode 100644 node_modules/jsdom/lib/jsdom/living/selection/Selection-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/svg/SVGAnimatedString-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/svg/SVGListBase.js create mode 100644 node_modules/jsdom/lib/jsdom/living/svg/SVGNumber-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/svg/SVGStringList-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/traversal/NodeIterator-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/traversal/TreeWalker-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/traversal/helpers.js create mode 100644 node_modules/jsdom/lib/jsdom/living/websockets/WebSocket-impl-browser.js create mode 100644 node_modules/jsdom/lib/jsdom/living/websockets/WebSocket-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/webstorage/Storage-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/window/BarProp-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/window/External-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/window/History-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/window/History.webidl create mode 100644 node_modules/jsdom/lib/jsdom/living/window/Location-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/window/Screen-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/window/SessionHistory.js create mode 100644 node_modules/jsdom/lib/jsdom/living/window/navigation.js create mode 100644 node_modules/jsdom/lib/jsdom/living/xhr/FormData-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequestEventTarget-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequestUpload-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/xhr/xhr-sync-worker.js create mode 100644 node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js create mode 100644 node_modules/jsdom/lib/jsdom/named-properties-tracker.js create mode 100644 node_modules/jsdom/lib/jsdom/utils.js create mode 100644 node_modules/jsdom/lib/jsdom/virtual-console.js create mode 100644 node_modules/jsdom/lib/jsdom/vm-shim.js create mode 100644 node_modules/jsdom/package.json create mode 100644 node_modules/levn/LICENSE create mode 100644 node_modules/levn/README.md create mode 100644 node_modules/levn/lib/cast.js create mode 100644 node_modules/levn/lib/coerce.js create mode 100644 node_modules/levn/lib/index.js create mode 100644 node_modules/levn/lib/parse-string.js create mode 100644 node_modules/levn/lib/parse.js create mode 100644 node_modules/levn/package.json create mode 100644 node_modules/lodash/LICENSE create mode 100644 node_modules/lodash/README.md create mode 100644 node_modules/lodash/_DataView.js create mode 100644 node_modules/lodash/_Hash.js create mode 100644 node_modules/lodash/_LazyWrapper.js create mode 100644 node_modules/lodash/_ListCache.js create mode 100644 node_modules/lodash/_LodashWrapper.js create mode 100644 node_modules/lodash/_Map.js create mode 100644 node_modules/lodash/_MapCache.js create mode 100644 node_modules/lodash/_Promise.js create mode 100644 node_modules/lodash/_Set.js create mode 100644 node_modules/lodash/_SetCache.js create mode 100644 node_modules/lodash/_Stack.js create mode 100644 node_modules/lodash/_Symbol.js create mode 100644 node_modules/lodash/_Uint8Array.js create mode 100644 node_modules/lodash/_WeakMap.js create mode 100644 node_modules/lodash/_apply.js create mode 100644 node_modules/lodash/_arrayAggregator.js create mode 100644 node_modules/lodash/_arrayEach.js create mode 100644 node_modules/lodash/_arrayEachRight.js create mode 100644 node_modules/lodash/_arrayEvery.js create mode 100644 node_modules/lodash/_arrayFilter.js create mode 100644 node_modules/lodash/_arrayIncludes.js create mode 100644 node_modules/lodash/_arrayIncludesWith.js create mode 100644 node_modules/lodash/_arrayLikeKeys.js create mode 100644 node_modules/lodash/_arrayMap.js create mode 100644 node_modules/lodash/_arrayPush.js create mode 100644 node_modules/lodash/_arrayReduce.js create mode 100644 node_modules/lodash/_arrayReduceRight.js create mode 100644 node_modules/lodash/_arraySample.js create mode 100644 node_modules/lodash/_arraySampleSize.js create mode 100644 node_modules/lodash/_arrayShuffle.js create mode 100644 node_modules/lodash/_arraySome.js create mode 100644 node_modules/lodash/_asciiSize.js create mode 100644 node_modules/lodash/_asciiToArray.js create mode 100644 node_modules/lodash/_asciiWords.js create mode 100644 node_modules/lodash/_assignMergeValue.js create mode 100644 node_modules/lodash/_assignValue.js create mode 100644 node_modules/lodash/_assocIndexOf.js create mode 100644 node_modules/lodash/_baseAggregator.js create mode 100644 node_modules/lodash/_baseAssign.js create mode 100644 node_modules/lodash/_baseAssignIn.js create mode 100644 node_modules/lodash/_baseAssignValue.js create mode 100644 node_modules/lodash/_baseAt.js create mode 100644 node_modules/lodash/_baseClamp.js create mode 100644 node_modules/lodash/_baseClone.js create mode 100644 node_modules/lodash/_baseConforms.js create mode 100644 node_modules/lodash/_baseConformsTo.js create mode 100644 node_modules/lodash/_baseCreate.js create mode 100644 node_modules/lodash/_baseDelay.js create mode 100644 node_modules/lodash/_baseDifference.js create mode 100644 node_modules/lodash/_baseEach.js create mode 100644 node_modules/lodash/_baseEachRight.js create mode 100644 node_modules/lodash/_baseEvery.js create mode 100644 node_modules/lodash/_baseExtremum.js create mode 100644 node_modules/lodash/_baseFill.js create mode 100644 node_modules/lodash/_baseFilter.js create mode 100644 node_modules/lodash/_baseFindIndex.js create mode 100644 node_modules/lodash/_baseFindKey.js create mode 100644 node_modules/lodash/_baseFlatten.js create mode 100644 node_modules/lodash/_baseFor.js create mode 100644 node_modules/lodash/_baseForOwn.js create mode 100644 node_modules/lodash/_baseForOwnRight.js create mode 100644 node_modules/lodash/_baseForRight.js create mode 100644 node_modules/lodash/_baseFunctions.js create mode 100644 node_modules/lodash/_baseGet.js create mode 100644 node_modules/lodash/_baseGetAllKeys.js create mode 100644 node_modules/lodash/_baseGetTag.js create mode 100644 node_modules/lodash/_baseGt.js create mode 100644 node_modules/lodash/_baseHas.js create mode 100644 node_modules/lodash/_baseHasIn.js create mode 100644 node_modules/lodash/_baseInRange.js create mode 100644 node_modules/lodash/_baseIndexOf.js create mode 100644 node_modules/lodash/_baseIndexOfWith.js create mode 100644 node_modules/lodash/_baseIntersection.js create mode 100644 node_modules/lodash/_baseInverter.js create mode 100644 node_modules/lodash/_baseInvoke.js create mode 100644 node_modules/lodash/_baseIsArguments.js create mode 100644 node_modules/lodash/_baseIsArrayBuffer.js create mode 100644 node_modules/lodash/_baseIsDate.js create mode 100644 node_modules/lodash/_baseIsEqual.js create mode 100644 node_modules/lodash/_baseIsEqualDeep.js create mode 100644 node_modules/lodash/_baseIsMap.js create mode 100644 node_modules/lodash/_baseIsMatch.js create mode 100644 node_modules/lodash/_baseIsNaN.js create mode 100644 node_modules/lodash/_baseIsNative.js create mode 100644 node_modules/lodash/_baseIsRegExp.js create mode 100644 node_modules/lodash/_baseIsSet.js create mode 100644 node_modules/lodash/_baseIsTypedArray.js create mode 100644 node_modules/lodash/_baseIteratee.js create mode 100644 node_modules/lodash/_baseKeys.js create mode 100644 node_modules/lodash/_baseKeysIn.js create mode 100644 node_modules/lodash/_baseLodash.js create mode 100644 node_modules/lodash/_baseLt.js create mode 100644 node_modules/lodash/_baseMap.js create mode 100644 node_modules/lodash/_baseMatches.js create mode 100644 node_modules/lodash/_baseMatchesProperty.js create mode 100644 node_modules/lodash/_baseMean.js create mode 100644 node_modules/lodash/_baseMerge.js create mode 100644 node_modules/lodash/_baseMergeDeep.js create mode 100644 node_modules/lodash/_baseNth.js create mode 100644 node_modules/lodash/_baseOrderBy.js create mode 100644 node_modules/lodash/_basePick.js create mode 100644 node_modules/lodash/_basePickBy.js create mode 100644 node_modules/lodash/_baseProperty.js create mode 100644 node_modules/lodash/_basePropertyDeep.js create mode 100644 node_modules/lodash/_basePropertyOf.js create mode 100644 node_modules/lodash/_basePullAll.js create mode 100644 node_modules/lodash/_basePullAt.js create mode 100644 node_modules/lodash/_baseRandom.js create mode 100644 node_modules/lodash/_baseRange.js create mode 100644 node_modules/lodash/_baseReduce.js create mode 100644 node_modules/lodash/_baseRepeat.js create mode 100644 node_modules/lodash/_baseRest.js create mode 100644 node_modules/lodash/_baseSample.js create mode 100644 node_modules/lodash/_baseSampleSize.js create mode 100644 node_modules/lodash/_baseSet.js create mode 100644 node_modules/lodash/_baseSetData.js create mode 100644 node_modules/lodash/_baseSetToString.js create mode 100644 node_modules/lodash/_baseShuffle.js create mode 100644 node_modules/lodash/_baseSlice.js create mode 100644 node_modules/lodash/_baseSome.js create mode 100644 node_modules/lodash/_baseSortBy.js create mode 100644 node_modules/lodash/_baseSortedIndex.js create mode 100644 node_modules/lodash/_baseSortedIndexBy.js create mode 100644 node_modules/lodash/_baseSortedUniq.js create mode 100644 node_modules/lodash/_baseSum.js create mode 100644 node_modules/lodash/_baseTimes.js create mode 100644 node_modules/lodash/_baseToNumber.js create mode 100644 node_modules/lodash/_baseToPairs.js create mode 100644 node_modules/lodash/_baseToString.js create mode 100644 node_modules/lodash/_baseTrim.js create mode 100644 node_modules/lodash/_baseUnary.js create mode 100644 node_modules/lodash/_baseUniq.js create mode 100644 node_modules/lodash/_baseUnset.js create mode 100644 node_modules/lodash/_baseUpdate.js create mode 100644 node_modules/lodash/_baseValues.js create mode 100644 node_modules/lodash/_baseWhile.js create mode 100644 node_modules/lodash/_baseWrapperValue.js create mode 100644 node_modules/lodash/_baseXor.js create mode 100644 node_modules/lodash/_baseZipObject.js create mode 100644 node_modules/lodash/_cacheHas.js create mode 100644 node_modules/lodash/_castArrayLikeObject.js create mode 100644 node_modules/lodash/_castFunction.js create mode 100644 node_modules/lodash/_castPath.js create mode 100644 node_modules/lodash/_castRest.js create mode 100644 node_modules/lodash/_castSlice.js create mode 100644 node_modules/lodash/_charsEndIndex.js create mode 100644 node_modules/lodash/_charsStartIndex.js create mode 100644 node_modules/lodash/_cloneArrayBuffer.js create mode 100644 node_modules/lodash/_cloneBuffer.js create mode 100644 node_modules/lodash/_cloneDataView.js create mode 100644 node_modules/lodash/_cloneRegExp.js create mode 100644 node_modules/lodash/_cloneSymbol.js create mode 100644 node_modules/lodash/_cloneTypedArray.js create mode 100644 node_modules/lodash/_compareAscending.js create mode 100644 node_modules/lodash/_compareMultiple.js create mode 100644 node_modules/lodash/_composeArgs.js create mode 100644 node_modules/lodash/_composeArgsRight.js create mode 100644 node_modules/lodash/_copyArray.js create mode 100644 node_modules/lodash/_copyObject.js create mode 100644 node_modules/lodash/_copySymbols.js create mode 100644 node_modules/lodash/_copySymbolsIn.js create mode 100644 node_modules/lodash/_coreJsData.js create mode 100644 node_modules/lodash/_countHolders.js create mode 100644 node_modules/lodash/_createAggregator.js create mode 100644 node_modules/lodash/_createAssigner.js create mode 100644 node_modules/lodash/_createBaseEach.js create mode 100644 node_modules/lodash/_createBaseFor.js create mode 100644 node_modules/lodash/_createBind.js create mode 100644 node_modules/lodash/_createCaseFirst.js create mode 100644 node_modules/lodash/_createCompounder.js create mode 100644 node_modules/lodash/_createCtor.js create mode 100644 node_modules/lodash/_createCurry.js create mode 100644 node_modules/lodash/_createFind.js create mode 100644 node_modules/lodash/_createFlow.js create mode 100644 node_modules/lodash/_createHybrid.js create mode 100644 node_modules/lodash/_createInverter.js create mode 100644 node_modules/lodash/_createMathOperation.js create mode 100644 node_modules/lodash/_createOver.js create mode 100644 node_modules/lodash/_createPadding.js create mode 100644 node_modules/lodash/_createPartial.js create mode 100644 node_modules/lodash/_createRange.js create mode 100644 node_modules/lodash/_createRecurry.js create mode 100644 node_modules/lodash/_createRelationalOperation.js create mode 100644 node_modules/lodash/_createRound.js create mode 100644 node_modules/lodash/_createSet.js create mode 100644 node_modules/lodash/_createToPairs.js create mode 100644 node_modules/lodash/_createWrap.js create mode 100644 node_modules/lodash/_customDefaultsAssignIn.js create mode 100644 node_modules/lodash/_customDefaultsMerge.js create mode 100644 node_modules/lodash/_customOmitClone.js create mode 100644 node_modules/lodash/_deburrLetter.js create mode 100644 node_modules/lodash/_defineProperty.js create mode 100644 node_modules/lodash/_equalArrays.js create mode 100644 node_modules/lodash/_equalByTag.js create mode 100644 node_modules/lodash/_equalObjects.js create mode 100644 node_modules/lodash/_escapeHtmlChar.js create mode 100644 node_modules/lodash/_escapeStringChar.js create mode 100644 node_modules/lodash/_flatRest.js create mode 100644 node_modules/lodash/_freeGlobal.js create mode 100644 node_modules/lodash/_getAllKeys.js create mode 100644 node_modules/lodash/_getAllKeysIn.js create mode 100644 node_modules/lodash/_getData.js create mode 100644 node_modules/lodash/_getFuncName.js create mode 100644 node_modules/lodash/_getHolder.js create mode 100644 node_modules/lodash/_getMapData.js create mode 100644 node_modules/lodash/_getMatchData.js create mode 100644 node_modules/lodash/_getNative.js create mode 100644 node_modules/lodash/_getPrototype.js create mode 100644 node_modules/lodash/_getRawTag.js create mode 100644 node_modules/lodash/_getSymbols.js create mode 100644 node_modules/lodash/_getSymbolsIn.js create mode 100644 node_modules/lodash/_getTag.js create mode 100644 node_modules/lodash/_getValue.js create mode 100644 node_modules/lodash/_getView.js create mode 100644 node_modules/lodash/_getWrapDetails.js create mode 100644 node_modules/lodash/_hasPath.js create mode 100644 node_modules/lodash/_hasUnicode.js create mode 100644 node_modules/lodash/_hasUnicodeWord.js create mode 100644 node_modules/lodash/_hashClear.js create mode 100644 node_modules/lodash/_hashDelete.js create mode 100644 node_modules/lodash/_hashGet.js create mode 100644 node_modules/lodash/_hashHas.js create mode 100644 node_modules/lodash/_hashSet.js create mode 100644 node_modules/lodash/_initCloneArray.js create mode 100644 node_modules/lodash/_initCloneByTag.js create mode 100644 node_modules/lodash/_initCloneObject.js create mode 100644 node_modules/lodash/_insertWrapDetails.js create mode 100644 node_modules/lodash/_isFlattenable.js create mode 100644 node_modules/lodash/_isIndex.js create mode 100644 node_modules/lodash/_isIterateeCall.js create mode 100644 node_modules/lodash/_isKey.js create mode 100644 node_modules/lodash/_isKeyable.js create mode 100644 node_modules/lodash/_isLaziable.js create mode 100644 node_modules/lodash/_isMaskable.js create mode 100644 node_modules/lodash/_isMasked.js create mode 100644 node_modules/lodash/_isPrototype.js create mode 100644 node_modules/lodash/_isStrictComparable.js create mode 100644 node_modules/lodash/_iteratorToArray.js create mode 100644 node_modules/lodash/_lazyClone.js create mode 100644 node_modules/lodash/_lazyReverse.js create mode 100644 node_modules/lodash/_lazyValue.js create mode 100644 node_modules/lodash/_listCacheClear.js create mode 100644 node_modules/lodash/_listCacheDelete.js create mode 100644 node_modules/lodash/_listCacheGet.js create mode 100644 node_modules/lodash/_listCacheHas.js create mode 100644 node_modules/lodash/_listCacheSet.js create mode 100644 node_modules/lodash/_mapCacheClear.js create mode 100644 node_modules/lodash/_mapCacheDelete.js create mode 100644 node_modules/lodash/_mapCacheGet.js create mode 100644 node_modules/lodash/_mapCacheHas.js create mode 100644 node_modules/lodash/_mapCacheSet.js create mode 100644 node_modules/lodash/_mapToArray.js create mode 100644 node_modules/lodash/_matchesStrictComparable.js create mode 100644 node_modules/lodash/_memoizeCapped.js create mode 100644 node_modules/lodash/_mergeData.js create mode 100644 node_modules/lodash/_metaMap.js create mode 100644 node_modules/lodash/_nativeCreate.js create mode 100644 node_modules/lodash/_nativeKeys.js create mode 100644 node_modules/lodash/_nativeKeysIn.js create mode 100644 node_modules/lodash/_nodeUtil.js create mode 100644 node_modules/lodash/_objectToString.js create mode 100644 node_modules/lodash/_overArg.js create mode 100644 node_modules/lodash/_overRest.js create mode 100644 node_modules/lodash/_parent.js create mode 100644 node_modules/lodash/_reEscape.js create mode 100644 node_modules/lodash/_reEvaluate.js create mode 100644 node_modules/lodash/_reInterpolate.js create mode 100644 node_modules/lodash/_realNames.js create mode 100644 node_modules/lodash/_reorder.js create mode 100644 node_modules/lodash/_replaceHolders.js create mode 100644 node_modules/lodash/_root.js create mode 100644 node_modules/lodash/_safeGet.js create mode 100644 node_modules/lodash/_setCacheAdd.js create mode 100644 node_modules/lodash/_setCacheHas.js create mode 100644 node_modules/lodash/_setData.js create mode 100644 node_modules/lodash/_setToArray.js create mode 100644 node_modules/lodash/_setToPairs.js create mode 100644 node_modules/lodash/_setToString.js create mode 100644 node_modules/lodash/_setWrapToString.js create mode 100644 node_modules/lodash/_shortOut.js create mode 100644 node_modules/lodash/_shuffleSelf.js create mode 100644 node_modules/lodash/_stackClear.js create mode 100644 node_modules/lodash/_stackDelete.js create mode 100644 node_modules/lodash/_stackGet.js create mode 100644 node_modules/lodash/_stackHas.js create mode 100644 node_modules/lodash/_stackSet.js create mode 100644 node_modules/lodash/_strictIndexOf.js create mode 100644 node_modules/lodash/_strictLastIndexOf.js create mode 100644 node_modules/lodash/_stringSize.js create mode 100644 node_modules/lodash/_stringToArray.js create mode 100644 node_modules/lodash/_stringToPath.js create mode 100644 node_modules/lodash/_toKey.js create mode 100644 node_modules/lodash/_toSource.js create mode 100644 node_modules/lodash/_trimmedEndIndex.js create mode 100644 node_modules/lodash/_unescapeHtmlChar.js create mode 100644 node_modules/lodash/_unicodeSize.js create mode 100644 node_modules/lodash/_unicodeToArray.js create mode 100644 node_modules/lodash/_unicodeWords.js create mode 100644 node_modules/lodash/_updateWrapDetails.js create mode 100644 node_modules/lodash/_wrapperClone.js create mode 100644 node_modules/lodash/add.js create mode 100644 node_modules/lodash/after.js create mode 100644 node_modules/lodash/array.js create mode 100644 node_modules/lodash/ary.js create mode 100644 node_modules/lodash/assign.js create mode 100644 node_modules/lodash/assignIn.js create mode 100644 node_modules/lodash/assignInWith.js create mode 100644 node_modules/lodash/assignWith.js create mode 100644 node_modules/lodash/at.js create mode 100644 node_modules/lodash/attempt.js create mode 100644 node_modules/lodash/before.js create mode 100644 node_modules/lodash/bind.js create mode 100644 node_modules/lodash/bindAll.js create mode 100644 node_modules/lodash/bindKey.js create mode 100644 node_modules/lodash/camelCase.js create mode 100644 node_modules/lodash/capitalize.js create mode 100644 node_modules/lodash/castArray.js create mode 100644 node_modules/lodash/ceil.js create mode 100644 node_modules/lodash/chain.js create mode 100644 node_modules/lodash/chunk.js create mode 100644 node_modules/lodash/clamp.js create mode 100644 node_modules/lodash/clone.js create mode 100644 node_modules/lodash/cloneDeep.js create mode 100644 node_modules/lodash/cloneDeepWith.js create mode 100644 node_modules/lodash/cloneWith.js create mode 100644 node_modules/lodash/collection.js create mode 100644 node_modules/lodash/commit.js create mode 100644 node_modules/lodash/compact.js create mode 100644 node_modules/lodash/concat.js create mode 100644 node_modules/lodash/cond.js create mode 100644 node_modules/lodash/conforms.js create mode 100644 node_modules/lodash/conformsTo.js create mode 100644 node_modules/lodash/constant.js create mode 100644 node_modules/lodash/core.js create mode 100644 node_modules/lodash/core.min.js create mode 100644 node_modules/lodash/countBy.js create mode 100644 node_modules/lodash/create.js create mode 100644 node_modules/lodash/curry.js create mode 100644 node_modules/lodash/curryRight.js create mode 100644 node_modules/lodash/date.js create mode 100644 node_modules/lodash/debounce.js create mode 100644 node_modules/lodash/deburr.js create mode 100644 node_modules/lodash/defaultTo.js create mode 100644 node_modules/lodash/defaults.js create mode 100644 node_modules/lodash/defaultsDeep.js create mode 100644 node_modules/lodash/defer.js create mode 100644 node_modules/lodash/delay.js create mode 100644 node_modules/lodash/difference.js create mode 100644 node_modules/lodash/differenceBy.js create mode 100644 node_modules/lodash/differenceWith.js create mode 100644 node_modules/lodash/divide.js create mode 100644 node_modules/lodash/drop.js create mode 100644 node_modules/lodash/dropRight.js create mode 100644 node_modules/lodash/dropRightWhile.js create mode 100644 node_modules/lodash/dropWhile.js create mode 100644 node_modules/lodash/each.js create mode 100644 node_modules/lodash/eachRight.js create mode 100644 node_modules/lodash/endsWith.js create mode 100644 node_modules/lodash/entries.js create mode 100644 node_modules/lodash/entriesIn.js create mode 100644 node_modules/lodash/eq.js create mode 100644 node_modules/lodash/escape.js create mode 100644 node_modules/lodash/escapeRegExp.js create mode 100644 node_modules/lodash/every.js create mode 100644 node_modules/lodash/extend.js create mode 100644 node_modules/lodash/extendWith.js create mode 100644 node_modules/lodash/fill.js create mode 100644 node_modules/lodash/filter.js create mode 100644 node_modules/lodash/find.js create mode 100644 node_modules/lodash/findIndex.js create mode 100644 node_modules/lodash/findKey.js create mode 100644 node_modules/lodash/findLast.js create mode 100644 node_modules/lodash/findLastIndex.js create mode 100644 node_modules/lodash/findLastKey.js create mode 100644 node_modules/lodash/first.js create mode 100644 node_modules/lodash/flake.lock create mode 100644 node_modules/lodash/flake.nix create mode 100644 node_modules/lodash/flatMap.js create mode 100644 node_modules/lodash/flatMapDeep.js create mode 100644 node_modules/lodash/flatMapDepth.js create mode 100644 node_modules/lodash/flatten.js create mode 100644 node_modules/lodash/flattenDeep.js create mode 100644 node_modules/lodash/flattenDepth.js create mode 100644 node_modules/lodash/flip.js create mode 100644 node_modules/lodash/floor.js create mode 100644 node_modules/lodash/flow.js create mode 100644 node_modules/lodash/flowRight.js create mode 100644 node_modules/lodash/forEach.js create mode 100644 node_modules/lodash/forEachRight.js create mode 100644 node_modules/lodash/forIn.js create mode 100644 node_modules/lodash/forInRight.js create mode 100644 node_modules/lodash/forOwn.js create mode 100644 node_modules/lodash/forOwnRight.js create mode 100644 node_modules/lodash/fp.js create mode 100644 node_modules/lodash/fp/F.js create mode 100644 node_modules/lodash/fp/T.js create mode 100644 node_modules/lodash/fp/__.js create mode 100644 node_modules/lodash/fp/_baseConvert.js create mode 100644 node_modules/lodash/fp/_convertBrowser.js create mode 100644 node_modules/lodash/fp/_falseOptions.js create mode 100644 node_modules/lodash/fp/_mapping.js create mode 100644 node_modules/lodash/fp/_util.js create mode 100644 node_modules/lodash/fp/add.js create mode 100644 node_modules/lodash/fp/after.js create mode 100644 node_modules/lodash/fp/all.js create mode 100644 node_modules/lodash/fp/allPass.js create mode 100644 node_modules/lodash/fp/always.js create mode 100644 node_modules/lodash/fp/any.js create mode 100644 node_modules/lodash/fp/anyPass.js create mode 100644 node_modules/lodash/fp/apply.js create mode 100644 node_modules/lodash/fp/array.js create mode 100644 node_modules/lodash/fp/ary.js create mode 100644 node_modules/lodash/fp/assign.js create mode 100644 node_modules/lodash/fp/assignAll.js create mode 100644 node_modules/lodash/fp/assignAllWith.js create mode 100644 node_modules/lodash/fp/assignIn.js create mode 100644 node_modules/lodash/fp/assignInAll.js create mode 100644 node_modules/lodash/fp/assignInAllWith.js create mode 100644 node_modules/lodash/fp/assignInWith.js create mode 100644 node_modules/lodash/fp/assignWith.js create mode 100644 node_modules/lodash/fp/assoc.js create mode 100644 node_modules/lodash/fp/assocPath.js create mode 100644 node_modules/lodash/fp/at.js create mode 100644 node_modules/lodash/fp/attempt.js create mode 100644 node_modules/lodash/fp/before.js create mode 100644 node_modules/lodash/fp/bind.js create mode 100644 node_modules/lodash/fp/bindAll.js create mode 100644 node_modules/lodash/fp/bindKey.js create mode 100644 node_modules/lodash/fp/camelCase.js create mode 100644 node_modules/lodash/fp/capitalize.js create mode 100644 node_modules/lodash/fp/castArray.js create mode 100644 node_modules/lodash/fp/ceil.js create mode 100644 node_modules/lodash/fp/chain.js create mode 100644 node_modules/lodash/fp/chunk.js create mode 100644 node_modules/lodash/fp/clamp.js create mode 100644 node_modules/lodash/fp/clone.js create mode 100644 node_modules/lodash/fp/cloneDeep.js create mode 100644 node_modules/lodash/fp/cloneDeepWith.js create mode 100644 node_modules/lodash/fp/cloneWith.js create mode 100644 node_modules/lodash/fp/collection.js create mode 100644 node_modules/lodash/fp/commit.js create mode 100644 node_modules/lodash/fp/compact.js create mode 100644 node_modules/lodash/fp/complement.js create mode 100644 node_modules/lodash/fp/compose.js create mode 100644 node_modules/lodash/fp/concat.js create mode 100644 node_modules/lodash/fp/cond.js create mode 100644 node_modules/lodash/fp/conforms.js create mode 100644 node_modules/lodash/fp/conformsTo.js create mode 100644 node_modules/lodash/fp/constant.js create mode 100644 node_modules/lodash/fp/contains.js create mode 100644 node_modules/lodash/fp/convert.js create mode 100644 node_modules/lodash/fp/countBy.js create mode 100644 node_modules/lodash/fp/create.js create mode 100644 node_modules/lodash/fp/curry.js create mode 100644 node_modules/lodash/fp/curryN.js create mode 100644 node_modules/lodash/fp/curryRight.js create mode 100644 node_modules/lodash/fp/curryRightN.js create mode 100644 node_modules/lodash/fp/date.js create mode 100644 node_modules/lodash/fp/debounce.js create mode 100644 node_modules/lodash/fp/deburr.js create mode 100644 node_modules/lodash/fp/defaultTo.js create mode 100644 node_modules/lodash/fp/defaults.js create mode 100644 node_modules/lodash/fp/defaultsAll.js create mode 100644 node_modules/lodash/fp/defaultsDeep.js create mode 100644 node_modules/lodash/fp/defaultsDeepAll.js create mode 100644 node_modules/lodash/fp/defer.js create mode 100644 node_modules/lodash/fp/delay.js create mode 100644 node_modules/lodash/fp/difference.js create mode 100644 node_modules/lodash/fp/differenceBy.js create mode 100644 node_modules/lodash/fp/differenceWith.js create mode 100644 node_modules/lodash/fp/dissoc.js create mode 100644 node_modules/lodash/fp/dissocPath.js create mode 100644 node_modules/lodash/fp/divide.js create mode 100644 node_modules/lodash/fp/drop.js create mode 100644 node_modules/lodash/fp/dropLast.js create mode 100644 node_modules/lodash/fp/dropLastWhile.js create mode 100644 node_modules/lodash/fp/dropRight.js create mode 100644 node_modules/lodash/fp/dropRightWhile.js create mode 100644 node_modules/lodash/fp/dropWhile.js create mode 100644 node_modules/lodash/fp/each.js create mode 100644 node_modules/lodash/fp/eachRight.js create mode 100644 node_modules/lodash/fp/endsWith.js create mode 100644 node_modules/lodash/fp/entries.js create mode 100644 node_modules/lodash/fp/entriesIn.js create mode 100644 node_modules/lodash/fp/eq.js create mode 100644 node_modules/lodash/fp/equals.js create mode 100644 node_modules/lodash/fp/escape.js create mode 100644 node_modules/lodash/fp/escapeRegExp.js create mode 100644 node_modules/lodash/fp/every.js create mode 100644 node_modules/lodash/fp/extend.js create mode 100644 node_modules/lodash/fp/extendAll.js create mode 100644 node_modules/lodash/fp/extendAllWith.js create mode 100644 node_modules/lodash/fp/extendWith.js create mode 100644 node_modules/lodash/fp/fill.js create mode 100644 node_modules/lodash/fp/filter.js create mode 100644 node_modules/lodash/fp/find.js create mode 100644 node_modules/lodash/fp/findFrom.js create mode 100644 node_modules/lodash/fp/findIndex.js create mode 100644 node_modules/lodash/fp/findIndexFrom.js create mode 100644 node_modules/lodash/fp/findKey.js create mode 100644 node_modules/lodash/fp/findLast.js create mode 100644 node_modules/lodash/fp/findLastFrom.js create mode 100644 node_modules/lodash/fp/findLastIndex.js create mode 100644 node_modules/lodash/fp/findLastIndexFrom.js create mode 100644 node_modules/lodash/fp/findLastKey.js create mode 100644 node_modules/lodash/fp/first.js create mode 100644 node_modules/lodash/fp/flatMap.js create mode 100644 node_modules/lodash/fp/flatMapDeep.js create mode 100644 node_modules/lodash/fp/flatMapDepth.js create mode 100644 node_modules/lodash/fp/flatten.js create mode 100644 node_modules/lodash/fp/flattenDeep.js create mode 100644 node_modules/lodash/fp/flattenDepth.js create mode 100644 node_modules/lodash/fp/flip.js create mode 100644 node_modules/lodash/fp/floor.js create mode 100644 node_modules/lodash/fp/flow.js create mode 100644 node_modules/lodash/fp/flowRight.js create mode 100644 node_modules/lodash/fp/forEach.js create mode 100644 node_modules/lodash/fp/forEachRight.js create mode 100644 node_modules/lodash/fp/forIn.js create mode 100644 node_modules/lodash/fp/forInRight.js create mode 100644 node_modules/lodash/fp/forOwn.js create mode 100644 node_modules/lodash/fp/forOwnRight.js create mode 100644 node_modules/lodash/fp/fromPairs.js create mode 100644 node_modules/lodash/fp/function.js create mode 100644 node_modules/lodash/fp/functions.js create mode 100644 node_modules/lodash/fp/functionsIn.js create mode 100644 node_modules/lodash/fp/get.js create mode 100644 node_modules/lodash/fp/getOr.js create mode 100644 node_modules/lodash/fp/groupBy.js create mode 100644 node_modules/lodash/fp/gt.js create mode 100644 node_modules/lodash/fp/gte.js create mode 100644 node_modules/lodash/fp/has.js create mode 100644 node_modules/lodash/fp/hasIn.js create mode 100644 node_modules/lodash/fp/head.js create mode 100644 node_modules/lodash/fp/identical.js create mode 100644 node_modules/lodash/fp/identity.js create mode 100644 node_modules/lodash/fp/inRange.js create mode 100644 node_modules/lodash/fp/includes.js create mode 100644 node_modules/lodash/fp/includesFrom.js create mode 100644 node_modules/lodash/fp/indexBy.js create mode 100644 node_modules/lodash/fp/indexOf.js create mode 100644 node_modules/lodash/fp/indexOfFrom.js create mode 100644 node_modules/lodash/fp/init.js create mode 100644 node_modules/lodash/fp/initial.js create mode 100644 node_modules/lodash/fp/intersection.js create mode 100644 node_modules/lodash/fp/intersectionBy.js create mode 100644 node_modules/lodash/fp/intersectionWith.js create mode 100644 node_modules/lodash/fp/invert.js create mode 100644 node_modules/lodash/fp/invertBy.js create mode 100644 node_modules/lodash/fp/invertObj.js create mode 100644 node_modules/lodash/fp/invoke.js create mode 100644 node_modules/lodash/fp/invokeArgs.js create mode 100644 node_modules/lodash/fp/invokeArgsMap.js create mode 100644 node_modules/lodash/fp/invokeMap.js create mode 100644 node_modules/lodash/fp/isArguments.js create mode 100644 node_modules/lodash/fp/isArray.js create mode 100644 node_modules/lodash/fp/isArrayBuffer.js create mode 100644 node_modules/lodash/fp/isArrayLike.js create mode 100644 node_modules/lodash/fp/isArrayLikeObject.js create mode 100644 node_modules/lodash/fp/isBoolean.js create mode 100644 node_modules/lodash/fp/isBuffer.js create mode 100644 node_modules/lodash/fp/isDate.js create mode 100644 node_modules/lodash/fp/isElement.js create mode 100644 node_modules/lodash/fp/isEmpty.js create mode 100644 node_modules/lodash/fp/isEqual.js create mode 100644 node_modules/lodash/fp/isEqualWith.js create mode 100644 node_modules/lodash/fp/isError.js create mode 100644 node_modules/lodash/fp/isFinite.js create mode 100644 node_modules/lodash/fp/isFunction.js create mode 100644 node_modules/lodash/fp/isInteger.js create mode 100644 node_modules/lodash/fp/isLength.js create mode 100644 node_modules/lodash/fp/isMap.js create mode 100644 node_modules/lodash/fp/isMatch.js create mode 100644 node_modules/lodash/fp/isMatchWith.js create mode 100644 node_modules/lodash/fp/isNaN.js create mode 100644 node_modules/lodash/fp/isNative.js create mode 100644 node_modules/lodash/fp/isNil.js create mode 100644 node_modules/lodash/fp/isNull.js create mode 100644 node_modules/lodash/fp/isNumber.js create mode 100644 node_modules/lodash/fp/isObject.js create mode 100644 node_modules/lodash/fp/isObjectLike.js create mode 100644 node_modules/lodash/fp/isPlainObject.js create mode 100644 node_modules/lodash/fp/isRegExp.js create mode 100644 node_modules/lodash/fp/isSafeInteger.js create mode 100644 node_modules/lodash/fp/isSet.js create mode 100644 node_modules/lodash/fp/isString.js create mode 100644 node_modules/lodash/fp/isSymbol.js create mode 100644 node_modules/lodash/fp/isTypedArray.js create mode 100644 node_modules/lodash/fp/isUndefined.js create mode 100644 node_modules/lodash/fp/isWeakMap.js create mode 100644 node_modules/lodash/fp/isWeakSet.js create mode 100644 node_modules/lodash/fp/iteratee.js create mode 100644 node_modules/lodash/fp/join.js create mode 100644 node_modules/lodash/fp/juxt.js create mode 100644 node_modules/lodash/fp/kebabCase.js create mode 100644 node_modules/lodash/fp/keyBy.js create mode 100644 node_modules/lodash/fp/keys.js create mode 100644 node_modules/lodash/fp/keysIn.js create mode 100644 node_modules/lodash/fp/lang.js create mode 100644 node_modules/lodash/fp/last.js create mode 100644 node_modules/lodash/fp/lastIndexOf.js create mode 100644 node_modules/lodash/fp/lastIndexOfFrom.js create mode 100644 node_modules/lodash/fp/lowerCase.js create mode 100644 node_modules/lodash/fp/lowerFirst.js create mode 100644 node_modules/lodash/fp/lt.js create mode 100644 node_modules/lodash/fp/lte.js create mode 100644 node_modules/lodash/fp/map.js create mode 100644 node_modules/lodash/fp/mapKeys.js create mode 100644 node_modules/lodash/fp/mapValues.js create mode 100644 node_modules/lodash/fp/matches.js create mode 100644 node_modules/lodash/fp/matchesProperty.js create mode 100644 node_modules/lodash/fp/math.js create mode 100644 node_modules/lodash/fp/max.js create mode 100644 node_modules/lodash/fp/maxBy.js create mode 100644 node_modules/lodash/fp/mean.js create mode 100644 node_modules/lodash/fp/meanBy.js create mode 100644 node_modules/lodash/fp/memoize.js create mode 100644 node_modules/lodash/fp/merge.js create mode 100644 node_modules/lodash/fp/mergeAll.js create mode 100644 node_modules/lodash/fp/mergeAllWith.js create mode 100644 node_modules/lodash/fp/mergeWith.js create mode 100644 node_modules/lodash/fp/method.js create mode 100644 node_modules/lodash/fp/methodOf.js create mode 100644 node_modules/lodash/fp/min.js create mode 100644 node_modules/lodash/fp/minBy.js create mode 100644 node_modules/lodash/fp/mixin.js create mode 100644 node_modules/lodash/fp/multiply.js create mode 100644 node_modules/lodash/fp/nAry.js create mode 100644 node_modules/lodash/fp/negate.js create mode 100644 node_modules/lodash/fp/next.js create mode 100644 node_modules/lodash/fp/noop.js create mode 100644 node_modules/lodash/fp/now.js create mode 100644 node_modules/lodash/fp/nth.js create mode 100644 node_modules/lodash/fp/nthArg.js create mode 100644 node_modules/lodash/fp/number.js create mode 100644 node_modules/lodash/fp/object.js create mode 100644 node_modules/lodash/fp/omit.js create mode 100644 node_modules/lodash/fp/omitAll.js create mode 100644 node_modules/lodash/fp/omitBy.js create mode 100644 node_modules/lodash/fp/once.js create mode 100644 node_modules/lodash/fp/orderBy.js create mode 100644 node_modules/lodash/fp/over.js create mode 100644 node_modules/lodash/fp/overArgs.js create mode 100644 node_modules/lodash/fp/overEvery.js create mode 100644 node_modules/lodash/fp/overSome.js create mode 100644 node_modules/lodash/fp/pad.js create mode 100644 node_modules/lodash/fp/padChars.js create mode 100644 node_modules/lodash/fp/padCharsEnd.js create mode 100644 node_modules/lodash/fp/padCharsStart.js create mode 100644 node_modules/lodash/fp/padEnd.js create mode 100644 node_modules/lodash/fp/padStart.js create mode 100644 node_modules/lodash/fp/parseInt.js create mode 100644 node_modules/lodash/fp/partial.js create mode 100644 node_modules/lodash/fp/partialRight.js create mode 100644 node_modules/lodash/fp/partition.js create mode 100644 node_modules/lodash/fp/path.js create mode 100644 node_modules/lodash/fp/pathEq.js create mode 100644 node_modules/lodash/fp/pathOr.js create mode 100644 node_modules/lodash/fp/paths.js create mode 100644 node_modules/lodash/fp/pick.js create mode 100644 node_modules/lodash/fp/pickAll.js create mode 100644 node_modules/lodash/fp/pickBy.js create mode 100644 node_modules/lodash/fp/pipe.js create mode 100644 node_modules/lodash/fp/placeholder.js create mode 100644 node_modules/lodash/fp/plant.js create mode 100644 node_modules/lodash/fp/pluck.js create mode 100644 node_modules/lodash/fp/prop.js create mode 100644 node_modules/lodash/fp/propEq.js create mode 100644 node_modules/lodash/fp/propOr.js create mode 100644 node_modules/lodash/fp/property.js create mode 100644 node_modules/lodash/fp/propertyOf.js create mode 100644 node_modules/lodash/fp/props.js create mode 100644 node_modules/lodash/fp/pull.js create mode 100644 node_modules/lodash/fp/pullAll.js create mode 100644 node_modules/lodash/fp/pullAllBy.js create mode 100644 node_modules/lodash/fp/pullAllWith.js create mode 100644 node_modules/lodash/fp/pullAt.js create mode 100644 node_modules/lodash/fp/random.js create mode 100644 node_modules/lodash/fp/range.js create mode 100644 node_modules/lodash/fp/rangeRight.js create mode 100644 node_modules/lodash/fp/rangeStep.js create mode 100644 node_modules/lodash/fp/rangeStepRight.js create mode 100644 node_modules/lodash/fp/rearg.js create mode 100644 node_modules/lodash/fp/reduce.js create mode 100644 node_modules/lodash/fp/reduceRight.js create mode 100644 node_modules/lodash/fp/reject.js create mode 100644 node_modules/lodash/fp/remove.js create mode 100644 node_modules/lodash/fp/repeat.js create mode 100644 node_modules/lodash/fp/replace.js create mode 100644 node_modules/lodash/fp/rest.js create mode 100644 node_modules/lodash/fp/restFrom.js create mode 100644 node_modules/lodash/fp/result.js create mode 100644 node_modules/lodash/fp/reverse.js create mode 100644 node_modules/lodash/fp/round.js create mode 100644 node_modules/lodash/fp/sample.js create mode 100644 node_modules/lodash/fp/sampleSize.js create mode 100644 node_modules/lodash/fp/seq.js create mode 100644 node_modules/lodash/fp/set.js create mode 100644 node_modules/lodash/fp/setWith.js create mode 100644 node_modules/lodash/fp/shuffle.js create mode 100644 node_modules/lodash/fp/size.js create mode 100644 node_modules/lodash/fp/slice.js create mode 100644 node_modules/lodash/fp/snakeCase.js create mode 100644 node_modules/lodash/fp/some.js create mode 100644 node_modules/lodash/fp/sortBy.js create mode 100644 node_modules/lodash/fp/sortedIndex.js create mode 100644 node_modules/lodash/fp/sortedIndexBy.js create mode 100644 node_modules/lodash/fp/sortedIndexOf.js create mode 100644 node_modules/lodash/fp/sortedLastIndex.js create mode 100644 node_modules/lodash/fp/sortedLastIndexBy.js create mode 100644 node_modules/lodash/fp/sortedLastIndexOf.js create mode 100644 node_modules/lodash/fp/sortedUniq.js create mode 100644 node_modules/lodash/fp/sortedUniqBy.js create mode 100644 node_modules/lodash/fp/split.js create mode 100644 node_modules/lodash/fp/spread.js create mode 100644 node_modules/lodash/fp/spreadFrom.js create mode 100644 node_modules/lodash/fp/startCase.js create mode 100644 node_modules/lodash/fp/startsWith.js create mode 100644 node_modules/lodash/fp/string.js create mode 100644 node_modules/lodash/fp/stubArray.js create mode 100644 node_modules/lodash/fp/stubFalse.js create mode 100644 node_modules/lodash/fp/stubObject.js create mode 100644 node_modules/lodash/fp/stubString.js create mode 100644 node_modules/lodash/fp/stubTrue.js create mode 100644 node_modules/lodash/fp/subtract.js create mode 100644 node_modules/lodash/fp/sum.js create mode 100644 node_modules/lodash/fp/sumBy.js create mode 100644 node_modules/lodash/fp/symmetricDifference.js create mode 100644 node_modules/lodash/fp/symmetricDifferenceBy.js create mode 100644 node_modules/lodash/fp/symmetricDifferenceWith.js create mode 100644 node_modules/lodash/fp/tail.js create mode 100644 node_modules/lodash/fp/take.js create mode 100644 node_modules/lodash/fp/takeLast.js create mode 100644 node_modules/lodash/fp/takeLastWhile.js create mode 100644 node_modules/lodash/fp/takeRight.js create mode 100644 node_modules/lodash/fp/takeRightWhile.js create mode 100644 node_modules/lodash/fp/takeWhile.js create mode 100644 node_modules/lodash/fp/tap.js create mode 100644 node_modules/lodash/fp/template.js create mode 100644 node_modules/lodash/fp/templateSettings.js create mode 100644 node_modules/lodash/fp/throttle.js create mode 100644 node_modules/lodash/fp/thru.js create mode 100644 node_modules/lodash/fp/times.js create mode 100644 node_modules/lodash/fp/toArray.js create mode 100644 node_modules/lodash/fp/toFinite.js create mode 100644 node_modules/lodash/fp/toInteger.js create mode 100644 node_modules/lodash/fp/toIterator.js create mode 100644 node_modules/lodash/fp/toJSON.js create mode 100644 node_modules/lodash/fp/toLength.js create mode 100644 node_modules/lodash/fp/toLower.js create mode 100644 node_modules/lodash/fp/toNumber.js create mode 100644 node_modules/lodash/fp/toPairs.js create mode 100644 node_modules/lodash/fp/toPairsIn.js create mode 100644 node_modules/lodash/fp/toPath.js create mode 100644 node_modules/lodash/fp/toPlainObject.js create mode 100644 node_modules/lodash/fp/toSafeInteger.js create mode 100644 node_modules/lodash/fp/toString.js create mode 100644 node_modules/lodash/fp/toUpper.js create mode 100644 node_modules/lodash/fp/transform.js create mode 100644 node_modules/lodash/fp/trim.js create mode 100644 node_modules/lodash/fp/trimChars.js create mode 100644 node_modules/lodash/fp/trimCharsEnd.js create mode 100644 node_modules/lodash/fp/trimCharsStart.js create mode 100644 node_modules/lodash/fp/trimEnd.js create mode 100644 node_modules/lodash/fp/trimStart.js create mode 100644 node_modules/lodash/fp/truncate.js create mode 100644 node_modules/lodash/fp/unapply.js create mode 100644 node_modules/lodash/fp/unary.js create mode 100644 node_modules/lodash/fp/unescape.js create mode 100644 node_modules/lodash/fp/union.js create mode 100644 node_modules/lodash/fp/unionBy.js create mode 100644 node_modules/lodash/fp/unionWith.js create mode 100644 node_modules/lodash/fp/uniq.js create mode 100644 node_modules/lodash/fp/uniqBy.js create mode 100644 node_modules/lodash/fp/uniqWith.js create mode 100644 node_modules/lodash/fp/uniqueId.js create mode 100644 node_modules/lodash/fp/unnest.js create mode 100644 node_modules/lodash/fp/unset.js create mode 100644 node_modules/lodash/fp/unzip.js create mode 100644 node_modules/lodash/fp/unzipWith.js create mode 100644 node_modules/lodash/fp/update.js create mode 100644 node_modules/lodash/fp/updateWith.js create mode 100644 node_modules/lodash/fp/upperCase.js create mode 100644 node_modules/lodash/fp/upperFirst.js create mode 100644 node_modules/lodash/fp/useWith.js create mode 100644 node_modules/lodash/fp/util.js create mode 100644 node_modules/lodash/fp/value.js create mode 100644 node_modules/lodash/fp/valueOf.js create mode 100644 node_modules/lodash/fp/values.js create mode 100644 node_modules/lodash/fp/valuesIn.js create mode 100644 node_modules/lodash/fp/where.js create mode 100644 node_modules/lodash/fp/whereEq.js create mode 100644 node_modules/lodash/fp/without.js create mode 100644 node_modules/lodash/fp/words.js create mode 100644 node_modules/lodash/fp/wrap.js create mode 100644 node_modules/lodash/fp/wrapperAt.js create mode 100644 node_modules/lodash/fp/wrapperChain.js create mode 100644 node_modules/lodash/fp/wrapperLodash.js create mode 100644 node_modules/lodash/fp/wrapperReverse.js create mode 100644 node_modules/lodash/fp/wrapperValue.js create mode 100644 node_modules/lodash/fp/xor.js create mode 100644 node_modules/lodash/fp/xorBy.js create mode 100644 node_modules/lodash/fp/xorWith.js create mode 100644 node_modules/lodash/fp/zip.js create mode 100644 node_modules/lodash/fp/zipAll.js create mode 100644 node_modules/lodash/fp/zipObj.js create mode 100644 node_modules/lodash/fp/zipObject.js create mode 100644 node_modules/lodash/fp/zipObjectDeep.js create mode 100644 node_modules/lodash/fp/zipWith.js create mode 100644 node_modules/lodash/fromPairs.js create mode 100644 node_modules/lodash/function.js create mode 100644 node_modules/lodash/functions.js create mode 100644 node_modules/lodash/functionsIn.js create mode 100644 node_modules/lodash/get.js create mode 100644 node_modules/lodash/groupBy.js create mode 100644 node_modules/lodash/gt.js create mode 100644 node_modules/lodash/gte.js create mode 100644 node_modules/lodash/has.js create mode 100644 node_modules/lodash/hasIn.js create mode 100644 node_modules/lodash/head.js create mode 100644 node_modules/lodash/identity.js create mode 100644 node_modules/lodash/inRange.js create mode 100644 node_modules/lodash/includes.js create mode 100644 node_modules/lodash/index.js create mode 100644 node_modules/lodash/indexOf.js create mode 100644 node_modules/lodash/initial.js create mode 100644 node_modules/lodash/intersection.js create mode 100644 node_modules/lodash/intersectionBy.js create mode 100644 node_modules/lodash/intersectionWith.js create mode 100644 node_modules/lodash/invert.js create mode 100644 node_modules/lodash/invertBy.js create mode 100644 node_modules/lodash/invoke.js create mode 100644 node_modules/lodash/invokeMap.js create mode 100644 node_modules/lodash/isArguments.js create mode 100644 node_modules/lodash/isArray.js create mode 100644 node_modules/lodash/isArrayBuffer.js create mode 100644 node_modules/lodash/isArrayLike.js create mode 100644 node_modules/lodash/isArrayLikeObject.js create mode 100644 node_modules/lodash/isBoolean.js create mode 100644 node_modules/lodash/isBuffer.js create mode 100644 node_modules/lodash/isDate.js create mode 100644 node_modules/lodash/isElement.js create mode 100644 node_modules/lodash/isEmpty.js create mode 100644 node_modules/lodash/isEqual.js create mode 100644 node_modules/lodash/isEqualWith.js create mode 100644 node_modules/lodash/isError.js create mode 100644 node_modules/lodash/isFinite.js create mode 100644 node_modules/lodash/isFunction.js create mode 100644 node_modules/lodash/isInteger.js create mode 100644 node_modules/lodash/isLength.js create mode 100644 node_modules/lodash/isMap.js create mode 100644 node_modules/lodash/isMatch.js create mode 100644 node_modules/lodash/isMatchWith.js create mode 100644 node_modules/lodash/isNaN.js create mode 100644 node_modules/lodash/isNative.js create mode 100644 node_modules/lodash/isNil.js create mode 100644 node_modules/lodash/isNull.js create mode 100644 node_modules/lodash/isNumber.js create mode 100644 node_modules/lodash/isObject.js create mode 100644 node_modules/lodash/isObjectLike.js create mode 100644 node_modules/lodash/isPlainObject.js create mode 100644 node_modules/lodash/isRegExp.js create mode 100644 node_modules/lodash/isSafeInteger.js create mode 100644 node_modules/lodash/isSet.js create mode 100644 node_modules/lodash/isString.js create mode 100644 node_modules/lodash/isSymbol.js create mode 100644 node_modules/lodash/isTypedArray.js create mode 100644 node_modules/lodash/isUndefined.js create mode 100644 node_modules/lodash/isWeakMap.js create mode 100644 node_modules/lodash/isWeakSet.js create mode 100644 node_modules/lodash/iteratee.js create mode 100644 node_modules/lodash/join.js create mode 100644 node_modules/lodash/kebabCase.js create mode 100644 node_modules/lodash/keyBy.js create mode 100644 node_modules/lodash/keys.js create mode 100644 node_modules/lodash/keysIn.js create mode 100644 node_modules/lodash/lang.js create mode 100644 node_modules/lodash/last.js create mode 100644 node_modules/lodash/lastIndexOf.js create mode 100644 node_modules/lodash/lodash.js create mode 100644 node_modules/lodash/lodash.min.js create mode 100644 node_modules/lodash/lowerCase.js create mode 100644 node_modules/lodash/lowerFirst.js create mode 100644 node_modules/lodash/lt.js create mode 100644 node_modules/lodash/lte.js create mode 100644 node_modules/lodash/map.js create mode 100644 node_modules/lodash/mapKeys.js create mode 100644 node_modules/lodash/mapValues.js create mode 100644 node_modules/lodash/matches.js create mode 100644 node_modules/lodash/matchesProperty.js create mode 100644 node_modules/lodash/math.js create mode 100644 node_modules/lodash/max.js create mode 100644 node_modules/lodash/maxBy.js create mode 100644 node_modules/lodash/mean.js create mode 100644 node_modules/lodash/meanBy.js create mode 100644 node_modules/lodash/memoize.js create mode 100644 node_modules/lodash/merge.js create mode 100644 node_modules/lodash/mergeWith.js create mode 100644 node_modules/lodash/method.js create mode 100644 node_modules/lodash/methodOf.js create mode 100644 node_modules/lodash/min.js create mode 100644 node_modules/lodash/minBy.js create mode 100644 node_modules/lodash/mixin.js create mode 100644 node_modules/lodash/multiply.js create mode 100644 node_modules/lodash/negate.js create mode 100644 node_modules/lodash/next.js create mode 100644 node_modules/lodash/noop.js create mode 100644 node_modules/lodash/now.js create mode 100644 node_modules/lodash/nth.js create mode 100644 node_modules/lodash/nthArg.js create mode 100644 node_modules/lodash/number.js create mode 100644 node_modules/lodash/object.js create mode 100644 node_modules/lodash/omit.js create mode 100644 node_modules/lodash/omitBy.js create mode 100644 node_modules/lodash/once.js create mode 100644 node_modules/lodash/orderBy.js create mode 100644 node_modules/lodash/over.js create mode 100644 node_modules/lodash/overArgs.js create mode 100644 node_modules/lodash/overEvery.js create mode 100644 node_modules/lodash/overSome.js create mode 100644 node_modules/lodash/package.json create mode 100644 node_modules/lodash/pad.js create mode 100644 node_modules/lodash/padEnd.js create mode 100644 node_modules/lodash/padStart.js create mode 100644 node_modules/lodash/parseInt.js create mode 100644 node_modules/lodash/partial.js create mode 100644 node_modules/lodash/partialRight.js create mode 100644 node_modules/lodash/partition.js create mode 100644 node_modules/lodash/pick.js create mode 100644 node_modules/lodash/pickBy.js create mode 100644 node_modules/lodash/plant.js create mode 100644 node_modules/lodash/property.js create mode 100644 node_modules/lodash/propertyOf.js create mode 100644 node_modules/lodash/pull.js create mode 100644 node_modules/lodash/pullAll.js create mode 100644 node_modules/lodash/pullAllBy.js create mode 100644 node_modules/lodash/pullAllWith.js create mode 100644 node_modules/lodash/pullAt.js create mode 100644 node_modules/lodash/random.js create mode 100644 node_modules/lodash/range.js create mode 100644 node_modules/lodash/rangeRight.js create mode 100644 node_modules/lodash/rearg.js create mode 100644 node_modules/lodash/reduce.js create mode 100644 node_modules/lodash/reduceRight.js create mode 100644 node_modules/lodash/reject.js create mode 100644 node_modules/lodash/release.md create mode 100644 node_modules/lodash/remove.js create mode 100644 node_modules/lodash/repeat.js create mode 100644 node_modules/lodash/replace.js create mode 100644 node_modules/lodash/rest.js create mode 100644 node_modules/lodash/result.js create mode 100644 node_modules/lodash/reverse.js create mode 100644 node_modules/lodash/round.js create mode 100644 node_modules/lodash/sample.js create mode 100644 node_modules/lodash/sampleSize.js create mode 100644 node_modules/lodash/seq.js create mode 100644 node_modules/lodash/set.js create mode 100644 node_modules/lodash/setWith.js create mode 100644 node_modules/lodash/shuffle.js create mode 100644 node_modules/lodash/size.js create mode 100644 node_modules/lodash/slice.js create mode 100644 node_modules/lodash/snakeCase.js create mode 100644 node_modules/lodash/some.js create mode 100644 node_modules/lodash/sortBy.js create mode 100644 node_modules/lodash/sortedIndex.js create mode 100644 node_modules/lodash/sortedIndexBy.js create mode 100644 node_modules/lodash/sortedIndexOf.js create mode 100644 node_modules/lodash/sortedLastIndex.js create mode 100644 node_modules/lodash/sortedLastIndexBy.js create mode 100644 node_modules/lodash/sortedLastIndexOf.js create mode 100644 node_modules/lodash/sortedUniq.js create mode 100644 node_modules/lodash/sortedUniqBy.js create mode 100644 node_modules/lodash/split.js create mode 100644 node_modules/lodash/spread.js create mode 100644 node_modules/lodash/startCase.js create mode 100644 node_modules/lodash/startsWith.js create mode 100644 node_modules/lodash/string.js create mode 100644 node_modules/lodash/stubArray.js create mode 100644 node_modules/lodash/stubFalse.js create mode 100644 node_modules/lodash/stubObject.js create mode 100644 node_modules/lodash/stubString.js create mode 100644 node_modules/lodash/stubTrue.js create mode 100644 node_modules/lodash/subtract.js create mode 100644 node_modules/lodash/sum.js create mode 100644 node_modules/lodash/sumBy.js create mode 100644 node_modules/lodash/tail.js create mode 100644 node_modules/lodash/take.js create mode 100644 node_modules/lodash/takeRight.js create mode 100644 node_modules/lodash/takeRightWhile.js create mode 100644 node_modules/lodash/takeWhile.js create mode 100644 node_modules/lodash/tap.js create mode 100644 node_modules/lodash/template.js create mode 100644 node_modules/lodash/templateSettings.js create mode 100644 node_modules/lodash/throttle.js create mode 100644 node_modules/lodash/thru.js create mode 100644 node_modules/lodash/times.js create mode 100644 node_modules/lodash/toArray.js create mode 100644 node_modules/lodash/toFinite.js create mode 100644 node_modules/lodash/toInteger.js create mode 100644 node_modules/lodash/toIterator.js create mode 100644 node_modules/lodash/toJSON.js create mode 100644 node_modules/lodash/toLength.js create mode 100644 node_modules/lodash/toLower.js create mode 100644 node_modules/lodash/toNumber.js create mode 100644 node_modules/lodash/toPairs.js create mode 100644 node_modules/lodash/toPairsIn.js create mode 100644 node_modules/lodash/toPath.js create mode 100644 node_modules/lodash/toPlainObject.js create mode 100644 node_modules/lodash/toSafeInteger.js create mode 100644 node_modules/lodash/toString.js create mode 100644 node_modules/lodash/toUpper.js create mode 100644 node_modules/lodash/transform.js create mode 100644 node_modules/lodash/trim.js create mode 100644 node_modules/lodash/trimEnd.js create mode 100644 node_modules/lodash/trimStart.js create mode 100644 node_modules/lodash/truncate.js create mode 100644 node_modules/lodash/unary.js create mode 100644 node_modules/lodash/unescape.js create mode 100644 node_modules/lodash/union.js create mode 100644 node_modules/lodash/unionBy.js create mode 100644 node_modules/lodash/unionWith.js create mode 100644 node_modules/lodash/uniq.js create mode 100644 node_modules/lodash/uniqBy.js create mode 100644 node_modules/lodash/uniqWith.js create mode 100644 node_modules/lodash/uniqueId.js create mode 100644 node_modules/lodash/unset.js create mode 100644 node_modules/lodash/unzip.js create mode 100644 node_modules/lodash/unzipWith.js create mode 100644 node_modules/lodash/update.js create mode 100644 node_modules/lodash/updateWith.js create mode 100644 node_modules/lodash/upperCase.js create mode 100644 node_modules/lodash/upperFirst.js create mode 100644 node_modules/lodash/util.js create mode 100644 node_modules/lodash/value.js create mode 100644 node_modules/lodash/valueOf.js create mode 100644 node_modules/lodash/values.js create mode 100644 node_modules/lodash/valuesIn.js create mode 100644 node_modules/lodash/without.js create mode 100644 node_modules/lodash/words.js create mode 100644 node_modules/lodash/wrap.js create mode 100644 node_modules/lodash/wrapperAt.js create mode 100644 node_modules/lodash/wrapperChain.js create mode 100644 node_modules/lodash/wrapperLodash.js create mode 100644 node_modules/lodash/wrapperReverse.js create mode 100644 node_modules/lodash/wrapperValue.js create mode 100644 node_modules/lodash/xor.js create mode 100644 node_modules/lodash/xorBy.js create mode 100644 node_modules/lodash/xorWith.js create mode 100644 node_modules/lodash/zip.js create mode 100644 node_modules/lodash/zipObject.js create mode 100644 node_modules/lodash/zipObjectDeep.js create mode 100644 node_modules/lodash/zipWith.js create mode 100644 node_modules/mime-db/HISTORY.md create mode 100644 node_modules/mime-db/LICENSE create mode 100644 node_modules/mime-db/README.md create mode 100644 node_modules/mime-db/db.json create mode 100644 node_modules/mime-db/index.js create mode 100644 node_modules/mime-db/package.json create mode 100644 node_modules/mime-types/HISTORY.md create mode 100644 node_modules/mime-types/LICENSE create mode 100644 node_modules/mime-types/README.md create mode 100644 node_modules/mime-types/index.js create mode 100644 node_modules/mime-types/package.json create mode 100644 node_modules/ms/index.js create mode 100644 node_modules/ms/license.md create mode 100644 node_modules/ms/package.json create mode 100644 node_modules/ms/readme.md create mode 100644 node_modules/nwsapi/LICENSE create mode 100644 node_modules/nwsapi/README.md create mode 100644 node_modules/nwsapi/dist/lint.log create mode 100644 node_modules/nwsapi/package.json create mode 100644 node_modules/nwsapi/src/modules/nwsapi-jquery.js create mode 100644 node_modules/nwsapi/src/modules/nwsapi-traversal.js create mode 100644 node_modules/nwsapi/src/nwsapi.js create mode 100644 node_modules/optionator/CHANGELOG.md create mode 100644 node_modules/optionator/LICENSE create mode 100644 node_modules/optionator/README.md create mode 100644 node_modules/optionator/lib/help.js create mode 100644 node_modules/optionator/lib/index.js create mode 100644 node_modules/optionator/lib/util.js create mode 100644 node_modules/optionator/package.json create mode 100644 node_modules/parse5/LICENSE create mode 100644 node_modules/parse5/README.md create mode 100644 node_modules/parse5/lib/common/doctype.js create mode 100644 node_modules/parse5/lib/common/error-codes.js create mode 100644 node_modules/parse5/lib/common/foreign-content.js create mode 100644 node_modules/parse5/lib/common/html.js create mode 100644 node_modules/parse5/lib/common/unicode.js create mode 100644 node_modules/parse5/lib/extensions/error-reporting/mixin-base.js create mode 100644 node_modules/parse5/lib/extensions/error-reporting/parser-mixin.js create mode 100644 node_modules/parse5/lib/extensions/error-reporting/preprocessor-mixin.js create mode 100644 node_modules/parse5/lib/extensions/error-reporting/tokenizer-mixin.js create mode 100644 node_modules/parse5/lib/extensions/location-info/open-element-stack-mixin.js create mode 100644 node_modules/parse5/lib/extensions/location-info/parser-mixin.js create mode 100644 node_modules/parse5/lib/extensions/location-info/tokenizer-mixin.js create mode 100644 node_modules/parse5/lib/extensions/position-tracking/preprocessor-mixin.js create mode 100644 node_modules/parse5/lib/index.js create mode 100644 node_modules/parse5/lib/parser/formatting-element-list.js create mode 100644 node_modules/parse5/lib/parser/index.js create mode 100644 node_modules/parse5/lib/parser/open-element-stack.js create mode 100644 node_modules/parse5/lib/serializer/index.js create mode 100644 node_modules/parse5/lib/tokenizer/index.js create mode 100644 node_modules/parse5/lib/tokenizer/named-entity-data.js create mode 100644 node_modules/parse5/lib/tokenizer/preprocessor.js create mode 100644 node_modules/parse5/lib/tree-adapters/default.js create mode 100644 node_modules/parse5/lib/utils/merge-options.js create mode 100644 node_modules/parse5/lib/utils/mixin.js create mode 100644 node_modules/parse5/package.json create mode 100644 node_modules/prelude-ls/CHANGELOG.md create mode 100644 node_modules/prelude-ls/LICENSE create mode 100644 node_modules/prelude-ls/README.md create mode 100644 node_modules/prelude-ls/lib/Func.js create mode 100644 node_modules/prelude-ls/lib/List.js create mode 100644 node_modules/prelude-ls/lib/Num.js create mode 100644 node_modules/prelude-ls/lib/Obj.js create mode 100644 node_modules/prelude-ls/lib/Str.js create mode 100644 node_modules/prelude-ls/lib/index.js create mode 100644 node_modules/prelude-ls/package.json create mode 100644 node_modules/psl/LICENSE create mode 100644 node_modules/psl/README.md create mode 100644 node_modules/psl/browserstack-logo.svg create mode 100644 node_modules/psl/data/rules.json create mode 100644 node_modules/psl/dist/psl.js create mode 100644 node_modules/psl/dist/psl.min.js create mode 100644 node_modules/psl/index.js create mode 100644 node_modules/psl/package.json create mode 100644 node_modules/punycode/LICENSE-MIT.txt create mode 100644 node_modules/punycode/README.md create mode 100644 node_modules/punycode/package.json create mode 100644 node_modules/punycode/punycode.es6.js create mode 100644 node_modules/punycode/punycode.js create mode 100644 node_modules/safer-buffer/LICENSE create mode 100644 node_modules/safer-buffer/Porting-Buffer.md create mode 100644 node_modules/safer-buffer/Readme.md create mode 100644 node_modules/safer-buffer/dangerous.js create mode 100644 node_modules/safer-buffer/package.json create mode 100644 node_modules/safer-buffer/safer.js create mode 100644 node_modules/safer-buffer/tests.js create mode 100644 node_modules/sax/LICENSE create mode 100644 node_modules/sax/README.md create mode 100644 node_modules/sax/lib/sax.js create mode 100644 node_modules/sax/package.json create mode 100644 node_modules/saxes/README.md create mode 100644 node_modules/saxes/package.json create mode 100644 node_modules/saxes/saxes.d.ts create mode 100644 node_modules/saxes/saxes.js create mode 100644 node_modules/saxes/saxes.js.map create mode 100644 node_modules/source-map/CHANGELOG.md create mode 100644 node_modules/source-map/LICENSE create mode 100644 node_modules/source-map/README.md create mode 100644 node_modules/source-map/dist/source-map.debug.js create mode 100644 node_modules/source-map/dist/source-map.js create mode 100644 node_modules/source-map/dist/source-map.min.js create mode 100644 node_modules/source-map/dist/source-map.min.js.map create mode 100644 node_modules/source-map/lib/array-set.js create mode 100644 node_modules/source-map/lib/base64-vlq.js create mode 100644 node_modules/source-map/lib/base64.js create mode 100644 node_modules/source-map/lib/binary-search.js create mode 100644 node_modules/source-map/lib/mapping-list.js create mode 100644 node_modules/source-map/lib/quick-sort.js create mode 100644 node_modules/source-map/lib/source-map-consumer.js create mode 100644 node_modules/source-map/lib/source-map-generator.js create mode 100644 node_modules/source-map/lib/source-node.js create mode 100644 node_modules/source-map/lib/util.js create mode 100644 node_modules/source-map/package.json create mode 100644 node_modules/source-map/source-map.d.ts create mode 100644 node_modules/source-map/source-map.js create mode 100644 node_modules/symbol-tree/LICENSE create mode 100644 node_modules/symbol-tree/README.md create mode 100644 node_modules/symbol-tree/lib/SymbolTree.js create mode 100644 node_modules/symbol-tree/lib/SymbolTreeNode.js create mode 100644 node_modules/symbol-tree/lib/TreeIterator.js create mode 100644 node_modules/symbol-tree/lib/TreePosition.js create mode 100644 node_modules/symbol-tree/package.json create mode 100644 node_modules/tough-cookie/LICENSE create mode 100644 node_modules/tough-cookie/README.md create mode 100644 node_modules/tough-cookie/lib/cookie.js create mode 100644 node_modules/tough-cookie/lib/memstore.js create mode 100644 node_modules/tough-cookie/lib/pathMatch.js create mode 100644 node_modules/tough-cookie/lib/permuteDomain.js create mode 100644 node_modules/tough-cookie/lib/pubsuffix-psl.js create mode 100644 node_modules/tough-cookie/lib/store.js create mode 100644 node_modules/tough-cookie/lib/version.js create mode 100644 node_modules/tough-cookie/package.json create mode 100644 node_modules/tr46/LICENSE.md create mode 100644 node_modules/tr46/README.md create mode 100644 node_modules/tr46/index.js create mode 100644 node_modules/tr46/lib/mappingTable.json create mode 100644 node_modules/tr46/lib/regexes.js create mode 100644 node_modules/tr46/lib/statusMapping.js create mode 100644 node_modules/tr46/package.json create mode 100644 node_modules/type-check/LICENSE create mode 100644 node_modules/type-check/README.md create mode 100644 node_modules/type-check/lib/check.js create mode 100644 node_modules/type-check/lib/index.js create mode 100644 node_modules/type-check/lib/parse-type.js create mode 100644 node_modules/type-check/package.json create mode 100644 node_modules/universalify/LICENSE create mode 100644 node_modules/universalify/README.md create mode 100644 node_modules/universalify/index.js create mode 100644 node_modules/universalify/package.json create mode 100644 node_modules/w3c-hr-time/CHANGELOG.md create mode 100644 node_modules/w3c-hr-time/LICENSE.md create mode 100644 node_modules/w3c-hr-time/README.md create mode 100644 node_modules/w3c-hr-time/index.js create mode 100644 node_modules/w3c-hr-time/lib/calculate-clock-offset.js create mode 100644 node_modules/w3c-hr-time/lib/clock-is-accurate.js create mode 100644 node_modules/w3c-hr-time/lib/global-monotonic-clock.js create mode 100644 node_modules/w3c-hr-time/lib/performance.js create mode 100644 node_modules/w3c-hr-time/lib/utils.js create mode 100644 node_modules/w3c-hr-time/package.json create mode 100644 node_modules/w3c-xmlserializer/LICENSE.md create mode 100644 node_modules/w3c-xmlserializer/README.md create mode 100644 node_modules/w3c-xmlserializer/lib/attributes.js create mode 100644 node_modules/w3c-xmlserializer/lib/constants.js create mode 100644 node_modules/w3c-xmlserializer/lib/serialize.js create mode 100644 node_modules/w3c-xmlserializer/package.json create mode 100644 node_modules/webidl-conversions/LICENSE.md create mode 100644 node_modules/webidl-conversions/README.md create mode 100644 node_modules/webidl-conversions/lib/index.js create mode 100644 node_modules/webidl-conversions/package.json create mode 100644 node_modules/whatwg-encoding/LICENSE.txt create mode 100644 node_modules/whatwg-encoding/README.md create mode 100644 node_modules/whatwg-encoding/lib/labels-to-names.json create mode 100644 node_modules/whatwg-encoding/lib/supported-names.json create mode 100644 node_modules/whatwg-encoding/lib/whatwg-encoding.js create mode 100644 node_modules/whatwg-encoding/package.json create mode 100644 node_modules/whatwg-mimetype/LICENSE.txt create mode 100644 node_modules/whatwg-mimetype/README.md create mode 100644 node_modules/whatwg-mimetype/lib/mime-type.js create mode 100644 node_modules/whatwg-mimetype/lib/parser.js create mode 100644 node_modules/whatwg-mimetype/lib/serializer.js create mode 100644 node_modules/whatwg-mimetype/lib/utils.js create mode 100644 node_modules/whatwg-mimetype/package.json create mode 100644 node_modules/whatwg-url/LICENSE.txt create mode 100644 node_modules/whatwg-url/README.md create mode 100644 node_modules/whatwg-url/dist/Function.js create mode 100644 node_modules/whatwg-url/dist/URL-impl.js create mode 100644 node_modules/whatwg-url/dist/URL.js create mode 100644 node_modules/whatwg-url/dist/URLSearchParams-impl.js create mode 100644 node_modules/whatwg-url/dist/URLSearchParams.js create mode 100644 node_modules/whatwg-url/dist/VoidFunction.js create mode 100644 node_modules/whatwg-url/dist/encoding.js create mode 100644 node_modules/whatwg-url/dist/infra.js create mode 100644 node_modules/whatwg-url/dist/percent-encoding.js create mode 100644 node_modules/whatwg-url/dist/url-state-machine.js create mode 100644 node_modules/whatwg-url/dist/urlencoded.js create mode 100644 node_modules/whatwg-url/dist/utils.js create mode 100644 node_modules/whatwg-url/index.js create mode 100644 node_modules/whatwg-url/package.json create mode 100644 node_modules/whatwg-url/webidl2js-wrapper.js create mode 100644 node_modules/word-wrap/LICENSE create mode 100644 node_modules/word-wrap/README.md create mode 100644 node_modules/word-wrap/index.d.ts create mode 100644 node_modules/word-wrap/index.js create mode 100644 node_modules/word-wrap/package.json create mode 100644 node_modules/ws/LICENSE create mode 100644 node_modules/ws/README.md create mode 100644 node_modules/ws/browser.js create mode 100644 node_modules/ws/index.js create mode 100644 node_modules/ws/lib/buffer-util.js create mode 100644 node_modules/ws/lib/constants.js create mode 100644 node_modules/ws/lib/event-target.js create mode 100644 node_modules/ws/lib/extension.js create mode 100644 node_modules/ws/lib/limiter.js create mode 100644 node_modules/ws/lib/permessage-deflate.js create mode 100644 node_modules/ws/lib/receiver.js create mode 100644 node_modules/ws/lib/sender.js create mode 100644 node_modules/ws/lib/stream.js create mode 100644 node_modules/ws/lib/validation.js create mode 100644 node_modules/ws/lib/websocket-server.js create mode 100644 node_modules/ws/lib/websocket.js create mode 100644 node_modules/ws/package.json create mode 100644 node_modules/xml-name-validator/LICENSE.txt create mode 100644 node_modules/xml-name-validator/README.md create mode 100644 node_modules/xml-name-validator/lib/generated-parser.js create mode 100644 node_modules/xml-name-validator/lib/grammar.pegjs create mode 100644 node_modules/xml-name-validator/lib/xml-name-validator.js create mode 100644 node_modules/xml-name-validator/package.json create mode 100644 node_modules/xml2js/LICENSE create mode 100644 node_modules/xml2js/README.md create mode 100644 node_modules/xml2js/lib/bom.js create mode 100644 node_modules/xml2js/lib/builder.js create mode 100644 node_modules/xml2js/lib/defaults.js create mode 100644 node_modules/xml2js/lib/parser.js create mode 100644 node_modules/xml2js/lib/processors.js create mode 100644 node_modules/xml2js/lib/xml2js.js create mode 100644 node_modules/xml2js/package.json create mode 100644 node_modules/xmlbuilder/CHANGELOG.md create mode 100644 node_modules/xmlbuilder/LICENSE create mode 100644 node_modules/xmlbuilder/README.md create mode 100644 node_modules/xmlbuilder/appveyor.yml create mode 100644 node_modules/xmlbuilder/lib/Derivation.js create mode 100644 node_modules/xmlbuilder/lib/DocumentPosition.js create mode 100644 node_modules/xmlbuilder/lib/NodeType.js create mode 100644 node_modules/xmlbuilder/lib/OperationType.js create mode 100644 node_modules/xmlbuilder/lib/Utility.js create mode 100644 node_modules/xmlbuilder/lib/WriterState.js create mode 100644 node_modules/xmlbuilder/lib/XMLAttribute.js create mode 100644 node_modules/xmlbuilder/lib/XMLCData.js create mode 100644 node_modules/xmlbuilder/lib/XMLCharacterData.js create mode 100644 node_modules/xmlbuilder/lib/XMLComment.js create mode 100644 node_modules/xmlbuilder/lib/XMLDOMConfiguration.js create mode 100644 node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js create mode 100644 node_modules/xmlbuilder/lib/XMLDOMImplementation.js create mode 100644 node_modules/xmlbuilder/lib/XMLDOMStringList.js create mode 100644 node_modules/xmlbuilder/lib/XMLDTDAttList.js create mode 100644 node_modules/xmlbuilder/lib/XMLDTDElement.js create mode 100644 node_modules/xmlbuilder/lib/XMLDTDEntity.js create mode 100644 node_modules/xmlbuilder/lib/XMLDTDNotation.js create mode 100644 node_modules/xmlbuilder/lib/XMLDeclaration.js create mode 100644 node_modules/xmlbuilder/lib/XMLDocType.js create mode 100644 node_modules/xmlbuilder/lib/XMLDocument.js create mode 100644 node_modules/xmlbuilder/lib/XMLDocumentCB.js create mode 100644 node_modules/xmlbuilder/lib/XMLDocumentFragment.js create mode 100644 node_modules/xmlbuilder/lib/XMLDummy.js create mode 100644 node_modules/xmlbuilder/lib/XMLElement.js create mode 100644 node_modules/xmlbuilder/lib/XMLNamedNodeMap.js create mode 100644 node_modules/xmlbuilder/lib/XMLNode.js create mode 100644 node_modules/xmlbuilder/lib/XMLNodeFilter.js create mode 100644 node_modules/xmlbuilder/lib/XMLNodeList.js create mode 100644 node_modules/xmlbuilder/lib/XMLProcessingInstruction.js create mode 100644 node_modules/xmlbuilder/lib/XMLRaw.js create mode 100644 node_modules/xmlbuilder/lib/XMLStreamWriter.js create mode 100644 node_modules/xmlbuilder/lib/XMLStringWriter.js create mode 100644 node_modules/xmlbuilder/lib/XMLStringifier.js create mode 100644 node_modules/xmlbuilder/lib/XMLText.js create mode 100644 node_modules/xmlbuilder/lib/XMLTypeInfo.js create mode 100644 node_modules/xmlbuilder/lib/XMLUserDataHandler.js create mode 100644 node_modules/xmlbuilder/lib/XMLWriterBase.js create mode 100644 node_modules/xmlbuilder/lib/index.js create mode 100644 node_modules/xmlbuilder/package.json create mode 100644 node_modules/xmlbuilder/typings/index.d.ts create mode 100644 node_modules/xmlchars/LICENSE create mode 100644 node_modules/xmlchars/README.md create mode 100644 node_modules/xmlchars/package.json create mode 100644 node_modules/xmlchars/xml/1.0/ed4.d.ts create mode 100644 node_modules/xmlchars/xml/1.0/ed4.js create mode 100644 node_modules/xmlchars/xml/1.0/ed4.js.map create mode 100644 node_modules/xmlchars/xml/1.0/ed5.d.ts create mode 100644 node_modules/xmlchars/xml/1.0/ed5.js create mode 100644 node_modules/xmlchars/xml/1.0/ed5.js.map create mode 100644 node_modules/xmlchars/xml/1.1/ed2.d.ts create mode 100644 node_modules/xmlchars/xml/1.1/ed2.js create mode 100644 node_modules/xmlchars/xml/1.1/ed2.js.map create mode 100644 node_modules/xmlchars/xmlchars.d.ts create mode 100644 node_modules/xmlchars/xmlchars.js create mode 100644 node_modules/xmlchars/xmlchars.js.map create mode 100644 node_modules/xmlchars/xmlns/1.0/ed3.d.ts create mode 100644 node_modules/xmlchars/xmlns/1.0/ed3.js create mode 100644 node_modules/xmlchars/xmlns/1.0/ed3.js.map create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.gitignore b/.gitignore index bc676d1..92a8e85 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ /common.mk /build +/scripts/mdx-scripts/node_modules +/scripts/mdx-scripts/markdown-events +/scripts/mdx-scripts/news-events \ No newline at end of file diff --git a/node_modules/.bin/acorn b/node_modules/.bin/acorn new file mode 100644 index 0000000..46a3e61 --- /dev/null +++ b/node_modules/.bin/acorn @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../acorn/bin/acorn" "$@" +else + exec node "$basedir/../acorn/bin/acorn" "$@" +fi diff --git a/node_modules/.bin/acorn.cmd b/node_modules/.bin/acorn.cmd new file mode 100644 index 0000000..a9324df --- /dev/null +++ b/node_modules/.bin/acorn.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\acorn\bin\acorn" %* diff --git a/node_modules/.bin/acorn.ps1 b/node_modules/.bin/acorn.ps1 new file mode 100644 index 0000000..6f6dcdd --- /dev/null +++ b/node_modules/.bin/acorn.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args + } else { + & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../acorn/bin/acorn" $args + } else { + & "node$exe" "$basedir/../acorn/bin/acorn" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/detect-libc b/node_modules/.bin/detect-libc new file mode 100644 index 0000000..9a7ff33 --- /dev/null +++ b/node_modules/.bin/detect-libc @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../detect-libc/bin/detect-libc.js" "$@" +else + exec node "$basedir/../detect-libc/bin/detect-libc.js" "$@" +fi diff --git a/node_modules/.bin/detect-libc.cmd b/node_modules/.bin/detect-libc.cmd new file mode 100644 index 0000000..1c5d86d --- /dev/null +++ b/node_modules/.bin/detect-libc.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\detect-libc\bin\detect-libc.js" %* diff --git a/node_modules/.bin/detect-libc.ps1 b/node_modules/.bin/detect-libc.ps1 new file mode 100644 index 0000000..5ebeae1 --- /dev/null +++ b/node_modules/.bin/detect-libc.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../detect-libc/bin/detect-libc.js" $args + } else { + & "$basedir/node$exe" "$basedir/../detect-libc/bin/detect-libc.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../detect-libc/bin/detect-libc.js" $args + } else { + & "node$exe" "$basedir/../detect-libc/bin/detect-libc.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/escodegen b/node_modules/.bin/escodegen new file mode 100644 index 0000000..63c8e99 --- /dev/null +++ b/node_modules/.bin/escodegen @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../escodegen/bin/escodegen.js" "$@" +else + exec node "$basedir/../escodegen/bin/escodegen.js" "$@" +fi diff --git a/node_modules/.bin/escodegen.cmd b/node_modules/.bin/escodegen.cmd new file mode 100644 index 0000000..9ac38a7 --- /dev/null +++ b/node_modules/.bin/escodegen.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\escodegen\bin\escodegen.js" %* diff --git a/node_modules/.bin/escodegen.ps1 b/node_modules/.bin/escodegen.ps1 new file mode 100644 index 0000000..61d258e --- /dev/null +++ b/node_modules/.bin/escodegen.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../escodegen/bin/escodegen.js" $args + } else { + & "$basedir/node$exe" "$basedir/../escodegen/bin/escodegen.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../escodegen/bin/escodegen.js" $args + } else { + & "node$exe" "$basedir/../escodegen/bin/escodegen.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/esgenerate b/node_modules/.bin/esgenerate new file mode 100644 index 0000000..710797a --- /dev/null +++ b/node_modules/.bin/esgenerate @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../escodegen/bin/esgenerate.js" "$@" +else + exec node "$basedir/../escodegen/bin/esgenerate.js" "$@" +fi diff --git a/node_modules/.bin/esgenerate.cmd b/node_modules/.bin/esgenerate.cmd new file mode 100644 index 0000000..5c6426d --- /dev/null +++ b/node_modules/.bin/esgenerate.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\escodegen\bin\esgenerate.js" %* diff --git a/node_modules/.bin/esgenerate.ps1 b/node_modules/.bin/esgenerate.ps1 new file mode 100644 index 0000000..8835d60 --- /dev/null +++ b/node_modules/.bin/esgenerate.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../escodegen/bin/esgenerate.js" $args + } else { + & "$basedir/node$exe" "$basedir/../escodegen/bin/esgenerate.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../escodegen/bin/esgenerate.js" $args + } else { + & "node$exe" "$basedir/../escodegen/bin/esgenerate.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/esparse b/node_modules/.bin/esparse new file mode 100644 index 0000000..1cc1c96 --- /dev/null +++ b/node_modules/.bin/esparse @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../esprima/bin/esparse.js" "$@" +else + exec node "$basedir/../esprima/bin/esparse.js" "$@" +fi diff --git a/node_modules/.bin/esparse.cmd b/node_modules/.bin/esparse.cmd new file mode 100644 index 0000000..2ca6d50 --- /dev/null +++ b/node_modules/.bin/esparse.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\esprima\bin\esparse.js" %* diff --git a/node_modules/.bin/esparse.ps1 b/node_modules/.bin/esparse.ps1 new file mode 100644 index 0000000..f19ed73 --- /dev/null +++ b/node_modules/.bin/esparse.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../esprima/bin/esparse.js" $args + } else { + & "$basedir/node$exe" "$basedir/../esprima/bin/esparse.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../esprima/bin/esparse.js" $args + } else { + & "node$exe" "$basedir/../esprima/bin/esparse.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/esvalidate b/node_modules/.bin/esvalidate new file mode 100644 index 0000000..91a4c9b --- /dev/null +++ b/node_modules/.bin/esvalidate @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../esprima/bin/esvalidate.js" "$@" +else + exec node "$basedir/../esprima/bin/esvalidate.js" "$@" +fi diff --git a/node_modules/.bin/esvalidate.cmd b/node_modules/.bin/esvalidate.cmd new file mode 100644 index 0000000..4c41643 --- /dev/null +++ b/node_modules/.bin/esvalidate.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\esprima\bin\esvalidate.js" %* diff --git a/node_modules/.bin/esvalidate.ps1 b/node_modules/.bin/esvalidate.ps1 new file mode 100644 index 0000000..23699d1 --- /dev/null +++ b/node_modules/.bin/esvalidate.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../esprima/bin/esvalidate.js" $args + } else { + & "$basedir/node$exe" "$basedir/../esprima/bin/esvalidate.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../esprima/bin/esvalidate.js" $args + } else { + & "node$exe" "$basedir/../esprima/bin/esvalidate.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/mkdirp b/node_modules/.bin/mkdirp new file mode 100644 index 0000000..6ba5765 --- /dev/null +++ b/node_modules/.bin/mkdirp @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@" +else + exec node "$basedir/../mkdirp/bin/cmd.js" "$@" +fi diff --git a/node_modules/.bin/mkdirp.cmd b/node_modules/.bin/mkdirp.cmd new file mode 100644 index 0000000..a865dd9 --- /dev/null +++ b/node_modules/.bin/mkdirp.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mkdirp\bin\cmd.js" %* diff --git a/node_modules/.bin/mkdirp.ps1 b/node_modules/.bin/mkdirp.ps1 new file mode 100644 index 0000000..911e854 --- /dev/null +++ b/node_modules/.bin/mkdirp.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args + } else { + & "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args + } else { + & "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/needle b/node_modules/.bin/needle new file mode 100644 index 0000000..c7ed0fe --- /dev/null +++ b/node_modules/.bin/needle @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../needle/bin/needle" "$@" +else + exec node "$basedir/../needle/bin/needle" "$@" +fi diff --git a/node_modules/.bin/needle.cmd b/node_modules/.bin/needle.cmd new file mode 100644 index 0000000..7b711f9 --- /dev/null +++ b/node_modules/.bin/needle.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\needle\bin\needle" %* diff --git a/node_modules/.bin/needle.ps1 b/node_modules/.bin/needle.ps1 new file mode 100644 index 0000000..39c95ac --- /dev/null +++ b/node_modules/.bin/needle.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../needle/bin/needle" $args + } else { + & "$basedir/node$exe" "$basedir/../needle/bin/needle" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../needle/bin/needle" $args + } else { + & "node$exe" "$basedir/../needle/bin/needle" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/node-pre-gyp b/node_modules/.bin/node-pre-gyp new file mode 100644 index 0000000..b0504e3 --- /dev/null +++ b/node_modules/.bin/node-pre-gyp @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../node-pre-gyp/bin/node-pre-gyp" "$@" +else + exec node "$basedir/../node-pre-gyp/bin/node-pre-gyp" "$@" +fi diff --git a/node_modules/.bin/node-pre-gyp.cmd b/node_modules/.bin/node-pre-gyp.cmd new file mode 100644 index 0000000..3381323 --- /dev/null +++ b/node_modules/.bin/node-pre-gyp.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\node-pre-gyp\bin\node-pre-gyp" %* diff --git a/node_modules/.bin/node-pre-gyp.ps1 b/node_modules/.bin/node-pre-gyp.ps1 new file mode 100644 index 0000000..f4bbed5 --- /dev/null +++ b/node_modules/.bin/node-pre-gyp.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../node-pre-gyp/bin/node-pre-gyp" $args + } else { + & "$basedir/node$exe" "$basedir/../node-pre-gyp/bin/node-pre-gyp" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../node-pre-gyp/bin/node-pre-gyp" $args + } else { + & "node$exe" "$basedir/../node-pre-gyp/bin/node-pre-gyp" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/nopt b/node_modules/.bin/nopt new file mode 100644 index 0000000..f1ec43b --- /dev/null +++ b/node_modules/.bin/nopt @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../nopt/bin/nopt.js" "$@" +else + exec node "$basedir/../nopt/bin/nopt.js" "$@" +fi diff --git a/node_modules/.bin/nopt.cmd b/node_modules/.bin/nopt.cmd new file mode 100644 index 0000000..a7f38b3 --- /dev/null +++ b/node_modules/.bin/nopt.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\nopt\bin\nopt.js" %* diff --git a/node_modules/.bin/nopt.ps1 b/node_modules/.bin/nopt.ps1 new file mode 100644 index 0000000..9d6ba56 --- /dev/null +++ b/node_modules/.bin/nopt.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../nopt/bin/nopt.js" $args + } else { + & "$basedir/node$exe" "$basedir/../nopt/bin/nopt.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../nopt/bin/nopt.js" $args + } else { + & "node$exe" "$basedir/../nopt/bin/nopt.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/rc b/node_modules/.bin/rc new file mode 100644 index 0000000..e31cd83 --- /dev/null +++ b/node_modules/.bin/rc @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../rc/cli.js" "$@" +else + exec node "$basedir/../rc/cli.js" "$@" +fi diff --git a/node_modules/.bin/rc.cmd b/node_modules/.bin/rc.cmd new file mode 100644 index 0000000..be16b73 --- /dev/null +++ b/node_modules/.bin/rc.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rc\cli.js" %* diff --git a/node_modules/.bin/rc.ps1 b/node_modules/.bin/rc.ps1 new file mode 100644 index 0000000..9a9b6e3 --- /dev/null +++ b/node_modules/.bin/rc.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../rc/cli.js" $args + } else { + & "$basedir/node$exe" "$basedir/../rc/cli.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../rc/cli.js" $args + } else { + & "node$exe" "$basedir/../rc/cli.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/rimraf b/node_modules/.bin/rimraf new file mode 100644 index 0000000..b816825 --- /dev/null +++ b/node_modules/.bin/rimraf @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../rimraf/bin.js" "$@" +else + exec node "$basedir/../rimraf/bin.js" "$@" +fi diff --git a/node_modules/.bin/rimraf.cmd b/node_modules/.bin/rimraf.cmd new file mode 100644 index 0000000..13f45ec --- /dev/null +++ b/node_modules/.bin/rimraf.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rimraf\bin.js" %* diff --git a/node_modules/.bin/rimraf.ps1 b/node_modules/.bin/rimraf.ps1 new file mode 100644 index 0000000..1716791 --- /dev/null +++ b/node_modules/.bin/rimraf.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args + } else { + & "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../rimraf/bin.js" $args + } else { + & "node$exe" "$basedir/../rimraf/bin.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver new file mode 100644 index 0000000..86cee84 --- /dev/null +++ b/node_modules/.bin/semver @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../semver/bin/semver" "$@" +else + exec node "$basedir/../semver/bin/semver" "$@" +fi diff --git a/node_modules/.bin/semver.cmd b/node_modules/.bin/semver.cmd new file mode 100644 index 0000000..22d9286 --- /dev/null +++ b/node_modules/.bin/semver.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver" %* diff --git a/node_modules/.bin/semver.ps1 b/node_modules/.bin/semver.ps1 new file mode 100644 index 0000000..98c1b09 --- /dev/null +++ b/node_modules/.bin/semver.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver" $args + } else { + & "$basedir/node$exe" "$basedir/../semver/bin/semver" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../semver/bin/semver" $args + } else { + & "node$exe" "$basedir/../semver/bin/semver" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 0000000..e79e3bb --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,619 @@ +{ + "name": "old-website", + "lockfileVersion": 2, + "requires": true, + "packages": { + "node_modules/@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/abab": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", + "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==" + }, + "node_modules/acorn": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.3.0.tgz", + "integrity": "sha512-tqPKHZ5CaBJw0Xmy0ZZvLs1qTV+BNFSyvn77ASXkpBNfIRk8ev26fKrD9iLGwGA9zedPao52GSHzq8lyZG0NUw==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-globals": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", + "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", + "dependencies": { + "acorn": "^7.1.1", + "acorn-walk": "^7.1.1" + } + }, + "node_modules/acorn-globals/node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "node_modules/browser-process-hrtime": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cssom": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", + "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==" + }, + "node_modules/cssstyle": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", + "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", + "dependencies": { + "cssom": "~0.3.6" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cssstyle/node_modules/cssom": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==" + }, + "node_modules/data-urls": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", + "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", + "dependencies": { + "abab": "^2.0.3", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decimal.js": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.2.1.tgz", + "integrity": "sha512-KaL7+6Fw6i5A2XSnsbhm/6B+NuEA7TZ4vqxnd5tXz9sbKtrN9Srj8ab4vKVdK8YAqZO9P1kg45Y6YLoduPf+kw==" + }, + "node_modules/deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/domexception": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", + "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", + "dependencies": { + "webidl-conversions": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/domexception/node_modules/webidl-conversions": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", + "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/escodegen": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", + "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + }, + "node_modules/form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/html-encoding-sniffer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", + "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", + "dependencies": { + "whatwg-encoding": "^1.0.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "dependencies": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" + }, + "node_modules/jsdom": { + "version": "16.6.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.6.0.tgz", + "integrity": "sha512-Ty1vmF4NHJkolaEmdjtxTfSfkdb8Ywarwf63f+F8/mDD1uLSSWDxDuMiZxiPhwunLrn9LOSVItWj4bLYsLN3Dg==", + "dependencies": { + "abab": "^2.0.5", + "acorn": "^8.2.4", + "acorn-globals": "^6.0.0", + "cssom": "^0.4.4", + "cssstyle": "^2.3.0", + "data-urls": "^2.0.0", + "decimal.js": "^10.2.1", + "domexception": "^2.0.1", + "escodegen": "^2.0.0", + "form-data": "^3.0.0", + "html-encoding-sniffer": "^2.0.1", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.0", + "parse5": "6.0.1", + "saxes": "^5.0.1", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.0.0", + "w3c-hr-time": "^1.0.2", + "w3c-xmlserializer": "^2.0.0", + "webidl-conversions": "^6.1.0", + "whatwg-encoding": "^1.0.5", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.5.0", + "ws": "^7.4.5", + "xml-name-validator": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "canvas": "^2.5.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, + "node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/mime-db": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz", + "integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.31", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz", + "integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==", + "dependencies": { + "mime-db": "1.48.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/nwsapi": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", + "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==" + }, + "node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" + }, + "node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "node_modules/saxes": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", + "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "dependencies": { + "xmlchars": "^2.2.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" + }, + "node_modules/tough-cookie": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.1.2" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tr46": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", + "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", + "dependencies": { + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/w3c-hr-time": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", + "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", + "dependencies": { + "browser-process-hrtime": "^1.0.0" + } + }, + "node_modules/w3c-xmlserializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", + "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", + "dependencies": { + "xml-name-validator": "^3.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/webidl-conversions": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", + "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", + "engines": { + "node": ">=10.4" + } + }, + "node_modules/whatwg-encoding": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", + "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", + "dependencies": { + "iconv-lite": "0.4.24" + } + }, + "node_modules/whatwg-mimetype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", + "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==" + }, + "node_modules/whatwg-url": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.5.0.tgz", + "integrity": "sha512-fy+R77xWv0AiqfLl4nuGUlQ3/6b5uNfQ4WAbGQVMYshCTCCPK9psC1nWh3XHuxGVCtlcDDQPQW1csmmIQo+fwg==", + "dependencies": { + "lodash": "^4.7.0", + "tr46": "^2.0.2", + "webidl-conversions": "^6.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ws": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xml-name-validator": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", + "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==" + }, + "node_modules/xml2js": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", + "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" + } + } +} diff --git a/node_modules/@tootallnate/once/dist/index.d.ts b/node_modules/@tootallnate/once/dist/index.d.ts new file mode 100644 index 0000000..a7efe94 --- /dev/null +++ b/node_modules/@tootallnate/once/dist/index.d.ts @@ -0,0 +1,14 @@ +/// +import { EventEmitter } from 'events'; +declare function once(emitter: EventEmitter, name: string): once.CancelablePromise; +declare namespace once { + interface CancelFunction { + (): void; + } + interface CancelablePromise extends Promise { + cancel: CancelFunction; + } + type CancellablePromise = CancelablePromise; + function spread(emitter: EventEmitter, name: string): once.CancelablePromise; +} +export = once; diff --git a/node_modules/@tootallnate/once/dist/index.js b/node_modules/@tootallnate/once/dist/index.js new file mode 100644 index 0000000..bfd0dc8 --- /dev/null +++ b/node_modules/@tootallnate/once/dist/index.js @@ -0,0 +1,39 @@ +"use strict"; +function noop() { } +function once(emitter, name) { + const o = once.spread(emitter, name); + const r = o.then((args) => args[0]); + r.cancel = o.cancel; + return r; +} +(function (once) { + function spread(emitter, name) { + let c = null; + const p = new Promise((resolve, reject) => { + function cancel() { + emitter.removeListener(name, onEvent); + emitter.removeListener('error', onError); + p.cancel = noop; + } + function onEvent(...args) { + cancel(); + resolve(args); + } + function onError(err) { + cancel(); + reject(err); + } + c = cancel; + emitter.on(name, onEvent); + emitter.on('error', onError); + }); + if (!c) { + throw new TypeError('Could not get `cancel()` function'); + } + p.cancel = c; + return p; + } + once.spread = spread; +})(once || (once = {})); +module.exports = once; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@tootallnate/once/dist/index.js.map b/node_modules/@tootallnate/once/dist/index.js.map new file mode 100644 index 0000000..30d2049 --- /dev/null +++ b/node_modules/@tootallnate/once/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,SAAS,IAAI,KAAI,CAAC;AAElB,SAAS,IAAI,CACZ,OAAqB,EACrB,IAAY;IAEZ,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAM,OAAO,EAAE,IAAI,CAAC,CAAC;IAC1C,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAA8B,CAAC;IACtE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACpB,OAAO,CAAC,CAAC;AACV,CAAC;AAED,WAAU,IAAI;IAWb,SAAgB,MAAM,CACrB,OAAqB,EACrB,IAAY;QAEZ,IAAI,CAAC,GAA+B,IAAI,CAAC;QACzC,MAAM,CAAC,GAAG,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC5C,SAAS,MAAM;gBACd,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;gBACtC,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;gBACzC,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC;YACjB,CAAC;YACD,SAAS,OAAO,CAAC,GAAG,IAAW;gBAC9B,MAAM,EAAE,CAAC;gBACT,OAAO,CAAC,IAAS,CAAC,CAAC;YACpB,CAAC;YACD,SAAS,OAAO,CAAC,GAAU;gBAC1B,MAAM,EAAE,CAAC;gBACT,MAAM,CAAC,GAAG,CAAC,CAAC;YACb,CAAC;YACD,CAAC,GAAG,MAAM,CAAC;YACX,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAC1B,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC9B,CAAC,CAA8B,CAAC;QAChC,IAAI,CAAC,CAAC,EAAE;YACP,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAC;SACzD;QACD,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QACb,OAAO,CAAC,CAAC;IACV,CAAC;IA5Be,WAAM,SA4BrB,CAAA;AACF,CAAC,EAxCS,IAAI,KAAJ,IAAI,QAwCb;AAED,iBAAS,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/@tootallnate/once/package.json b/node_modules/@tootallnate/once/package.json new file mode 100644 index 0000000..8343f9f --- /dev/null +++ b/node_modules/@tootallnate/once/package.json @@ -0,0 +1,45 @@ +{ + "name": "@tootallnate/once", + "version": "1.1.2", + "description": "Creates a Promise that waits for a single event", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist" + ], + "scripts": { + "prebuild": "rimraf dist", + "build": "tsc", + "test": "mocha --reporter spec", + "test-lint": "eslint src --ext .js,.ts", + "prepublishOnly": "npm run build" + }, + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/once.git" + }, + "keywords": [], + "author": "Nathan Rajlich (http://n8.io/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/TooTallNate/once/issues" + }, + "devDependencies": { + "@types/node": "^12.12.11", + "@typescript-eslint/eslint-plugin": "1.6.0", + "@typescript-eslint/parser": "1.1.0", + "eslint": "5.16.0", + "eslint-config-airbnb": "17.1.0", + "eslint-config-prettier": "4.1.0", + "eslint-import-resolver-typescript": "1.1.1", + "eslint-plugin-import": "2.16.0", + "eslint-plugin-jsx-a11y": "6.2.1", + "eslint-plugin-react": "7.12.4", + "mocha": "^6.2.2", + "rimraf": "^3.0.0", + "typescript": "^3.7.3" + }, + "engines": { + "node": ">= 6" + } +} diff --git a/node_modules/abab/CHANGELOG.md b/node_modules/abab/CHANGELOG.md new file mode 100644 index 0000000..7493ffe --- /dev/null +++ b/node_modules/abab/CHANGELOG.md @@ -0,0 +1,45 @@ +## 2.0.5 + +- Use a lookup string in atobLookup and btoaLookup (@GiovanniFrigo in #38) +- Dependency updates + +## 2.0.4 + +- Dependency updates + +## 2.0.3 + +- Use standard wording for BSD-3-Clause license (@PhilippWendler) + +## 2.0.2 + +- Correct license in `package.json` (@Haegin) + +## 2.0.1 + +- Add TypeScript type definitions, thanks to @LinusU + +## 2.0.0 + +Modernization updates thanks to @TimothyGu: + +- Use jsdom's eslint config, remove jscs +- Move syntax to ES6 +- Remove Babel +- Via: https://github.com/jsdom/abab/pull/26 + +## 1.0.4 + +- Added license file + +## 1.0.3 + +- Replaced `let` with `var` in `lib/btoa.js` + - Follow up from `1.0.2` + - Resolves https://github.com/jsdom/abab/issues/18 + +## 1.0.2 + +- Replaced `const` with `var` in `index.js` + - Allows use of `abab` in the browser without a transpilation step + - Resolves https://github.com/jsdom/abab/issues/15 diff --git a/node_modules/abab/LICENSE.md b/node_modules/abab/LICENSE.md new file mode 100644 index 0000000..aac4aac --- /dev/null +++ b/node_modules/abab/LICENSE.md @@ -0,0 +1,13 @@ +Copyright © 2019 W3C and Jeff Carpenter \ + +Both the original source code and new contributions in this repository are released under the [3-Clause BSD license](https://opensource.org/licenses/BSD-3-Clause). + +# The 3-Clause BSD License + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/abab/README.md b/node_modules/abab/README.md new file mode 100644 index 0000000..6f32eb0 --- /dev/null +++ b/node_modules/abab/README.md @@ -0,0 +1,51 @@ +# abab [![npm version](https://badge.fury.io/js/abab.svg)](https://www.npmjs.com/package/abab) [![Build Status](https://travis-ci.org/jsdom/abab.svg?branch=master)](https://travis-ci.org/jsdom/abab) + +A JavaScript module that implements `window.atob` and `window.btoa` according the forgiving-base64 algorithm in the [Infra Standard](https://infra.spec.whatwg.org/#forgiving-base64). The original code was forked from [w3c/web-platform-tests](https://github.com/w3c/web-platform-tests/blob/master/html/webappapis/atob/base64.html). + +Compatibility: Node.js version 3+ and all major browsers. + +Install with `npm`: + +```sh +npm install abab +``` + +## API + +### `btoa` (base64 encode) + +```js +const { btoa } = require('abab'); +btoa('Hello, world!'); // 'SGVsbG8sIHdvcmxkIQ==' +``` + +### `atob` (base64 decode) + +```js +const { atob } = require('abab'); +atob('SGVsbG8sIHdvcmxkIQ=='); // 'Hello, world!' +``` + +#### Valid characters + +[Per the spec](https://html.spec.whatwg.org/multipage/webappapis.html#atob:dom-windowbase64-btoa-3), `btoa` will accept strings "containing only characters in the range `U+0000` to `U+00FF`." If passed a string with characters above `U+00FF`, `btoa` will return `null`. If `atob` is passed a string that is not base64-valid, it will also return `null`. In both cases when `null` is returned, the spec calls for throwing a `DOMException` of type `InvalidCharacterError`. + +## Browsers + +If you want to include just one of the methods to save bytes in your client-side code, you can `require` the desired module directly. + +```js +const atob = require('abab/lib/atob'); +const btoa = require('abab/lib/btoa'); +``` + +## Development + +If you're **submitting a PR** or **deploying to npm**, please use the [checklists in CONTRIBUTING.md](CONTRIBUTING.md#checklists). + +## Remembering what `atob` and `btoa` stand for + +Base64 comes from IETF [RFC 4648](https://tools.ietf.org/html/rfc4648#section-4) (2006). + +- **`btoa`**, the encoder function, stands for **binary** to **ASCII**, meaning it converts any binary input into a subset of **ASCII** (Base64). +- **`atob`**, the decoder function, converts **ASCII** (or Base64) to its original **binary** format. diff --git a/node_modules/abab/index.d.ts b/node_modules/abab/index.d.ts new file mode 100644 index 0000000..665a6ad --- /dev/null +++ b/node_modules/abab/index.d.ts @@ -0,0 +1,2 @@ +export function atob(encodedData: string): string | null +export function btoa(stringToEncode: string): string | null diff --git a/node_modules/abab/index.js b/node_modules/abab/index.js new file mode 100644 index 0000000..49d5ae9 --- /dev/null +++ b/node_modules/abab/index.js @@ -0,0 +1,9 @@ +"use strict"; + +const atob = require("./lib/atob"); +const btoa = require("./lib/btoa"); + +module.exports = { + atob, + btoa +}; diff --git a/node_modules/abab/lib/atob.js b/node_modules/abab/lib/atob.js new file mode 100644 index 0000000..a47b48d --- /dev/null +++ b/node_modules/abab/lib/atob.js @@ -0,0 +1,97 @@ +"use strict"; + +/** + * Implementation of atob() according to the HTML and Infra specs, except that + * instead of throwing INVALID_CHARACTER_ERR we return null. + */ +function atob(data) { + // Web IDL requires DOMStrings to just be converted using ECMAScript + // ToString, which in our case amounts to using a template literal. + data = `${data}`; + // "Remove all ASCII whitespace from data." + data = data.replace(/[ \t\n\f\r]/g, ""); + // "If data's length divides by 4 leaving no remainder, then: if data ends + // with one or two U+003D (=) code points, then remove them from data." + if (data.length % 4 === 0) { + data = data.replace(/==?$/, ""); + } + // "If data's length divides by 4 leaving a remainder of 1, then return + // failure." + // + // "If data contains a code point that is not one of + // + // U+002B (+) + // U+002F (/) + // ASCII alphanumeric + // + // then return failure." + if (data.length % 4 === 1 || /[^+/0-9A-Za-z]/.test(data)) { + return null; + } + // "Let output be an empty byte sequence." + let output = ""; + // "Let buffer be an empty buffer that can have bits appended to it." + // + // We append bits via left-shift and or. accumulatedBits is used to track + // when we've gotten to 24 bits. + let buffer = 0; + let accumulatedBits = 0; + // "Let position be a position variable for data, initially pointing at the + // start of data." + // + // "While position does not point past the end of data:" + for (let i = 0; i < data.length; i++) { + // "Find the code point pointed to by position in the second column of + // Table 1: The Base 64 Alphabet of RFC 4648. Let n be the number given in + // the first cell of the same row. + // + // "Append to buffer the six bits corresponding to n, most significant bit + // first." + // + // atobLookup() implements the table from RFC 4648. + buffer <<= 6; + buffer |= atobLookup(data[i]); + accumulatedBits += 6; + // "If buffer has accumulated 24 bits, interpret them as three 8-bit + // big-endian numbers. Append three bytes with values equal to those + // numbers to output, in the same order, and then empty buffer." + if (accumulatedBits === 24) { + output += String.fromCharCode((buffer & 0xff0000) >> 16); + output += String.fromCharCode((buffer & 0xff00) >> 8); + output += String.fromCharCode(buffer & 0xff); + buffer = accumulatedBits = 0; + } + // "Advance position by 1." + } + // "If buffer is not empty, it contains either 12 or 18 bits. If it contains + // 12 bits, then discard the last four and interpret the remaining eight as + // an 8-bit big-endian number. If it contains 18 bits, then discard the last + // two and interpret the remaining 16 as two 8-bit big-endian numbers. Append + // the one or two bytes with values equal to those one or two numbers to + // output, in the same order." + if (accumulatedBits === 12) { + buffer >>= 4; + output += String.fromCharCode(buffer); + } else if (accumulatedBits === 18) { + buffer >>= 2; + output += String.fromCharCode((buffer & 0xff00) >> 8); + output += String.fromCharCode(buffer & 0xff); + } + // "Return output." + return output; +} +/** + * A lookup table for atob(), which converts an ASCII character to the + * corresponding six-bit number. + */ + +const keystr = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + +function atobLookup(chr) { + const index = keystr.indexOf(chr); + // Throw exception if character is not in the lookup string; should not be hit in tests + return index < 0 ? undefined : index; +} + +module.exports = atob; diff --git a/node_modules/abab/lib/btoa.js b/node_modules/abab/lib/btoa.js new file mode 100644 index 0000000..131a679 --- /dev/null +++ b/node_modules/abab/lib/btoa.js @@ -0,0 +1,58 @@ +"use strict"; + +/** + * btoa() as defined by the HTML and Infra specs, which mostly just references + * RFC 4648. + */ +function btoa(s) { + let i; + // String conversion as required by Web IDL. + s = `${s}`; + // "The btoa() method must throw an "InvalidCharacterError" DOMException if + // data contains any character whose code point is greater than U+00FF." + for (i = 0; i < s.length; i++) { + if (s.charCodeAt(i) > 255) { + return null; + } + } + let out = ""; + for (i = 0; i < s.length; i += 3) { + const groupsOfSix = [undefined, undefined, undefined, undefined]; + groupsOfSix[0] = s.charCodeAt(i) >> 2; + groupsOfSix[1] = (s.charCodeAt(i) & 0x03) << 4; + if (s.length > i + 1) { + groupsOfSix[1] |= s.charCodeAt(i + 1) >> 4; + groupsOfSix[2] = (s.charCodeAt(i + 1) & 0x0f) << 2; + } + if (s.length > i + 2) { + groupsOfSix[2] |= s.charCodeAt(i + 2) >> 6; + groupsOfSix[3] = s.charCodeAt(i + 2) & 0x3f; + } + for (let j = 0; j < groupsOfSix.length; j++) { + if (typeof groupsOfSix[j] === "undefined") { + out += "="; + } else { + out += btoaLookup(groupsOfSix[j]); + } + } + } + return out; +} + +/** + * Lookup table for btoa(), which converts a six-bit number into the + * corresponding ASCII character. + */ +const keystr = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + +function btoaLookup(index) { + if (index >= 0 && index < 64) { + return keystr[index]; + } + + // Throw INVALID_CHARACTER_ERR exception here -- won't be hit in the tests. + return undefined; +} + +module.exports = btoa; diff --git a/node_modules/abab/package.json b/node_modules/abab/package.json new file mode 100644 index 0000000..1b38204 --- /dev/null +++ b/node_modules/abab/package.json @@ -0,0 +1,42 @@ +{ + "name": "abab", + "version": "2.0.5", + "description": "WHATWG spec-compliant implementations of window.atob and window.btoa.", + "main": "index.js", + "files": [ + "index.d.ts", + "index.js", + "lib/" + ], + "scripts": { + "mocha": "mocha test/node", + "karma": "karma start", + "test": "npm run lint && npm run mocha && npm run karma", + "lint": "eslint ." + }, + "repository": { + "type": "git", + "url": "git+https://github.com/jsdom/abab.git" + }, + "keywords": [ + "atob", + "btoa", + "browser" + ], + "author": "Jeff Carpenter ", + "license": "BSD-3-Clause", + "bugs": { + "url": "https://github.com/jsdom/abab/issues" + }, + "homepage": "https://github.com/jsdom/abab#readme", + "devDependencies": { + "eslint": "^4.19.1", + "karma": "^2.0.0", + "karma-cli": "^1.0.1", + "karma-firefox-launcher": "^1.1.0", + "karma-mocha": "^1.3.0", + "karma-webpack": "^3.0.0", + "mocha": "^5.1.0", + "webpack": "^4.5.0" + } +} diff --git a/node_modules/acorn-globals/LICENSE b/node_modules/acorn-globals/LICENSE new file mode 100644 index 0000000..27cc9f3 --- /dev/null +++ b/node_modules/acorn-globals/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014 Forbes Lindesay + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/acorn-globals/README.md b/node_modules/acorn-globals/README.md new file mode 100644 index 0000000..5f7326f --- /dev/null +++ b/node_modules/acorn-globals/README.md @@ -0,0 +1,81 @@ +# acorn-globals + +Detect global variables in JavaScript using acorn + +[Get supported acorn-globals with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-acorn_globals?utm_source=npm-acorn-globals&utm_medium=referral&utm_campaign=readme) + +[![Build Status](https://img.shields.io/travis/ForbesLindesay/acorn-globals/master.svg)](https://travis-ci.org/ForbesLindesay/acorn-globals) +[![Dependency Status](https://img.shields.io/david/ForbesLindesay/acorn-globals.svg)](https://david-dm.org/ForbesLindesay/acorn-globals) +[![NPM version](https://img.shields.io/npm/v/acorn-globals.svg)](https://www.npmjs.org/package/acorn-globals) + +## Installation + + npm install acorn-globals + +## Usage + +detect.js + +```js +var fs = require('fs'); +var detect = require('acorn-globals'); + +var src = fs.readFileSync(__dirname + '/input.js', 'utf8'); + +var scope = detect(src); +console.dir(scope); +``` + +input.js + +```js +var x = 5; +var y = 3, z = 2; + +w.foo(); +w = 2; + +RAWR=444; +RAWR.foo(); + +BLARG=3; + +foo(function () { + var BAR = 3; + process.nextTick(function (ZZZZZZZZZZZZ) { + console.log('beep boop'); + var xyz = 4; + x += 10; + x.zzzzzz; + ZZZ=6; + }); + function doom () { + } + ZZZ.foo(); + +}); + +console.log(xyz); +``` + +output: + +``` +$ node example/detect.js +[ { name: 'BLARG', nodes: [ [Object] ] }, + { name: 'RAWR', nodes: [ [Object], [Object] ] }, + { name: 'ZZZ', nodes: [ [Object], [Object] ] }, + { name: 'console', nodes: [ [Object], [Object] ] }, + { name: 'foo', nodes: [ [Object] ] }, + { name: 'process', nodes: [ [Object] ] }, + { name: 'w', nodes: [ [Object], [Object] ] }, + { name: 'xyz', nodes: [ [Object] ] } ] +``` + +## Security contact information + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + +## License + + MIT diff --git a/node_modules/acorn-globals/index.js b/node_modules/acorn-globals/index.js new file mode 100644 index 0000000..232cbe4 --- /dev/null +++ b/node_modules/acorn-globals/index.js @@ -0,0 +1,179 @@ +'use strict'; + +var acorn = require('acorn'); +var walk = require('acorn-walk'); + +function isScope(node) { + return node.type === 'FunctionExpression' || node.type === 'FunctionDeclaration' || node.type === 'ArrowFunctionExpression' || node.type === 'Program'; +} +function isBlockScope(node) { + return node.type === 'BlockStatement' || isScope(node); +} + +function declaresArguments(node) { + return node.type === 'FunctionExpression' || node.type === 'FunctionDeclaration'; +} + +function declaresThis(node) { + return node.type === 'FunctionExpression' || node.type === 'FunctionDeclaration'; +} + +function reallyParse(source, options) { + var parseOptions = Object.assign({}, options, + { + allowReturnOutsideFunction: true, + allowImportExportEverywhere: true, + allowHashBang: true + } + ); + return acorn.parse(source, parseOptions); +} +module.exports = findGlobals; +module.exports.parse = reallyParse; +function findGlobals(source, options) { + options = options || {}; + var globals = []; + var ast; + // istanbul ignore else + if (typeof source === 'string') { + ast = reallyParse(source, options); + } else { + ast = source; + } + // istanbul ignore if + if (!(ast && typeof ast === 'object' && ast.type === 'Program')) { + throw new TypeError('Source must be either a string of JavaScript or an acorn AST'); + } + var declareFunction = function (node) { + var fn = node; + fn.locals = fn.locals || Object.create(null); + node.params.forEach(function (node) { + declarePattern(node, fn); + }); + if (node.id) { + fn.locals[node.id.name] = true; + } + }; + var declareClass = function (node) { + node.locals = node.locals || Object.create(null); + if (node.id) { + node.locals[node.id.name] = true; + } + }; + var declarePattern = function (node, parent) { + switch (node.type) { + case 'Identifier': + parent.locals[node.name] = true; + break; + case 'ObjectPattern': + node.properties.forEach(function (node) { + declarePattern(node.value || node.argument, parent); + }); + break; + case 'ArrayPattern': + node.elements.forEach(function (node) { + if (node) declarePattern(node, parent); + }); + break; + case 'RestElement': + declarePattern(node.argument, parent); + break; + case 'AssignmentPattern': + declarePattern(node.left, parent); + break; + // istanbul ignore next + default: + throw new Error('Unrecognized pattern type: ' + node.type); + } + }; + var declareModuleSpecifier = function (node, parents) { + ast.locals = ast.locals || Object.create(null); + ast.locals[node.local.name] = true; + }; + walk.ancestor(ast, { + 'VariableDeclaration': function (node, parents) { + var parent = null; + for (var i = parents.length - 1; i >= 0 && parent === null; i--) { + if (node.kind === 'var' ? isScope(parents[i]) : isBlockScope(parents[i])) { + parent = parents[i]; + } + } + parent.locals = parent.locals || Object.create(null); + node.declarations.forEach(function (declaration) { + declarePattern(declaration.id, parent); + }); + }, + 'FunctionDeclaration': function (node, parents) { + var parent = null; + for (var i = parents.length - 2; i >= 0 && parent === null; i--) { + if (isScope(parents[i])) { + parent = parents[i]; + } + } + parent.locals = parent.locals || Object.create(null); + if (node.id) { + parent.locals[node.id.name] = true; + } + declareFunction(node); + }, + 'Function': declareFunction, + 'ClassDeclaration': function (node, parents) { + var parent = null; + for (var i = parents.length - 2; i >= 0 && parent === null; i--) { + if (isBlockScope(parents[i])) { + parent = parents[i]; + } + } + parent.locals = parent.locals || Object.create(null); + if (node.id) { + parent.locals[node.id.name] = true; + } + declareClass(node); + }, + 'Class': declareClass, + 'TryStatement': function (node) { + if (node.handler === null) return; + node.handler.locals = node.handler.locals || Object.create(null); + declarePattern(node.handler.param, node.handler); + }, + 'ImportDefaultSpecifier': declareModuleSpecifier, + 'ImportSpecifier': declareModuleSpecifier, + 'ImportNamespaceSpecifier': declareModuleSpecifier + }); + function identifier(node, parents) { + var name = node.name; + if (name === 'undefined') return; + for (var i = 0; i < parents.length; i++) { + if (name === 'arguments' && declaresArguments(parents[i])) { + return; + } + if (parents[i].locals && name in parents[i].locals) { + return; + } + } + node.parents = parents.slice(); + globals.push(node); + } + walk.ancestor(ast, { + 'VariablePattern': identifier, + 'Identifier': identifier, + 'ThisExpression': function (node, parents) { + for (var i = 0; i < parents.length; i++) { + if (declaresThis(parents[i])) { + return; + } + } + node.parents = parents.slice(); + globals.push(node); + } + }); + var groupedGlobals = Object.create(null); + globals.forEach(function (node) { + var name = node.type === 'ThisExpression' ? 'this' : node.name; + groupedGlobals[name] = (groupedGlobals[name] || []); + groupedGlobals[name].push(node); + }); + return Object.keys(groupedGlobals).sort().map(function (name) { + return {name: name, nodes: groupedGlobals[name]}; + }); +} diff --git a/node_modules/acorn-globals/node_modules/.bin/acorn b/node_modules/acorn-globals/node_modules/.bin/acorn new file mode 100644 index 0000000..46a3e61 --- /dev/null +++ b/node_modules/acorn-globals/node_modules/.bin/acorn @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../acorn/bin/acorn" "$@" +else + exec node "$basedir/../acorn/bin/acorn" "$@" +fi diff --git a/node_modules/acorn-globals/node_modules/.bin/acorn.cmd b/node_modules/acorn-globals/node_modules/.bin/acorn.cmd new file mode 100644 index 0000000..a9324df --- /dev/null +++ b/node_modules/acorn-globals/node_modules/.bin/acorn.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\acorn\bin\acorn" %* diff --git a/node_modules/acorn-globals/node_modules/.bin/acorn.ps1 b/node_modules/acorn-globals/node_modules/.bin/acorn.ps1 new file mode 100644 index 0000000..6f6dcdd --- /dev/null +++ b/node_modules/acorn-globals/node_modules/.bin/acorn.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args + } else { + & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../acorn/bin/acorn" $args + } else { + & "node$exe" "$basedir/../acorn/bin/acorn" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/acorn-globals/node_modules/acorn/CHANGELOG.md b/node_modules/acorn-globals/node_modules/acorn/CHANGELOG.md new file mode 100644 index 0000000..164fd27 --- /dev/null +++ b/node_modules/acorn-globals/node_modules/acorn/CHANGELOG.md @@ -0,0 +1,620 @@ +## 7.4.0 (2020-08-03) + +### New features + +Add support for logical assignment operators. + +Add support for numeric separators. + +## 7.3.1 (2020-06-11) + +### Bug fixes + +Make the string in the `version` export match the actual library version. + +## 7.3.0 (2020-06-11) + +### Bug fixes + +Fix a bug that caused parsing of object patterns with a property named `set` that had a default value to fail. + +### New features + +Add support for optional chaining (`?.`). + +## 7.2.0 (2020-05-09) + +### Bug fixes + +Fix precedence issue in parsing of async arrow functions. + +### New features + +Add support for nullish coalescing. + +Add support for `import.meta`. + +Support `export * as ...` syntax. + +Upgrade to Unicode 13. + +## 6.4.1 (2020-03-09) + +### Bug fixes + +More carefully check for valid UTF16 surrogate pairs in regexp validator. + +## 7.1.1 (2020-03-01) + +### Bug fixes + +Treat `\8` and `\9` as invalid escapes in template strings. + +Allow unicode escapes in property names that are keywords. + +Don't error on an exponential operator expression as argument to `await`. + +More carefully check for valid UTF16 surrogate pairs in regexp validator. + +## 7.1.0 (2019-09-24) + +### Bug fixes + +Disallow trailing object literal commas when ecmaVersion is less than 5. + +### New features + +Add a static `acorn` property to the `Parser` class that contains the entire module interface, to allow plugins to access the instance of the library that they are acting on. + +## 7.0.0 (2019-08-13) + +### Breaking changes + +Changes the node format for dynamic imports to use the `ImportExpression` node type, as defined in [ESTree](https://github.com/estree/estree/blob/master/es2020.md#importexpression). + +Makes 10 (ES2019) the default value for the `ecmaVersion` option. + +## 6.3.0 (2019-08-12) + +### New features + +`sourceType: "module"` can now be used even when `ecmaVersion` is less than 6, to parse module-style code that otherwise conforms to an older standard. + +## 6.2.1 (2019-07-21) + +### Bug fixes + +Fix bug causing Acorn to treat some characters as identifier characters that shouldn't be treated as such. + +Fix issue where setting the `allowReserved` option to `"never"` allowed reserved words in some circumstances. + +## 6.2.0 (2019-07-04) + +### Bug fixes + +Improve valid assignment checking in `for`/`in` and `for`/`of` loops. + +Disallow binding `let` in patterns. + +### New features + +Support bigint syntax with `ecmaVersion` >= 11. + +Support dynamic `import` syntax with `ecmaVersion` >= 11. + +Upgrade to Unicode version 12. + +## 6.1.1 (2019-02-27) + +### Bug fixes + +Fix bug that caused parsing default exports of with names to fail. + +## 6.1.0 (2019-02-08) + +### Bug fixes + +Fix scope checking when redefining a `var` as a lexical binding. + +### New features + +Split up `parseSubscripts` to use an internal `parseSubscript` method to make it easier to extend with plugins. + +## 6.0.7 (2019-02-04) + +### Bug fixes + +Check that exported bindings are defined. + +Don't treat `\u180e` as a whitespace character. + +Check for duplicate parameter names in methods. + +Don't allow shorthand properties when they are generators or async methods. + +Forbid binding `await` in async arrow function's parameter list. + +## 6.0.6 (2019-01-30) + +### Bug fixes + +The content of class declarations and expressions is now always parsed in strict mode. + +Don't allow `let` or `const` to bind the variable name `let`. + +Treat class declarations as lexical. + +Don't allow a generator function declaration as the sole body of an `if` or `else`. + +Ignore `"use strict"` when after an empty statement. + +Allow string line continuations with special line terminator characters. + +Treat `for` bodies as part of the `for` scope when checking for conflicting bindings. + +Fix bug with parsing `yield` in a `for` loop initializer. + +Implement special cases around scope checking for functions. + +## 6.0.5 (2019-01-02) + +### Bug fixes + +Fix TypeScript type for `Parser.extend` and add `allowAwaitOutsideFunction` to options type. + +Don't treat `let` as a keyword when the next token is `{` on the next line. + +Fix bug that broke checking for parentheses around an object pattern in a destructuring assignment when `preserveParens` was on. + +## 6.0.4 (2018-11-05) + +### Bug fixes + +Further improvements to tokenizing regular expressions in corner cases. + +## 6.0.3 (2018-11-04) + +### Bug fixes + +Fix bug in tokenizing an expression-less return followed by a function followed by a regular expression. + +Remove stray symlink in the package tarball. + +## 6.0.2 (2018-09-26) + +### Bug fixes + +Fix bug where default expressions could fail to parse inside an object destructuring assignment expression. + +## 6.0.1 (2018-09-14) + +### Bug fixes + +Fix wrong value in `version` export. + +## 6.0.0 (2018-09-14) + +### Bug fixes + +Better handle variable-redefinition checks for catch bindings and functions directly under if statements. + +Forbid `new.target` in top-level arrow functions. + +Fix issue with parsing a regexp after `yield` in some contexts. + +### New features + +The package now comes with TypeScript definitions. + +### Breaking changes + +The default value of the `ecmaVersion` option is now 9 (2018). + +Plugins work differently, and will have to be rewritten to work with this version. + +The loose parser and walker have been moved into separate packages (`acorn-loose` and `acorn-walk`). + +## 5.7.3 (2018-09-10) + +### Bug fixes + +Fix failure to tokenize regexps after expressions like `x.of`. + +Better error message for unterminated template literals. + +## 5.7.2 (2018-08-24) + +### Bug fixes + +Properly handle `allowAwaitOutsideFunction` in for statements. + +Treat function declarations at the top level of modules like let bindings. + +Don't allow async function declarations as the only statement under a label. + +## 5.7.0 (2018-06-15) + +### New features + +Upgraded to Unicode 11. + +## 5.6.0 (2018-05-31) + +### New features + +Allow U+2028 and U+2029 in string when ECMAVersion >= 10. + +Allow binding-less catch statements when ECMAVersion >= 10. + +Add `allowAwaitOutsideFunction` option for parsing top-level `await`. + +## 5.5.3 (2018-03-08) + +### Bug fixes + +A _second_ republish of the code in 5.5.1, this time with yarn, to hopefully get valid timestamps. + +## 5.5.2 (2018-03-08) + +### Bug fixes + +A republish of the code in 5.5.1 in an attempt to solve an issue with the file timestamps in the npm package being 0. + +## 5.5.1 (2018-03-06) + +### Bug fixes + +Fix misleading error message for octal escapes in template strings. + +## 5.5.0 (2018-02-27) + +### New features + +The identifier character categorization is now based on Unicode version 10. + +Acorn will now validate the content of regular expressions, including new ES9 features. + +## 5.4.0 (2018-02-01) + +### Bug fixes + +Disallow duplicate or escaped flags on regular expressions. + +Disallow octal escapes in strings in strict mode. + +### New features + +Add support for async iteration. + +Add support for object spread and rest. + +## 5.3.0 (2017-12-28) + +### Bug fixes + +Fix parsing of floating point literals with leading zeroes in loose mode. + +Allow duplicate property names in object patterns. + +Don't allow static class methods named `prototype`. + +Disallow async functions directly under `if` or `else`. + +Parse right-hand-side of `for`/`of` as an assignment expression. + +Stricter parsing of `for`/`in`. + +Don't allow unicode escapes in contextual keywords. + +### New features + +Parsing class members was factored into smaller methods to allow plugins to hook into it. + +## 5.2.1 (2017-10-30) + +### Bug fixes + +Fix a token context corruption bug. + +## 5.2.0 (2017-10-30) + +### Bug fixes + +Fix token context tracking for `class` and `function` in property-name position. + +Make sure `%*` isn't parsed as a valid operator. + +Allow shorthand properties `get` and `set` to be followed by default values. + +Disallow `super` when not in callee or object position. + +### New features + +Support [`directive` property](https://github.com/estree/estree/compare/b3de58c9997504d6fba04b72f76e6dd1619ee4eb...1da8e603237144f44710360f8feb7a9977e905e0) on directive expression statements. + +## 5.1.2 (2017-09-04) + +### Bug fixes + +Disable parsing of legacy HTML-style comments in modules. + +Fix parsing of async methods whose names are keywords. + +## 5.1.1 (2017-07-06) + +### Bug fixes + +Fix problem with disambiguating regexp and division after a class. + +## 5.1.0 (2017-07-05) + +### Bug fixes + +Fix tokenizing of regexps in an object-desctructuring `for`/`of` loop and after `yield`. + +Parse zero-prefixed numbers with non-octal digits as decimal. + +Allow object/array patterns in rest parameters. + +Don't error when `yield` is used as a property name. + +Allow `async` as a shorthand object property. + +### New features + +Implement the [template literal revision proposal](https://github.com/tc39/proposal-template-literal-revision) for ES9. + +## 5.0.3 (2017-04-01) + +### Bug fixes + +Fix spurious duplicate variable definition errors for named functions. + +## 5.0.2 (2017-03-30) + +### Bug fixes + +A binary operator after a parenthesized arrow expression is no longer incorrectly treated as an error. + +## 5.0.0 (2017-03-28) + +### Bug fixes + +Raise an error for duplicated lexical bindings. + +Fix spurious error when an assignement expression occurred after a spread expression. + +Accept regular expressions after `of` (in `for`/`of`), `yield` (in a generator), and braced arrow functions. + +Allow labels in front or `var` declarations, even in strict mode. + +### Breaking changes + +Parse declarations following `export default` as declaration nodes, not expressions. This means that class and function declarations nodes can now have `null` as their `id`. + +## 4.0.11 (2017-02-07) + +### Bug fixes + +Allow all forms of member expressions to be parenthesized as lvalue. + +## 4.0.10 (2017-02-07) + +### Bug fixes + +Don't expect semicolons after default-exported functions or classes, even when they are expressions. + +Check for use of `'use strict'` directives in non-simple parameter functions, even when already in strict mode. + +## 4.0.9 (2017-02-06) + +### Bug fixes + +Fix incorrect error raised for parenthesized simple assignment targets, so that `(x) = 1` parses again. + +## 4.0.8 (2017-02-03) + +### Bug fixes + +Solve spurious parenthesized pattern errors by temporarily erring on the side of accepting programs that our delayed errors don't handle correctly yet. + +## 4.0.7 (2017-02-02) + +### Bug fixes + +Accept invalidly rejected code like `(x).y = 2` again. + +Don't raise an error when a function _inside_ strict code has a non-simple parameter list. + +## 4.0.6 (2017-02-02) + +### Bug fixes + +Fix exponential behavior (manifesting itself as a complete hang for even relatively small source files) introduced by the new 'use strict' check. + +## 4.0.5 (2017-02-02) + +### Bug fixes + +Disallow parenthesized pattern expressions. + +Allow keywords as export names. + +Don't allow the `async` keyword to be parenthesized. + +Properly raise an error when a keyword contains a character escape. + +Allow `"use strict"` to appear after other string literal expressions. + +Disallow labeled declarations. + +## 4.0.4 (2016-12-19) + +### Bug fixes + +Fix crash when `export` was followed by a keyword that can't be +exported. + +## 4.0.3 (2016-08-16) + +### Bug fixes + +Allow regular function declarations inside single-statement `if` branches in loose mode. Forbid them entirely in strict mode. + +Properly parse properties named `async` in ES2017 mode. + +Fix bug where reserved words were broken in ES2017 mode. + +## 4.0.2 (2016-08-11) + +### Bug fixes + +Don't ignore period or 'e' characters after octal numbers. + +Fix broken parsing for call expressions in default parameter values of arrow functions. + +## 4.0.1 (2016-08-08) + +### Bug fixes + +Fix false positives in duplicated export name errors. + +## 4.0.0 (2016-08-07) + +### Breaking changes + +The default `ecmaVersion` option value is now 7. + +A number of internal method signatures changed, so plugins might need to be updated. + +### Bug fixes + +The parser now raises errors on duplicated export names. + +`arguments` and `eval` can now be used in shorthand properties. + +Duplicate parameter names in non-simple argument lists now always produce an error. + +### New features + +The `ecmaVersion` option now also accepts year-style version numbers +(2015, etc). + +Support for `async`/`await` syntax when `ecmaVersion` is >= 8. + +Support for trailing commas in call expressions when `ecmaVersion` is >= 8. + +## 3.3.0 (2016-07-25) + +### Bug fixes + +Fix bug in tokenizing of regexp operator after a function declaration. + +Fix parser crash when parsing an array pattern with a hole. + +### New features + +Implement check against complex argument lists in functions that enable strict mode in ES7. + +## 3.2.0 (2016-06-07) + +### Bug fixes + +Improve handling of lack of unicode regexp support in host +environment. + +Properly reject shorthand properties whose name is a keyword. + +### New features + +Visitors created with `visit.make` now have their base as _prototype_, rather than copying properties into a fresh object. + +## 3.1.0 (2016-04-18) + +### Bug fixes + +Properly tokenize the division operator directly after a function expression. + +Allow trailing comma in destructuring arrays. + +## 3.0.4 (2016-02-25) + +### Fixes + +Allow update expressions as left-hand-side of the ES7 exponential operator. + +## 3.0.2 (2016-02-10) + +### Fixes + +Fix bug that accidentally made `undefined` a reserved word when parsing ES7. + +## 3.0.0 (2016-02-10) + +### Breaking changes + +The default value of the `ecmaVersion` option is now 6 (used to be 5). + +Support for comprehension syntax (which was dropped from the draft spec) has been removed. + +### Fixes + +`let` and `yield` are now “contextual keywords”, meaning you can mostly use them as identifiers in ES5 non-strict code. + +A parenthesized class or function expression after `export default` is now parsed correctly. + +### New features + +When `ecmaVersion` is set to 7, Acorn will parse the exponentiation operator (`**`). + +The identifier character ranges are now based on Unicode 8.0.0. + +Plugins can now override the `raiseRecoverable` method to override the way non-critical errors are handled. + +## 2.7.0 (2016-01-04) + +### Fixes + +Stop allowing rest parameters in setters. + +Disallow `y` rexexp flag in ES5. + +Disallow `\00` and `\000` escapes in strict mode. + +Raise an error when an import name is a reserved word. + +## 2.6.2 (2015-11-10) + +### Fixes + +Don't crash when no options object is passed. + +## 2.6.0 (2015-11-09) + +### Fixes + +Add `await` as a reserved word in module sources. + +Disallow `yield` in a parameter default value for a generator. + +Forbid using a comma after a rest pattern in an array destructuring. + +### New features + +Support parsing stdin in command-line tool. + +## 2.5.0 (2015-10-27) + +### Fixes + +Fix tokenizer support in the command-line tool. + +Stop allowing `new.target` outside of functions. + +Remove legacy `guard` and `guardedHandler` properties from try nodes. + +Stop allowing multiple `__proto__` properties on an object literal in strict mode. + +Don't allow rest parameters to be non-identifier patterns. + +Check for duplicate paramter names in arrow functions. diff --git a/node_modules/acorn-globals/node_modules/acorn/LICENSE b/node_modules/acorn-globals/node_modules/acorn/LICENSE new file mode 100644 index 0000000..cc5272c --- /dev/null +++ b/node_modules/acorn-globals/node_modules/acorn/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (C) 2012-2018 by various contributors (see AUTHORS) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/acorn-globals/node_modules/acorn/README.md b/node_modules/acorn-globals/node_modules/acorn/README.md new file mode 100644 index 0000000..52d2e9b --- /dev/null +++ b/node_modules/acorn-globals/node_modules/acorn/README.md @@ -0,0 +1,269 @@ +# Acorn + +A tiny, fast JavaScript parser written in JavaScript. + +## Community + +Acorn is open source software released under an +[MIT license](https://github.com/acornjs/acorn/blob/master/acorn/LICENSE). + +You are welcome to +[report bugs](https://github.com/acornjs/acorn/issues) or create pull +requests on [github](https://github.com/acornjs/acorn). For questions +and discussion, please use the +[Tern discussion forum](https://discuss.ternjs.net). + +## Installation + +The easiest way to install acorn is from [`npm`](https://www.npmjs.com/): + +```sh +npm install acorn +``` + +Alternately, you can download the source and build acorn yourself: + +```sh +git clone https://github.com/acornjs/acorn.git +cd acorn +npm install +``` + +## Interface + +**parse**`(input, options)` is the main interface to the library. The +`input` parameter is a string, `options` can be undefined or an object +setting some of the options listed below. The return value will be an +abstract syntax tree object as specified by the [ESTree +spec](https://github.com/estree/estree). + +```javascript +let acorn = require("acorn"); +console.log(acorn.parse("1 + 1")); +``` + +When encountering a syntax error, the parser will raise a +`SyntaxError` object with a meaningful message. The error object will +have a `pos` property that indicates the string offset at which the +error occurred, and a `loc` object that contains a `{line, column}` +object referring to that same position. + +Options can be provided by passing a second argument, which should be +an object containing any of these fields: + +- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be + either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019) or 11 + (2020, partial support). This influences support for strict mode, + the set of reserved words, and support for new syntax features. + Default is 10. + + **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being + implemented by Acorn. Other proposed new features can be implemented + through plugins. + +- **sourceType**: Indicate the mode the code should be parsed in. Can be + either `"script"` or `"module"`. This influences global strict mode + and parsing of `import` and `export` declarations. + + **NOTE**: If set to `"module"`, then static `import` / `export` syntax + will be valid, even if `ecmaVersion` is less than 6. + +- **onInsertedSemicolon**: If given a callback, that callback will be + called whenever a missing semicolon is inserted by the parser. The + callback will be given the character offset of the point where the + semicolon is inserted as argument, and if `locations` is on, also a + `{line, column}` object representing this position. + +- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing + commas. + +- **allowReserved**: If `false`, using a reserved word will generate + an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher + versions. When given the value `"never"`, reserved words and + keywords can also not be used as property names (as in Internet + Explorer's old parser). + +- **allowReturnOutsideFunction**: By default, a return statement at + the top level raises an error. Set this to `true` to accept such + code. + +- **allowImportExportEverywhere**: By default, `import` and `export` + declarations can only appear at a program's top level. Setting this + option to `true` allows them anywhere where a statement is allowed. + +- **allowAwaitOutsideFunction**: By default, `await` expressions can + only appear inside `async` functions. Setting this option to + `true` allows to have top-level `await` expressions. They are + still not allowed in non-`async` functions, though. + +- **allowHashBang**: When this is enabled (off by default), if the + code starts with the characters `#!` (as in a shellscript), the + first line will be treated as a comment. + +- **locations**: When `true`, each node has a `loc` object attached + with `start` and `end` subobjects, each of which contains the + one-based line and zero-based column numbers in `{line, column}` + form. Default is `false`. + +- **onToken**: If a function is passed for this option, each found + token will be passed in same format as tokens returned from + `tokenizer().getToken()`. + + If array is passed, each found token is pushed to it. + + Note that you are not allowed to call the parser from the + callback—that will corrupt its internal state. + +- **onComment**: If a function is passed for this option, whenever a + comment is encountered the function will be called with the + following parameters: + + - `block`: `true` if the comment is a block comment, false if it + is a line comment. + - `text`: The content of the comment. + - `start`: Character offset of the start of the comment. + - `end`: Character offset of the end of the comment. + + When the `locations` options is on, the `{line, column}` locations + of the comment’s start and end are passed as two additional + parameters. + + If array is passed for this option, each found comment is pushed + to it as object in Esprima format: + + ```javascript + { + "type": "Line" | "Block", + "value": "comment text", + "start": Number, + "end": Number, + // If `locations` option is on: + "loc": { + "start": {line: Number, column: Number} + "end": {line: Number, column: Number} + }, + // If `ranges` option is on: + "range": [Number, Number] + } + ``` + + Note that you are not allowed to call the parser from the + callback—that will corrupt its internal state. + +- **ranges**: Nodes have their start and end characters offsets + recorded in `start` and `end` properties (directly on the node, + rather than the `loc` object, which holds line/column data. To also + add a + [semi-standardized](https://bugzilla.mozilla.org/show_bug.cgi?id=745678) + `range` property holding a `[start, end]` array with the same + numbers, set the `ranges` option to `true`. + +- **program**: It is possible to parse multiple files into a single + AST by passing the tree produced by parsing the first file as the + `program` option in subsequent parses. This will add the toplevel + forms of the parsed file to the "Program" (top) node of an existing + parse tree. + +- **sourceFile**: When the `locations` option is `true`, you can pass + this option to add a `source` attribute in every node’s `loc` + object. Note that the contents of this option are not examined or + processed in any way; you are free to use whatever format you + choose. + +- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property + will be added (regardless of the `location` option) directly to the + nodes, rather than the `loc` object. + +- **preserveParens**: If this option is `true`, parenthesized expressions + are represented by (non-standard) `ParenthesizedExpression` nodes + that have a single `expression` property containing the expression + inside parentheses. + +**parseExpressionAt**`(input, offset, options)` will parse a single +expression in a string, and return its AST. It will not complain if +there is more of the string left after the expression. + +**tokenizer**`(input, options)` returns an object with a `getToken` +method that can be called repeatedly to get the next token, a `{start, +end, type, value}` object (with added `loc` property when the +`locations` option is enabled and `range` property when the `ranges` +option is enabled). When the token's type is `tokTypes.eof`, you +should stop calling the method, since it will keep returning that same +token forever. + +In ES6 environment, returned result can be used as any other +protocol-compliant iterable: + +```javascript +for (let token of acorn.tokenizer(str)) { + // iterate over the tokens +} + +// transform code to array of tokens: +var tokens = [...acorn.tokenizer(str)]; +``` + +**tokTypes** holds an object mapping names to the token type objects +that end up in the `type` properties of tokens. + +**getLineInfo**`(input, offset)` can be used to get a `{line, +column}` object for a given program string and offset. + +### The `Parser` class + +Instances of the **`Parser`** class contain all the state and logic +that drives a parse. It has static methods `parse`, +`parseExpressionAt`, and `tokenizer` that match the top-level +functions by the same name. + +When extending the parser with plugins, you need to call these methods +on the extended version of the class. To extend a parser with plugins, +you can use its static `extend` method. + +```javascript +var acorn = require("acorn"); +var jsx = require("acorn-jsx"); +var JSXParser = acorn.Parser.extend(jsx()); +JSXParser.parse("foo()"); +``` + +The `extend` method takes any number of plugin values, and returns a +new `Parser` class that includes the extra parser logic provided by +the plugins. + +## Command line interface + +The `bin/acorn` utility can be used to parse a file from the command +line. It accepts as arguments its input file and the following +options: + +- `--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|--ecma10`: Sets the ECMAScript version + to parse. Default is version 9. + +- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise. + +- `--locations`: Attaches a "loc" object to each node with "start" and + "end" subobjects, each of which contains the one-based line and + zero-based column numbers in `{line, column}` form. + +- `--allow-hash-bang`: If the code starts with the characters #! (as + in a shellscript), the first line will be treated as a comment. + +- `--compact`: No whitespace is used in the AST output. + +- `--silent`: Do not output the AST, just return the exit status. + +- `--help`: Print the usage information and quit. + +The utility spits out the syntax tree as JSON data. + +## Existing plugins + + - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx) + +Plugins for ECMAScript proposals: + + - [`acorn-stage3`](https://github.com/acornjs/acorn-stage3): Parse most stage 3 proposals, bundling: + - [`acorn-class-fields`](https://github.com/acornjs/acorn-class-fields): Parse [class fields proposal](https://github.com/tc39/proposal-class-fields) + - [`acorn-import-meta`](https://github.com/acornjs/acorn-import-meta): Parse [import.meta proposal](https://github.com/tc39/proposal-import-meta) + - [`acorn-private-methods`](https://github.com/acornjs/acorn-private-methods): parse [private methods, getters and setters proposal](https://github.com/tc39/proposal-private-methods)n diff --git a/node_modules/acorn-globals/node_modules/acorn/bin/acorn b/node_modules/acorn-globals/node_modules/acorn/bin/acorn new file mode 100644 index 0000000..cf7df46 --- /dev/null +++ b/node_modules/acorn-globals/node_modules/acorn/bin/acorn @@ -0,0 +1,4 @@ +#!/usr/bin/env node +'use strict'; + +require('../dist/bin.js'); diff --git a/node_modules/acorn-globals/node_modules/acorn/dist/acorn.d.ts b/node_modules/acorn-globals/node_modules/acorn/dist/acorn.d.ts new file mode 100644 index 0000000..bda5f80 --- /dev/null +++ b/node_modules/acorn-globals/node_modules/acorn/dist/acorn.d.ts @@ -0,0 +1,209 @@ +export as namespace acorn +export = acorn + +declare namespace acorn { + function parse(input: string, options?: Options): Node + + function parseExpressionAt(input: string, pos?: number, options?: Options): Node + + function tokenizer(input: string, options?: Options): { + getToken(): Token + [Symbol.iterator](): Iterator + } + + interface Options { + ecmaVersion?: 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 + sourceType?: 'script' | 'module' + onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: Position) => void + onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: Position) => void + allowReserved?: boolean | 'never' + allowReturnOutsideFunction?: boolean + allowImportExportEverywhere?: boolean + allowAwaitOutsideFunction?: boolean + allowHashBang?: boolean + locations?: boolean + onToken?: ((token: Token) => any) | Token[] + onComment?: (( + isBlock: boolean, text: string, start: number, end: number, startLoc?: Position, + endLoc?: Position + ) => void) | Comment[] + ranges?: boolean + program?: Node + sourceFile?: string + directSourceFile?: string + preserveParens?: boolean + } + + class Parser { + constructor(options: Options, input: string, startPos?: number) + parse(this: Parser): Node + static parse(this: typeof Parser, input: string, options?: Options): Node + static parseExpressionAt(this: typeof Parser, input: string, pos: number, options?: Options): Node + static tokenizer(this: typeof Parser, input: string, options?: Options): { + getToken(): Token + [Symbol.iterator](): Iterator + } + static extend(this: typeof Parser, ...plugins: ((BaseParser: typeof Parser) => typeof Parser)[]): typeof Parser + } + + interface Position { line: number; column: number; offset: number } + + const defaultOptions: Options + + function getLineInfo(input: string, offset: number): Position + + class SourceLocation { + start: Position + end: Position + source?: string | null + constructor(p: Parser, start: Position, end: Position) + } + + class Node { + type: string + start: number + end: number + loc?: SourceLocation + sourceFile?: string + range?: [number, number] + constructor(parser: Parser, pos: number, loc?: SourceLocation) + } + + class TokenType { + label: string + keyword: string + beforeExpr: boolean + startsExpr: boolean + isLoop: boolean + isAssign: boolean + prefix: boolean + postfix: boolean + binop: number + updateContext?: (prevType: TokenType) => void + constructor(label: string, conf?: any) + } + + const tokTypes: { + num: TokenType + regexp: TokenType + string: TokenType + name: TokenType + eof: TokenType + bracketL: TokenType + bracketR: TokenType + braceL: TokenType + braceR: TokenType + parenL: TokenType + parenR: TokenType + comma: TokenType + semi: TokenType + colon: TokenType + dot: TokenType + question: TokenType + arrow: TokenType + template: TokenType + ellipsis: TokenType + backQuote: TokenType + dollarBraceL: TokenType + eq: TokenType + assign: TokenType + incDec: TokenType + prefix: TokenType + logicalOR: TokenType + logicalAND: TokenType + bitwiseOR: TokenType + bitwiseXOR: TokenType + bitwiseAND: TokenType + equality: TokenType + relational: TokenType + bitShift: TokenType + plusMin: TokenType + modulo: TokenType + star: TokenType + slash: TokenType + starstar: TokenType + _break: TokenType + _case: TokenType + _catch: TokenType + _continue: TokenType + _debugger: TokenType + _default: TokenType + _do: TokenType + _else: TokenType + _finally: TokenType + _for: TokenType + _function: TokenType + _if: TokenType + _return: TokenType + _switch: TokenType + _throw: TokenType + _try: TokenType + _var: TokenType + _const: TokenType + _while: TokenType + _with: TokenType + _new: TokenType + _this: TokenType + _super: TokenType + _class: TokenType + _extends: TokenType + _export: TokenType + _import: TokenType + _null: TokenType + _true: TokenType + _false: TokenType + _in: TokenType + _instanceof: TokenType + _typeof: TokenType + _void: TokenType + _delete: TokenType + } + + class TokContext { + constructor(token: string, isExpr: boolean, preserveSpace: boolean, override?: (p: Parser) => void) + } + + const tokContexts: { + b_stat: TokContext + b_expr: TokContext + b_tmpl: TokContext + p_stat: TokContext + p_expr: TokContext + q_tmpl: TokContext + f_expr: TokContext + } + + function isIdentifierStart(code: number, astral?: boolean): boolean + + function isIdentifierChar(code: number, astral?: boolean): boolean + + interface AbstractToken { + } + + interface Comment extends AbstractToken { + type: string + value: string + start: number + end: number + loc?: SourceLocation + range?: [number, number] + } + + class Token { + type: TokenType + value: any + start: number + end: number + loc?: SourceLocation + range?: [number, number] + constructor(p: Parser) + } + + function isNewLine(code: number): boolean + + const lineBreak: RegExp + + const lineBreakG: RegExp + + const version: string +} diff --git a/node_modules/acorn-globals/node_modules/acorn/dist/acorn.js b/node_modules/acorn-globals/node_modules/acorn/dist/acorn.js new file mode 100644 index 0000000..0523f0e --- /dev/null +++ b/node_modules/acorn-globals/node_modules/acorn/dist/acorn.js @@ -0,0 +1,5186 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = global || self, factory(global.acorn = {})); +}(this, (function (exports) { 'use strict'; + + // Reserved word lists for various dialects of the language + + var reservedWords = { + 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", + 5: "class enum extends super const export import", + 6: "enum", + strict: "implements interface let package private protected public static yield", + strictBind: "eval arguments" + }; + + // And the keywords + + var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; + + var keywords = { + 5: ecma5AndLessKeywords, + "5module": ecma5AndLessKeywords + " export import", + 6: ecma5AndLessKeywords + " const class extends export import super" + }; + + var keywordRelationalOperator = /^in(stanceof)?$/; + + // ## Character categories + + // Big ugly regular expressions that match characters in the + // whitespace, identifier, and identifier-start categories. These + // are only applied when a character is found to actually have a + // code point above 128. + // Generated by `bin/generate-identifier-regex.js`. + var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08c7\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\u9ffc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7ca\ua7f5-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; + var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf\u1ac0\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; + + var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); + var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + + nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; + + // These are a run-length and offset encoded representation of the + // >0xffff code points that are a valid part of identifiers. The + // offset starts at 0x10000, and each pair of numbers represents an + // offset to the next range, and then a size of the range. They were + // generated by bin/generate-identifier-regex.js + + // eslint-disable-next-line comma-spacing + var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8952,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938]; + + // eslint-disable-next-line comma-spacing + var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239]; + + // This has a complexity linear to the value of the code. The + // assumption is that looking up astral identifier characters is + // rare. + function isInAstralSet(code, set) { + var pos = 0x10000; + for (var i = 0; i < set.length; i += 2) { + pos += set[i]; + if (pos > code) { return false } + pos += set[i + 1]; + if (pos >= code) { return true } + } + } + + // Test whether a given character code starts an identifier. + + function isIdentifierStart(code, astral) { + if (code < 65) { return code === 36 } + if (code < 91) { return true } + if (code < 97) { return code === 95 } + if (code < 123) { return true } + if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) } + if (astral === false) { return false } + return isInAstralSet(code, astralIdentifierStartCodes) + } + + // Test whether a given character is part of an identifier. + + function isIdentifierChar(code, astral) { + if (code < 48) { return code === 36 } + if (code < 58) { return true } + if (code < 65) { return false } + if (code < 91) { return true } + if (code < 97) { return code === 95 } + if (code < 123) { return true } + if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) } + if (astral === false) { return false } + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) + } + + // ## Token types + + // The assignment of fine-grained, information-carrying type objects + // allows the tokenizer to store the information it has about a + // token in a way that is very cheap for the parser to look up. + + // All token type variables start with an underscore, to make them + // easy to recognize. + + // The `beforeExpr` property is used to disambiguate between regular + // expressions and divisions. It is set on all token types that can + // be followed by an expression (thus, a slash after them would be a + // regular expression). + // + // The `startsExpr` property is used to check if the token ends a + // `yield` expression. It is set on all token types that either can + // directly start an expression (like a quotation mark) or can + // continue an expression (like the body of a string). + // + // `isLoop` marks a keyword as starting a loop, which is important + // to know when parsing a label, in order to allow or disallow + // continue jumps to that label. + + var TokenType = function TokenType(label, conf) { + if ( conf === void 0 ) conf = {}; + + this.label = label; + this.keyword = conf.keyword; + this.beforeExpr = !!conf.beforeExpr; + this.startsExpr = !!conf.startsExpr; + this.isLoop = !!conf.isLoop; + this.isAssign = !!conf.isAssign; + this.prefix = !!conf.prefix; + this.postfix = !!conf.postfix; + this.binop = conf.binop || null; + this.updateContext = null; + }; + + function binop(name, prec) { + return new TokenType(name, {beforeExpr: true, binop: prec}) + } + var beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true}; + + // Map keyword names to token types. + + var keywords$1 = {}; + + // Succinct definitions of keyword token types + function kw(name, options) { + if ( options === void 0 ) options = {}; + + options.keyword = name; + return keywords$1[name] = new TokenType(name, options) + } + + var types = { + num: new TokenType("num", startsExpr), + regexp: new TokenType("regexp", startsExpr), + string: new TokenType("string", startsExpr), + name: new TokenType("name", startsExpr), + eof: new TokenType("eof"), + + // Punctuation token types. + bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}), + bracketR: new TokenType("]"), + braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}), + braceR: new TokenType("}"), + parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}), + parenR: new TokenType(")"), + comma: new TokenType(",", beforeExpr), + semi: new TokenType(";", beforeExpr), + colon: new TokenType(":", beforeExpr), + dot: new TokenType("."), + question: new TokenType("?", beforeExpr), + questionDot: new TokenType("?."), + arrow: new TokenType("=>", beforeExpr), + template: new TokenType("template"), + invalidTemplate: new TokenType("invalidTemplate"), + ellipsis: new TokenType("...", beforeExpr), + backQuote: new TokenType("`", startsExpr), + dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}), + + // Operators. These carry several kinds of properties to help the + // parser use them properly (the presence of these properties is + // what categorizes them as operators). + // + // `binop`, when present, specifies that this operator is a binary + // operator, and will refer to its precedence. + // + // `prefix` and `postfix` mark the operator as a prefix or postfix + // unary operator. + // + // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as + // binary operators with a very low precedence, that should result + // in AssignmentExpression nodes. + + eq: new TokenType("=", {beforeExpr: true, isAssign: true}), + assign: new TokenType("_=", {beforeExpr: true, isAssign: true}), + incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}), + prefix: new TokenType("!/~", {beforeExpr: true, prefix: true, startsExpr: true}), + logicalOR: binop("||", 1), + logicalAND: binop("&&", 2), + bitwiseOR: binop("|", 3), + bitwiseXOR: binop("^", 4), + bitwiseAND: binop("&", 5), + equality: binop("==/!=/===/!==", 6), + relational: binop("/<=/>=", 7), + bitShift: binop("<>/>>>", 8), + plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}), + modulo: binop("%", 10), + star: binop("*", 10), + slash: binop("/", 10), + starstar: new TokenType("**", {beforeExpr: true}), + coalesce: binop("??", 1), + + // Keyword token types. + _break: kw("break"), + _case: kw("case", beforeExpr), + _catch: kw("catch"), + _continue: kw("continue"), + _debugger: kw("debugger"), + _default: kw("default", beforeExpr), + _do: kw("do", {isLoop: true, beforeExpr: true}), + _else: kw("else", beforeExpr), + _finally: kw("finally"), + _for: kw("for", {isLoop: true}), + _function: kw("function", startsExpr), + _if: kw("if"), + _return: kw("return", beforeExpr), + _switch: kw("switch"), + _throw: kw("throw", beforeExpr), + _try: kw("try"), + _var: kw("var"), + _const: kw("const"), + _while: kw("while", {isLoop: true}), + _with: kw("with"), + _new: kw("new", {beforeExpr: true, startsExpr: true}), + _this: kw("this", startsExpr), + _super: kw("super", startsExpr), + _class: kw("class", startsExpr), + _extends: kw("extends", beforeExpr), + _export: kw("export"), + _import: kw("import", startsExpr), + _null: kw("null", startsExpr), + _true: kw("true", startsExpr), + _false: kw("false", startsExpr), + _in: kw("in", {beforeExpr: true, binop: 7}), + _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), + _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), + _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), + _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) + }; + + // Matches a whole line break (where CRLF is considered a single + // line break). Used to count lines. + + var lineBreak = /\r\n?|\n|\u2028|\u2029/; + var lineBreakG = new RegExp(lineBreak.source, "g"); + + function isNewLine(code, ecma2019String) { + return code === 10 || code === 13 || (!ecma2019String && (code === 0x2028 || code === 0x2029)) + } + + var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/; + + var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; + + var ref = Object.prototype; + var hasOwnProperty = ref.hasOwnProperty; + var toString = ref.toString; + + // Checks if an object has a property. + + function has(obj, propName) { + return hasOwnProperty.call(obj, propName) + } + + var isArray = Array.isArray || (function (obj) { return ( + toString.call(obj) === "[object Array]" + ); }); + + function wordsRegexp(words) { + return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$") + } + + // These are used when `options.locations` is on, for the + // `startLoc` and `endLoc` properties. + + var Position = function Position(line, col) { + this.line = line; + this.column = col; + }; + + Position.prototype.offset = function offset (n) { + return new Position(this.line, this.column + n) + }; + + var SourceLocation = function SourceLocation(p, start, end) { + this.start = start; + this.end = end; + if (p.sourceFile !== null) { this.source = p.sourceFile; } + }; + + // The `getLineInfo` function is mostly useful when the + // `locations` option is off (for performance reasons) and you + // want to find the line/column position for a given character + // offset. `input` should be the code string that the offset refers + // into. + + function getLineInfo(input, offset) { + for (var line = 1, cur = 0;;) { + lineBreakG.lastIndex = cur; + var match = lineBreakG.exec(input); + if (match && match.index < offset) { + ++line; + cur = match.index + match[0].length; + } else { + return new Position(line, offset - cur) + } + } + } + + // A second optional argument can be given to further configure + // the parser process. These options are recognized: + + var defaultOptions = { + // `ecmaVersion` indicates the ECMAScript version to parse. Must be + // either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), or 10 + // (2019). This influences support for strict mode, the set of + // reserved words, and support for new syntax features. The default + // is 10. + ecmaVersion: 10, + // `sourceType` indicates the mode the code should be parsed in. + // Can be either `"script"` or `"module"`. This influences global + // strict mode and parsing of `import` and `export` declarations. + sourceType: "script", + // `onInsertedSemicolon` can be a callback that will be called + // when a semicolon is automatically inserted. It will be passed + // the position of the comma as an offset, and if `locations` is + // enabled, it is given the location as a `{line, column}` object + // as second argument. + onInsertedSemicolon: null, + // `onTrailingComma` is similar to `onInsertedSemicolon`, but for + // trailing commas. + onTrailingComma: null, + // By default, reserved words are only enforced if ecmaVersion >= 5. + // Set `allowReserved` to a boolean value to explicitly turn this on + // an off. When this option has the value "never", reserved words + // and keywords can also not be used as property names. + allowReserved: null, + // When enabled, a return at the top level is not considered an + // error. + allowReturnOutsideFunction: false, + // When enabled, import/export statements are not constrained to + // appearing at the top of the program. + allowImportExportEverywhere: false, + // When enabled, await identifiers are allowed to appear at the top-level scope, + // but they are still not allowed in non-async functions. + allowAwaitOutsideFunction: false, + // When enabled, hashbang directive in the beginning of file + // is allowed and treated as a line comment. + allowHashBang: false, + // When `locations` is on, `loc` properties holding objects with + // `start` and `end` properties in `{line, column}` form (with + // line being 1-based and column 0-based) will be attached to the + // nodes. + locations: false, + // A function can be passed as `onToken` option, which will + // cause Acorn to call that function with object in the same + // format as tokens returned from `tokenizer().getToken()`. Note + // that you are not allowed to call the parser from the + // callback—that will corrupt its internal state. + onToken: null, + // A function can be passed as `onComment` option, which will + // cause Acorn to call that function with `(block, text, start, + // end)` parameters whenever a comment is skipped. `block` is a + // boolean indicating whether this is a block (`/* */`) comment, + // `text` is the content of the comment, and `start` and `end` are + // character offsets that denote the start and end of the comment. + // When the `locations` option is on, two more parameters are + // passed, the full `{line, column}` locations of the start and + // end of the comments. Note that you are not allowed to call the + // parser from the callback—that will corrupt its internal state. + onComment: null, + // Nodes have their start and end characters offsets recorded in + // `start` and `end` properties (directly on the node, rather than + // the `loc` object, which holds line/column data. To also add a + // [semi-standardized][range] `range` property holding a `[start, + // end]` array with the same numbers, set the `ranges` option to + // `true`. + // + // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + ranges: false, + // It is possible to parse multiple files into a single AST by + // passing the tree produced by parsing the first file as + // `program` option in subsequent parses. This will add the + // toplevel forms of the parsed file to the `Program` (top) node + // of an existing parse tree. + program: null, + // When `locations` is on, you can pass this to record the source + // file in every node's `loc` object. + sourceFile: null, + // This value, if given, is stored in every node, whether + // `locations` is on or off. + directSourceFile: null, + // When enabled, parenthesized expressions are represented by + // (non-standard) ParenthesizedExpression nodes + preserveParens: false + }; + + // Interpret and default an options object + + function getOptions(opts) { + var options = {}; + + for (var opt in defaultOptions) + { options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; } + + if (options.ecmaVersion >= 2015) + { options.ecmaVersion -= 2009; } + + if (options.allowReserved == null) + { options.allowReserved = options.ecmaVersion < 5; } + + if (isArray(options.onToken)) { + var tokens = options.onToken; + options.onToken = function (token) { return tokens.push(token); }; + } + if (isArray(options.onComment)) + { options.onComment = pushComment(options, options.onComment); } + + return options + } + + function pushComment(options, array) { + return function(block, text, start, end, startLoc, endLoc) { + var comment = { + type: block ? "Block" : "Line", + value: text, + start: start, + end: end + }; + if (options.locations) + { comment.loc = new SourceLocation(this, startLoc, endLoc); } + if (options.ranges) + { comment.range = [start, end]; } + array.push(comment); + } + } + + // Each scope gets a bitset that may contain these flags + var + SCOPE_TOP = 1, + SCOPE_FUNCTION = 2, + SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION, + SCOPE_ASYNC = 4, + SCOPE_GENERATOR = 8, + SCOPE_ARROW = 16, + SCOPE_SIMPLE_CATCH = 32, + SCOPE_SUPER = 64, + SCOPE_DIRECT_SUPER = 128; + + function functionFlags(async, generator) { + return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0) + } + + // Used in checkLVal and declareName to determine the type of a binding + var + BIND_NONE = 0, // Not a binding + BIND_VAR = 1, // Var-style binding + BIND_LEXICAL = 2, // Let- or const-style binding + BIND_FUNCTION = 3, // Function declaration + BIND_SIMPLE_CATCH = 4, // Simple (identifier pattern) catch binding + BIND_OUTSIDE = 5; // Special case for function names as bound inside the function + + var Parser = function Parser(options, input, startPos) { + this.options = options = getOptions(options); + this.sourceFile = options.sourceFile; + this.keywords = wordsRegexp(keywords[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]); + var reserved = ""; + if (options.allowReserved !== true) { + for (var v = options.ecmaVersion;; v--) + { if (reserved = reservedWords[v]) { break } } + if (options.sourceType === "module") { reserved += " await"; } + } + this.reservedWords = wordsRegexp(reserved); + var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict; + this.reservedWordsStrict = wordsRegexp(reservedStrict); + this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind); + this.input = String(input); + + // Used to signal to callers of `readWord1` whether the word + // contained any escape sequences. This is needed because words with + // escape sequences must not be interpreted as keywords. + this.containsEsc = false; + + // Set up token state + + // The current position of the tokenizer in the input. + if (startPos) { + this.pos = startPos; + this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1; + this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; + } else { + this.pos = this.lineStart = 0; + this.curLine = 1; + } + + // Properties of the current token: + // Its type + this.type = types.eof; + // For tokens that include more information than their type, the value + this.value = null; + // Its start and end offset + this.start = this.end = this.pos; + // And, if locations are used, the {line, column} object + // corresponding to those offsets + this.startLoc = this.endLoc = this.curPosition(); + + // Position information for the previous token + this.lastTokEndLoc = this.lastTokStartLoc = null; + this.lastTokStart = this.lastTokEnd = this.pos; + + // The context stack is used to superficially track syntactic + // context to predict whether a regular expression is allowed in a + // given position. + this.context = this.initialContext(); + this.exprAllowed = true; + + // Figure out if it's a module code. + this.inModule = options.sourceType === "module"; + this.strict = this.inModule || this.strictDirective(this.pos); + + // Used to signify the start of a potential arrow function + this.potentialArrowAt = -1; + + // Positions to delayed-check that yield/await does not exist in default parameters. + this.yieldPos = this.awaitPos = this.awaitIdentPos = 0; + // Labels in scope. + this.labels = []; + // Thus-far undefined exports. + this.undefinedExports = {}; + + // If enabled, skip leading hashbang line. + if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") + { this.skipLineComment(2); } + + // Scope tracking for duplicate variable names (see scope.js) + this.scopeStack = []; + this.enterScope(SCOPE_TOP); + + // For RegExp validation + this.regexpState = null; + }; + + var prototypeAccessors = { inFunction: { configurable: true },inGenerator: { configurable: true },inAsync: { configurable: true },allowSuper: { configurable: true },allowDirectSuper: { configurable: true },treatFunctionsAsVar: { configurable: true } }; + + Parser.prototype.parse = function parse () { + var node = this.options.program || this.startNode(); + this.nextToken(); + return this.parseTopLevel(node) + }; + + prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 }; + prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 }; + prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 }; + prototypeAccessors.allowSuper.get = function () { return (this.currentThisScope().flags & SCOPE_SUPER) > 0 }; + prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 }; + prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) }; + + // Switch to a getter for 7.0.0. + Parser.prototype.inNonArrowFunction = function inNonArrowFunction () { return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0 }; + + Parser.extend = function extend () { + var plugins = [], len = arguments.length; + while ( len-- ) plugins[ len ] = arguments[ len ]; + + var cls = this; + for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); } + return cls + }; + + Parser.parse = function parse (input, options) { + return new this(options, input).parse() + }; + + Parser.parseExpressionAt = function parseExpressionAt (input, pos, options) { + var parser = new this(options, input, pos); + parser.nextToken(); + return parser.parseExpression() + }; + + Parser.tokenizer = function tokenizer (input, options) { + return new this(options, input) + }; + + Object.defineProperties( Parser.prototype, prototypeAccessors ); + + var pp = Parser.prototype; + + // ## Parser utilities + + var literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/; + pp.strictDirective = function(start) { + for (;;) { + // Try to find string literal. + skipWhiteSpace.lastIndex = start; + start += skipWhiteSpace.exec(this.input)[0].length; + var match = literal.exec(this.input.slice(start)); + if (!match) { return false } + if ((match[1] || match[2]) === "use strict") { + skipWhiteSpace.lastIndex = start + match[0].length; + var spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length; + var next = this.input.charAt(end); + return next === ";" || next === "}" || + (lineBreak.test(spaceAfter[0]) && + !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "=")) + } + start += match[0].length; + + // Skip semicolon, if any. + skipWhiteSpace.lastIndex = start; + start += skipWhiteSpace.exec(this.input)[0].length; + if (this.input[start] === ";") + { start++; } + } + }; + + // Predicate that tests whether the next token is of the given + // type, and if yes, consumes it as a side effect. + + pp.eat = function(type) { + if (this.type === type) { + this.next(); + return true + } else { + return false + } + }; + + // Tests whether parsed token is a contextual keyword. + + pp.isContextual = function(name) { + return this.type === types.name && this.value === name && !this.containsEsc + }; + + // Consumes contextual keyword if possible. + + pp.eatContextual = function(name) { + if (!this.isContextual(name)) { return false } + this.next(); + return true + }; + + // Asserts that following token is given contextual keyword. + + pp.expectContextual = function(name) { + if (!this.eatContextual(name)) { this.unexpected(); } + }; + + // Test whether a semicolon can be inserted at the current position. + + pp.canInsertSemicolon = function() { + return this.type === types.eof || + this.type === types.braceR || + lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + }; + + pp.insertSemicolon = function() { + if (this.canInsertSemicolon()) { + if (this.options.onInsertedSemicolon) + { this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); } + return true + } + }; + + // Consume a semicolon, or, failing that, see if we are allowed to + // pretend that there is a semicolon at this position. + + pp.semicolon = function() { + if (!this.eat(types.semi) && !this.insertSemicolon()) { this.unexpected(); } + }; + + pp.afterTrailingComma = function(tokType, notNext) { + if (this.type === tokType) { + if (this.options.onTrailingComma) + { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); } + if (!notNext) + { this.next(); } + return true + } + }; + + // Expect a token of a given type. If found, consume it, otherwise, + // raise an unexpected token error. + + pp.expect = function(type) { + this.eat(type) || this.unexpected(); + }; + + // Raise an unexpected token error. + + pp.unexpected = function(pos) { + this.raise(pos != null ? pos : this.start, "Unexpected token"); + }; + + function DestructuringErrors() { + this.shorthandAssign = + this.trailingComma = + this.parenthesizedAssign = + this.parenthesizedBind = + this.doubleProto = + -1; + } + + pp.checkPatternErrors = function(refDestructuringErrors, isAssign) { + if (!refDestructuringErrors) { return } + if (refDestructuringErrors.trailingComma > -1) + { this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); } + var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind; + if (parens > -1) { this.raiseRecoverable(parens, "Parenthesized pattern"); } + }; + + pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) { + if (!refDestructuringErrors) { return false } + var shorthandAssign = refDestructuringErrors.shorthandAssign; + var doubleProto = refDestructuringErrors.doubleProto; + if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0 } + if (shorthandAssign >= 0) + { this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); } + if (doubleProto >= 0) + { this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); } + }; + + pp.checkYieldAwaitInDefaultParams = function() { + if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) + { this.raise(this.yieldPos, "Yield expression cannot be a default value"); } + if (this.awaitPos) + { this.raise(this.awaitPos, "Await expression cannot be a default value"); } + }; + + pp.isSimpleAssignTarget = function(expr) { + if (expr.type === "ParenthesizedExpression") + { return this.isSimpleAssignTarget(expr.expression) } + return expr.type === "Identifier" || expr.type === "MemberExpression" + }; + + var pp$1 = Parser.prototype; + + // ### Statement parsing + + // Parse a program. Initializes the parser, reads any number of + // statements, and wraps them in a Program node. Optionally takes a + // `program` argument. If present, the statements will be appended + // to its body instead of creating a new node. + + pp$1.parseTopLevel = function(node) { + var exports = {}; + if (!node.body) { node.body = []; } + while (this.type !== types.eof) { + var stmt = this.parseStatement(null, true, exports); + node.body.push(stmt); + } + if (this.inModule) + { for (var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1) + { + var name = list[i]; + + this.raiseRecoverable(this.undefinedExports[name].start, ("Export '" + name + "' is not defined")); + } } + this.adaptDirectivePrologue(node.body); + this.next(); + node.sourceType = this.options.sourceType; + return this.finishNode(node, "Program") + }; + + var loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"}; + + pp$1.isLet = function(context) { + if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { return false } + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); + // For ambiguous cases, determine if a LexicalDeclaration (or only a + // Statement) is allowed here. If context is not empty then only a Statement + // is allowed. However, `let [` is an explicit negative lookahead for + // ExpressionStatement, so special-case it first. + if (nextCh === 91) { return true } // '[' + if (context) { return false } + + if (nextCh === 123) { return true } // '{' + if (isIdentifierStart(nextCh, true)) { + var pos = next + 1; + while (isIdentifierChar(this.input.charCodeAt(pos), true)) { ++pos; } + var ident = this.input.slice(next, pos); + if (!keywordRelationalOperator.test(ident)) { return true } + } + return false + }; + + // check 'async [no LineTerminator here] function' + // - 'async /*foo*/ function' is OK. + // - 'async /*\n*/ function' is invalid. + pp$1.isAsyncFunction = function() { + if (this.options.ecmaVersion < 8 || !this.isContextual("async")) + { return false } + + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length; + return !lineBreak.test(this.input.slice(this.pos, next)) && + this.input.slice(next, next + 8) === "function" && + (next + 8 === this.input.length || !isIdentifierChar(this.input.charAt(next + 8))) + }; + + // Parse a single statement. + // + // If expecting a statement and finding a slash operator, parse a + // regular expression literal. This is to handle cases like + // `if (foo) /blah/.exec(foo)`, where looking at the previous token + // does not help. + + pp$1.parseStatement = function(context, topLevel, exports) { + var starttype = this.type, node = this.startNode(), kind; + + if (this.isLet(context)) { + starttype = types._var; + kind = "let"; + } + + // Most types of statements are recognized by the keyword they + // start with. Many are trivial to parse, some require a bit of + // complexity. + + switch (starttype) { + case types._break: case types._continue: return this.parseBreakContinueStatement(node, starttype.keyword) + case types._debugger: return this.parseDebuggerStatement(node) + case types._do: return this.parseDoStatement(node) + case types._for: return this.parseForStatement(node) + case types._function: + // Function as sole body of either an if statement or a labeled statement + // works, but not when it is part of a labeled statement that is the sole + // body of an if statement. + if ((context && (this.strict || context !== "if" && context !== "label")) && this.options.ecmaVersion >= 6) { this.unexpected(); } + return this.parseFunctionStatement(node, false, !context) + case types._class: + if (context) { this.unexpected(); } + return this.parseClass(node, true) + case types._if: return this.parseIfStatement(node) + case types._return: return this.parseReturnStatement(node) + case types._switch: return this.parseSwitchStatement(node) + case types._throw: return this.parseThrowStatement(node) + case types._try: return this.parseTryStatement(node) + case types._const: case types._var: + kind = kind || this.value; + if (context && kind !== "var") { this.unexpected(); } + return this.parseVarStatement(node, kind) + case types._while: return this.parseWhileStatement(node) + case types._with: return this.parseWithStatement(node) + case types.braceL: return this.parseBlock(true, node) + case types.semi: return this.parseEmptyStatement(node) + case types._export: + case types._import: + if (this.options.ecmaVersion > 10 && starttype === types._import) { + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); + if (nextCh === 40 || nextCh === 46) // '(' or '.' + { return this.parseExpressionStatement(node, this.parseExpression()) } + } + + if (!this.options.allowImportExportEverywhere) { + if (!topLevel) + { this.raise(this.start, "'import' and 'export' may only appear at the top level"); } + if (!this.inModule) + { this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); } + } + return starttype === types._import ? this.parseImport(node) : this.parseExport(node, exports) + + // If the statement does not start with a statement keyword or a + // brace, it's an ExpressionStatement or LabeledStatement. We + // simply start parsing an expression, and afterwards, if the + // next token is a colon and the expression was a simple + // Identifier node, we switch to interpreting it as a label. + default: + if (this.isAsyncFunction()) { + if (context) { this.unexpected(); } + this.next(); + return this.parseFunctionStatement(node, true, !context) + } + + var maybeName = this.value, expr = this.parseExpression(); + if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) + { return this.parseLabeledStatement(node, maybeName, expr, context) } + else { return this.parseExpressionStatement(node, expr) } + } + }; + + pp$1.parseBreakContinueStatement = function(node, keyword) { + var isBreak = keyword === "break"; + this.next(); + if (this.eat(types.semi) || this.insertSemicolon()) { node.label = null; } + else if (this.type !== types.name) { this.unexpected(); } + else { + node.label = this.parseIdent(); + this.semicolon(); + } + + // Verify that there is an actual destination to break or + // continue to. + var i = 0; + for (; i < this.labels.length; ++i) { + var lab = this.labels[i]; + if (node.label == null || lab.name === node.label.name) { + if (lab.kind != null && (isBreak || lab.kind === "loop")) { break } + if (node.label && isBreak) { break } + } + } + if (i === this.labels.length) { this.raise(node.start, "Unsyntactic " + keyword); } + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") + }; + + pp$1.parseDebuggerStatement = function(node) { + this.next(); + this.semicolon(); + return this.finishNode(node, "DebuggerStatement") + }; + + pp$1.parseDoStatement = function(node) { + this.next(); + this.labels.push(loopLabel); + node.body = this.parseStatement("do"); + this.labels.pop(); + this.expect(types._while); + node.test = this.parseParenExpression(); + if (this.options.ecmaVersion >= 6) + { this.eat(types.semi); } + else + { this.semicolon(); } + return this.finishNode(node, "DoWhileStatement") + }; + + // Disambiguating between a `for` and a `for`/`in` or `for`/`of` + // loop is non-trivial. Basically, we have to parse the init `var` + // statement or expression, disallowing the `in` operator (see + // the second parameter to `parseExpression`), and then check + // whether the next token is `in` or `of`. When there is no init + // part (semicolon immediately after the opening parenthesis), it + // is a regular `for` loop. + + pp$1.parseForStatement = function(node) { + this.next(); + var awaitAt = (this.options.ecmaVersion >= 9 && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction)) && this.eatContextual("await")) ? this.lastTokStart : -1; + this.labels.push(loopLabel); + this.enterScope(0); + this.expect(types.parenL); + if (this.type === types.semi) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, null) + } + var isLet = this.isLet(); + if (this.type === types._var || this.type === types._const || isLet) { + var init$1 = this.startNode(), kind = isLet ? "let" : this.value; + this.next(); + this.parseVar(init$1, true, kind); + this.finishNode(init$1, "VariableDeclaration"); + if ((this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1) { + if (this.options.ecmaVersion >= 9) { + if (this.type === types._in) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + } else { node.await = awaitAt > -1; } + } + return this.parseForIn(node, init$1) + } + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, init$1) + } + var refDestructuringErrors = new DestructuringErrors; + var init = this.parseExpression(true, refDestructuringErrors); + if (this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) { + if (this.options.ecmaVersion >= 9) { + if (this.type === types._in) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + } else { node.await = awaitAt > -1; } + } + this.toAssignable(init, false, refDestructuringErrors); + this.checkLVal(init); + return this.parseForIn(node, init) + } else { + this.checkExpressionErrors(refDestructuringErrors, true); + } + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, init) + }; + + pp$1.parseFunctionStatement = function(node, isAsync, declarationPosition) { + this.next(); + return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync) + }; + + pp$1.parseIfStatement = function(node) { + this.next(); + node.test = this.parseParenExpression(); + // allow function declarations in branches, but only in non-strict mode + node.consequent = this.parseStatement("if"); + node.alternate = this.eat(types._else) ? this.parseStatement("if") : null; + return this.finishNode(node, "IfStatement") + }; + + pp$1.parseReturnStatement = function(node) { + if (!this.inFunction && !this.options.allowReturnOutsideFunction) + { this.raise(this.start, "'return' outside of function"); } + this.next(); + + // In `return` (and `break`/`continue`), the keywords with + // optional arguments, we eagerly look for a semicolon or the + // possibility to insert one. + + if (this.eat(types.semi) || this.insertSemicolon()) { node.argument = null; } + else { node.argument = this.parseExpression(); this.semicolon(); } + return this.finishNode(node, "ReturnStatement") + }; + + pp$1.parseSwitchStatement = function(node) { + this.next(); + node.discriminant = this.parseParenExpression(); + node.cases = []; + this.expect(types.braceL); + this.labels.push(switchLabel); + this.enterScope(0); + + // Statements under must be grouped (by label) in SwitchCase + // nodes. `cur` is used to keep the node that we are currently + // adding statements to. + + var cur; + for (var sawDefault = false; this.type !== types.braceR;) { + if (this.type === types._case || this.type === types._default) { + var isCase = this.type === types._case; + if (cur) { this.finishNode(cur, "SwitchCase"); } + node.cases.push(cur = this.startNode()); + cur.consequent = []; + this.next(); + if (isCase) { + cur.test = this.parseExpression(); + } else { + if (sawDefault) { this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"); } + sawDefault = true; + cur.test = null; + } + this.expect(types.colon); + } else { + if (!cur) { this.unexpected(); } + cur.consequent.push(this.parseStatement(null)); + } + } + this.exitScope(); + if (cur) { this.finishNode(cur, "SwitchCase"); } + this.next(); // Closing brace + this.labels.pop(); + return this.finishNode(node, "SwitchStatement") + }; + + pp$1.parseThrowStatement = function(node) { + this.next(); + if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) + { this.raise(this.lastTokEnd, "Illegal newline after throw"); } + node.argument = this.parseExpression(); + this.semicolon(); + return this.finishNode(node, "ThrowStatement") + }; + + // Reused empty array added for node fields that are always empty. + + var empty = []; + + pp$1.parseTryStatement = function(node) { + this.next(); + node.block = this.parseBlock(); + node.handler = null; + if (this.type === types._catch) { + var clause = this.startNode(); + this.next(); + if (this.eat(types.parenL)) { + clause.param = this.parseBindingAtom(); + var simple = clause.param.type === "Identifier"; + this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0); + this.checkLVal(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL); + this.expect(types.parenR); + } else { + if (this.options.ecmaVersion < 10) { this.unexpected(); } + clause.param = null; + this.enterScope(0); + } + clause.body = this.parseBlock(false); + this.exitScope(); + node.handler = this.finishNode(clause, "CatchClause"); + } + node.finalizer = this.eat(types._finally) ? this.parseBlock() : null; + if (!node.handler && !node.finalizer) + { this.raise(node.start, "Missing catch or finally clause"); } + return this.finishNode(node, "TryStatement") + }; + + pp$1.parseVarStatement = function(node, kind) { + this.next(); + this.parseVar(node, false, kind); + this.semicolon(); + return this.finishNode(node, "VariableDeclaration") + }; + + pp$1.parseWhileStatement = function(node) { + this.next(); + node.test = this.parseParenExpression(); + this.labels.push(loopLabel); + node.body = this.parseStatement("while"); + this.labels.pop(); + return this.finishNode(node, "WhileStatement") + }; + + pp$1.parseWithStatement = function(node) { + if (this.strict) { this.raise(this.start, "'with' in strict mode"); } + this.next(); + node.object = this.parseParenExpression(); + node.body = this.parseStatement("with"); + return this.finishNode(node, "WithStatement") + }; + + pp$1.parseEmptyStatement = function(node) { + this.next(); + return this.finishNode(node, "EmptyStatement") + }; + + pp$1.parseLabeledStatement = function(node, maybeName, expr, context) { + for (var i$1 = 0, list = this.labels; i$1 < list.length; i$1 += 1) + { + var label = list[i$1]; + + if (label.name === maybeName) + { this.raise(expr.start, "Label '" + maybeName + "' is already declared"); + } } + var kind = this.type.isLoop ? "loop" : this.type === types._switch ? "switch" : null; + for (var i = this.labels.length - 1; i >= 0; i--) { + var label$1 = this.labels[i]; + if (label$1.statementStart === node.start) { + // Update information about previous labels on this node + label$1.statementStart = this.start; + label$1.kind = kind; + } else { break } + } + this.labels.push({name: maybeName, kind: kind, statementStart: this.start}); + node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); + this.labels.pop(); + node.label = expr; + return this.finishNode(node, "LabeledStatement") + }; + + pp$1.parseExpressionStatement = function(node, expr) { + node.expression = expr; + this.semicolon(); + return this.finishNode(node, "ExpressionStatement") + }; + + // Parse a semicolon-enclosed block of statements, handling `"use + // strict"` declarations when `allowStrict` is true (used for + // function bodies). + + pp$1.parseBlock = function(createNewLexicalScope, node, exitStrict) { + if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true; + if ( node === void 0 ) node = this.startNode(); + + node.body = []; + this.expect(types.braceL); + if (createNewLexicalScope) { this.enterScope(0); } + while (this.type !== types.braceR) { + var stmt = this.parseStatement(null); + node.body.push(stmt); + } + if (exitStrict) { this.strict = false; } + this.next(); + if (createNewLexicalScope) { this.exitScope(); } + return this.finishNode(node, "BlockStatement") + }; + + // Parse a regular `for` loop. The disambiguation code in + // `parseStatement` will already have parsed the init statement or + // expression. + + pp$1.parseFor = function(node, init) { + node.init = init; + this.expect(types.semi); + node.test = this.type === types.semi ? null : this.parseExpression(); + this.expect(types.semi); + node.update = this.type === types.parenR ? null : this.parseExpression(); + this.expect(types.parenR); + node.body = this.parseStatement("for"); + this.exitScope(); + this.labels.pop(); + return this.finishNode(node, "ForStatement") + }; + + // Parse a `for`/`in` and `for`/`of` loop, which are almost + // same from parser's perspective. + + pp$1.parseForIn = function(node, init) { + var isForIn = this.type === types._in; + this.next(); + + if ( + init.type === "VariableDeclaration" && + init.declarations[0].init != null && + ( + !isForIn || + this.options.ecmaVersion < 8 || + this.strict || + init.kind !== "var" || + init.declarations[0].id.type !== "Identifier" + ) + ) { + this.raise( + init.start, + ((isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer") + ); + } else if (init.type === "AssignmentPattern") { + this.raise(init.start, "Invalid left-hand side in for-loop"); + } + node.left = init; + node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign(); + this.expect(types.parenR); + node.body = this.parseStatement("for"); + this.exitScope(); + this.labels.pop(); + return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement") + }; + + // Parse a list of variable declarations. + + pp$1.parseVar = function(node, isFor, kind) { + node.declarations = []; + node.kind = kind; + for (;;) { + var decl = this.startNode(); + this.parseVarId(decl, kind); + if (this.eat(types.eq)) { + decl.init = this.parseMaybeAssign(isFor); + } else if (kind === "const" && !(this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of")))) { + this.unexpected(); + } else if (decl.id.type !== "Identifier" && !(isFor && (this.type === types._in || this.isContextual("of")))) { + this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); + } else { + decl.init = null; + } + node.declarations.push(this.finishNode(decl, "VariableDeclarator")); + if (!this.eat(types.comma)) { break } + } + return node + }; + + pp$1.parseVarId = function(decl, kind) { + decl.id = this.parseBindingAtom(); + this.checkLVal(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false); + }; + + var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4; + + // Parse a function declaration or literal (depending on the + // `statement & FUNC_STATEMENT`). + + // Remove `allowExpressionBody` for 7.0.0, as it is only called with false + pp$1.parseFunction = function(node, statement, allowExpressionBody, isAsync) { + this.initFunction(node); + if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) { + if (this.type === types.star && (statement & FUNC_HANGING_STATEMENT)) + { this.unexpected(); } + node.generator = this.eat(types.star); + } + if (this.options.ecmaVersion >= 8) + { node.async = !!isAsync; } + + if (statement & FUNC_STATEMENT) { + node.id = (statement & FUNC_NULLABLE_ID) && this.type !== types.name ? null : this.parseIdent(); + if (node.id && !(statement & FUNC_HANGING_STATEMENT)) + // If it is a regular function declaration in sloppy mode, then it is + // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding + // mode depends on properties of the current scope (see + // treatFunctionsAsVar). + { this.checkLVal(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); } + } + + var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope(functionFlags(node.async, node.generator)); + + if (!(statement & FUNC_STATEMENT)) + { node.id = this.type === types.name ? this.parseIdent() : null; } + + this.parseFunctionParams(node); + this.parseFunctionBody(node, allowExpressionBody, false); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, (statement & FUNC_STATEMENT) ? "FunctionDeclaration" : "FunctionExpression") + }; + + pp$1.parseFunctionParams = function(node) { + this.expect(types.parenL); + node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); + this.checkYieldAwaitInDefaultParams(); + }; + + // Parse a class declaration or literal (depending on the + // `isStatement` parameter). + + pp$1.parseClass = function(node, isStatement) { + this.next(); + + // ecma-262 14.6 Class Definitions + // A class definition is always strict mode code. + var oldStrict = this.strict; + this.strict = true; + + this.parseClassId(node, isStatement); + this.parseClassSuper(node); + var classBody = this.startNode(); + var hadConstructor = false; + classBody.body = []; + this.expect(types.braceL); + while (this.type !== types.braceR) { + var element = this.parseClassElement(node.superClass !== null); + if (element) { + classBody.body.push(element); + if (element.type === "MethodDefinition" && element.kind === "constructor") { + if (hadConstructor) { this.raise(element.start, "Duplicate constructor in the same class"); } + hadConstructor = true; + } + } + } + this.strict = oldStrict; + this.next(); + node.body = this.finishNode(classBody, "ClassBody"); + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") + }; + + pp$1.parseClassElement = function(constructorAllowsSuper) { + var this$1 = this; + + if (this.eat(types.semi)) { return null } + + var method = this.startNode(); + var tryContextual = function (k, noLineBreak) { + if ( noLineBreak === void 0 ) noLineBreak = false; + + var start = this$1.start, startLoc = this$1.startLoc; + if (!this$1.eatContextual(k)) { return false } + if (this$1.type !== types.parenL && (!noLineBreak || !this$1.canInsertSemicolon())) { return true } + if (method.key) { this$1.unexpected(); } + method.computed = false; + method.key = this$1.startNodeAt(start, startLoc); + method.key.name = k; + this$1.finishNode(method.key, "Identifier"); + return false + }; + + method.kind = "method"; + method.static = tryContextual("static"); + var isGenerator = this.eat(types.star); + var isAsync = false; + if (!isGenerator) { + if (this.options.ecmaVersion >= 8 && tryContextual("async", true)) { + isAsync = true; + isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); + } else if (tryContextual("get")) { + method.kind = "get"; + } else if (tryContextual("set")) { + method.kind = "set"; + } + } + if (!method.key) { this.parsePropertyName(method); } + var key = method.key; + var allowsDirectSuper = false; + if (!method.computed && !method.static && (key.type === "Identifier" && key.name === "constructor" || + key.type === "Literal" && key.value === "constructor")) { + if (method.kind !== "method") { this.raise(key.start, "Constructor can't have get/set modifier"); } + if (isGenerator) { this.raise(key.start, "Constructor can't be a generator"); } + if (isAsync) { this.raise(key.start, "Constructor can't be an async method"); } + method.kind = "constructor"; + allowsDirectSuper = constructorAllowsSuper; + } else if (method.static && key.type === "Identifier" && key.name === "prototype") { + this.raise(key.start, "Classes may not have a static property named prototype"); + } + this.parseClassMethod(method, isGenerator, isAsync, allowsDirectSuper); + if (method.kind === "get" && method.value.params.length !== 0) + { this.raiseRecoverable(method.value.start, "getter should have no params"); } + if (method.kind === "set" && method.value.params.length !== 1) + { this.raiseRecoverable(method.value.start, "setter should have exactly one param"); } + if (method.kind === "set" && method.value.params[0].type === "RestElement") + { this.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params"); } + return method + }; + + pp$1.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) { + method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper); + return this.finishNode(method, "MethodDefinition") + }; + + pp$1.parseClassId = function(node, isStatement) { + if (this.type === types.name) { + node.id = this.parseIdent(); + if (isStatement) + { this.checkLVal(node.id, BIND_LEXICAL, false); } + } else { + if (isStatement === true) + { this.unexpected(); } + node.id = null; + } + }; + + pp$1.parseClassSuper = function(node) { + node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null; + }; + + // Parses module export declaration. + + pp$1.parseExport = function(node, exports) { + this.next(); + // export * from '...' + if (this.eat(types.star)) { + if (this.options.ecmaVersion >= 11) { + if (this.eatContextual("as")) { + node.exported = this.parseIdent(true); + this.checkExport(exports, node.exported.name, this.lastTokStart); + } else { + node.exported = null; + } + } + this.expectContextual("from"); + if (this.type !== types.string) { this.unexpected(); } + node.source = this.parseExprAtom(); + this.semicolon(); + return this.finishNode(node, "ExportAllDeclaration") + } + if (this.eat(types._default)) { // export default ... + this.checkExport(exports, "default", this.lastTokStart); + var isAsync; + if (this.type === types._function || (isAsync = this.isAsyncFunction())) { + var fNode = this.startNode(); + this.next(); + if (isAsync) { this.next(); } + node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync); + } else if (this.type === types._class) { + var cNode = this.startNode(); + node.declaration = this.parseClass(cNode, "nullableID"); + } else { + node.declaration = this.parseMaybeAssign(); + this.semicolon(); + } + return this.finishNode(node, "ExportDefaultDeclaration") + } + // export var|const|let|function|class ... + if (this.shouldParseExportStatement()) { + node.declaration = this.parseStatement(null); + if (node.declaration.type === "VariableDeclaration") + { this.checkVariableExport(exports, node.declaration.declarations); } + else + { this.checkExport(exports, node.declaration.id.name, node.declaration.id.start); } + node.specifiers = []; + node.source = null; + } else { // export { x, y as z } [from '...'] + node.declaration = null; + node.specifiers = this.parseExportSpecifiers(exports); + if (this.eatContextual("from")) { + if (this.type !== types.string) { this.unexpected(); } + node.source = this.parseExprAtom(); + } else { + for (var i = 0, list = node.specifiers; i < list.length; i += 1) { + // check for keywords used as local names + var spec = list[i]; + + this.checkUnreserved(spec.local); + // check if export is defined + this.checkLocalExport(spec.local); + } + + node.source = null; + } + this.semicolon(); + } + return this.finishNode(node, "ExportNamedDeclaration") + }; + + pp$1.checkExport = function(exports, name, pos) { + if (!exports) { return } + if (has(exports, name)) + { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); } + exports[name] = true; + }; + + pp$1.checkPatternExport = function(exports, pat) { + var type = pat.type; + if (type === "Identifier") + { this.checkExport(exports, pat.name, pat.start); } + else if (type === "ObjectPattern") + { for (var i = 0, list = pat.properties; i < list.length; i += 1) + { + var prop = list[i]; + + this.checkPatternExport(exports, prop); + } } + else if (type === "ArrayPattern") + { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) { + var elt = list$1[i$1]; + + if (elt) { this.checkPatternExport(exports, elt); } + } } + else if (type === "Property") + { this.checkPatternExport(exports, pat.value); } + else if (type === "AssignmentPattern") + { this.checkPatternExport(exports, pat.left); } + else if (type === "RestElement") + { this.checkPatternExport(exports, pat.argument); } + else if (type === "ParenthesizedExpression") + { this.checkPatternExport(exports, pat.expression); } + }; + + pp$1.checkVariableExport = function(exports, decls) { + if (!exports) { return } + for (var i = 0, list = decls; i < list.length; i += 1) + { + var decl = list[i]; + + this.checkPatternExport(exports, decl.id); + } + }; + + pp$1.shouldParseExportStatement = function() { + return this.type.keyword === "var" || + this.type.keyword === "const" || + this.type.keyword === "class" || + this.type.keyword === "function" || + this.isLet() || + this.isAsyncFunction() + }; + + // Parses a comma-separated list of module exports. + + pp$1.parseExportSpecifiers = function(exports) { + var nodes = [], first = true; + // export { x, y as z } [from '...'] + this.expect(types.braceL); + while (!this.eat(types.braceR)) { + if (!first) { + this.expect(types.comma); + if (this.afterTrailingComma(types.braceR)) { break } + } else { first = false; } + + var node = this.startNode(); + node.local = this.parseIdent(true); + node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local; + this.checkExport(exports, node.exported.name, node.exported.start); + nodes.push(this.finishNode(node, "ExportSpecifier")); + } + return nodes + }; + + // Parses import declaration. + + pp$1.parseImport = function(node) { + this.next(); + // import '...' + if (this.type === types.string) { + node.specifiers = empty; + node.source = this.parseExprAtom(); + } else { + node.specifiers = this.parseImportSpecifiers(); + this.expectContextual("from"); + node.source = this.type === types.string ? this.parseExprAtom() : this.unexpected(); + } + this.semicolon(); + return this.finishNode(node, "ImportDeclaration") + }; + + // Parses a comma-separated list of module imports. + + pp$1.parseImportSpecifiers = function() { + var nodes = [], first = true; + if (this.type === types.name) { + // import defaultObj, { x, y as z } from '...' + var node = this.startNode(); + node.local = this.parseIdent(); + this.checkLVal(node.local, BIND_LEXICAL); + nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); + if (!this.eat(types.comma)) { return nodes } + } + if (this.type === types.star) { + var node$1 = this.startNode(); + this.next(); + this.expectContextual("as"); + node$1.local = this.parseIdent(); + this.checkLVal(node$1.local, BIND_LEXICAL); + nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier")); + return nodes + } + this.expect(types.braceL); + while (!this.eat(types.braceR)) { + if (!first) { + this.expect(types.comma); + if (this.afterTrailingComma(types.braceR)) { break } + } else { first = false; } + + var node$2 = this.startNode(); + node$2.imported = this.parseIdent(true); + if (this.eatContextual("as")) { + node$2.local = this.parseIdent(); + } else { + this.checkUnreserved(node$2.imported); + node$2.local = node$2.imported; + } + this.checkLVal(node$2.local, BIND_LEXICAL); + nodes.push(this.finishNode(node$2, "ImportSpecifier")); + } + return nodes + }; + + // Set `ExpressionStatement#directive` property for directive prologues. + pp$1.adaptDirectivePrologue = function(statements) { + for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) { + statements[i].directive = statements[i].expression.raw.slice(1, -1); + } + }; + pp$1.isDirectiveCandidate = function(statement) { + return ( + statement.type === "ExpressionStatement" && + statement.expression.type === "Literal" && + typeof statement.expression.value === "string" && + // Reject parenthesized strings. + (this.input[statement.start] === "\"" || this.input[statement.start] === "'") + ) + }; + + var pp$2 = Parser.prototype; + + // Convert existing expression atom to assignable pattern + // if possible. + + pp$2.toAssignable = function(node, isBinding, refDestructuringErrors) { + if (this.options.ecmaVersion >= 6 && node) { + switch (node.type) { + case "Identifier": + if (this.inAsync && node.name === "await") + { this.raise(node.start, "Cannot use 'await' as identifier inside an async function"); } + break + + case "ObjectPattern": + case "ArrayPattern": + case "RestElement": + break + + case "ObjectExpression": + node.type = "ObjectPattern"; + if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + for (var i = 0, list = node.properties; i < list.length; i += 1) { + var prop = list[i]; + + this.toAssignable(prop, isBinding); + // Early error: + // AssignmentRestProperty[Yield, Await] : + // `...` DestructuringAssignmentTarget[Yield, Await] + // + // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|. + if ( + prop.type === "RestElement" && + (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern") + ) { + this.raise(prop.argument.start, "Unexpected token"); + } + } + break + + case "Property": + // AssignmentProperty has type === "Property" + if (node.kind !== "init") { this.raise(node.key.start, "Object pattern can't contain getter or setter"); } + this.toAssignable(node.value, isBinding); + break + + case "ArrayExpression": + node.type = "ArrayPattern"; + if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + this.toAssignableList(node.elements, isBinding); + break + + case "SpreadElement": + node.type = "RestElement"; + this.toAssignable(node.argument, isBinding); + if (node.argument.type === "AssignmentPattern") + { this.raise(node.argument.start, "Rest elements cannot have a default value"); } + break + + case "AssignmentExpression": + if (node.operator !== "=") { this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); } + node.type = "AssignmentPattern"; + delete node.operator; + this.toAssignable(node.left, isBinding); + // falls through to AssignmentPattern + + case "AssignmentPattern": + break + + case "ParenthesizedExpression": + this.toAssignable(node.expression, isBinding, refDestructuringErrors); + break + + case "ChainExpression": + this.raiseRecoverable(node.start, "Optional chaining cannot appear in left-hand side"); + break + + case "MemberExpression": + if (!isBinding) { break } + + default: + this.raise(node.start, "Assigning to rvalue"); + } + } else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + return node + }; + + // Convert list of expression atoms to binding list. + + pp$2.toAssignableList = function(exprList, isBinding) { + var end = exprList.length; + for (var i = 0; i < end; i++) { + var elt = exprList[i]; + if (elt) { this.toAssignable(elt, isBinding); } + } + if (end) { + var last = exprList[end - 1]; + if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") + { this.unexpected(last.argument.start); } + } + return exprList + }; + + // Parses spread element. + + pp$2.parseSpread = function(refDestructuringErrors) { + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeAssign(false, refDestructuringErrors); + return this.finishNode(node, "SpreadElement") + }; + + pp$2.parseRestBinding = function() { + var node = this.startNode(); + this.next(); + + // RestElement inside of a function parameter must be an identifier + if (this.options.ecmaVersion === 6 && this.type !== types.name) + { this.unexpected(); } + + node.argument = this.parseBindingAtom(); + + return this.finishNode(node, "RestElement") + }; + + // Parses lvalue (assignable) atom. + + pp$2.parseBindingAtom = function() { + if (this.options.ecmaVersion >= 6) { + switch (this.type) { + case types.bracketL: + var node = this.startNode(); + this.next(); + node.elements = this.parseBindingList(types.bracketR, true, true); + return this.finishNode(node, "ArrayPattern") + + case types.braceL: + return this.parseObj(true) + } + } + return this.parseIdent() + }; + + pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma) { + var elts = [], first = true; + while (!this.eat(close)) { + if (first) { first = false; } + else { this.expect(types.comma); } + if (allowEmpty && this.type === types.comma) { + elts.push(null); + } else if (allowTrailingComma && this.afterTrailingComma(close)) { + break + } else if (this.type === types.ellipsis) { + var rest = this.parseRestBinding(); + this.parseBindingListItem(rest); + elts.push(rest); + if (this.type === types.comma) { this.raise(this.start, "Comma is not permitted after the rest element"); } + this.expect(close); + break + } else { + var elem = this.parseMaybeDefault(this.start, this.startLoc); + this.parseBindingListItem(elem); + elts.push(elem); + } + } + return elts + }; + + pp$2.parseBindingListItem = function(param) { + return param + }; + + // Parses assignment pattern around given atom if possible. + + pp$2.parseMaybeDefault = function(startPos, startLoc, left) { + left = left || this.parseBindingAtom(); + if (this.options.ecmaVersion < 6 || !this.eat(types.eq)) { return left } + var node = this.startNodeAt(startPos, startLoc); + node.left = left; + node.right = this.parseMaybeAssign(); + return this.finishNode(node, "AssignmentPattern") + }; + + // Verify that a node is an lval — something that can be assigned + // to. + // bindingType can be either: + // 'var' indicating that the lval creates a 'var' binding + // 'let' indicating that the lval creates a lexical ('let' or 'const') binding + // 'none' indicating that the binding should be checked for illegal identifiers, but not for duplicate references + + pp$2.checkLVal = function(expr, bindingType, checkClashes) { + if ( bindingType === void 0 ) bindingType = BIND_NONE; + + switch (expr.type) { + case "Identifier": + if (bindingType === BIND_LEXICAL && expr.name === "let") + { this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"); } + if (this.strict && this.reservedWordsStrictBind.test(expr.name)) + { this.raiseRecoverable(expr.start, (bindingType ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); } + if (checkClashes) { + if (has(checkClashes, expr.name)) + { this.raiseRecoverable(expr.start, "Argument name clash"); } + checkClashes[expr.name] = true; + } + if (bindingType !== BIND_NONE && bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); } + break + + case "ChainExpression": + this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side"); + break + + case "MemberExpression": + if (bindingType) { this.raiseRecoverable(expr.start, "Binding member expression"); } + break + + case "ObjectPattern": + for (var i = 0, list = expr.properties; i < list.length; i += 1) + { + var prop = list[i]; + + this.checkLVal(prop, bindingType, checkClashes); + } + break + + case "Property": + // AssignmentProperty has type === "Property" + this.checkLVal(expr.value, bindingType, checkClashes); + break + + case "ArrayPattern": + for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) { + var elem = list$1[i$1]; + + if (elem) { this.checkLVal(elem, bindingType, checkClashes); } + } + break + + case "AssignmentPattern": + this.checkLVal(expr.left, bindingType, checkClashes); + break + + case "RestElement": + this.checkLVal(expr.argument, bindingType, checkClashes); + break + + case "ParenthesizedExpression": + this.checkLVal(expr.expression, bindingType, checkClashes); + break + + default: + this.raise(expr.start, (bindingType ? "Binding" : "Assigning to") + " rvalue"); + } + }; + + // A recursive descent parser operates by defining functions for all + + var pp$3 = Parser.prototype; + + // Check if property name clashes with already added. + // Object/class getters and setters are not allowed to clash — + // either with each other or with an init property — and in + // strict mode, init properties are also not allowed to be repeated. + + pp$3.checkPropClash = function(prop, propHash, refDestructuringErrors) { + if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") + { return } + if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) + { return } + var key = prop.key; + var name; + switch (key.type) { + case "Identifier": name = key.name; break + case "Literal": name = String(key.value); break + default: return + } + var kind = prop.kind; + if (this.options.ecmaVersion >= 6) { + if (name === "__proto__" && kind === "init") { + if (propHash.proto) { + if (refDestructuringErrors) { + if (refDestructuringErrors.doubleProto < 0) + { refDestructuringErrors.doubleProto = key.start; } + // Backwards-compat kludge. Can be removed in version 6.0 + } else { this.raiseRecoverable(key.start, "Redefinition of __proto__ property"); } + } + propHash.proto = true; + } + return + } + name = "$" + name; + var other = propHash[name]; + if (other) { + var redefinition; + if (kind === "init") { + redefinition = this.strict && other.init || other.get || other.set; + } else { + redefinition = other.init || other[kind]; + } + if (redefinition) + { this.raiseRecoverable(key.start, "Redefinition of property"); } + } else { + other = propHash[name] = { + init: false, + get: false, + set: false + }; + } + other[kind] = true; + }; + + // ### Expression parsing + + // These nest, from the most general expression type at the top to + // 'atomic', nondivisible expression types at the bottom. Most of + // the functions will simply let the function(s) below them parse, + // and, *if* the syntactic construct they handle is present, wrap + // the AST node that the inner parser gave them in another node. + + // Parse a full expression. The optional arguments are used to + // forbid the `in` operator (in for loops initalization expressions) + // and provide reference for storing '=' operator inside shorthand + // property assignment in contexts where both object expression + // and object pattern might appear (so it's possible to raise + // delayed syntax error at correct position). + + pp$3.parseExpression = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseMaybeAssign(noIn, refDestructuringErrors); + if (this.type === types.comma) { + var node = this.startNodeAt(startPos, startLoc); + node.expressions = [expr]; + while (this.eat(types.comma)) { node.expressions.push(this.parseMaybeAssign(noIn, refDestructuringErrors)); } + return this.finishNode(node, "SequenceExpression") + } + return expr + }; + + // Parse an assignment expression. This includes applications of + // operators like `+=`. + + pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) { + if (this.isContextual("yield")) { + if (this.inGenerator) { return this.parseYield(noIn) } + // The tokenizer will assume an expression is allowed after + // `yield`, but this isn't that kind of yield + else { this.exprAllowed = false; } + } + + var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1; + if (refDestructuringErrors) { + oldParenAssign = refDestructuringErrors.parenthesizedAssign; + oldTrailingComma = refDestructuringErrors.trailingComma; + refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1; + } else { + refDestructuringErrors = new DestructuringErrors; + ownDestructuringErrors = true; + } + + var startPos = this.start, startLoc = this.startLoc; + if (this.type === types.parenL || this.type === types.name) + { this.potentialArrowAt = this.start; } + var left = this.parseMaybeConditional(noIn, refDestructuringErrors); + if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); } + if (this.type.isAssign) { + var node = this.startNodeAt(startPos, startLoc); + node.operator = this.value; + node.left = this.type === types.eq ? this.toAssignable(left, false, refDestructuringErrors) : left; + if (!ownDestructuringErrors) { + refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1; + } + if (refDestructuringErrors.shorthandAssign >= node.left.start) + { refDestructuringErrors.shorthandAssign = -1; } // reset because shorthand default was used correctly + this.checkLVal(left); + this.next(); + node.right = this.parseMaybeAssign(noIn); + return this.finishNode(node, "AssignmentExpression") + } else { + if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); } + } + if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; } + if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; } + return left + }; + + // Parse a ternary conditional (`?:`) operator. + + pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseExprOps(noIn, refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + if (this.eat(types.question)) { + var node = this.startNodeAt(startPos, startLoc); + node.test = expr; + node.consequent = this.parseMaybeAssign(); + this.expect(types.colon); + node.alternate = this.parseMaybeAssign(noIn); + return this.finishNode(node, "ConditionalExpression") + } + return expr + }; + + // Start the precedence parser. + + pp$3.parseExprOps = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseMaybeUnary(refDestructuringErrors, false); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, noIn) + }; + + // Parse binary operators with the operator precedence parsing + // algorithm. `left` is the left-hand side of the operator. + // `minPrec` provides context that allows the function to stop and + // defer further parser to one of its callers when it encounters an + // operator that has a lower precedence than the set it is parsing. + + pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) { + var prec = this.type.binop; + if (prec != null && (!noIn || this.type !== types._in)) { + if (prec > minPrec) { + var logical = this.type === types.logicalOR || this.type === types.logicalAND; + var coalesce = this.type === types.coalesce; + if (coalesce) { + // Handle the precedence of `tt.coalesce` as equal to the range of logical expressions. + // In other words, `node.right` shouldn't contain logical expressions in order to check the mixed error. + prec = types.logicalAND.binop; + } + var op = this.value; + this.next(); + var startPos = this.start, startLoc = this.startLoc; + var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn); + var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce); + if ((logical && this.type === types.coalesce) || (coalesce && (this.type === types.logicalOR || this.type === types.logicalAND))) { + this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"); + } + return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn) + } + } + return left + }; + + pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) { + var node = this.startNodeAt(startPos, startLoc); + node.left = left; + node.operator = op; + node.right = right; + return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") + }; + + // Parse unary operators, both prefix and postfix. + + pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) { + var startPos = this.start, startLoc = this.startLoc, expr; + if (this.isContextual("await") && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction))) { + expr = this.parseAwait(); + sawUnary = true; + } else if (this.type.prefix) { + var node = this.startNode(), update = this.type === types.incDec; + node.operator = this.value; + node.prefix = true; + this.next(); + node.argument = this.parseMaybeUnary(null, true); + this.checkExpressionErrors(refDestructuringErrors, true); + if (update) { this.checkLVal(node.argument); } + else if (this.strict && node.operator === "delete" && + node.argument.type === "Identifier") + { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); } + else { sawUnary = true; } + expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); + } else { + expr = this.parseExprSubscripts(refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + while (this.type.postfix && !this.canInsertSemicolon()) { + var node$1 = this.startNodeAt(startPos, startLoc); + node$1.operator = this.value; + node$1.prefix = false; + node$1.argument = expr; + this.checkLVal(expr); + this.next(); + expr = this.finishNode(node$1, "UpdateExpression"); + } + } + + if (!sawUnary && this.eat(types.starstar)) + { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false) } + else + { return expr } + }; + + // Parse call, dot, and `[]`-subscript expressions. + + pp$3.parseExprSubscripts = function(refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseExprAtom(refDestructuringErrors); + if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") + { return expr } + var result = this.parseSubscripts(expr, startPos, startLoc); + if (refDestructuringErrors && result.type === "MemberExpression") { + if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; } + if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; } + } + return result + }; + + pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) { + var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && + this.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && + this.potentialArrowAt === base.start; + var optionalChained = false; + + while (true) { + var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained); + + if (element.optional) { optionalChained = true; } + if (element === base || element.type === "ArrowFunctionExpression") { + if (optionalChained) { + var chainNode = this.startNodeAt(startPos, startLoc); + chainNode.expression = element; + element = this.finishNode(chainNode, "ChainExpression"); + } + return element + } + + base = element; + } + }; + + pp$3.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained) { + var optionalSupported = this.options.ecmaVersion >= 11; + var optional = optionalSupported && this.eat(types.questionDot); + if (noCalls && optional) { this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions"); } + + var computed = this.eat(types.bracketL); + if (computed || (optional && this.type !== types.parenL && this.type !== types.backQuote) || this.eat(types.dot)) { + var node = this.startNodeAt(startPos, startLoc); + node.object = base; + node.property = computed ? this.parseExpression() : this.parseIdent(this.options.allowReserved !== "never"); + node.computed = !!computed; + if (computed) { this.expect(types.bracketR); } + if (optionalSupported) { + node.optional = optional; + } + base = this.finishNode(node, "MemberExpression"); + } else if (!noCalls && this.eat(types.parenL)) { + var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + var exprList = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors); + if (maybeAsyncArrow && !optional && !this.canInsertSemicolon() && this.eat(types.arrow)) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + if (this.awaitIdentPos > 0) + { this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"); } + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true) + } + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos; + var node$1 = this.startNodeAt(startPos, startLoc); + node$1.callee = base; + node$1.arguments = exprList; + if (optionalSupported) { + node$1.optional = optional; + } + base = this.finishNode(node$1, "CallExpression"); + } else if (this.type === types.backQuote) { + if (optional || optionalChained) { + this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions"); + } + var node$2 = this.startNodeAt(startPos, startLoc); + node$2.tag = base; + node$2.quasi = this.parseTemplate({isTagged: true}); + base = this.finishNode(node$2, "TaggedTemplateExpression"); + } + return base + }; + + // Parse an atomic expression — either a single token that is an + // expression, an expression started by a keyword like `function` or + // `new`, or an expression wrapped in punctuation like `()`, `[]`, + // or `{}`. + + pp$3.parseExprAtom = function(refDestructuringErrors) { + // If a division operator appears in an expression position, the + // tokenizer got confused, and we force it to read a regexp instead. + if (this.type === types.slash) { this.readRegexp(); } + + var node, canBeArrow = this.potentialArrowAt === this.start; + switch (this.type) { + case types._super: + if (!this.allowSuper) + { this.raise(this.start, "'super' keyword outside a method"); } + node = this.startNode(); + this.next(); + if (this.type === types.parenL && !this.allowDirectSuper) + { this.raise(node.start, "super() call outside constructor of a subclass"); } + // The `super` keyword can appear at below: + // SuperProperty: + // super [ Expression ] + // super . IdentifierName + // SuperCall: + // super ( Arguments ) + if (this.type !== types.dot && this.type !== types.bracketL && this.type !== types.parenL) + { this.unexpected(); } + return this.finishNode(node, "Super") + + case types._this: + node = this.startNode(); + this.next(); + return this.finishNode(node, "ThisExpression") + + case types.name: + var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; + var id = this.parseIdent(false); + if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types._function)) + { return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true) } + if (canBeArrow && !this.canInsertSemicolon()) { + if (this.eat(types.arrow)) + { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false) } + if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types.name && !containsEsc) { + id = this.parseIdent(false); + if (this.canInsertSemicolon() || !this.eat(types.arrow)) + { this.unexpected(); } + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true) + } + } + return id + + case types.regexp: + var value = this.value; + node = this.parseLiteral(value.value); + node.regex = {pattern: value.pattern, flags: value.flags}; + return node + + case types.num: case types.string: + return this.parseLiteral(this.value) + + case types._null: case types._true: case types._false: + node = this.startNode(); + node.value = this.type === types._null ? null : this.type === types._true; + node.raw = this.type.keyword; + this.next(); + return this.finishNode(node, "Literal") + + case types.parenL: + var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow); + if (refDestructuringErrors) { + if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) + { refDestructuringErrors.parenthesizedAssign = start; } + if (refDestructuringErrors.parenthesizedBind < 0) + { refDestructuringErrors.parenthesizedBind = start; } + } + return expr + + case types.bracketL: + node = this.startNode(); + this.next(); + node.elements = this.parseExprList(types.bracketR, true, true, refDestructuringErrors); + return this.finishNode(node, "ArrayExpression") + + case types.braceL: + return this.parseObj(false, refDestructuringErrors) + + case types._function: + node = this.startNode(); + this.next(); + return this.parseFunction(node, 0) + + case types._class: + return this.parseClass(this.startNode(), false) + + case types._new: + return this.parseNew() + + case types.backQuote: + return this.parseTemplate() + + case types._import: + if (this.options.ecmaVersion >= 11) { + return this.parseExprImport() + } else { + return this.unexpected() + } + + default: + this.unexpected(); + } + }; + + pp$3.parseExprImport = function() { + var node = this.startNode(); + + // Consume `import` as an identifier for `import.meta`. + // Because `this.parseIdent(true)` doesn't check escape sequences, it needs the check of `this.containsEsc`. + if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword import"); } + var meta = this.parseIdent(true); + + switch (this.type) { + case types.parenL: + return this.parseDynamicImport(node) + case types.dot: + node.meta = meta; + return this.parseImportMeta(node) + default: + this.unexpected(); + } + }; + + pp$3.parseDynamicImport = function(node) { + this.next(); // skip `(` + + // Parse node.source. + node.source = this.parseMaybeAssign(); + + // Verify ending. + if (!this.eat(types.parenR)) { + var errorPos = this.start; + if (this.eat(types.comma) && this.eat(types.parenR)) { + this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()"); + } else { + this.unexpected(errorPos); + } + } + + return this.finishNode(node, "ImportExpression") + }; + + pp$3.parseImportMeta = function(node) { + this.next(); // skip `.` + + var containsEsc = this.containsEsc; + node.property = this.parseIdent(true); + + if (node.property.name !== "meta") + { this.raiseRecoverable(node.property.start, "The only valid meta property for import is 'import.meta'"); } + if (containsEsc) + { this.raiseRecoverable(node.start, "'import.meta' must not contain escaped characters"); } + if (this.options.sourceType !== "module") + { this.raiseRecoverable(node.start, "Cannot use 'import.meta' outside a module"); } + + return this.finishNode(node, "MetaProperty") + }; + + pp$3.parseLiteral = function(value) { + var node = this.startNode(); + node.value = value; + node.raw = this.input.slice(this.start, this.end); + if (node.raw.charCodeAt(node.raw.length - 1) === 110) { node.bigint = node.raw.slice(0, -1).replace(/_/g, ""); } + this.next(); + return this.finishNode(node, "Literal") + }; + + pp$3.parseParenExpression = function() { + this.expect(types.parenL); + var val = this.parseExpression(); + this.expect(types.parenR); + return val + }; + + pp$3.parseParenAndDistinguishExpression = function(canBeArrow) { + var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8; + if (this.options.ecmaVersion >= 6) { + this.next(); + + var innerStartPos = this.start, innerStartLoc = this.startLoc; + var exprList = [], first = true, lastIsComma = false; + var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; + this.yieldPos = 0; + this.awaitPos = 0; + // Do not save awaitIdentPos to allow checking awaits nested in parameters + while (this.type !== types.parenR) { + first ? first = false : this.expect(types.comma); + if (allowTrailingComma && this.afterTrailingComma(types.parenR, true)) { + lastIsComma = true; + break + } else if (this.type === types.ellipsis) { + spreadStart = this.start; + exprList.push(this.parseParenItem(this.parseRestBinding())); + if (this.type === types.comma) { this.raise(this.start, "Comma is not permitted after the rest element"); } + break + } else { + exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem)); + } + } + var innerEndPos = this.start, innerEndLoc = this.startLoc; + this.expect(types.parenR); + + if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + return this.parseParenArrowList(startPos, startLoc, exprList) + } + + if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); } + if (spreadStart) { this.unexpected(spreadStart); } + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + + if (exprList.length > 1) { + val = this.startNodeAt(innerStartPos, innerStartLoc); + val.expressions = exprList; + this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); + } else { + val = exprList[0]; + } + } else { + val = this.parseParenExpression(); + } + + if (this.options.preserveParens) { + var par = this.startNodeAt(startPos, startLoc); + par.expression = val; + return this.finishNode(par, "ParenthesizedExpression") + } else { + return val + } + }; + + pp$3.parseParenItem = function(item) { + return item + }; + + pp$3.parseParenArrowList = function(startPos, startLoc, exprList) { + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList) + }; + + // New's precedence is slightly tricky. It must allow its argument to + // be a `[]` or dot subscript expression, but not a call — at least, + // not without wrapping it in parentheses. Thus, it uses the noCalls + // argument to parseSubscripts to prevent it from consuming the + // argument list. + + var empty$1 = []; + + pp$3.parseNew = function() { + if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword new"); } + var node = this.startNode(); + var meta = this.parseIdent(true); + if (this.options.ecmaVersion >= 6 && this.eat(types.dot)) { + node.meta = meta; + var containsEsc = this.containsEsc; + node.property = this.parseIdent(true); + if (node.property.name !== "target") + { this.raiseRecoverable(node.property.start, "The only valid meta property for new is 'new.target'"); } + if (containsEsc) + { this.raiseRecoverable(node.start, "'new.target' must not contain escaped characters"); } + if (!this.inNonArrowFunction()) + { this.raiseRecoverable(node.start, "'new.target' can only be used in functions"); } + return this.finishNode(node, "MetaProperty") + } + var startPos = this.start, startLoc = this.startLoc, isImport = this.type === types._import; + node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); + if (isImport && node.callee.type === "ImportExpression") { + this.raise(startPos, "Cannot use new with import()"); + } + if (this.eat(types.parenL)) { node.arguments = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8, false); } + else { node.arguments = empty$1; } + return this.finishNode(node, "NewExpression") + }; + + // Parse template expression. + + pp$3.parseTemplateElement = function(ref) { + var isTagged = ref.isTagged; + + var elem = this.startNode(); + if (this.type === types.invalidTemplate) { + if (!isTagged) { + this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"); + } + elem.value = { + raw: this.value, + cooked: null + }; + } else { + elem.value = { + raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), + cooked: this.value + }; + } + this.next(); + elem.tail = this.type === types.backQuote; + return this.finishNode(elem, "TemplateElement") + }; + + pp$3.parseTemplate = function(ref) { + if ( ref === void 0 ) ref = {}; + var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false; + + var node = this.startNode(); + this.next(); + node.expressions = []; + var curElt = this.parseTemplateElement({isTagged: isTagged}); + node.quasis = [curElt]; + while (!curElt.tail) { + if (this.type === types.eof) { this.raise(this.pos, "Unterminated template literal"); } + this.expect(types.dollarBraceL); + node.expressions.push(this.parseExpression()); + this.expect(types.braceR); + node.quasis.push(curElt = this.parseTemplateElement({isTagged: isTagged})); + } + this.next(); + return this.finishNode(node, "TemplateLiteral") + }; + + pp$3.isAsyncProp = function(prop) { + return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && + (this.type === types.name || this.type === types.num || this.type === types.string || this.type === types.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === types.star)) && + !lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + }; + + // Parse an object literal or binding pattern. + + pp$3.parseObj = function(isPattern, refDestructuringErrors) { + var node = this.startNode(), first = true, propHash = {}; + node.properties = []; + this.next(); + while (!this.eat(types.braceR)) { + if (!first) { + this.expect(types.comma); + if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(types.braceR)) { break } + } else { first = false; } + + var prop = this.parseProperty(isPattern, refDestructuringErrors); + if (!isPattern) { this.checkPropClash(prop, propHash, refDestructuringErrors); } + node.properties.push(prop); + } + return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") + }; + + pp$3.parseProperty = function(isPattern, refDestructuringErrors) { + var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc; + if (this.options.ecmaVersion >= 9 && this.eat(types.ellipsis)) { + if (isPattern) { + prop.argument = this.parseIdent(false); + if (this.type === types.comma) { + this.raise(this.start, "Comma is not permitted after the rest element"); + } + return this.finishNode(prop, "RestElement") + } + // To disallow parenthesized identifier via `this.toAssignable()`. + if (this.type === types.parenL && refDestructuringErrors) { + if (refDestructuringErrors.parenthesizedAssign < 0) { + refDestructuringErrors.parenthesizedAssign = this.start; + } + if (refDestructuringErrors.parenthesizedBind < 0) { + refDestructuringErrors.parenthesizedBind = this.start; + } + } + // Parse argument. + prop.argument = this.parseMaybeAssign(false, refDestructuringErrors); + // To disallow trailing comma via `this.toAssignable()`. + if (this.type === types.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) { + refDestructuringErrors.trailingComma = this.start; + } + // Finish + return this.finishNode(prop, "SpreadElement") + } + if (this.options.ecmaVersion >= 6) { + prop.method = false; + prop.shorthand = false; + if (isPattern || refDestructuringErrors) { + startPos = this.start; + startLoc = this.startLoc; + } + if (!isPattern) + { isGenerator = this.eat(types.star); } + } + var containsEsc = this.containsEsc; + this.parsePropertyName(prop); + if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) { + isAsync = true; + isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); + this.parsePropertyName(prop, refDestructuringErrors); + } else { + isAsync = false; + } + this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc); + return this.finishNode(prop, "Property") + }; + + pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) { + if ((isGenerator || isAsync) && this.type === types.colon) + { this.unexpected(); } + + if (this.eat(types.colon)) { + prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); + prop.kind = "init"; + } else if (this.options.ecmaVersion >= 6 && this.type === types.parenL) { + if (isPattern) { this.unexpected(); } + prop.kind = "init"; + prop.method = true; + prop.value = this.parseMethod(isGenerator, isAsync); + } else if (!isPattern && !containsEsc && + this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && + (prop.key.name === "get" || prop.key.name === "set") && + (this.type !== types.comma && this.type !== types.braceR && this.type !== types.eq)) { + if (isGenerator || isAsync) { this.unexpected(); } + prop.kind = prop.key.name; + this.parsePropertyName(prop); + prop.value = this.parseMethod(false); + var paramCount = prop.kind === "get" ? 0 : 1; + if (prop.value.params.length !== paramCount) { + var start = prop.value.start; + if (prop.kind === "get") + { this.raiseRecoverable(start, "getter should have no params"); } + else + { this.raiseRecoverable(start, "setter should have exactly one param"); } + } else { + if (prop.kind === "set" && prop.value.params[0].type === "RestElement") + { this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); } + } + } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { + if (isGenerator || isAsync) { this.unexpected(); } + this.checkUnreserved(prop.key); + if (prop.key.name === "await" && !this.awaitIdentPos) + { this.awaitIdentPos = startPos; } + prop.kind = "init"; + if (isPattern) { + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); + } else if (this.type === types.eq && refDestructuringErrors) { + if (refDestructuringErrors.shorthandAssign < 0) + { refDestructuringErrors.shorthandAssign = this.start; } + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); + } else { + prop.value = prop.key; + } + prop.shorthand = true; + } else { this.unexpected(); } + }; + + pp$3.parsePropertyName = function(prop) { + if (this.options.ecmaVersion >= 6) { + if (this.eat(types.bracketL)) { + prop.computed = true; + prop.key = this.parseMaybeAssign(); + this.expect(types.bracketR); + return prop.key + } else { + prop.computed = false; + } + } + return prop.key = this.type === types.num || this.type === types.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never") + }; + + // Initialize empty function node. + + pp$3.initFunction = function(node) { + node.id = null; + if (this.options.ecmaVersion >= 6) { node.generator = node.expression = false; } + if (this.options.ecmaVersion >= 8) { node.async = false; } + }; + + // Parse object or class method. + + pp$3.parseMethod = function(isGenerator, isAsync, allowDirectSuper) { + var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + + this.initFunction(node); + if (this.options.ecmaVersion >= 6) + { node.generator = isGenerator; } + if (this.options.ecmaVersion >= 8) + { node.async = !!isAsync; } + + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); + + this.expect(types.parenL); + node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); + this.checkYieldAwaitInDefaultParams(); + this.parseFunctionBody(node, false, true); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, "FunctionExpression") + }; + + // Parse arrow function expression with given parameters. + + pp$3.parseArrowExpression = function(node, params, isAsync) { + var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + + this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW); + this.initFunction(node); + if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; } + + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + + node.params = this.toAssignableList(params, true); + this.parseFunctionBody(node, true, false); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, "ArrowFunctionExpression") + }; + + // Parse function body and check parameters. + + pp$3.parseFunctionBody = function(node, isArrowFunction, isMethod) { + var isExpression = isArrowFunction && this.type !== types.braceL; + var oldStrict = this.strict, useStrict = false; + + if (isExpression) { + node.body = this.parseMaybeAssign(); + node.expression = true; + this.checkParams(node, false); + } else { + var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params); + if (!oldStrict || nonSimple) { + useStrict = this.strictDirective(this.end); + // If this is a strict mode function, verify that argument names + // are not repeated, and it does not try to bind the words `eval` + // or `arguments`. + if (useStrict && nonSimple) + { this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); } + } + // Start a new scope with regard to labels and the `inFunction` + // flag (restore them to their old value afterwards). + var oldLabels = this.labels; + this.labels = []; + if (useStrict) { this.strict = true; } + + // Add the params to varDeclaredNames to ensure that an error is thrown + // if a let/const declaration in the function clashes with one of the params. + this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params)); + // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval' + if (this.strict && node.id) { this.checkLVal(node.id, BIND_OUTSIDE); } + node.body = this.parseBlock(false, undefined, useStrict && !oldStrict); + node.expression = false; + this.adaptDirectivePrologue(node.body.body); + this.labels = oldLabels; + } + this.exitScope(); + }; + + pp$3.isSimpleParamList = function(params) { + for (var i = 0, list = params; i < list.length; i += 1) + { + var param = list[i]; + + if (param.type !== "Identifier") { return false + } } + return true + }; + + // Checks function params for various disallowed patterns such as using "eval" + // or "arguments" and duplicate parameters. + + pp$3.checkParams = function(node, allowDuplicates) { + var nameHash = {}; + for (var i = 0, list = node.params; i < list.length; i += 1) + { + var param = list[i]; + + this.checkLVal(param, BIND_VAR, allowDuplicates ? null : nameHash); + } + }; + + // Parses a comma-separated list of expressions, and returns them as + // an array. `close` is the token type that ends the list, and + // `allowEmpty` can be turned on to allow subsequent commas with + // nothing in between them to be parsed as `null` (which is needed + // for array literals). + + pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { + var elts = [], first = true; + while (!this.eat(close)) { + if (!first) { + this.expect(types.comma); + if (allowTrailingComma && this.afterTrailingComma(close)) { break } + } else { first = false; } + + var elt = (void 0); + if (allowEmpty && this.type === types.comma) + { elt = null; } + else if (this.type === types.ellipsis) { + elt = this.parseSpread(refDestructuringErrors); + if (refDestructuringErrors && this.type === types.comma && refDestructuringErrors.trailingComma < 0) + { refDestructuringErrors.trailingComma = this.start; } + } else { + elt = this.parseMaybeAssign(false, refDestructuringErrors); + } + elts.push(elt); + } + return elts + }; + + pp$3.checkUnreserved = function(ref) { + var start = ref.start; + var end = ref.end; + var name = ref.name; + + if (this.inGenerator && name === "yield") + { this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); } + if (this.inAsync && name === "await") + { this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); } + if (this.keywords.test(name)) + { this.raise(start, ("Unexpected keyword '" + name + "'")); } + if (this.options.ecmaVersion < 6 && + this.input.slice(start, end).indexOf("\\") !== -1) { return } + var re = this.strict ? this.reservedWordsStrict : this.reservedWords; + if (re.test(name)) { + if (!this.inAsync && name === "await") + { this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"); } + this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); + } + }; + + // Parse the next token as an identifier. If `liberal` is true (used + // when parsing properties), it will also convert keywords into + // identifiers. + + pp$3.parseIdent = function(liberal, isBinding) { + var node = this.startNode(); + if (this.type === types.name) { + node.name = this.value; + } else if (this.type.keyword) { + node.name = this.type.keyword; + + // To fix https://github.com/acornjs/acorn/issues/575 + // `class` and `function` keywords push new context into this.context. + // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name. + // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword + if ((node.name === "class" || node.name === "function") && + (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) { + this.context.pop(); + } + } else { + this.unexpected(); + } + this.next(!!liberal); + this.finishNode(node, "Identifier"); + if (!liberal) { + this.checkUnreserved(node); + if (node.name === "await" && !this.awaitIdentPos) + { this.awaitIdentPos = node.start; } + } + return node + }; + + // Parses yield expression inside generator. + + pp$3.parseYield = function(noIn) { + if (!this.yieldPos) { this.yieldPos = this.start; } + + var node = this.startNode(); + this.next(); + if (this.type === types.semi || this.canInsertSemicolon() || (this.type !== types.star && !this.type.startsExpr)) { + node.delegate = false; + node.argument = null; + } else { + node.delegate = this.eat(types.star); + node.argument = this.parseMaybeAssign(noIn); + } + return this.finishNode(node, "YieldExpression") + }; + + pp$3.parseAwait = function() { + if (!this.awaitPos) { this.awaitPos = this.start; } + + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeUnary(null, false); + return this.finishNode(node, "AwaitExpression") + }; + + var pp$4 = Parser.prototype; + + // This function is used to raise exceptions on parse errors. It + // takes an offset integer (into the current `input`) to indicate + // the location of the error, attaches the position to the end + // of the error message, and then raises a `SyntaxError` with that + // message. + + pp$4.raise = function(pos, message) { + var loc = getLineInfo(this.input, pos); + message += " (" + loc.line + ":" + loc.column + ")"; + var err = new SyntaxError(message); + err.pos = pos; err.loc = loc; err.raisedAt = this.pos; + throw err + }; + + pp$4.raiseRecoverable = pp$4.raise; + + pp$4.curPosition = function() { + if (this.options.locations) { + return new Position(this.curLine, this.pos - this.lineStart) + } + }; + + var pp$5 = Parser.prototype; + + var Scope = function Scope(flags) { + this.flags = flags; + // A list of var-declared names in the current lexical scope + this.var = []; + // A list of lexically-declared names in the current lexical scope + this.lexical = []; + // A list of lexically-declared FunctionDeclaration names in the current lexical scope + this.functions = []; + }; + + // The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names. + + pp$5.enterScope = function(flags) { + this.scopeStack.push(new Scope(flags)); + }; + + pp$5.exitScope = function() { + this.scopeStack.pop(); + }; + + // The spec says: + // > At the top level of a function, or script, function declarations are + // > treated like var declarations rather than like lexical declarations. + pp$5.treatFunctionsAsVarInScope = function(scope) { + return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP) + }; + + pp$5.declareName = function(name, bindingType, pos) { + var redeclared = false; + if (bindingType === BIND_LEXICAL) { + var scope = this.currentScope(); + redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; + scope.lexical.push(name); + if (this.inModule && (scope.flags & SCOPE_TOP)) + { delete this.undefinedExports[name]; } + } else if (bindingType === BIND_SIMPLE_CATCH) { + var scope$1 = this.currentScope(); + scope$1.lexical.push(name); + } else if (bindingType === BIND_FUNCTION) { + var scope$2 = this.currentScope(); + if (this.treatFunctionsAsVar) + { redeclared = scope$2.lexical.indexOf(name) > -1; } + else + { redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1; } + scope$2.functions.push(name); + } else { + for (var i = this.scopeStack.length - 1; i >= 0; --i) { + var scope$3 = this.scopeStack[i]; + if (scope$3.lexical.indexOf(name) > -1 && !((scope$3.flags & SCOPE_SIMPLE_CATCH) && scope$3.lexical[0] === name) || + !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) { + redeclared = true; + break + } + scope$3.var.push(name); + if (this.inModule && (scope$3.flags & SCOPE_TOP)) + { delete this.undefinedExports[name]; } + if (scope$3.flags & SCOPE_VAR) { break } + } + } + if (redeclared) { this.raiseRecoverable(pos, ("Identifier '" + name + "' has already been declared")); } + }; + + pp$5.checkLocalExport = function(id) { + // scope.functions must be empty as Module code is always strict. + if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && + this.scopeStack[0].var.indexOf(id.name) === -1) { + this.undefinedExports[id.name] = id; + } + }; + + pp$5.currentScope = function() { + return this.scopeStack[this.scopeStack.length - 1] + }; + + pp$5.currentVarScope = function() { + for (var i = this.scopeStack.length - 1;; i--) { + var scope = this.scopeStack[i]; + if (scope.flags & SCOPE_VAR) { return scope } + } + }; + + // Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`. + pp$5.currentThisScope = function() { + for (var i = this.scopeStack.length - 1;; i--) { + var scope = this.scopeStack[i]; + if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { return scope } + } + }; + + var Node = function Node(parser, pos, loc) { + this.type = ""; + this.start = pos; + this.end = 0; + if (parser.options.locations) + { this.loc = new SourceLocation(parser, loc); } + if (parser.options.directSourceFile) + { this.sourceFile = parser.options.directSourceFile; } + if (parser.options.ranges) + { this.range = [pos, 0]; } + }; + + // Start an AST node, attaching a start offset. + + var pp$6 = Parser.prototype; + + pp$6.startNode = function() { + return new Node(this, this.start, this.startLoc) + }; + + pp$6.startNodeAt = function(pos, loc) { + return new Node(this, pos, loc) + }; + + // Finish an AST node, adding `type` and `end` properties. + + function finishNodeAt(node, type, pos, loc) { + node.type = type; + node.end = pos; + if (this.options.locations) + { node.loc.end = loc; } + if (this.options.ranges) + { node.range[1] = pos; } + return node + } + + pp$6.finishNode = function(node, type) { + return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) + }; + + // Finish node at given position + + pp$6.finishNodeAt = function(node, type, pos, loc) { + return finishNodeAt.call(this, node, type, pos, loc) + }; + + // The algorithm used to determine whether a regexp can appear at a + + var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) { + this.token = token; + this.isExpr = !!isExpr; + this.preserveSpace = !!preserveSpace; + this.override = override; + this.generator = !!generator; + }; + + var types$1 = { + b_stat: new TokContext("{", false), + b_expr: new TokContext("{", true), + b_tmpl: new TokContext("${", false), + p_stat: new TokContext("(", false), + p_expr: new TokContext("(", true), + q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }), + f_stat: new TokContext("function", false), + f_expr: new TokContext("function", true), + f_expr_gen: new TokContext("function", true, false, null, true), + f_gen: new TokContext("function", false, false, null, true) + }; + + var pp$7 = Parser.prototype; + + pp$7.initialContext = function() { + return [types$1.b_stat] + }; + + pp$7.braceIsBlock = function(prevType) { + var parent = this.curContext(); + if (parent === types$1.f_expr || parent === types$1.f_stat) + { return true } + if (prevType === types.colon && (parent === types$1.b_stat || parent === types$1.b_expr)) + { return !parent.isExpr } + + // The check for `tt.name && exprAllowed` detects whether we are + // after a `yield` or `of` construct. See the `updateContext` for + // `tt.name`. + if (prevType === types._return || prevType === types.name && this.exprAllowed) + { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) } + if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType === types.arrow) + { return true } + if (prevType === types.braceL) + { return parent === types$1.b_stat } + if (prevType === types._var || prevType === types._const || prevType === types.name) + { return false } + return !this.exprAllowed + }; + + pp$7.inGeneratorContext = function() { + for (var i = this.context.length - 1; i >= 1; i--) { + var context = this.context[i]; + if (context.token === "function") + { return context.generator } + } + return false + }; + + pp$7.updateContext = function(prevType) { + var update, type = this.type; + if (type.keyword && prevType === types.dot) + { this.exprAllowed = false; } + else if (update = type.updateContext) + { update.call(this, prevType); } + else + { this.exprAllowed = type.beforeExpr; } + }; + + // Token-specific context update code + + types.parenR.updateContext = types.braceR.updateContext = function() { + if (this.context.length === 1) { + this.exprAllowed = true; + return + } + var out = this.context.pop(); + if (out === types$1.b_stat && this.curContext().token === "function") { + out = this.context.pop(); + } + this.exprAllowed = !out.isExpr; + }; + + types.braceL.updateContext = function(prevType) { + this.context.push(this.braceIsBlock(prevType) ? types$1.b_stat : types$1.b_expr); + this.exprAllowed = true; + }; + + types.dollarBraceL.updateContext = function() { + this.context.push(types$1.b_tmpl); + this.exprAllowed = true; + }; + + types.parenL.updateContext = function(prevType) { + var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; + this.context.push(statementParens ? types$1.p_stat : types$1.p_expr); + this.exprAllowed = true; + }; + + types.incDec.updateContext = function() { + // tokExprAllowed stays unchanged + }; + + types._function.updateContext = types._class.updateContext = function(prevType) { + if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else && + !(prevType === types._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && + !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) + { this.context.push(types$1.f_expr); } + else + { this.context.push(types$1.f_stat); } + this.exprAllowed = false; + }; + + types.backQuote.updateContext = function() { + if (this.curContext() === types$1.q_tmpl) + { this.context.pop(); } + else + { this.context.push(types$1.q_tmpl); } + this.exprAllowed = false; + }; + + types.star.updateContext = function(prevType) { + if (prevType === types._function) { + var index = this.context.length - 1; + if (this.context[index] === types$1.f_expr) + { this.context[index] = types$1.f_expr_gen; } + else + { this.context[index] = types$1.f_gen; } + } + this.exprAllowed = true; + }; + + types.name.updateContext = function(prevType) { + var allowed = false; + if (this.options.ecmaVersion >= 6 && prevType !== types.dot) { + if (this.value === "of" && !this.exprAllowed || + this.value === "yield" && this.inGeneratorContext()) + { allowed = true; } + } + this.exprAllowed = allowed; + }; + + // This file contains Unicode properties extracted from the ECMAScript + // specification. The lists are extracted like so: + // $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText) + + // #table-binary-unicode-properties + var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS"; + var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic"; + var ecma11BinaryProperties = ecma10BinaryProperties; + var unicodeBinaryProperties = { + 9: ecma9BinaryProperties, + 10: ecma10BinaryProperties, + 11: ecma11BinaryProperties + }; + + // #table-unicode-general-category-values + var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu"; + + // #table-unicode-script-values + var ecma9ScriptValues = "Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb"; + var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd"; + var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho"; + var unicodeScriptValues = { + 9: ecma9ScriptValues, + 10: ecma10ScriptValues, + 11: ecma11ScriptValues + }; + + var data = {}; + function buildUnicodeData(ecmaVersion) { + var d = data[ecmaVersion] = { + binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues), + nonBinary: { + General_Category: wordsRegexp(unicodeGeneralCategoryValues), + Script: wordsRegexp(unicodeScriptValues[ecmaVersion]) + } + }; + d.nonBinary.Script_Extensions = d.nonBinary.Script; + + d.nonBinary.gc = d.nonBinary.General_Category; + d.nonBinary.sc = d.nonBinary.Script; + d.nonBinary.scx = d.nonBinary.Script_Extensions; + } + buildUnicodeData(9); + buildUnicodeData(10); + buildUnicodeData(11); + + var pp$8 = Parser.prototype; + + var RegExpValidationState = function RegExpValidationState(parser) { + this.parser = parser; + this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : ""); + this.unicodeProperties = data[parser.options.ecmaVersion >= 11 ? 11 : parser.options.ecmaVersion]; + this.source = ""; + this.flags = ""; + this.start = 0; + this.switchU = false; + this.switchN = false; + this.pos = 0; + this.lastIntValue = 0; + this.lastStringValue = ""; + this.lastAssertionIsQuantifiable = false; + this.numCapturingParens = 0; + this.maxBackReference = 0; + this.groupNames = []; + this.backReferenceNames = []; + }; + + RegExpValidationState.prototype.reset = function reset (start, pattern, flags) { + var unicode = flags.indexOf("u") !== -1; + this.start = start | 0; + this.source = pattern + ""; + this.flags = flags; + this.switchU = unicode && this.parser.options.ecmaVersion >= 6; + this.switchN = unicode && this.parser.options.ecmaVersion >= 9; + }; + + RegExpValidationState.prototype.raise = function raise (message) { + this.parser.raiseRecoverable(this.start, ("Invalid regular expression: /" + (this.source) + "/: " + message)); + }; + + // If u flag is given, this returns the code point at the index (it combines a surrogate pair). + // Otherwise, this returns the code unit of the index (can be a part of a surrogate pair). + RegExpValidationState.prototype.at = function at (i, forceU) { + if ( forceU === void 0 ) forceU = false; + + var s = this.source; + var l = s.length; + if (i >= l) { + return -1 + } + var c = s.charCodeAt(i); + if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { + return c + } + var next = s.charCodeAt(i + 1); + return next >= 0xDC00 && next <= 0xDFFF ? (c << 10) + next - 0x35FDC00 : c + }; + + RegExpValidationState.prototype.nextIndex = function nextIndex (i, forceU) { + if ( forceU === void 0 ) forceU = false; + + var s = this.source; + var l = s.length; + if (i >= l) { + return l + } + var c = s.charCodeAt(i), next; + if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l || + (next = s.charCodeAt(i + 1)) < 0xDC00 || next > 0xDFFF) { + return i + 1 + } + return i + 2 + }; + + RegExpValidationState.prototype.current = function current (forceU) { + if ( forceU === void 0 ) forceU = false; + + return this.at(this.pos, forceU) + }; + + RegExpValidationState.prototype.lookahead = function lookahead (forceU) { + if ( forceU === void 0 ) forceU = false; + + return this.at(this.nextIndex(this.pos, forceU), forceU) + }; + + RegExpValidationState.prototype.advance = function advance (forceU) { + if ( forceU === void 0 ) forceU = false; + + this.pos = this.nextIndex(this.pos, forceU); + }; + + RegExpValidationState.prototype.eat = function eat (ch, forceU) { + if ( forceU === void 0 ) forceU = false; + + if (this.current(forceU) === ch) { + this.advance(forceU); + return true + } + return false + }; + + function codePointToString(ch) { + if (ch <= 0xFFFF) { return String.fromCharCode(ch) } + ch -= 0x10000; + return String.fromCharCode((ch >> 10) + 0xD800, (ch & 0x03FF) + 0xDC00) + } + + /** + * Validate the flags part of a given RegExpLiteral. + * + * @param {RegExpValidationState} state The state to validate RegExp. + * @returns {void} + */ + pp$8.validateRegExpFlags = function(state) { + var validFlags = state.validFlags; + var flags = state.flags; + + for (var i = 0; i < flags.length; i++) { + var flag = flags.charAt(i); + if (validFlags.indexOf(flag) === -1) { + this.raise(state.start, "Invalid regular expression flag"); + } + if (flags.indexOf(flag, i + 1) > -1) { + this.raise(state.start, "Duplicate regular expression flag"); + } + } + }; + + /** + * Validate the pattern part of a given RegExpLiteral. + * + * @param {RegExpValidationState} state The state to validate RegExp. + * @returns {void} + */ + pp$8.validateRegExpPattern = function(state) { + this.regexp_pattern(state); + + // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of + // parsing contains a |GroupName|, reparse with the goal symbol + // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError* + // exception if _P_ did not conform to the grammar, if any elements of _P_ + // were not matched by the parse, or if any Early Error conditions exist. + if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) { + state.switchN = true; + this.regexp_pattern(state); + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern + pp$8.regexp_pattern = function(state) { + state.pos = 0; + state.lastIntValue = 0; + state.lastStringValue = ""; + state.lastAssertionIsQuantifiable = false; + state.numCapturingParens = 0; + state.maxBackReference = 0; + state.groupNames.length = 0; + state.backReferenceNames.length = 0; + + this.regexp_disjunction(state); + + if (state.pos !== state.source.length) { + // Make the same messages as V8. + if (state.eat(0x29 /* ) */)) { + state.raise("Unmatched ')'"); + } + if (state.eat(0x5D /* ] */) || state.eat(0x7D /* } */)) { + state.raise("Lone quantifier brackets"); + } + } + if (state.maxBackReference > state.numCapturingParens) { + state.raise("Invalid escape"); + } + for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) { + var name = list[i]; + + if (state.groupNames.indexOf(name) === -1) { + state.raise("Invalid named capture referenced"); + } + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction + pp$8.regexp_disjunction = function(state) { + this.regexp_alternative(state); + while (state.eat(0x7C /* | */)) { + this.regexp_alternative(state); + } + + // Make the same message as V8. + if (this.regexp_eatQuantifier(state, true)) { + state.raise("Nothing to repeat"); + } + if (state.eat(0x7B /* { */)) { + state.raise("Lone quantifier brackets"); + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative + pp$8.regexp_alternative = function(state) { + while (state.pos < state.source.length && this.regexp_eatTerm(state)) + { } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term + pp$8.regexp_eatTerm = function(state) { + if (this.regexp_eatAssertion(state)) { + // Handle `QuantifiableAssertion Quantifier` alternative. + // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion + // is a QuantifiableAssertion. + if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) { + // Make the same message as V8. + if (state.switchU) { + state.raise("Invalid quantifier"); + } + } + return true + } + + if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) { + this.regexp_eatQuantifier(state); + return true + } + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion + pp$8.regexp_eatAssertion = function(state) { + var start = state.pos; + state.lastAssertionIsQuantifiable = false; + + // ^, $ + if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) { + return true + } + + // \b \B + if (state.eat(0x5C /* \ */)) { + if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) { + return true + } + state.pos = start; + } + + // Lookahead / Lookbehind + if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) { + var lookbehind = false; + if (this.options.ecmaVersion >= 9) { + lookbehind = state.eat(0x3C /* < */); + } + if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) { + this.regexp_disjunction(state); + if (!state.eat(0x29 /* ) */)) { + state.raise("Unterminated group"); + } + state.lastAssertionIsQuantifiable = !lookbehind; + return true + } + } + + state.pos = start; + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier + pp$8.regexp_eatQuantifier = function(state, noError) { + if ( noError === void 0 ) noError = false; + + if (this.regexp_eatQuantifierPrefix(state, noError)) { + state.eat(0x3F /* ? */); + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix + pp$8.regexp_eatQuantifierPrefix = function(state, noError) { + return ( + state.eat(0x2A /* * */) || + state.eat(0x2B /* + */) || + state.eat(0x3F /* ? */) || + this.regexp_eatBracedQuantifier(state, noError) + ) + }; + pp$8.regexp_eatBracedQuantifier = function(state, noError) { + var start = state.pos; + if (state.eat(0x7B /* { */)) { + var min = 0, max = -1; + if (this.regexp_eatDecimalDigits(state)) { + min = state.lastIntValue; + if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) { + max = state.lastIntValue; + } + if (state.eat(0x7D /* } */)) { + // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term + if (max !== -1 && max < min && !noError) { + state.raise("numbers out of order in {} quantifier"); + } + return true + } + } + if (state.switchU && !noError) { + state.raise("Incomplete quantifier"); + } + state.pos = start; + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Atom + pp$8.regexp_eatAtom = function(state) { + return ( + this.regexp_eatPatternCharacters(state) || + state.eat(0x2E /* . */) || + this.regexp_eatReverseSolidusAtomEscape(state) || + this.regexp_eatCharacterClass(state) || + this.regexp_eatUncapturingGroup(state) || + this.regexp_eatCapturingGroup(state) + ) + }; + pp$8.regexp_eatReverseSolidusAtomEscape = function(state) { + var start = state.pos; + if (state.eat(0x5C /* \ */)) { + if (this.regexp_eatAtomEscape(state)) { + return true + } + state.pos = start; + } + return false + }; + pp$8.regexp_eatUncapturingGroup = function(state) { + var start = state.pos; + if (state.eat(0x28 /* ( */)) { + if (state.eat(0x3F /* ? */) && state.eat(0x3A /* : */)) { + this.regexp_disjunction(state); + if (state.eat(0x29 /* ) */)) { + return true + } + state.raise("Unterminated group"); + } + state.pos = start; + } + return false + }; + pp$8.regexp_eatCapturingGroup = function(state) { + if (state.eat(0x28 /* ( */)) { + if (this.options.ecmaVersion >= 9) { + this.regexp_groupSpecifier(state); + } else if (state.current() === 0x3F /* ? */) { + state.raise("Invalid group"); + } + this.regexp_disjunction(state); + if (state.eat(0x29 /* ) */)) { + state.numCapturingParens += 1; + return true + } + state.raise("Unterminated group"); + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom + pp$8.regexp_eatExtendedAtom = function(state) { + return ( + state.eat(0x2E /* . */) || + this.regexp_eatReverseSolidusAtomEscape(state) || + this.regexp_eatCharacterClass(state) || + this.regexp_eatUncapturingGroup(state) || + this.regexp_eatCapturingGroup(state) || + this.regexp_eatInvalidBracedQuantifier(state) || + this.regexp_eatExtendedPatternCharacter(state) + ) + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier + pp$8.regexp_eatInvalidBracedQuantifier = function(state) { + if (this.regexp_eatBracedQuantifier(state, true)) { + state.raise("Nothing to repeat"); + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter + pp$8.regexp_eatSyntaxCharacter = function(state) { + var ch = state.current(); + if (isSyntaxCharacter(ch)) { + state.lastIntValue = ch; + state.advance(); + return true + } + return false + }; + function isSyntaxCharacter(ch) { + return ( + ch === 0x24 /* $ */ || + ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ || + ch === 0x2E /* . */ || + ch === 0x3F /* ? */ || + ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ || + ch >= 0x7B /* { */ && ch <= 0x7D /* } */ + ) + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter + // But eat eager. + pp$8.regexp_eatPatternCharacters = function(state) { + var start = state.pos; + var ch = 0; + while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) { + state.advance(); + } + return state.pos !== start + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter + pp$8.regexp_eatExtendedPatternCharacter = function(state) { + var ch = state.current(); + if ( + ch !== -1 && + ch !== 0x24 /* $ */ && + !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) && + ch !== 0x2E /* . */ && + ch !== 0x3F /* ? */ && + ch !== 0x5B /* [ */ && + ch !== 0x5E /* ^ */ && + ch !== 0x7C /* | */ + ) { + state.advance(); + return true + } + return false + }; + + // GroupSpecifier :: + // [empty] + // `?` GroupName + pp$8.regexp_groupSpecifier = function(state) { + if (state.eat(0x3F /* ? */)) { + if (this.regexp_eatGroupName(state)) { + if (state.groupNames.indexOf(state.lastStringValue) !== -1) { + state.raise("Duplicate capture group name"); + } + state.groupNames.push(state.lastStringValue); + return + } + state.raise("Invalid group"); + } + }; + + // GroupName :: + // `<` RegExpIdentifierName `>` + // Note: this updates `state.lastStringValue` property with the eaten name. + pp$8.regexp_eatGroupName = function(state) { + state.lastStringValue = ""; + if (state.eat(0x3C /* < */)) { + if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) { + return true + } + state.raise("Invalid capture group name"); + } + return false + }; + + // RegExpIdentifierName :: + // RegExpIdentifierStart + // RegExpIdentifierName RegExpIdentifierPart + // Note: this updates `state.lastStringValue` property with the eaten name. + pp$8.regexp_eatRegExpIdentifierName = function(state) { + state.lastStringValue = ""; + if (this.regexp_eatRegExpIdentifierStart(state)) { + state.lastStringValue += codePointToString(state.lastIntValue); + while (this.regexp_eatRegExpIdentifierPart(state)) { + state.lastStringValue += codePointToString(state.lastIntValue); + } + return true + } + return false + }; + + // RegExpIdentifierStart :: + // UnicodeIDStart + // `$` + // `_` + // `\` RegExpUnicodeEscapeSequence[+U] + pp$8.regexp_eatRegExpIdentifierStart = function(state) { + var start = state.pos; + var forceU = this.options.ecmaVersion >= 11; + var ch = state.current(forceU); + state.advance(forceU); + + if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) { + ch = state.lastIntValue; + } + if (isRegExpIdentifierStart(ch)) { + state.lastIntValue = ch; + return true + } + + state.pos = start; + return false + }; + function isRegExpIdentifierStart(ch) { + return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ + } + + // RegExpIdentifierPart :: + // UnicodeIDContinue + // `$` + // `_` + // `\` RegExpUnicodeEscapeSequence[+U] + // + // + pp$8.regexp_eatRegExpIdentifierPart = function(state) { + var start = state.pos; + var forceU = this.options.ecmaVersion >= 11; + var ch = state.current(forceU); + state.advance(forceU); + + if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) { + ch = state.lastIntValue; + } + if (isRegExpIdentifierPart(ch)) { + state.lastIntValue = ch; + return true + } + + state.pos = start; + return false + }; + function isRegExpIdentifierPart(ch) { + return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* */ || ch === 0x200D /* */ + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape + pp$8.regexp_eatAtomEscape = function(state) { + if ( + this.regexp_eatBackReference(state) || + this.regexp_eatCharacterClassEscape(state) || + this.regexp_eatCharacterEscape(state) || + (state.switchN && this.regexp_eatKGroupName(state)) + ) { + return true + } + if (state.switchU) { + // Make the same message as V8. + if (state.current() === 0x63 /* c */) { + state.raise("Invalid unicode escape"); + } + state.raise("Invalid escape"); + } + return false + }; + pp$8.regexp_eatBackReference = function(state) { + var start = state.pos; + if (this.regexp_eatDecimalEscape(state)) { + var n = state.lastIntValue; + if (state.switchU) { + // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape + if (n > state.maxBackReference) { + state.maxBackReference = n; + } + return true + } + if (n <= state.numCapturingParens) { + return true + } + state.pos = start; + } + return false + }; + pp$8.regexp_eatKGroupName = function(state) { + if (state.eat(0x6B /* k */)) { + if (this.regexp_eatGroupName(state)) { + state.backReferenceNames.push(state.lastStringValue); + return true + } + state.raise("Invalid named reference"); + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape + pp$8.regexp_eatCharacterEscape = function(state) { + return ( + this.regexp_eatControlEscape(state) || + this.regexp_eatCControlLetter(state) || + this.regexp_eatZero(state) || + this.regexp_eatHexEscapeSequence(state) || + this.regexp_eatRegExpUnicodeEscapeSequence(state, false) || + (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) || + this.regexp_eatIdentityEscape(state) + ) + }; + pp$8.regexp_eatCControlLetter = function(state) { + var start = state.pos; + if (state.eat(0x63 /* c */)) { + if (this.regexp_eatControlLetter(state)) { + return true + } + state.pos = start; + } + return false + }; + pp$8.regexp_eatZero = function(state) { + if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) { + state.lastIntValue = 0; + state.advance(); + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape + pp$8.regexp_eatControlEscape = function(state) { + var ch = state.current(); + if (ch === 0x74 /* t */) { + state.lastIntValue = 0x09; /* \t */ + state.advance(); + return true + } + if (ch === 0x6E /* n */) { + state.lastIntValue = 0x0A; /* \n */ + state.advance(); + return true + } + if (ch === 0x76 /* v */) { + state.lastIntValue = 0x0B; /* \v */ + state.advance(); + return true + } + if (ch === 0x66 /* f */) { + state.lastIntValue = 0x0C; /* \f */ + state.advance(); + return true + } + if (ch === 0x72 /* r */) { + state.lastIntValue = 0x0D; /* \r */ + state.advance(); + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter + pp$8.regexp_eatControlLetter = function(state) { + var ch = state.current(); + if (isControlLetter(ch)) { + state.lastIntValue = ch % 0x20; + state.advance(); + return true + } + return false + }; + function isControlLetter(ch) { + return ( + (ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) || + (ch >= 0x61 /* a */ && ch <= 0x7A /* z */) + ) + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence + pp$8.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) { + if ( forceU === void 0 ) forceU = false; + + var start = state.pos; + var switchU = forceU || state.switchU; + + if (state.eat(0x75 /* u */)) { + if (this.regexp_eatFixedHexDigits(state, 4)) { + var lead = state.lastIntValue; + if (switchU && lead >= 0xD800 && lead <= 0xDBFF) { + var leadSurrogateEnd = state.pos; + if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) { + var trail = state.lastIntValue; + if (trail >= 0xDC00 && trail <= 0xDFFF) { + state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + return true + } + } + state.pos = leadSurrogateEnd; + state.lastIntValue = lead; + } + return true + } + if ( + switchU && + state.eat(0x7B /* { */) && + this.regexp_eatHexDigits(state) && + state.eat(0x7D /* } */) && + isValidUnicode(state.lastIntValue) + ) { + return true + } + if (switchU) { + state.raise("Invalid unicode escape"); + } + state.pos = start; + } + + return false + }; + function isValidUnicode(ch) { + return ch >= 0 && ch <= 0x10FFFF + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape + pp$8.regexp_eatIdentityEscape = function(state) { + if (state.switchU) { + if (this.regexp_eatSyntaxCharacter(state)) { + return true + } + if (state.eat(0x2F /* / */)) { + state.lastIntValue = 0x2F; /* / */ + return true + } + return false + } + + var ch = state.current(); + if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) { + state.lastIntValue = ch; + state.advance(); + return true + } + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape + pp$8.regexp_eatDecimalEscape = function(state) { + state.lastIntValue = 0; + var ch = state.current(); + if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) { + do { + state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); + state.advance(); + } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape + pp$8.regexp_eatCharacterClassEscape = function(state) { + var ch = state.current(); + + if (isCharacterClassEscape(ch)) { + state.lastIntValue = -1; + state.advance(); + return true + } + + if ( + state.switchU && + this.options.ecmaVersion >= 9 && + (ch === 0x50 /* P */ || ch === 0x70 /* p */) + ) { + state.lastIntValue = -1; + state.advance(); + if ( + state.eat(0x7B /* { */) && + this.regexp_eatUnicodePropertyValueExpression(state) && + state.eat(0x7D /* } */) + ) { + return true + } + state.raise("Invalid property name"); + } + + return false + }; + function isCharacterClassEscape(ch) { + return ( + ch === 0x64 /* d */ || + ch === 0x44 /* D */ || + ch === 0x73 /* s */ || + ch === 0x53 /* S */ || + ch === 0x77 /* w */ || + ch === 0x57 /* W */ + ) + } + + // UnicodePropertyValueExpression :: + // UnicodePropertyName `=` UnicodePropertyValue + // LoneUnicodePropertyNameOrValue + pp$8.regexp_eatUnicodePropertyValueExpression = function(state) { + var start = state.pos; + + // UnicodePropertyName `=` UnicodePropertyValue + if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) { + var name = state.lastStringValue; + if (this.regexp_eatUnicodePropertyValue(state)) { + var value = state.lastStringValue; + this.regexp_validateUnicodePropertyNameAndValue(state, name, value); + return true + } + } + state.pos = start; + + // LoneUnicodePropertyNameOrValue + if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) { + var nameOrValue = state.lastStringValue; + this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue); + return true + } + return false + }; + pp$8.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) { + if (!has(state.unicodeProperties.nonBinary, name)) + { state.raise("Invalid property name"); } + if (!state.unicodeProperties.nonBinary[name].test(value)) + { state.raise("Invalid property value"); } + }; + pp$8.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) { + if (!state.unicodeProperties.binary.test(nameOrValue)) + { state.raise("Invalid property name"); } + }; + + // UnicodePropertyName :: + // UnicodePropertyNameCharacters + pp$8.regexp_eatUnicodePropertyName = function(state) { + var ch = 0; + state.lastStringValue = ""; + while (isUnicodePropertyNameCharacter(ch = state.current())) { + state.lastStringValue += codePointToString(ch); + state.advance(); + } + return state.lastStringValue !== "" + }; + function isUnicodePropertyNameCharacter(ch) { + return isControlLetter(ch) || ch === 0x5F /* _ */ + } + + // UnicodePropertyValue :: + // UnicodePropertyValueCharacters + pp$8.regexp_eatUnicodePropertyValue = function(state) { + var ch = 0; + state.lastStringValue = ""; + while (isUnicodePropertyValueCharacter(ch = state.current())) { + state.lastStringValue += codePointToString(ch); + state.advance(); + } + return state.lastStringValue !== "" + }; + function isUnicodePropertyValueCharacter(ch) { + return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch) + } + + // LoneUnicodePropertyNameOrValue :: + // UnicodePropertyValueCharacters + pp$8.regexp_eatLoneUnicodePropertyNameOrValue = function(state) { + return this.regexp_eatUnicodePropertyValue(state) + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass + pp$8.regexp_eatCharacterClass = function(state) { + if (state.eat(0x5B /* [ */)) { + state.eat(0x5E /* ^ */); + this.regexp_classRanges(state); + if (state.eat(0x5D /* ] */)) { + return true + } + // Unreachable since it threw "unterminated regular expression" error before. + state.raise("Unterminated character class"); + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges + // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges + // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash + pp$8.regexp_classRanges = function(state) { + while (this.regexp_eatClassAtom(state)) { + var left = state.lastIntValue; + if (state.eat(0x2D /* - */) && this.regexp_eatClassAtom(state)) { + var right = state.lastIntValue; + if (state.switchU && (left === -1 || right === -1)) { + state.raise("Invalid character class"); + } + if (left !== -1 && right !== -1 && left > right) { + state.raise("Range out of order in character class"); + } + } + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash + pp$8.regexp_eatClassAtom = function(state) { + var start = state.pos; + + if (state.eat(0x5C /* \ */)) { + if (this.regexp_eatClassEscape(state)) { + return true + } + if (state.switchU) { + // Make the same message as V8. + var ch$1 = state.current(); + if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) { + state.raise("Invalid class escape"); + } + state.raise("Invalid escape"); + } + state.pos = start; + } + + var ch = state.current(); + if (ch !== 0x5D /* ] */) { + state.lastIntValue = ch; + state.advance(); + return true + } + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape + pp$8.regexp_eatClassEscape = function(state) { + var start = state.pos; + + if (state.eat(0x62 /* b */)) { + state.lastIntValue = 0x08; /* */ + return true + } + + if (state.switchU && state.eat(0x2D /* - */)) { + state.lastIntValue = 0x2D; /* - */ + return true + } + + if (!state.switchU && state.eat(0x63 /* c */)) { + if (this.regexp_eatClassControlLetter(state)) { + return true + } + state.pos = start; + } + + return ( + this.regexp_eatCharacterClassEscape(state) || + this.regexp_eatCharacterEscape(state) + ) + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter + pp$8.regexp_eatClassControlLetter = function(state) { + var ch = state.current(); + if (isDecimalDigit(ch) || ch === 0x5F /* _ */) { + state.lastIntValue = ch % 0x20; + state.advance(); + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence + pp$8.regexp_eatHexEscapeSequence = function(state) { + var start = state.pos; + if (state.eat(0x78 /* x */)) { + if (this.regexp_eatFixedHexDigits(state, 2)) { + return true + } + if (state.switchU) { + state.raise("Invalid escape"); + } + state.pos = start; + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits + pp$8.regexp_eatDecimalDigits = function(state) { + var start = state.pos; + var ch = 0; + state.lastIntValue = 0; + while (isDecimalDigit(ch = state.current())) { + state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); + state.advance(); + } + return state.pos !== start + }; + function isDecimalDigit(ch) { + return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */ + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits + pp$8.regexp_eatHexDigits = function(state) { + var start = state.pos; + var ch = 0; + state.lastIntValue = 0; + while (isHexDigit(ch = state.current())) { + state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); + state.advance(); + } + return state.pos !== start + }; + function isHexDigit(ch) { + return ( + (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) || + (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) || + (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) + ) + } + function hexToInt(ch) { + if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) { + return 10 + (ch - 0x41 /* A */) + } + if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) { + return 10 + (ch - 0x61 /* a */) + } + return ch - 0x30 /* 0 */ + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence + // Allows only 0-377(octal) i.e. 0-255(decimal). + pp$8.regexp_eatLegacyOctalEscapeSequence = function(state) { + if (this.regexp_eatOctalDigit(state)) { + var n1 = state.lastIntValue; + if (this.regexp_eatOctalDigit(state)) { + var n2 = state.lastIntValue; + if (n1 <= 3 && this.regexp_eatOctalDigit(state)) { + state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue; + } else { + state.lastIntValue = n1 * 8 + n2; + } + } else { + state.lastIntValue = n1; + } + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit + pp$8.regexp_eatOctalDigit = function(state) { + var ch = state.current(); + if (isOctalDigit(ch)) { + state.lastIntValue = ch - 0x30; /* 0 */ + state.advance(); + return true + } + state.lastIntValue = 0; + return false + }; + function isOctalDigit(ch) { + return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */ + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit + // And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence + pp$8.regexp_eatFixedHexDigits = function(state, length) { + var start = state.pos; + state.lastIntValue = 0; + for (var i = 0; i < length; ++i) { + var ch = state.current(); + if (!isHexDigit(ch)) { + state.pos = start; + return false + } + state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); + state.advance(); + } + return true + }; + + // Object type used to represent tokens. Note that normally, tokens + // simply exist as properties on the parser object. This is only + // used for the onToken callback and the external tokenizer. + + var Token = function Token(p) { + this.type = p.type; + this.value = p.value; + this.start = p.start; + this.end = p.end; + if (p.options.locations) + { this.loc = new SourceLocation(p, p.startLoc, p.endLoc); } + if (p.options.ranges) + { this.range = [p.start, p.end]; } + }; + + // ## Tokenizer + + var pp$9 = Parser.prototype; + + // Move to the next token + + pp$9.next = function(ignoreEscapeSequenceInKeyword) { + if (!ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc) + { this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword); } + if (this.options.onToken) + { this.options.onToken(new Token(this)); } + + this.lastTokEnd = this.end; + this.lastTokStart = this.start; + this.lastTokEndLoc = this.endLoc; + this.lastTokStartLoc = this.startLoc; + this.nextToken(); + }; + + pp$9.getToken = function() { + this.next(); + return new Token(this) + }; + + // If we're in an ES6 environment, make parsers iterable + if (typeof Symbol !== "undefined") + { pp$9[Symbol.iterator] = function() { + var this$1 = this; + + return { + next: function () { + var token = this$1.getToken(); + return { + done: token.type === types.eof, + value: token + } + } + } + }; } + + // Toggle strict mode. Re-reads the next number or string to please + // pedantic tests (`"use strict"; 010;` should fail). + + pp$9.curContext = function() { + return this.context[this.context.length - 1] + }; + + // Read a single token, updating the parser object's token-related + // properties. + + pp$9.nextToken = function() { + var curContext = this.curContext(); + if (!curContext || !curContext.preserveSpace) { this.skipSpace(); } + + this.start = this.pos; + if (this.options.locations) { this.startLoc = this.curPosition(); } + if (this.pos >= this.input.length) { return this.finishToken(types.eof) } + + if (curContext.override) { return curContext.override(this) } + else { this.readToken(this.fullCharCodeAtPos()); } + }; + + pp$9.readToken = function(code) { + // Identifier or keyword. '\uXXXX' sequences are allowed in + // identifiers, so '\' also dispatches to that. + if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) + { return this.readWord() } + + return this.getTokenFromCode(code) + }; + + pp$9.fullCharCodeAtPos = function() { + var code = this.input.charCodeAt(this.pos); + if (code <= 0xd7ff || code >= 0xe000) { return code } + var next = this.input.charCodeAt(this.pos + 1); + return (code << 10) + next - 0x35fdc00 + }; + + pp$9.skipBlockComment = function() { + var startLoc = this.options.onComment && this.curPosition(); + var start = this.pos, end = this.input.indexOf("*/", this.pos += 2); + if (end === -1) { this.raise(this.pos - 2, "Unterminated comment"); } + this.pos = end + 2; + if (this.options.locations) { + lineBreakG.lastIndex = start; + var match; + while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { + ++this.curLine; + this.lineStart = match.index + match[0].length; + } + } + if (this.options.onComment) + { this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, + startLoc, this.curPosition()); } + }; + + pp$9.skipLineComment = function(startSkip) { + var start = this.pos; + var startLoc = this.options.onComment && this.curPosition(); + var ch = this.input.charCodeAt(this.pos += startSkip); + while (this.pos < this.input.length && !isNewLine(ch)) { + ch = this.input.charCodeAt(++this.pos); + } + if (this.options.onComment) + { this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, + startLoc, this.curPosition()); } + }; + + // Called at the start of the parse and after every token. Skips + // whitespace and comments, and. + + pp$9.skipSpace = function() { + loop: while (this.pos < this.input.length) { + var ch = this.input.charCodeAt(this.pos); + switch (ch) { + case 32: case 160: // ' ' + ++this.pos; + break + case 13: + if (this.input.charCodeAt(this.pos + 1) === 10) { + ++this.pos; + } + case 10: case 8232: case 8233: + ++this.pos; + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + break + case 47: // '/' + switch (this.input.charCodeAt(this.pos + 1)) { + case 42: // '*' + this.skipBlockComment(); + break + case 47: + this.skipLineComment(2); + break + default: + break loop + } + break + default: + if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this.pos; + } else { + break loop + } + } + } + }; + + // Called at the end of every token. Sets `end`, `val`, and + // maintains `context` and `exprAllowed`, and skips the space after + // the token, so that the next one's `start` will point at the + // right position. + + pp$9.finishToken = function(type, val) { + this.end = this.pos; + if (this.options.locations) { this.endLoc = this.curPosition(); } + var prevType = this.type; + this.type = type; + this.value = val; + + this.updateContext(prevType); + }; + + // ### Token reading + + // This is the function that is called to fetch the next token. It + // is somewhat obscure, because it works in character codes rather + // than characters, and because operator parsing has been inlined + // into it. + // + // All in the name of speed. + // + pp$9.readToken_dot = function() { + var next = this.input.charCodeAt(this.pos + 1); + if (next >= 48 && next <= 57) { return this.readNumber(true) } + var next2 = this.input.charCodeAt(this.pos + 2); + if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' + this.pos += 3; + return this.finishToken(types.ellipsis) + } else { + ++this.pos; + return this.finishToken(types.dot) + } + }; + + pp$9.readToken_slash = function() { // '/' + var next = this.input.charCodeAt(this.pos + 1); + if (this.exprAllowed) { ++this.pos; return this.readRegexp() } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.slash, 1) + }; + + pp$9.readToken_mult_modulo_exp = function(code) { // '%*' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + var tokentype = code === 42 ? types.star : types.modulo; + + // exponentiation operator ** and **= + if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) { + ++size; + tokentype = types.starstar; + next = this.input.charCodeAt(this.pos + 2); + } + + if (next === 61) { return this.finishOp(types.assign, size + 1) } + return this.finishOp(tokentype, size) + }; + + pp$9.readToken_pipe_amp = function(code) { // '|&' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) { + if (this.options.ecmaVersion >= 12) { + var next2 = this.input.charCodeAt(this.pos + 2); + if (next2 === 61) { return this.finishOp(types.assign, 3) } + } + return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2) + } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1) + }; + + pp$9.readToken_caret = function() { // '^' + var next = this.input.charCodeAt(this.pos + 1); + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.bitwiseXOR, 1) + }; + + pp$9.readToken_plus_min = function(code) { // '+-' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) { + if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && + (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) { + // A `-->` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken() + } + return this.finishOp(types.incDec, 2) + } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.plusMin, 1) + }; + + pp$9.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types.assign, size + 1) } + return this.finishOp(types.bitShift, size) + } + if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && + this.input.charCodeAt(this.pos + 3) === 45) { + // `` line comment\n this.skipLineComment(3)\n this.skipSpace()\n return this.nextToken()\n }\n return this.finishOp(tt.incDec, 2)\n }\n if (next === 61) return this.finishOp(tt.assign, 2)\n return this.finishOp(tt.plusMin, 1)\n}\n\npp.readToken_lt_gt = function(code) { // '<>'\n let next = this.input.charCodeAt(this.pos + 1)\n let size = 1\n if (next === code) {\n size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2\n if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1)\n return this.finishOp(tt.bitShift, size)\n }\n if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 &&\n this.input.charCodeAt(this.pos + 3) === 45) {\n // `` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken() + } + return this.finishOp(types.incDec, 2) + } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.plusMin, 1) +}; + +pp$9.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types.assign, size + 1) } + return this.finishOp(types.bitShift, size) + } + if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && + this.input.charCodeAt(this.pos + 3) === 45) { + // `` line comment\n this.skipLineComment(3)\n this.skipSpace()\n return this.nextToken()\n }\n return this.finishOp(tt.incDec, 2)\n }\n if (next === 61) return this.finishOp(tt.assign, 2)\n return this.finishOp(tt.plusMin, 1)\n}\n\npp.readToken_lt_gt = function(code) { // '<>'\n let next = this.input.charCodeAt(this.pos + 1)\n let size = 1\n if (next === code) {\n size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2\n if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1)\n return this.finishOp(tt.bitShift, size)\n }\n if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 &&\n this.input.charCodeAt(this.pos + 3) === 45) {\n // `` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken() + } + return this.finishOp(types.incDec, 2) + } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.plusMin, 1) + }; + + pp$9.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types.assign, size + 1) } + return this.finishOp(types.bitShift, size) + } + if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && + this.input.charCodeAt(this.pos + 3) === 45) { + // `` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken() + } + return this.finishOp(types.incDec, 2) + } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.plusMin, 1) +}; + +pp$9.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types.assign, size + 1) } + return this.finishOp(types.bitShift, size) + } + if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && + this.input.charCodeAt(this.pos + 3) === 45) { + // ` + +AsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects. +Optionally it accepts abort function (should be synchronously return by iterator for each item), and terminates left over jobs upon an error event. For specific iteration order built-in (`ascending` and `descending`) and custom sort helpers also supported, via `asynckit.serialOrdered` method. + +It ensures async operations to keep behavior more stable and prevent `Maximum call stack size exceeded` errors, from sync iterators. + +| compression | size | +| :----------------- | -------: | +| asynckit.js | 12.34 kB | +| asynckit.min.js | 4.11 kB | +| asynckit.min.js.gz | 1.47 kB | + + +## Install + +```sh +$ npm install --save asynckit +``` + +## Examples + +### Parallel Jobs + +Runs iterator over provided array in parallel. Stores output in the `result` array, +on the matching positions. In unlikely event of an error from one of the jobs, +will terminate rest of the active jobs (if abort function is provided) +and return error along with salvaged data to the main callback function. + +#### Input Array + +```javascript +var parallel = require('asynckit').parallel + , assert = require('assert') + ; + +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] + , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] + , target = [] + ; + +parallel(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); +}); + +// async job accepts one element from the array +// and a callback function +function asyncJob(item, cb) +{ + // different delays (in ms) per item + var delay = item * 25; + + // pretend different jobs take different time to finish + // and not in consequential order + var timeoutId = setTimeout(function() { + target.push(item); + cb(null, item * 2); + }, delay); + + // allow to cancel "leftover" jobs upon error + // return function, invoking of which will abort this job + return clearTimeout.bind(null, timeoutId); +} +``` + +More examples could be found in [test/test-parallel-array.js](test/test-parallel-array.js). + +#### Input Object + +Also it supports named jobs, listed via object. + +```javascript +var parallel = require('asynckit/parallel') + , assert = require('assert') + ; + +var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } + , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } + , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] + , expectedKeys = [ 'first', 'one', 'two', 'four', 'eight', 'sixteen', 'thirtyTwo', 'sixtyFour' ] + , target = [] + , keys = [] + ; + +parallel(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); + assert.deepEqual(keys, expectedKeys); +}); + +// supports full value, key, callback (shortcut) interface +function asyncJob(item, key, cb) +{ + // different delays (in ms) per item + var delay = item * 25; + + // pretend different jobs take different time to finish + // and not in consequential order + var timeoutId = setTimeout(function() { + keys.push(key); + target.push(item); + cb(null, item * 2); + }, delay); + + // allow to cancel "leftover" jobs upon error + // return function, invoking of which will abort this job + return clearTimeout.bind(null, timeoutId); +} +``` + +More examples could be found in [test/test-parallel-object.js](test/test-parallel-object.js). + +### Serial Jobs + +Runs iterator over provided array sequentially. Stores output in the `result` array, +on the matching positions. In unlikely event of an error from one of the jobs, +will not proceed to the rest of the items in the list +and return error along with salvaged data to the main callback function. + +#### Input Array + +```javascript +var serial = require('asynckit/serial') + , assert = require('assert') + ; + +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] + , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] + , target = [] + ; + +serial(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); +}); + +// extended interface (item, key, callback) +// also supported for arrays +function asyncJob(item, key, cb) +{ + target.push(key); + + // it will be automatically made async + // even it iterator "returns" in the same event loop + cb(null, item * 2); +} +``` + +More examples could be found in [test/test-serial-array.js](test/test-serial-array.js). + +#### Input Object + +Also it supports named jobs, listed via object. + +```javascript +var serial = require('asynckit').serial + , assert = require('assert') + ; + +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] + , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] + , target = [] + ; + +var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } + , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } + , expectedTarget = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , target = [] + ; + + +serial(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); +}); + +// shortcut interface (item, callback) +// works for object as well as for the arrays +function asyncJob(item, cb) +{ + target.push(item); + + // it will be automatically made async + // even it iterator "returns" in the same event loop + cb(null, item * 2); +} +``` + +More examples could be found in [test/test-serial-object.js](test/test-serial-object.js). + +_Note: Since _object_ is an _unordered_ collection of properties, +it may produce unexpected results with sequential iterations. +Whenever order of the jobs' execution is important please use `serialOrdered` method._ + +### Ordered Serial Iterations + +TBD + +For example [compare-property](compare-property) package. + +### Streaming interface + +TBD + +## Want to Know More? + +More examples can be found in [test folder](test/). + +Or open an [issue](https://github.com/alexindigo/asynckit/issues) with questions and/or suggestions. + +## License + +AsyncKit is licensed under the MIT license. diff --git a/node_modules/asynckit/bench.js b/node_modules/asynckit/bench.js new file mode 100644 index 0000000..c612f1a --- /dev/null +++ b/node_modules/asynckit/bench.js @@ -0,0 +1,76 @@ +/* eslint no-console: "off" */ + +var asynckit = require('./') + , async = require('async') + , assert = require('assert') + , expected = 0 + ; + +var Benchmark = require('benchmark'); +var suite = new Benchmark.Suite; + +var source = []; +for (var z = 1; z < 100; z++) +{ + source.push(z); + expected += z; +} + +suite +// add tests + +.add('async.map', function(deferred) +{ + var total = 0; + + async.map(source, + function(i, cb) + { + setImmediate(function() + { + total += i; + cb(null, total); + }); + }, + function(err, result) + { + assert.ifError(err); + assert.equal(result[result.length - 1], expected); + deferred.resolve(); + }); +}, {'defer': true}) + + +.add('asynckit.parallel', function(deferred) +{ + var total = 0; + + asynckit.parallel(source, + function(i, cb) + { + setImmediate(function() + { + total += i; + cb(null, total); + }); + }, + function(err, result) + { + assert.ifError(err); + assert.equal(result[result.length - 1], expected); + deferred.resolve(); + }); +}, {'defer': true}) + + +// add listeners +.on('cycle', function(ev) +{ + console.log(String(ev.target)); +}) +.on('complete', function() +{ + console.log('Fastest is ' + this.filter('fastest').map('name')); +}) +// run async +.run({ 'async': true }); diff --git a/node_modules/asynckit/index.js b/node_modules/asynckit/index.js new file mode 100644 index 0000000..455f945 --- /dev/null +++ b/node_modules/asynckit/index.js @@ -0,0 +1,6 @@ +module.exports = +{ + parallel : require('./parallel.js'), + serial : require('./serial.js'), + serialOrdered : require('./serialOrdered.js') +}; diff --git a/node_modules/asynckit/lib/abort.js b/node_modules/asynckit/lib/abort.js new file mode 100644 index 0000000..114367e --- /dev/null +++ b/node_modules/asynckit/lib/abort.js @@ -0,0 +1,29 @@ +// API +module.exports = abort; + +/** + * Aborts leftover active jobs + * + * @param {object} state - current state object + */ +function abort(state) +{ + Object.keys(state.jobs).forEach(clean.bind(state)); + + // reset leftover jobs + state.jobs = {}; +} + +/** + * Cleans up leftover job by invoking abort function for the provided job id + * + * @this state + * @param {string|number} key - job id to abort + */ +function clean(key) +{ + if (typeof this.jobs[key] == 'function') + { + this.jobs[key](); + } +} diff --git a/node_modules/asynckit/lib/async.js b/node_modules/asynckit/lib/async.js new file mode 100644 index 0000000..7f1288a --- /dev/null +++ b/node_modules/asynckit/lib/async.js @@ -0,0 +1,34 @@ +var defer = require('./defer.js'); + +// API +module.exports = async; + +/** + * Runs provided callback asynchronously + * even if callback itself is not + * + * @param {function} callback - callback to invoke + * @returns {function} - augmented callback + */ +function async(callback) +{ + var isAsync = false; + + // check if async happened + defer(function() { isAsync = true; }); + + return function async_callback(err, result) + { + if (isAsync) + { + callback(err, result); + } + else + { + defer(function nextTick_callback() + { + callback(err, result); + }); + } + }; +} diff --git a/node_modules/asynckit/lib/defer.js b/node_modules/asynckit/lib/defer.js new file mode 100644 index 0000000..b67110c --- /dev/null +++ b/node_modules/asynckit/lib/defer.js @@ -0,0 +1,26 @@ +module.exports = defer; + +/** + * Runs provided function on next iteration of the event loop + * + * @param {function} fn - function to run + */ +function defer(fn) +{ + var nextTick = typeof setImmediate == 'function' + ? setImmediate + : ( + typeof process == 'object' && typeof process.nextTick == 'function' + ? process.nextTick + : null + ); + + if (nextTick) + { + nextTick(fn); + } + else + { + setTimeout(fn, 0); + } +} diff --git a/node_modules/asynckit/lib/iterate.js b/node_modules/asynckit/lib/iterate.js new file mode 100644 index 0000000..5d2839a --- /dev/null +++ b/node_modules/asynckit/lib/iterate.js @@ -0,0 +1,75 @@ +var async = require('./async.js') + , abort = require('./abort.js') + ; + +// API +module.exports = iterate; + +/** + * Iterates over each job object + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {object} state - current job status + * @param {function} callback - invoked when all elements processed + */ +function iterate(list, iterator, state, callback) +{ + // store current index + var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; + + state.jobs[key] = runJob(iterator, key, list[key], function(error, output) + { + // don't repeat yourself + // skip secondary callbacks + if (!(key in state.jobs)) + { + return; + } + + // clean up jobs + delete state.jobs[key]; + + if (error) + { + // don't process rest of the results + // stop still active jobs + // and reset the list + abort(state); + } + else + { + state.results[key] = output; + } + + // return salvaged results + callback(error, state.results); + }); +} + +/** + * Runs iterator over provided job element + * + * @param {function} iterator - iterator to invoke + * @param {string|number} key - key/index of the element in the list of jobs + * @param {mixed} item - job description + * @param {function} callback - invoked after iterator is done with the job + * @returns {function|mixed} - job abort function or something else + */ +function runJob(iterator, key, item, callback) +{ + var aborter; + + // allow shortcut if iterator expects only two arguments + if (iterator.length == 2) + { + aborter = iterator(item, async(callback)); + } + // otherwise go with full three arguments + else + { + aborter = iterator(item, key, async(callback)); + } + + return aborter; +} diff --git a/node_modules/asynckit/lib/readable_asynckit.js b/node_modules/asynckit/lib/readable_asynckit.js new file mode 100644 index 0000000..78ad240 --- /dev/null +++ b/node_modules/asynckit/lib/readable_asynckit.js @@ -0,0 +1,91 @@ +var streamify = require('./streamify.js') + , defer = require('./defer.js') + ; + +// API +module.exports = ReadableAsyncKit; + +/** + * Base constructor for all streams + * used to hold properties/methods + */ +function ReadableAsyncKit() +{ + ReadableAsyncKit.super_.apply(this, arguments); + + // list of active jobs + this.jobs = {}; + + // add stream methods + this.destroy = destroy; + this._start = _start; + this._read = _read; +} + +/** + * Destroys readable stream, + * by aborting outstanding jobs + * + * @returns {void} + */ +function destroy() +{ + if (this.destroyed) + { + return; + } + + this.destroyed = true; + + if (typeof this.terminator == 'function') + { + this.terminator(); + } +} + +/** + * Starts provided jobs in async manner + * + * @private + */ +function _start() +{ + // first argument – runner function + var runner = arguments[0] + // take away first argument + , args = Array.prototype.slice.call(arguments, 1) + // second argument - input data + , input = args[0] + // last argument - result callback + , endCb = streamify.callback.call(this, args[args.length - 1]) + ; + + args[args.length - 1] = endCb; + // third argument - iterator + args[1] = streamify.iterator.call(this, args[1]); + + // allow time for proper setup + defer(function() + { + if (!this.destroyed) + { + this.terminator = runner.apply(null, args); + } + else + { + endCb(null, Array.isArray(input) ? [] : {}); + } + }.bind(this)); +} + + +/** + * Implement _read to comply with Readable streams + * Doesn't really make sense for flowing object mode + * + * @private + */ +function _read() +{ + +} diff --git a/node_modules/asynckit/lib/readable_parallel.js b/node_modules/asynckit/lib/readable_parallel.js new file mode 100644 index 0000000..5d2929f --- /dev/null +++ b/node_modules/asynckit/lib/readable_parallel.js @@ -0,0 +1,25 @@ +var parallel = require('../parallel.js'); + +// API +module.exports = ReadableParallel; + +/** + * Streaming wrapper to `asynckit.parallel` + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {stream.Readable#} + */ +function ReadableParallel(list, iterator, callback) +{ + if (!(this instanceof ReadableParallel)) + { + return new ReadableParallel(list, iterator, callback); + } + + // turn on object mode + ReadableParallel.super_.call(this, {objectMode: true}); + + this._start(parallel, list, iterator, callback); +} diff --git a/node_modules/asynckit/lib/readable_serial.js b/node_modules/asynckit/lib/readable_serial.js new file mode 100644 index 0000000..7822698 --- /dev/null +++ b/node_modules/asynckit/lib/readable_serial.js @@ -0,0 +1,25 @@ +var serial = require('../serial.js'); + +// API +module.exports = ReadableSerial; + +/** + * Streaming wrapper to `asynckit.serial` + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {stream.Readable#} + */ +function ReadableSerial(list, iterator, callback) +{ + if (!(this instanceof ReadableSerial)) + { + return new ReadableSerial(list, iterator, callback); + } + + // turn on object mode + ReadableSerial.super_.call(this, {objectMode: true}); + + this._start(serial, list, iterator, callback); +} diff --git a/node_modules/asynckit/lib/readable_serial_ordered.js b/node_modules/asynckit/lib/readable_serial_ordered.js new file mode 100644 index 0000000..3de89c4 --- /dev/null +++ b/node_modules/asynckit/lib/readable_serial_ordered.js @@ -0,0 +1,29 @@ +var serialOrdered = require('../serialOrdered.js'); + +// API +module.exports = ReadableSerialOrdered; +// expose sort helpers +module.exports.ascending = serialOrdered.ascending; +module.exports.descending = serialOrdered.descending; + +/** + * Streaming wrapper to `asynckit.serialOrdered` + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} sortMethod - custom sort function + * @param {function} callback - invoked when all elements processed + * @returns {stream.Readable#} + */ +function ReadableSerialOrdered(list, iterator, sortMethod, callback) +{ + if (!(this instanceof ReadableSerialOrdered)) + { + return new ReadableSerialOrdered(list, iterator, sortMethod, callback); + } + + // turn on object mode + ReadableSerialOrdered.super_.call(this, {objectMode: true}); + + this._start(serialOrdered, list, iterator, sortMethod, callback); +} diff --git a/node_modules/asynckit/lib/state.js b/node_modules/asynckit/lib/state.js new file mode 100644 index 0000000..cbea7ad --- /dev/null +++ b/node_modules/asynckit/lib/state.js @@ -0,0 +1,37 @@ +// API +module.exports = state; + +/** + * Creates initial state object + * for iteration over list + * + * @param {array|object} list - list to iterate over + * @param {function|null} sortMethod - function to use for keys sort, + * or `null` to keep them as is + * @returns {object} - initial state object + */ +function state(list, sortMethod) +{ + var isNamedList = !Array.isArray(list) + , initState = + { + index : 0, + keyedList: isNamedList || sortMethod ? Object.keys(list) : null, + jobs : {}, + results : isNamedList ? {} : [], + size : isNamedList ? Object.keys(list).length : list.length + } + ; + + if (sortMethod) + { + // sort array keys based on it's values + // sort object's keys just on own merit + initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) + { + return sortMethod(list[a], list[b]); + }); + } + + return initState; +} diff --git a/node_modules/asynckit/lib/streamify.js b/node_modules/asynckit/lib/streamify.js new file mode 100644 index 0000000..f56a1c9 --- /dev/null +++ b/node_modules/asynckit/lib/streamify.js @@ -0,0 +1,141 @@ +var async = require('./async.js'); + +// API +module.exports = { + iterator: wrapIterator, + callback: wrapCallback +}; + +/** + * Wraps iterators with long signature + * + * @this ReadableAsyncKit# + * @param {function} iterator - function to wrap + * @returns {function} - wrapped function + */ +function wrapIterator(iterator) +{ + var stream = this; + + return function(item, key, cb) + { + var aborter + , wrappedCb = async(wrapIteratorCallback.call(stream, cb, key)) + ; + + stream.jobs[key] = wrappedCb; + + // it's either shortcut (item, cb) + if (iterator.length == 2) + { + aborter = iterator(item, wrappedCb); + } + // or long format (item, key, cb) + else + { + aborter = iterator(item, key, wrappedCb); + } + + return aborter; + }; +} + +/** + * Wraps provided callback function + * allowing to execute snitch function before + * real callback + * + * @this ReadableAsyncKit# + * @param {function} callback - function to wrap + * @returns {function} - wrapped function + */ +function wrapCallback(callback) +{ + var stream = this; + + var wrapped = function(error, result) + { + return finisher.call(stream, error, result, callback); + }; + + return wrapped; +} + +/** + * Wraps provided iterator callback function + * makes sure snitch only called once, + * but passes secondary calls to the original callback + * + * @this ReadableAsyncKit# + * @param {function} callback - callback to wrap + * @param {number|string} key - iteration key + * @returns {function} wrapped callback + */ +function wrapIteratorCallback(callback, key) +{ + var stream = this; + + return function(error, output) + { + // don't repeat yourself + if (!(key in stream.jobs)) + { + callback(error, output); + return; + } + + // clean up jobs + delete stream.jobs[key]; + + return streamer.call(stream, error, {key: key, value: output}, callback); + }; +} + +/** + * Stream wrapper for iterator callback + * + * @this ReadableAsyncKit# + * @param {mixed} error - error response + * @param {mixed} output - iterator output + * @param {function} callback - callback that expects iterator results + */ +function streamer(error, output, callback) +{ + if (error && !this.error) + { + this.error = error; + this.pause(); + this.emit('error', error); + // send back value only, as expected + callback(error, output && output.value); + return; + } + + // stream stuff + this.push(output); + + // back to original track + // send back value only, as expected + callback(error, output && output.value); +} + +/** + * Stream wrapper for finishing callback + * + * @this ReadableAsyncKit# + * @param {mixed} error - error response + * @param {mixed} output - iterator output + * @param {function} callback - callback that expects final results + */ +function finisher(error, output, callback) +{ + // signal end of the stream + // only for successfully finished streams + if (!error) + { + this.push(null); + } + + // back to original track + callback(error, output); +} diff --git a/node_modules/asynckit/lib/terminator.js b/node_modules/asynckit/lib/terminator.js new file mode 100644 index 0000000..d6eb992 --- /dev/null +++ b/node_modules/asynckit/lib/terminator.js @@ -0,0 +1,29 @@ +var abort = require('./abort.js') + , async = require('./async.js') + ; + +// API +module.exports = terminator; + +/** + * Terminates jobs in the attached state context + * + * @this AsyncKitState# + * @param {function} callback - final callback to invoke after termination + */ +function terminator(callback) +{ + if (!Object.keys(this.jobs).length) + { + return; + } + + // fast forward iteration index + this.index = this.size; + + // abort jobs + abort(this); + + // send back results we have so far + async(callback)(null, this.results); +} diff --git a/node_modules/asynckit/package.json b/node_modules/asynckit/package.json new file mode 100644 index 0000000..51147d6 --- /dev/null +++ b/node_modules/asynckit/package.json @@ -0,0 +1,63 @@ +{ + "name": "asynckit", + "version": "0.4.0", + "description": "Minimal async jobs utility library, with streams support", + "main": "index.js", + "scripts": { + "clean": "rimraf coverage", + "lint": "eslint *.js lib/*.js test/*.js", + "test": "istanbul cover --reporter=json tape -- 'test/test-*.js' | tap-spec", + "win-test": "tape test/test-*.js", + "browser": "browserify -t browserify-istanbul test/lib/browserify_adjustment.js test/test-*.js | obake --coverage | tap-spec", + "report": "istanbul report", + "size": "browserify index.js | size-table asynckit", + "debug": "tape test/test-*.js" + }, + "pre-commit": [ + "clean", + "lint", + "test", + "browser", + "report", + "size" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/alexindigo/asynckit.git" + }, + "keywords": [ + "async", + "jobs", + "parallel", + "serial", + "iterator", + "array", + "object", + "stream", + "destroy", + "terminate", + "abort" + ], + "author": "Alex Indigo ", + "license": "MIT", + "bugs": { + "url": "https://github.com/alexindigo/asynckit/issues" + }, + "homepage": "https://github.com/alexindigo/asynckit#readme", + "devDependencies": { + "browserify": "^13.0.0", + "browserify-istanbul": "^2.0.0", + "coveralls": "^2.11.9", + "eslint": "^2.9.0", + "istanbul": "^0.4.3", + "obake": "^0.1.2", + "phantomjs-prebuilt": "^2.1.7", + "pre-commit": "^1.1.3", + "reamde": "^1.1.0", + "rimraf": "^2.5.2", + "size-table": "^0.2.0", + "tap-spec": "^4.1.1", + "tape": "^4.5.1" + }, + "dependencies": {} +} diff --git a/node_modules/asynckit/parallel.js b/node_modules/asynckit/parallel.js new file mode 100644 index 0000000..3c50344 --- /dev/null +++ b/node_modules/asynckit/parallel.js @@ -0,0 +1,43 @@ +var iterate = require('./lib/iterate.js') + , initState = require('./lib/state.js') + , terminator = require('./lib/terminator.js') + ; + +// Public API +module.exports = parallel; + +/** + * Runs iterator over provided array elements in parallel + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function parallel(list, iterator, callback) +{ + var state = initState(list); + + while (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, function(error, result) + { + if (error) + { + callback(error, result); + return; + } + + // looks like it's the last one + if (Object.keys(state.jobs).length === 0) + { + callback(null, state.results); + return; + } + }); + + state.index++; + } + + return terminator.bind(state, callback); +} diff --git a/node_modules/asynckit/serial.js b/node_modules/asynckit/serial.js new file mode 100644 index 0000000..6cd949a --- /dev/null +++ b/node_modules/asynckit/serial.js @@ -0,0 +1,17 @@ +var serialOrdered = require('./serialOrdered.js'); + +// Public API +module.exports = serial; + +/** + * Runs iterator over provided array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serial(list, iterator, callback) +{ + return serialOrdered(list, iterator, null, callback); +} diff --git a/node_modules/asynckit/serialOrdered.js b/node_modules/asynckit/serialOrdered.js new file mode 100644 index 0000000..607eafe --- /dev/null +++ b/node_modules/asynckit/serialOrdered.js @@ -0,0 +1,75 @@ +var iterate = require('./lib/iterate.js') + , initState = require('./lib/state.js') + , terminator = require('./lib/terminator.js') + ; + +// Public API +module.exports = serialOrdered; +// sorting helpers +module.exports.ascending = ascending; +module.exports.descending = descending; + +/** + * Runs iterator over provided sorted array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} sortMethod - custom sort function + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serialOrdered(list, iterator, sortMethod, callback) +{ + var state = initState(list, sortMethod); + + iterate(list, iterator, state, function iteratorHandler(error, result) + { + if (error) + { + callback(error, result); + return; + } + + state.index++; + + // are we there yet? + if (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, iteratorHandler); + return; + } + + // done here + callback(null, state.results); + }); + + return terminator.bind(state, callback); +} + +/* + * -- Sort methods + */ + +/** + * sort helper to sort array elements in ascending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function ascending(a, b) +{ + return a < b ? -1 : a > b ? 1 : 0; +} + +/** + * sort helper to sort array elements in descending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function descending(a, b) +{ + return -1 * ascending(a, b); +} diff --git a/node_modules/asynckit/stream.js b/node_modules/asynckit/stream.js new file mode 100644 index 0000000..d43465f --- /dev/null +++ b/node_modules/asynckit/stream.js @@ -0,0 +1,21 @@ +var inherits = require('util').inherits + , Readable = require('stream').Readable + , ReadableAsyncKit = require('./lib/readable_asynckit.js') + , ReadableParallel = require('./lib/readable_parallel.js') + , ReadableSerial = require('./lib/readable_serial.js') + , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js') + ; + +// API +module.exports = +{ + parallel : ReadableParallel, + serial : ReadableSerial, + serialOrdered : ReadableSerialOrdered, +}; + +inherits(ReadableAsyncKit, Readable); + +inherits(ReadableParallel, ReadableAsyncKit); +inherits(ReadableSerial, ReadableAsyncKit); +inherits(ReadableSerialOrdered, ReadableAsyncKit); diff --git a/node_modules/browser-process-hrtime/LICENSE b/node_modules/browser-process-hrtime/LICENSE new file mode 100644 index 0000000..d78d076 --- /dev/null +++ b/node_modules/browser-process-hrtime/LICENSE @@ -0,0 +1,9 @@ +Copyright 2014 kumavis + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/browser-process-hrtime/README.md b/node_modules/browser-process-hrtime/README.md new file mode 100644 index 0000000..ec0ebc2 --- /dev/null +++ b/node_modules/browser-process-hrtime/README.md @@ -0,0 +1,27 @@ +# browser-process-hrtime + +Browser shim for Node.js `process.hrtime()`. +See [documentation at nodejs.org](http://nodejs.org/api/process.html#process_process_hrtime) + +This module does not provide the same level of time precision as node.js, but provides a matching API and response format. + +### usage +Use hrtime independent of environment (node or browser). +It will use `process.hrtime` first and fallback if not present. +```js +const hrtime = require('browser-process-hrtime') +const start = hrtime() +// ... +const delta = hrtime(start) +``` + +### monkey-patching +You can monkey-patch `process.hrtime` for your dependency graph like this: +```js +process.hrtime = require('browser-process-hrtime') +const coolTool = require('module-that-uses-hrtime-somewhere-in-its-depths') +``` + +### note +This was originally pull-requested against [node-process](https://github.com/defunctzombie/node-process), +but they are trying to stay lean. diff --git a/node_modules/browser-process-hrtime/index.d.ts b/node_modules/browser-process-hrtime/index.d.ts new file mode 100644 index 0000000..90e3988 --- /dev/null +++ b/node_modules/browser-process-hrtime/index.d.ts @@ -0,0 +1,4 @@ +declare module "browser-process-hrtime" { + function hrtime(time?: [number, number]): [number, number]; + export = hrtime; +} diff --git a/node_modules/browser-process-hrtime/index.js b/node_modules/browser-process-hrtime/index.js new file mode 100644 index 0000000..7312c2c --- /dev/null +++ b/node_modules/browser-process-hrtime/index.js @@ -0,0 +1,28 @@ +module.exports = process.hrtime || hrtime + +// polyfil for window.performance.now +var performance = global.performance || {} +var performanceNow = + performance.now || + performance.mozNow || + performance.msNow || + performance.oNow || + performance.webkitNow || + function(){ return (new Date()).getTime() } + +// generate timestamp or delta +// see http://nodejs.org/api/process.html#process_process_hrtime +function hrtime(previousTimestamp){ + var clocktime = performanceNow.call(performance)*1e-3 + var seconds = Math.floor(clocktime) + var nanoseconds = Math.floor((clocktime%1)*1e9) + if (previousTimestamp) { + seconds = seconds - previousTimestamp[0] + nanoseconds = nanoseconds - previousTimestamp[1] + if (nanoseconds<0) { + seconds-- + nanoseconds += 1e9 + } + } + return [seconds,nanoseconds] +} \ No newline at end of file diff --git a/node_modules/browser-process-hrtime/package.json b/node_modules/browser-process-hrtime/package.json new file mode 100644 index 0000000..f9449cf --- /dev/null +++ b/node_modules/browser-process-hrtime/package.json @@ -0,0 +1,15 @@ +{ + "name": "browser-process-hrtime", + "version": "1.0.0", + "description": "Shim for process.hrtime in the browser", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git://github.com/kumavis/browser-process-hrtime.git" + }, + "author": "kumavis", + "license": "BSD-2-Clause" +} diff --git a/node_modules/combined-stream/License b/node_modules/combined-stream/License new file mode 100644 index 0000000..4804b7a --- /dev/null +++ b/node_modules/combined-stream/License @@ -0,0 +1,19 @@ +Copyright (c) 2011 Debuggable Limited + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/combined-stream/Readme.md b/node_modules/combined-stream/Readme.md new file mode 100644 index 0000000..9e367b5 --- /dev/null +++ b/node_modules/combined-stream/Readme.md @@ -0,0 +1,138 @@ +# combined-stream + +A stream that emits multiple other streams one after another. + +**NB** Currently `combined-stream` works with streams version 1 only. There is ongoing effort to switch this library to streams version 2. Any help is welcome. :) Meanwhile you can explore other libraries that provide streams2 support with more or less compatibility with `combined-stream`. + +- [combined-stream2](https://www.npmjs.com/package/combined-stream2): A drop-in streams2-compatible replacement for the combined-stream module. + +- [multistream](https://www.npmjs.com/package/multistream): A stream that emits multiple other streams one after another. + +## Installation + +``` bash +npm install combined-stream +``` + +## Usage + +Here is a simple example that shows how you can use combined-stream to combine +two files into one: + +``` javascript +var CombinedStream = require('combined-stream'); +var fs = require('fs'); + +var combinedStream = CombinedStream.create(); +combinedStream.append(fs.createReadStream('file1.txt')); +combinedStream.append(fs.createReadStream('file2.txt')); + +combinedStream.pipe(fs.createWriteStream('combined.txt')); +``` + +While the example above works great, it will pause all source streams until +they are needed. If you don't want that to happen, you can set `pauseStreams` +to `false`: + +``` javascript +var CombinedStream = require('combined-stream'); +var fs = require('fs'); + +var combinedStream = CombinedStream.create({pauseStreams: false}); +combinedStream.append(fs.createReadStream('file1.txt')); +combinedStream.append(fs.createReadStream('file2.txt')); + +combinedStream.pipe(fs.createWriteStream('combined.txt')); +``` + +However, what if you don't have all the source streams yet, or you don't want +to allocate the resources (file descriptors, memory, etc.) for them right away? +Well, in that case you can simply provide a callback that supplies the stream +by calling a `next()` function: + +``` javascript +var CombinedStream = require('combined-stream'); +var fs = require('fs'); + +var combinedStream = CombinedStream.create(); +combinedStream.append(function(next) { + next(fs.createReadStream('file1.txt')); +}); +combinedStream.append(function(next) { + next(fs.createReadStream('file2.txt')); +}); + +combinedStream.pipe(fs.createWriteStream('combined.txt')); +``` + +## API + +### CombinedStream.create([options]) + +Returns a new combined stream object. Available options are: + +* `maxDataSize` +* `pauseStreams` + +The effect of those options is described below. + +### combinedStream.pauseStreams = `true` + +Whether to apply back pressure to the underlaying streams. If set to `false`, +the underlaying streams will never be paused. If set to `true`, the +underlaying streams will be paused right after being appended, as well as when +`delayedStream.pipe()` wants to throttle. + +### combinedStream.maxDataSize = `2 * 1024 * 1024` + +The maximum amount of bytes (or characters) to buffer for all source streams. +If this value is exceeded, `combinedStream` emits an `'error'` event. + +### combinedStream.dataSize = `0` + +The amount of bytes (or characters) currently buffered by `combinedStream`. + +### combinedStream.append(stream) + +Appends the given `stream` to the combinedStream object. If `pauseStreams` is +set to `true, this stream will also be paused right away. + +`streams` can also be a function that takes one parameter called `next`. `next` +is a function that must be invoked in order to provide the `next` stream, see +example above. + +Regardless of how the `stream` is appended, combined-stream always attaches an +`'error'` listener to it, so you don't have to do that manually. + +Special case: `stream` can also be a String or Buffer. + +### combinedStream.write(data) + +You should not call this, `combinedStream` takes care of piping the appended +streams into itself for you. + +### combinedStream.resume() + +Causes `combinedStream` to start drain the streams it manages. The function is +idempotent, and also emits a `'resume'` event each time which usually goes to +the stream that is currently being drained. + +### combinedStream.pause(); + +If `combinedStream.pauseStreams` is set to `false`, this does nothing. +Otherwise a `'pause'` event is emitted, this goes to the stream that is +currently being drained, so you can use it to apply back pressure. + +### combinedStream.end(); + +Sets `combinedStream.writable` to false, emits an `'end'` event, and removes +all streams from the queue. + +### combinedStream.destroy(); + +Same as `combinedStream.end()`, except it emits a `'close'` event instead of +`'end'`. + +## License + +combined-stream is licensed under the MIT license. diff --git a/node_modules/combined-stream/lib/combined_stream.js b/node_modules/combined-stream/lib/combined_stream.js new file mode 100644 index 0000000..125f097 --- /dev/null +++ b/node_modules/combined-stream/lib/combined_stream.js @@ -0,0 +1,208 @@ +var util = require('util'); +var Stream = require('stream').Stream; +var DelayedStream = require('delayed-stream'); + +module.exports = CombinedStream; +function CombinedStream() { + this.writable = false; + this.readable = true; + this.dataSize = 0; + this.maxDataSize = 2 * 1024 * 1024; + this.pauseStreams = true; + + this._released = false; + this._streams = []; + this._currentStream = null; + this._insideLoop = false; + this._pendingNext = false; +} +util.inherits(CombinedStream, Stream); + +CombinedStream.create = function(options) { + var combinedStream = new this(); + + options = options || {}; + for (var option in options) { + combinedStream[option] = options[option]; + } + + return combinedStream; +}; + +CombinedStream.isStreamLike = function(stream) { + return (typeof stream !== 'function') + && (typeof stream !== 'string') + && (typeof stream !== 'boolean') + && (typeof stream !== 'number') + && (!Buffer.isBuffer(stream)); +}; + +CombinedStream.prototype.append = function(stream) { + var isStreamLike = CombinedStream.isStreamLike(stream); + + if (isStreamLike) { + if (!(stream instanceof DelayedStream)) { + var newStream = DelayedStream.create(stream, { + maxDataSize: Infinity, + pauseStream: this.pauseStreams, + }); + stream.on('data', this._checkDataSize.bind(this)); + stream = newStream; + } + + this._handleErrors(stream); + + if (this.pauseStreams) { + stream.pause(); + } + } + + this._streams.push(stream); + return this; +}; + +CombinedStream.prototype.pipe = function(dest, options) { + Stream.prototype.pipe.call(this, dest, options); + this.resume(); + return dest; +}; + +CombinedStream.prototype._getNext = function() { + this._currentStream = null; + + if (this._insideLoop) { + this._pendingNext = true; + return; // defer call + } + + this._insideLoop = true; + try { + do { + this._pendingNext = false; + this._realGetNext(); + } while (this._pendingNext); + } finally { + this._insideLoop = false; + } +}; + +CombinedStream.prototype._realGetNext = function() { + var stream = this._streams.shift(); + + + if (typeof stream == 'undefined') { + this.end(); + return; + } + + if (typeof stream !== 'function') { + this._pipeNext(stream); + return; + } + + var getStream = stream; + getStream(function(stream) { + var isStreamLike = CombinedStream.isStreamLike(stream); + if (isStreamLike) { + stream.on('data', this._checkDataSize.bind(this)); + this._handleErrors(stream); + } + + this._pipeNext(stream); + }.bind(this)); +}; + +CombinedStream.prototype._pipeNext = function(stream) { + this._currentStream = stream; + + var isStreamLike = CombinedStream.isStreamLike(stream); + if (isStreamLike) { + stream.on('end', this._getNext.bind(this)); + stream.pipe(this, {end: false}); + return; + } + + var value = stream; + this.write(value); + this._getNext(); +}; + +CombinedStream.prototype._handleErrors = function(stream) { + var self = this; + stream.on('error', function(err) { + self._emitError(err); + }); +}; + +CombinedStream.prototype.write = function(data) { + this.emit('data', data); +}; + +CombinedStream.prototype.pause = function() { + if (!this.pauseStreams) { + return; + } + + if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause(); + this.emit('pause'); +}; + +CombinedStream.prototype.resume = function() { + if (!this._released) { + this._released = true; + this.writable = true; + this._getNext(); + } + + if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume(); + this.emit('resume'); +}; + +CombinedStream.prototype.end = function() { + this._reset(); + this.emit('end'); +}; + +CombinedStream.prototype.destroy = function() { + this._reset(); + this.emit('close'); +}; + +CombinedStream.prototype._reset = function() { + this.writable = false; + this._streams = []; + this._currentStream = null; +}; + +CombinedStream.prototype._checkDataSize = function() { + this._updateDataSize(); + if (this.dataSize <= this.maxDataSize) { + return; + } + + var message = + 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'; + this._emitError(new Error(message)); +}; + +CombinedStream.prototype._updateDataSize = function() { + this.dataSize = 0; + + var self = this; + this._streams.forEach(function(stream) { + if (!stream.dataSize) { + return; + } + + self.dataSize += stream.dataSize; + }); + + if (this._currentStream && this._currentStream.dataSize) { + this.dataSize += this._currentStream.dataSize; + } +}; + +CombinedStream.prototype._emitError = function(err) { + this._reset(); + this.emit('error', err); +}; diff --git a/node_modules/combined-stream/package.json b/node_modules/combined-stream/package.json new file mode 100644 index 0000000..6982b6d --- /dev/null +++ b/node_modules/combined-stream/package.json @@ -0,0 +1,25 @@ +{ + "author": "Felix Geisendörfer (http://debuggable.com/)", + "name": "combined-stream", + "description": "A stream that emits multiple other streams one after another.", + "version": "1.0.8", + "homepage": "https://github.com/felixge/node-combined-stream", + "repository": { + "type": "git", + "url": "git://github.com/felixge/node-combined-stream.git" + }, + "main": "./lib/combined_stream", + "scripts": { + "test": "node test/run.js" + }, + "engines": { + "node": ">= 0.8" + }, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "devDependencies": { + "far": "~0.0.7" + }, + "license": "MIT" +} diff --git a/node_modules/combined-stream/yarn.lock b/node_modules/combined-stream/yarn.lock new file mode 100644 index 0000000..7edf418 --- /dev/null +++ b/node_modules/combined-stream/yarn.lock @@ -0,0 +1,17 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +far@~0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/far/-/far-0.0.7.tgz#01c1fd362bcd26ce9cf161af3938aa34619f79a7" + dependencies: + oop "0.0.3" + +oop@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/oop/-/oop-0.0.3.tgz#70fa405a5650891a194fdc82ca68dad6dabf4401" diff --git a/node_modules/cssom/LICENSE.txt b/node_modules/cssom/LICENSE.txt new file mode 100644 index 0000000..bc57aac --- /dev/null +++ b/node_modules/cssom/LICENSE.txt @@ -0,0 +1,20 @@ +Copyright (c) Nikita Vasilyev + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/cssom/README.mdown b/node_modules/cssom/README.mdown new file mode 100644 index 0000000..83af16b --- /dev/null +++ b/node_modules/cssom/README.mdown @@ -0,0 +1,67 @@ +# CSSOM + +CSSOM.js is a CSS parser written in pure JavaScript. It is also a partial implementation of [CSS Object Model](http://dev.w3.org/csswg/cssom/). + + CSSOM.parse("body {color: black}") + -> { + cssRules: [ + { + selectorText: "body", + style: { + 0: "color", + color: "black", + length: 1 + } + } + ] + } + + +## [Parser demo](http://nv.github.com/CSSOM/docs/parse.html) + +Works well in Google Chrome 6+, Safari 5+, Firefox 3.6+, Opera 10.63+. +Doesn't work in IE < 9 because of unsupported getters/setters. + +To use CSSOM.js in the browser you might want to build a one-file version that exposes a single `CSSOM` global variable: + + ➤ git clone https://github.com/NV/CSSOM.git + ➤ cd CSSOM + ➤ node build.js + build/CSSOM.js is done + +To use it with Node.js or any other CommonJS loader: + + ➤ npm install cssom + +## Don’t use it if... + +You parse CSS to mungle, minify or reformat code like this: + +```css +div { + background: gray; + background: linear-gradient(to bottom, white 0%, black 100%); +} +``` + +This pattern is often used to give browsers that don’t understand linear gradients a fallback solution (e.g. gray color in the example). +In CSSOM, `background: gray` [gets overwritten](http://nv.github.io/CSSOM/docs/parse.html#css=div%20%7B%0A%20%20%20%20%20%20background%3A%20gray%3B%0A%20%20%20%20background%3A%20linear-gradient(to%20bottom%2C%20white%200%25%2C%20black%20100%25)%3B%0A%7D). +It doesn't get preserved. + +If you do CSS mungling, minification, image inlining, and such, CSSOM.js is no good for you, considere using one of the following: + + * [postcss](https://github.com/postcss/postcss) + * [reworkcss/css](https://github.com/reworkcss/css) + * [csso](https://github.com/css/csso) + * [mensch](https://github.com/brettstimmerman/mensch) + + +## [Tests](http://nv.github.com/CSSOM/spec/) + +To run tests locally: + + ➤ git submodule init + ➤ git submodule update + + +## [Who uses CSSOM.js](https://github.com/NV/CSSOM/wiki/Who-uses-CSSOM.js) diff --git a/node_modules/cssom/lib/CSSDocumentRule.js b/node_modules/cssom/lib/CSSDocumentRule.js new file mode 100644 index 0000000..aec0776 --- /dev/null +++ b/node_modules/cssom/lib/CSSDocumentRule.js @@ -0,0 +1,39 @@ +//.CommonJS +var CSSOM = { + CSSRule: require("./CSSRule").CSSRule, + MatcherList: require("./MatcherList").MatcherList +}; +///CommonJS + + +/** + * @constructor + * @see https://developer.mozilla.org/en/CSS/@-moz-document + */ +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; +//FIXME +//CSSOM.CSSDocumentRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; +//CSSOM.CSSDocumentRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; + +Object.defineProperty(CSSOM.CSSDocumentRule.prototype, "cssText", { + get: function() { + var cssTexts = []; + for (var i=0, length=this.cssRules.length; i < length; i++) { + cssTexts.push(this.cssRules[i].cssText); + } + return "@-moz-document " + this.matcher.matcherText + " {" + cssTexts.join("") + "}"; + } +}); + + +//.CommonJS +exports.CSSDocumentRule = CSSOM.CSSDocumentRule; +///CommonJS diff --git a/node_modules/cssom/lib/CSSFontFaceRule.js b/node_modules/cssom/lib/CSSFontFaceRule.js new file mode 100644 index 0000000..7a537fb --- /dev/null +++ b/node_modules/cssom/lib/CSSFontFaceRule.js @@ -0,0 +1,36 @@ +//.CommonJS +var CSSOM = { + CSSStyleDeclaration: require("./CSSStyleDeclaration").CSSStyleDeclaration, + CSSRule: require("./CSSRule").CSSRule +}; +///CommonJS + + +/** + * @constructor + * @see http://dev.w3.org/csswg/cssom/#css-font-face-rule + */ +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; +//FIXME +//CSSOM.CSSFontFaceRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; +//CSSOM.CSSFontFaceRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; + +// http://www.opensource.apple.com/source/WebCore/WebCore-955.66.1/css/WebKitCSSFontFaceRule.cpp +Object.defineProperty(CSSOM.CSSFontFaceRule.prototype, "cssText", { + get: function() { + return "@font-face {" + this.style.cssText + "}"; + } +}); + + +//.CommonJS +exports.CSSFontFaceRule = CSSOM.CSSFontFaceRule; +///CommonJS diff --git a/node_modules/cssom/lib/CSSHostRule.js b/node_modules/cssom/lib/CSSHostRule.js new file mode 100644 index 0000000..365304f --- /dev/null +++ b/node_modules/cssom/lib/CSSHostRule.js @@ -0,0 +1,37 @@ +//.CommonJS +var CSSOM = { + CSSRule: require("./CSSRule").CSSRule +}; +///CommonJS + + +/** + * @constructor + * @see http://www.w3.org/TR/shadow-dom/#host-at-rule + */ +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; +//FIXME +//CSSOM.CSSHostRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; +//CSSOM.CSSHostRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; + +Object.defineProperty(CSSOM.CSSHostRule.prototype, "cssText", { + get: function() { + var cssTexts = []; + for (var i=0, length=this.cssRules.length; i < length; i++) { + cssTexts.push(this.cssRules[i].cssText); + } + return "@host {" + cssTexts.join("") + "}"; + } +}); + + +//.CommonJS +exports.CSSHostRule = CSSOM.CSSHostRule; +///CommonJS diff --git a/node_modules/cssom/lib/CSSImportRule.js b/node_modules/cssom/lib/CSSImportRule.js new file mode 100644 index 0000000..0398105 --- /dev/null +++ b/node_modules/cssom/lib/CSSImportRule.js @@ -0,0 +1,132 @@ +//.CommonJS +var CSSOM = { + CSSRule: require("./CSSRule").CSSRule, + CSSStyleSheet: require("./CSSStyleSheet").CSSStyleSheet, + MediaList: require("./MediaList").MediaList +}; +///CommonJS + + +/** + * @constructor + * @see http://dev.w3.org/csswg/cssom/#cssimportrule + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSImportRule + */ +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 i = 0; + + /** + * @import url(partial.css) screen, handheld; + * || | + * after-import media + * | + * url + */ + var state = ''; + + var buffer = ''; + var index; + for (var character; (character = cssText.charAt(i)); i++) { + + switch (character) { + case ' ': + case '\t': + case '\r': + case '\n': + case '\f': + if (state === 'after-import') { + state = 'url'; + } else { + buffer += character; + } + break; + + case '@': + if (!state && cssText.indexOf('@import', i) === i) { + state = 'after-import'; + i += 'import'.length; + buffer = ''; + } + break; + + case 'u': + if (state === 'url' && cssText.indexOf('url(', i) === i) { + index = cssText.indexOf(')', i + 1); + if (index === -1) { + throw i + ': ")" not found'; + } + i += 'url('.length; + var url = cssText.slice(i, index); + if (url[0] === url[url.length - 1]) { + if (url[0] === '"' || url[0] === "'") { + url = url.slice(1, -1); + } + } + this.href = url; + i = index; + state = 'media'; + } + break; + + case '"': + if (state === 'url') { + index = cssText.indexOf('"', i + 1); + if (!index) { + throw i + ": '\"' not found"; + } + this.href = cssText.slice(i + 1, index); + i = index; + state = 'media'; + } + break; + + case "'": + if (state === 'url') { + index = cssText.indexOf("'", i + 1); + if (!index) { + throw i + ': "\'" not found'; + } + this.href = cssText.slice(i + 1, index); + i = index; + state = 'media'; + } + break; + + case ';': + if (state === 'media') { + if (buffer) { + this.media.mediaText = buffer.trim(); + } + } + break; + + default: + if (state === 'media') { + buffer += character; + } + break; + } + } + } +}); + + +//.CommonJS +exports.CSSImportRule = CSSOM.CSSImportRule; +///CommonJS diff --git a/node_modules/cssom/lib/CSSKeyframeRule.js b/node_modules/cssom/lib/CSSKeyframeRule.js new file mode 100644 index 0000000..3b928ef --- /dev/null +++ b/node_modules/cssom/lib/CSSKeyframeRule.js @@ -0,0 +1,37 @@ +//.CommonJS +var CSSOM = { + CSSRule: require("./CSSRule").CSSRule, + CSSStyleDeclaration: require('./CSSStyleDeclaration').CSSStyleDeclaration +}; +///CommonJS + + +/** + * @constructor + * @see http://www.w3.org/TR/css3-animations/#DOM-CSSKeyframeRule + */ +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; +//FIXME +//CSSOM.CSSKeyframeRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; +//CSSOM.CSSKeyframeRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; + +// http://www.opensource.apple.com/source/WebCore/WebCore-955.66.1/css/WebKitCSSKeyframeRule.cpp +Object.defineProperty(CSSOM.CSSKeyframeRule.prototype, "cssText", { + get: function() { + return this.keyText + " {" + this.style.cssText + "} "; + } +}); + + +//.CommonJS +exports.CSSKeyframeRule = CSSOM.CSSKeyframeRule; +///CommonJS diff --git a/node_modules/cssom/lib/CSSKeyframesRule.js b/node_modules/cssom/lib/CSSKeyframesRule.js new file mode 100644 index 0000000..53e61fa --- /dev/null +++ b/node_modules/cssom/lib/CSSKeyframesRule.js @@ -0,0 +1,39 @@ +//.CommonJS +var CSSOM = { + CSSRule: require("./CSSRule").CSSRule +}; +///CommonJS + + +/** + * @constructor + * @see http://www.w3.org/TR/css3-animations/#DOM-CSSKeyframesRule + */ +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; +//FIXME +//CSSOM.CSSKeyframesRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; +//CSSOM.CSSKeyframesRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; + +// http://www.opensource.apple.com/source/WebCore/WebCore-955.66.1/css/WebKitCSSKeyframesRule.cpp +Object.defineProperty(CSSOM.CSSKeyframesRule.prototype, "cssText", { + get: function() { + var cssTexts = []; + for (var i=0, length=this.cssRules.length; i < length; i++) { + cssTexts.push(" " + this.cssRules[i].cssText); + } + return "@" + (this._vendorPrefix || '') + "keyframes " + this.name + " { \n" + cssTexts.join("\n") + "\n}"; + } +}); + + +//.CommonJS +exports.CSSKeyframesRule = CSSOM.CSSKeyframesRule; +///CommonJS diff --git a/node_modules/cssom/lib/CSSMediaRule.js b/node_modules/cssom/lib/CSSMediaRule.js new file mode 100644 index 0000000..367a35e --- /dev/null +++ b/node_modules/cssom/lib/CSSMediaRule.js @@ -0,0 +1,41 @@ +//.CommonJS +var CSSOM = { + CSSRule: require("./CSSRule").CSSRule, + MediaList: require("./MediaList").MediaList +}; +///CommonJS + + +/** + * @constructor + * @see http://dev.w3.org/csswg/cssom/#cssmediarule + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSMediaRule + */ +CSSOM.CSSMediaRule = function CSSMediaRule() { + CSSOM.CSSRule.call(this); + this.media = new CSSOM.MediaList(); + this.cssRules = []; +}; + +CSSOM.CSSMediaRule.prototype = new CSSOM.CSSRule(); +CSSOM.CSSMediaRule.prototype.constructor = CSSOM.CSSMediaRule; +CSSOM.CSSMediaRule.prototype.type = 4; +//FIXME +//CSSOM.CSSMediaRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; +//CSSOM.CSSMediaRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; + +// http://opensource.apple.com/source/WebCore/WebCore-658.28/css/CSSMediaRule.cpp +Object.defineProperty(CSSOM.CSSMediaRule.prototype, "cssText", { + get: function() { + var cssTexts = []; + for (var i=0, length=this.cssRules.length; i < length; i++) { + cssTexts.push(this.cssRules[i].cssText); + } + return "@media " + this.media.mediaText + " {" + cssTexts.join("") + "}"; + } +}); + + +//.CommonJS +exports.CSSMediaRule = CSSOM.CSSMediaRule; +///CommonJS diff --git a/node_modules/cssom/lib/CSSOM.js b/node_modules/cssom/lib/CSSOM.js new file mode 100644 index 0000000..95f3563 --- /dev/null +++ b/node_modules/cssom/lib/CSSOM.js @@ -0,0 +1,3 @@ +var CSSOM = {}; + + diff --git a/node_modules/cssom/lib/CSSRule.js b/node_modules/cssom/lib/CSSRule.js new file mode 100644 index 0000000..0b5e25b --- /dev/null +++ b/node_modules/cssom/lib/CSSRule.js @@ -0,0 +1,43 @@ +//.CommonJS +var CSSOM = {}; +///CommonJS + + +/** + * @constructor + * @see http://dev.w3.org/csswg/cssom/#the-cssrule-interface + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule + */ +CSSOM.CSSRule = function CSSRule() { + this.parentRule = null; + this.parentStyleSheet = null; +}; + +CSSOM.CSSRule.UNKNOWN_RULE = 0; // obsolete +CSSOM.CSSRule.STYLE_RULE = 1; +CSSOM.CSSRule.CHARSET_RULE = 2; // obsolete +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 + //FIXME +}; + + +//.CommonJS +exports.CSSRule = CSSOM.CSSRule; +///CommonJS diff --git a/node_modules/cssom/lib/CSSStyleDeclaration.js b/node_modules/cssom/lib/CSSStyleDeclaration.js new file mode 100644 index 0000000..b43b9af --- /dev/null +++ b/node_modules/cssom/lib/CSSStyleDeclaration.js @@ -0,0 +1,148 @@ +//.CommonJS +var CSSOM = {}; +///CommonJS + + +/** + * @constructor + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration + */ +CSSOM.CSSStyleDeclaration = function CSSStyleDeclaration(){ + this.length = 0; + this.parentRule = null; + + // NON-STANDARD + this._importants = {}; +}; + + +CSSOM.CSSStyleDeclaration.prototype = { + + constructor: CSSOM.CSSStyleDeclaration, + + /** + * + * @param {string} name + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-getPropertyValue + * @return {string} the value of the property if it has been explicitly set for this declaration block. + * Returns the empty string if the property has not been set. + */ + getPropertyValue: function(name) { + return this[name] || ""; + }, + + /** + * + * @param {string} name + * @param {string} value + * @param {string} [priority=null] "important" or null + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-setProperty + */ + setProperty: function(name, value, priority) { + if (this[name]) { + // Property already exist. Overwrite it. + var index = Array.prototype.indexOf.call(this, name); + if (index < 0) { + this[this.length] = name; + this.length++; + } + } else { + // New property. + this[this.length] = name; + this.length++; + } + this[name] = value + ""; + this._importants[name] = priority; + }, + + /** + * + * @param {string} name + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-removeProperty + * @return {string} the value of the property if it has been explicitly set for this declaration block. + * Returns the empty string if the property has not been set or the property name does not correspond to a known CSS property. + */ + 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] = ""; + + // That's what WebKit and Opera do + Array.prototype.splice.call(this, index, 1); + + // That's what Firefox does + //this[index] = "" + + return prevValue; + }, + + getPropertyCSSValue: function() { + //FIXME + }, + + /** + * + * @param {String} name + */ + getPropertyPriority: function(name) { + return this._importants[name] || ""; + }, + + + /** + * element.style.overflow = "auto" + * element.style.getPropertyShorthand("overflow-x") + * -> "overflow" + */ + getPropertyShorthand: function() { + //FIXME + }, + + isPropertyImplicit: function() { + //FIXME + }, + + // Doesn't work in IE < 9 + get cssText(){ + var properties = []; + for (var i=0, length=this.length; i < length; ++i) { + var name = this[i]; + var value = this.getPropertyValue(name); + var priority = this.getPropertyPriority(name); + if (priority) { + priority = " !" + priority; + } + properties[i] = name + ": " + value + priority + ";"; + } + return properties.join(" "); + }, + + set cssText(text){ + var i, name; + for (i = this.length; i--;) { + name = this[i]; + 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 (i = 0; i < length; ++i) { + name = dummyRule[i]; + this.setProperty(dummyRule[i], dummyRule.getPropertyValue(name), dummyRule.getPropertyPriority(name)); + } + } +}; + + +//.CommonJS +exports.CSSStyleDeclaration = CSSOM.CSSStyleDeclaration; +CSSOM.parse = require('./parse').parse; // Cannot be included sooner due to the mutual dependency between parse.js and CSSStyleDeclaration.js +///CommonJS diff --git a/node_modules/cssom/lib/CSSStyleRule.js b/node_modules/cssom/lib/CSSStyleRule.js new file mode 100644 index 0000000..630b3f8 --- /dev/null +++ b/node_modules/cssom/lib/CSSStyleRule.js @@ -0,0 +1,190 @@ +//.CommonJS +var CSSOM = { + CSSStyleDeclaration: require("./CSSStyleDeclaration").CSSStyleDeclaration, + CSSRule: require("./CSSRule").CSSRule +}; +///CommonJS + + +/** + * @constructor + * @see http://dev.w3.org/csswg/cssom/#cssstylerule + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleRule + */ +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; + } +}); + + +/** + * NON-STANDARD + * lightweight version of parse.js. + * @param {string} ruleText + * @return CSSStyleRule + */ +CSSOM.CSSStyleRule.parse = function(ruleText) { + var i = 0; + var state = "selector"; + var index; + var j = i; + var buffer = ""; + + var SIGNIFICANT_WHITESPACE = { + "selector": true, + "value": true + }; + + var styleRule = new CSSOM.CSSStyleRule(); + var name, priority=""; + + for (var character; (character = ruleText.charAt(i)); i++) { + + switch (character) { + + case " ": + case "\t": + case "\r": + case "\n": + case "\f": + if (SIGNIFICANT_WHITESPACE[state]) { + // Squash 2 or more white-spaces in the row into 1 + switch (ruleText.charAt(i - 1)) { + case " ": + case "\t": + case "\r": + case "\n": + case "\f": + break; + default: + buffer += " "; + break; + } + } + break; + + // String + case '"': + j = i + 1; + index = ruleText.indexOf('"', j) + 1; + if (!index) { + throw '" is missing'; + } + buffer += ruleText.slice(i, index); + i = index - 1; + break; + + case "'": + j = i + 1; + index = ruleText.indexOf("'", j) + 1; + if (!index) { + throw "' is missing"; + } + buffer += ruleText.slice(i, index); + i = index - 1; + break; + + // Comment + case "/": + if (ruleText.charAt(i + 1) === "*") { + i += 2; + index = ruleText.indexOf("*/", i); + if (index === -1) { + throw new SyntaxError("Missing */"); + } else { + i = 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", i) === i) { + priority = "important"; + i += "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; + +}; + + +//.CommonJS +exports.CSSStyleRule = CSSOM.CSSStyleRule; +///CommonJS diff --git a/node_modules/cssom/lib/CSSStyleSheet.js b/node_modules/cssom/lib/CSSStyleSheet.js new file mode 100644 index 0000000..f0e0dfc --- /dev/null +++ b/node_modules/cssom/lib/CSSStyleSheet.js @@ -0,0 +1,88 @@ +//.CommonJS +var CSSOM = { + StyleSheet: require("./StyleSheet").StyleSheet, + CSSStyleRule: require("./CSSStyleRule").CSSStyleRule +}; +///CommonJS + + +/** + * @constructor + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet + */ +CSSOM.CSSStyleSheet = function CSSStyleSheet() { + CSSOM.StyleSheet.call(this); + this.cssRules = []; +}; + + +CSSOM.CSSStyleSheet.prototype = new CSSOM.StyleSheet(); +CSSOM.CSSStyleSheet.prototype.constructor = CSSOM.CSSStyleSheet; + + +/** + * Used to insert a new rule into the style sheet. The new rule now becomes part of the cascade. + * + * sheet = new Sheet("body {margin: 0}") + * sheet.toString() + * -> "body{margin:0;}" + * sheet.insertRule("img {border: none}", 0) + * -> 0 + * sheet.toString() + * -> "img{border:none;}body{margin:0;}" + * + * @param {string} rule + * @param {number} index + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet-insertRule + * @return {number} The index within the style sheet's rule collection of the newly inserted rule. + */ +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; +}; + + +/** + * Used to delete a rule from the style sheet. + * + * sheet = new Sheet("img{border:none} body{margin:0}") + * sheet.toString() + * -> "img{border:none;}body{margin:0;}" + * sheet.deleteRule(0) + * sheet.toString() + * -> "body{margin:0;}" + * + * @param {number} index within the style sheet's rule list of the rule to remove. + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet-deleteRule + */ +CSSOM.CSSStyleSheet.prototype.deleteRule = function(index) { + if (index < 0 || index >= this.cssRules.length) { + throw new RangeError("INDEX_SIZE_ERR"); + } + this.cssRules.splice(index, 1); +}; + + +/** + * NON-STANDARD + * @return {string} serialize stylesheet + */ +CSSOM.CSSStyleSheet.prototype.toString = function() { + var result = ""; + var rules = this.cssRules; + for (var i=0; i 1000 ? '1000px' : 'auto'); + * } + */ +CSSOM.CSSValueExpression.prototype.parse = function() { + var token = this._token, + idx = this._idx; + + var character = '', + expression = '', + error = '', + info, + paren = []; + + + for (; ; ++idx) { + character = token.charAt(idx); + + // end of token + 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))) { // comment? + if (info.error) { + error = 'css expression error: unfinished comment in expression!'; + } else { + idx = info.idx; + // ignore the comment + } + } else if ((info = this._parseJSRexExp(token, idx))) { // regexp + idx = info.idx; + expression += info.text; + } else { // other + expression += character; + } + break; + + case "'": + case '"': + info = this._parseJSString(token, idx, character); + if (info) { // string + idx = info.idx; + expression += info.text; + } else { + expression += character; + } + break; + + default: + expression += character; + break; + } + + if (error) { + break; + } + + // end of expression + if (paren.length === 0) { + break; + } + } + + var ret; + if (error) { + ret = { + error: error + }; + } else { + ret = { + idx: idx, + expression: expression + }; + } + + return ret; +}; + + +/** + * + * @return {Object|false} + * - idx: + * - text: + * or + * - error: + * or + * false + * + */ +CSSOM.CSSValueExpression.prototype._parseJSComment = function(token, idx) { + var nextChar = token.charAt(idx + 1), + text; + + if (nextChar === '/' || nextChar === '*') { + var startIdx = idx, + endIdx, + commentEndChar; + + if (nextChar === '/') { // line comment + commentEndChar = '\n'; + } else if (nextChar === '*') { // block comment + 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: text + }; + } else { + var error = 'css expression error: unfinished comment in expression!'; + return { + error: error + }; + } + } else { + return false; + } +}; + + +/** + * + * @return {Object|false} + * - idx: + * - text: + * or + * 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: text + }; + } +}; + + +/** + * parse regexp in css expression + * + * @return {Object|false} + * - idx: + * - regExp: + * or + * false + */ + +/* + +all legal RegExp + +/a/ +(/a/) +[/a/] +[12, /a/] + +!/a/ + ++/a/ +-/a/ +* /a/ +/ /a/ +%/a/ + +===/a/ +!==/a/ +==/a/ +!=/a/ +>/a/ +>=/a/ +>/a/ +>>>/a/ + +&&/a/ +||/a/ +?/a/ +=/a/ +,/a/ + + delete /a/ + in /a/ +instanceof /a/ + new /a/ + typeof /a/ + void /a/ + +*/ +CSSOM.CSSValueExpression.prototype._parseJSRexExp = function(token, idx) { + var before = token.substring(0, idx).replace(/\s+$/, ""), + legalRegx = [ + /^$/, + /\($/, + /\[$/, + /\!$/, + /\+$/, + /\-$/, + /\*$/, + /\/\s+/, + /\%$/, + /\=$/, + /\>$/, + /<$/, + /\&$/, + /\|$/, + /\^$/, + /\~$/, + /\?$/, + /\,$/, + /delete$/, + /in$/, + /instanceof$/, + /new$/, + /typeof$/, + /void$/ + ]; + + var isLegal = legalRegx.some(function(reg) { + return reg.test(before); + }); + + if (!isLegal) { + return false; + } else { + var sep = '/'; + + // same logic as string + return this._parseJSString(token, idx, sep); + } +}; + + +/** + * + * find next sep(same line) index in `token` + * + * @return {Number} + * + */ +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) { // not found + endIdx = NOT_FOUND; + break; + } else { + var text = token.substring(idx + 1, endIdx), + matched = text.match(/\\+$/); + if (!matched || matched[0] % 2 === 0) { // not escaped + break; + } else { + startIdx = endIdx; + } + } + } + + // boundary must be in the same line(js sting or regexp) + var nextNewLineIdx = token.indexOf('\n', idx + 1); + if (nextNewLineIdx < endIdx) { + endIdx = NOT_FOUND; + } + + + return endIdx; +}; + + + + +//.CommonJS +exports.CSSValueExpression = CSSOM.CSSValueExpression; +///CommonJS diff --git a/node_modules/cssom/lib/MatcherList.js b/node_modules/cssom/lib/MatcherList.js new file mode 100644 index 0000000..a791585 --- /dev/null +++ b/node_modules/cssom/lib/MatcherList.js @@ -0,0 +1,62 @@ +//.CommonJS +var CSSOM = {}; +///CommonJS + + +/** + * @constructor + * @see https://developer.mozilla.org/en/CSS/@-moz-document + */ +CSSOM.MatcherList = function MatcherList(){ + this.length = 0; +}; + +CSSOM.MatcherList.prototype = { + + constructor: CSSOM.MatcherList, + + /** + * @return {string} + */ + get matcherText() { + return Array.prototype.join.call(this, ", "); + }, + + /** + * @param {string} value + */ + set matcherText(value) { + // just a temporary solution, actually it may be wrong by just split the value with ',', because a url can include ','. + var values = value.split(","); + var length = this.length = values.length; + for (var i=0; i 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 = i + 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 = i; + break; + case "before-name": + state = "name"; + break; + case "before-value": + state = "value"; + break; + case "importRule-begin": + state = "importRule"; + break; + } + buffer += character; + break; + } + } + + return styleSheet; +}; + + +//.CommonJS +exports.parse = CSSOM.parse; +// The following modules cannot be included sooner due to the mutual dependency with parse.js +CSSOM.CSSStyleSheet = require("./CSSStyleSheet").CSSStyleSheet; +CSSOM.CSSStyleRule = require("./CSSStyleRule").CSSStyleRule; +CSSOM.CSSImportRule = require("./CSSImportRule").CSSImportRule; +CSSOM.CSSMediaRule = require("./CSSMediaRule").CSSMediaRule; +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; +///CommonJS diff --git a/node_modules/cssom/package.json b/node_modules/cssom/package.json new file mode 100644 index 0000000..c8e813f --- /dev/null +++ b/node_modules/cssom/package.json @@ -0,0 +1,18 @@ +{ + "name": "cssom", + "description": "CSS Object Model implementation and CSS parser", + "keywords": [ + "CSS", + "CSSOM", + "parser", + "styleSheet" + ], + "version": "0.4.4", + "author": "Nikita Vasilyev ", + "repository": "NV/CSSOM", + "files": [ + "lib/" + ], + "main": "./lib/index.js", + "license": "MIT" +} diff --git a/node_modules/cssstyle/LICENSE b/node_modules/cssstyle/LICENSE new file mode 100644 index 0000000..060a7e6 --- /dev/null +++ b/node_modules/cssstyle/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) Chad Walker + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/cssstyle/README.md b/node_modules/cssstyle/README.md new file mode 100644 index 0000000..0016345 --- /dev/null +++ b/node_modules/cssstyle/README.md @@ -0,0 +1,15 @@ +# CSSStyleDeclaration + +A Node JS implementation of the CSS Object Model [CSSStyleDeclaration interface](https://www.w3.org/TR/cssom-1/#the-cssstyledeclaration-interface). + +[![NpmVersion](https://img.shields.io/npm/v/cssstyle.svg)](https://www.npmjs.com/package/cssstyle) [![Build Status](https://travis-ci.org/jsdom/cssstyle.svg?branch=master)](https://travis-ci.org/jsdom/cssstyle) [![codecov](https://codecov.io/gh/jsdom/cssstyle/branch/master/graph/badge.svg)](https://codecov.io/gh/jsdom/cssstyle) + +--- + +#### Background + +This package is an extension of the CSSStyleDeclaration class in Nikita Vasilyev's [CSSOM](https://github.com/NV/CSSOM) with added support for CSS 2 & 3 properties. The primary use case is for testing browser code in a Node environment. + +It was originally created by Chad Walker, it is now maintaind by Jon Sakas and other open source contributors. + +Bug reports and pull requests are welcome. diff --git a/node_modules/cssstyle/lib/CSSStyleDeclaration.js b/node_modules/cssstyle/lib/CSSStyleDeclaration.js new file mode 100644 index 0000000..bded9a4 --- /dev/null +++ b/node_modules/cssstyle/lib/CSSStyleDeclaration.js @@ -0,0 +1,260 @@ +/********************************************************************* + * This is a fork from the CSS Style Declaration part of + * https://github.com/NV/CSSOM + ********************************************************************/ +'use strict'; +var CSSOM = require('cssom'); +var allProperties = require('./allProperties'); +var allExtraProperties = require('./allExtraProperties'); +var implementedProperties = require('./implementedProperties'); +var { dashedToCamelCase } = require('./parsers'); +var getBasicPropertyDescriptor = require('./utils/getBasicPropertyDescriptor'); + +/** + * @constructor + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration + */ +var CSSStyleDeclaration = function CSSStyleDeclaration(onChangeCallback) { + this._values = {}; + this._importants = {}; + this._length = 0; + this._onChange = + onChangeCallback || + function() { + return; + }; +}; +CSSStyleDeclaration.prototype = { + constructor: CSSStyleDeclaration, + + /** + * + * @param {string} name + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-getPropertyValue + * @return {string} the value of the property if it has been explicitly set for this declaration block. + * Returns the empty string if the property has not been set. + */ + getPropertyValue: function(name) { + if (!this._values.hasOwnProperty(name)) { + return ''; + } + return this._values[name].toString(); + }, + + /** + * + * @param {string} name + * @param {string} value + * @param {string} [priority=null] "important" or null + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-setProperty + */ + setProperty: function(name, value, priority) { + if (value === undefined) { + return; + } + if (value === null || value === '') { + this.removeProperty(name); + return; + } + var isCustomProperty = name.indexOf('--') === 0; + if (isCustomProperty) { + this._setProperty(name, value, priority); + return; + } + var lowercaseName = name.toLowerCase(); + if (!allProperties.has(lowercaseName) && !allExtraProperties.has(lowercaseName)) { + return; + } + + this[lowercaseName] = value; + this._importants[lowercaseName] = priority; + }, + _setProperty: function(name, value, priority) { + if (value === undefined) { + return; + } + if (value === null || value === '') { + this.removeProperty(name); + return; + } + if (this._values[name]) { + // Property already exist. Overwrite it. + var index = Array.prototype.indexOf.call(this, name); + if (index < 0) { + this[this._length] = name; + this._length++; + } + } else { + // New property. + this[this._length] = name; + this._length++; + } + this._values[name] = value; + this._importants[name] = priority; + this._onChange(this.cssText); + }, + + /** + * + * @param {string} name + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-removeProperty + * @return {string} the value of the property if it has been explicitly set for this declaration block. + * Returns the empty string if the property has not been set or the property name does not correspond to a known CSS property. + */ + removeProperty: function(name) { + if (!this._values.hasOwnProperty(name)) { + return ''; + } + + var prevValue = this._values[name]; + delete this._values[name]; + delete this._importants[name]; + + var index = Array.prototype.indexOf.call(this, name); + if (index < 0) { + return prevValue; + } + + // That's what WebKit and Opera do + Array.prototype.splice.call(this, index, 1); + + // That's what Firefox does + //this[index] = "" + + this._onChange(this.cssText); + return prevValue; + }, + + /** + * + * @param {String} name + */ + getPropertyPriority: function(name) { + return this._importants[name] || ''; + }, + + getPropertyCSSValue: function() { + //FIXME + return; + }, + + /** + * element.style.overflow = "auto" + * element.style.getPropertyShorthand("overflow-x") + * -> "overflow" + */ + getPropertyShorthand: function() { + //FIXME + return; + }, + + isPropertyImplicit: function() { + //FIXME + return; + }, + + /** + * http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-item + */ + item: function(index) { + index = parseInt(index, 10); + if (index < 0 || index >= this._length) { + return ''; + } + return this[index]; + }, +}; + +Object.defineProperties(CSSStyleDeclaration.prototype, { + cssText: { + get: function() { + var properties = []; + var i; + var name; + var value; + var priority; + for (i = 0; i < this._length; i++) { + name = this[i]; + value = this.getPropertyValue(name); + priority = this.getPropertyPriority(name); + if (priority !== '') { + priority = ' !' + priority; + } + properties.push([name, ': ', value, priority, ';'].join('')); + } + return properties.join(' '); + }, + set: function(value) { + var i; + this._values = {}; + Array.prototype.splice.call(this, 0, this._length); + this._importants = {}; + var dummyRule; + try { + dummyRule = CSSOM.parse('#bogus{' + value + '}').cssRules[0].style; + } catch (err) { + // malformed css, just return + return; + } + var rule_length = dummyRule.length; + var name; + for (i = 0; i < rule_length; ++i) { + name = dummyRule[i]; + this.setProperty( + dummyRule[i], + dummyRule.getPropertyValue(name), + dummyRule.getPropertyPriority(name) + ); + } + this._onChange(this.cssText); + }, + enumerable: true, + configurable: true, + }, + parentRule: { + get: function() { + return null; + }, + enumerable: true, + configurable: true, + }, + length: { + get: function() { + return this._length; + }, + /** + * This deletes indices if the new length is less then the current + * length. If the new length is more, it does nothing, the new indices + * will be undefined until set. + **/ + set: function(value) { + var i; + for (i = value; i < this._length; i++) { + delete this[i]; + } + this._length = value; + }, + enumerable: true, + configurable: true, + }, +}); + +require('./properties')(CSSStyleDeclaration.prototype); + +allProperties.forEach(function(property) { + if (!implementedProperties.has(property)) { + var declaration = getBasicPropertyDescriptor(property); + Object.defineProperty(CSSStyleDeclaration.prototype, property, declaration); + Object.defineProperty(CSSStyleDeclaration.prototype, dashedToCamelCase(property), declaration); + } +}); + +allExtraProperties.forEach(function(property) { + if (!implementedProperties.has(property)) { + var declaration = getBasicPropertyDescriptor(property); + Object.defineProperty(CSSStyleDeclaration.prototype, property, declaration); + Object.defineProperty(CSSStyleDeclaration.prototype, dashedToCamelCase(property), declaration); + } +}); + +exports.CSSStyleDeclaration = CSSStyleDeclaration; diff --git a/node_modules/cssstyle/lib/CSSStyleDeclaration.test.js b/node_modules/cssstyle/lib/CSSStyleDeclaration.test.js new file mode 100644 index 0000000..9fa8ed3 --- /dev/null +++ b/node_modules/cssstyle/lib/CSSStyleDeclaration.test.js @@ -0,0 +1,556 @@ +'use strict'; + +var { CSSStyleDeclaration } = require('./CSSStyleDeclaration'); + +var allProperties = require('./allProperties'); +var allExtraProperties = require('./allExtraProperties'); +var implementedProperties = require('./implementedProperties'); +var parsers = require('./parsers'); + +var dashedProperties = [...allProperties, ...allExtraProperties]; +var allowedProperties = dashedProperties.map(parsers.dashedToCamelCase); +implementedProperties = Array.from(implementedProperties).map(parsers.dashedToCamelCase); +var invalidProperties = implementedProperties.filter(prop => !allowedProperties.includes(prop)); + +describe('CSSStyleDeclaration', () => { + test('has only valid properties implemented', () => { + expect(invalidProperties.length).toEqual(0); + }); + + test('has all properties', () => { + var style = new CSSStyleDeclaration(); + allProperties.forEach(property => { + expect(style.__lookupGetter__(property)).toBeTruthy(); + expect(style.__lookupSetter__(property)).toBeTruthy(); + }); + }); + + test('has dashed properties', () => { + var style = new CSSStyleDeclaration(); + dashedProperties.forEach(property => { + expect(style.__lookupGetter__(property)).toBeTruthy(); + expect(style.__lookupSetter__(property)).toBeTruthy(); + }); + }); + + test('has all functions', () => { + var style = new CSSStyleDeclaration(); + + expect(typeof style.item).toEqual('function'); + expect(typeof style.getPropertyValue).toEqual('function'); + expect(typeof style.setProperty).toEqual('function'); + expect(typeof style.getPropertyPriority).toEqual('function'); + expect(typeof style.removeProperty).toEqual('function'); + + // TODO - deprecated according to MDN and not implemented at all, can we remove? + expect(typeof style.getPropertyCSSValue).toEqual('function'); + }); + + test('has special properties', () => { + var style = new CSSStyleDeclaration(); + + expect(style.__lookupGetter__('cssText')).toBeTruthy(); + expect(style.__lookupSetter__('cssText')).toBeTruthy(); + expect(style.__lookupGetter__('length')).toBeTruthy(); + expect(style.__lookupSetter__('length')).toBeTruthy(); + expect(style.__lookupGetter__('parentRule')).toBeTruthy(); + }); + + test('from style string', () => { + var style = new CSSStyleDeclaration(); + style.cssText = 'color: blue; background-color: red; width: 78%; height: 50vh;'; + expect(style.length).toEqual(4); + expect(style.cssText).toEqual('color: blue; background-color: red; width: 78%; height: 50vh;'); + expect(style.getPropertyValue('color')).toEqual('blue'); + expect(style.item(0)).toEqual('color'); + expect(style[1]).toEqual('background-color'); + expect(style.backgroundColor).toEqual('red'); + style.cssText = ''; + expect(style.cssText).toEqual(''); + expect(style.length).toEqual(0); + }); + + test('from properties', () => { + var style = new CSSStyleDeclaration(); + style.color = 'blue'; + expect(style.length).toEqual(1); + expect(style[0]).toEqual('color'); + expect(style.cssText).toEqual('color: blue;'); + expect(style.item(0)).toEqual('color'); + expect(style.color).toEqual('blue'); + style.backgroundColor = 'red'; + expect(style.length).toEqual(2); + expect(style[0]).toEqual('color'); + expect(style[1]).toEqual('background-color'); + expect(style.cssText).toEqual('color: blue; background-color: red;'); + expect(style.backgroundColor).toEqual('red'); + style.removeProperty('color'); + expect(style[0]).toEqual('background-color'); + }); + + test('shorthand properties', () => { + var style = new CSSStyleDeclaration(); + style.background = 'blue url(http://www.example.com/some_img.jpg)'; + expect(style.backgroundColor).toEqual('blue'); + expect(style.backgroundImage).toEqual('url(http://www.example.com/some_img.jpg)'); + expect(style.background).toEqual('blue url(http://www.example.com/some_img.jpg)'); + style.border = '0 solid black'; + expect(style.borderWidth).toEqual('0px'); + expect(style.borderStyle).toEqual('solid'); + expect(style.borderColor).toEqual('black'); + expect(style.borderTopWidth).toEqual('0px'); + expect(style.borderLeftStyle).toEqual('solid'); + expect(style.borderBottomColor).toEqual('black'); + style.font = '12em monospace'; + expect(style.fontSize).toEqual('12em'); + expect(style.fontFamily).toEqual('monospace'); + }); + + test('width and height properties and null and empty strings', () => { + var style = new CSSStyleDeclaration(); + style.height = 6; + expect(style.height).toEqual(''); + style.width = 0; + expect(style.width).toEqual('0px'); + style.height = '34%'; + expect(style.height).toEqual('34%'); + style.height = '100vh'; + expect(style.height).toEqual('100vh'); + style.height = '100vw'; + expect(style.height).toEqual('100vw'); + style.height = ''; + expect(1).toEqual(style.length); + expect(style.cssText).toEqual('width: 0px;'); + style.width = null; + expect(0).toEqual(style.length); + expect(style.cssText).toEqual(''); + }); + + test('implicit properties', () => { + var style = new CSSStyleDeclaration(); + style.borderWidth = 0; + expect(style.length).toEqual(1); + expect(style.borderWidth).toEqual('0px'); + expect(style.borderTopWidth).toEqual('0px'); + expect(style.borderBottomWidth).toEqual('0px'); + expect(style.borderLeftWidth).toEqual('0px'); + expect(style.borderRightWidth).toEqual('0px'); + expect(style.cssText).toEqual('border-width: 0px;'); + }); + + test('top, left, right, bottom properties', () => { + var style = new CSSStyleDeclaration(); + style.top = 0; + style.left = '0%'; + style.right = '5em'; + style.bottom = '12pt'; + expect(style.top).toEqual('0px'); + expect(style.left).toEqual('0%'); + expect(style.right).toEqual('5em'); + expect(style.bottom).toEqual('12pt'); + expect(style.length).toEqual(4); + expect(style.cssText).toEqual('top: 0px; left: 0%; right: 5em; bottom: 12pt;'); + }); + + test('clear and clip properties', () => { + var style = new CSSStyleDeclaration(); + style.clear = 'none'; + expect(style.clear).toEqual('none'); + style.clear = 'lfet'; + expect(style.clear).toEqual('none'); + style.clear = 'left'; + expect(style.clear).toEqual('left'); + style.clear = 'right'; + expect(style.clear).toEqual('right'); + style.clear = 'both'; + expect(style.clear).toEqual('both'); + style.clip = 'elipse(5px, 10px)'; + expect(style.clip).toEqual(''); + expect(style.length).toEqual(1); + style.clip = 'rect(0, 3Em, 2pt, 50%)'; + expect(style.clip).toEqual('rect(0px, 3em, 2pt, 50%)'); + expect(style.length).toEqual(2); + expect(style.cssText).toEqual('clear: both; clip: rect(0px, 3em, 2pt, 50%);'); + }); + + test('colors', () => { + var style = new CSSStyleDeclaration(); + style.color = 'rgba(0,0,0,0)'; + expect(style.color).toEqual('rgba(0, 0, 0, 0)'); + style.color = 'rgba(5%, 10%, 20%, 0.4)'; + expect(style.color).toEqual('rgba(12, 25, 51, 0.4)'); + style.color = 'rgb(33%, 34%, 33%)'; + expect(style.color).toEqual('rgb(84, 86, 84)'); + style.color = 'rgba(300, 200, 100, 1.5)'; + expect(style.color).toEqual('rgb(255, 200, 100)'); + style.color = 'hsla(0, 1%, 2%, 0.5)'; + expect(style.color).toEqual('rgba(5, 5, 5, 0.5)'); + style.color = 'hsl(0, 1%, 2%)'; + expect(style.color).toEqual('rgb(5, 5, 5)'); + style.color = 'rebeccapurple'; + expect(style.color).toEqual('rebeccapurple'); + style.color = 'transparent'; + expect(style.color).toEqual('transparent'); + style.color = 'currentcolor'; + expect(style.color).toEqual('currentcolor'); + style.color = '#ffffffff'; + expect(style.color).toEqual('rgba(255, 255, 255, 1)'); + style.color = '#fffa'; + expect(style.color).toEqual('rgba(255, 255, 255, 0.667)'); + style.color = '#ffffff66'; + expect(style.color).toEqual('rgba(255, 255, 255, 0.4)'); + }); + + test('short hand properties with embedded spaces', () => { + var style = new CSSStyleDeclaration(); + style.background = 'rgb(0, 0, 0) url(/something/somewhere.jpg)'; + expect(style.backgroundColor).toEqual('rgb(0, 0, 0)'); + expect(style.backgroundImage).toEqual('url(/something/somewhere.jpg)'); + expect(style.cssText).toEqual('background: rgb(0, 0, 0) url(/something/somewhere.jpg);'); + style = new CSSStyleDeclaration(); + style.border = ' 1px solid black '; + expect(style.border).toEqual('1px solid black'); + }); + + test('setting shorthand properties to an empty string should clear all dependent properties', () => { + var style = new CSSStyleDeclaration(); + style.borderWidth = '1px'; + expect(style.cssText).toEqual('border-width: 1px;'); + style.border = ''; + expect(style.cssText).toEqual(''); + }); + + test('setting implicit properties to an empty string should clear all dependent properties', () => { + var style = new CSSStyleDeclaration(); + style.borderTopWidth = '1px'; + expect(style.cssText).toEqual('border-top-width: 1px;'); + style.borderWidth = ''; + expect(style.cssText).toEqual(''); + }); + + test('setting a shorthand property, whose shorthands are implicit properties, to an empty string should clear all dependent properties', () => { + var style = new CSSStyleDeclaration(); + style.borderTopWidth = '1px'; + expect(style.cssText).toEqual('border-top-width: 1px;'); + style.border = ''; + expect(style.cssText).toEqual(''); + style.borderTop = '1px solid black'; + expect(style.cssText).toEqual('border-top: 1px solid black;'); + style.border = ''; + expect(style.cssText).toEqual(''); + }); + + test('setting border values to "none" should clear dependent values', () => { + var style = new CSSStyleDeclaration(); + style.borderTopWidth = '1px'; + expect(style.cssText).toEqual('border-top-width: 1px;'); + style.border = 'none'; + expect(style.cssText).toEqual(''); + style.borderTopWidth = '1px'; + expect(style.cssText).toEqual('border-top-width: 1px;'); + style.borderTopStyle = 'none'; + expect(style.cssText).toEqual(''); + style.borderTopWidth = '1px'; + expect(style.cssText).toEqual('border-top-width: 1px;'); + style.borderTop = 'none'; + expect(style.cssText).toEqual(''); + style.borderTopWidth = '1px'; + style.borderLeftWidth = '1px'; + expect(style.cssText).toEqual('border-top-width: 1px; border-left-width: 1px;'); + style.borderTop = 'none'; + expect(style.cssText).toEqual('border-left-width: 1px;'); + }); + + test('setting border to 0 should be okay', () => { + var style = new CSSStyleDeclaration(); + style.border = 0; + expect(style.cssText).toEqual('border: 0px;'); + }); + + test('setting values implicit and shorthand properties via csstext and setproperty should propagate to dependent properties', () => { + var style = new CSSStyleDeclaration(); + style.cssText = 'border: 1px solid black;'; + expect(style.cssText).toEqual('border: 1px solid black;'); + expect(style.borderTop).toEqual('1px solid black'); + style.border = ''; + expect(style.cssText).toEqual(''); + style.setProperty('border', '1px solid black'); + expect(style.cssText).toEqual('border: 1px solid black;'); + }); + + test('setting opacity should work', () => { + var style = new CSSStyleDeclaration(); + style.setProperty('opacity', 0.75); + expect(style.cssText).toEqual('opacity: 0.75;'); + style.opacity = '0.50'; + expect(style.cssText).toEqual('opacity: 0.5;'); + style.opacity = 1; + expect(style.cssText).toEqual('opacity: 1;'); + }); + + test('width and height of auto should work', () => { + var style = new CSSStyleDeclaration(); + style.width = 'auto'; + expect(style.cssText).toEqual('width: auto;'); + expect(style.width).toEqual('auto'); + style = new CSSStyleDeclaration(); + style.height = 'auto'; + expect(style.cssText).toEqual('height: auto;'); + expect(style.height).toEqual('auto'); + }); + + test('padding and margin should set/clear shorthand properties', () => { + var style = new CSSStyleDeclaration(); + var parts = ['Top', 'Right', 'Bottom', 'Left']; + var testParts = function(name, v, V) { + style[name] = v; + for (var i = 0; i < 4; i++) { + var part = name + parts[i]; + expect(style[part]).toEqual(V[i]); + } + + expect(style[name]).toEqual(v); + style[name] = ''; + }; + testParts('padding', '1px', ['1px', '1px', '1px', '1px']); + testParts('padding', '1px 2%', ['1px', '2%', '1px', '2%']); + testParts('padding', '1px 2px 3px', ['1px', '2px', '3px', '2px']); + testParts('padding', '1px 2px 3px 4px', ['1px', '2px', '3px', '4px']); + style.paddingTop = style.paddingRight = style.paddingBottom = style.paddingLeft = '1px'; + testParts('padding', '', ['', '', '', '']); + testParts('margin', '1px', ['1px', '1px', '1px', '1px']); + testParts('margin', '1px auto', ['1px', 'auto', '1px', 'auto']); + testParts('margin', '1px 2% 3px', ['1px', '2%', '3px', '2%']); + testParts('margin', '1px 2px 3px 4px', ['1px', '2px', '3px', '4px']); + style.marginTop = style.marginRight = style.marginBottom = style.marginLeft = '1px'; + testParts('margin', '', ['', '', '', '']); + }); + + test('padding and margin shorthands should set main properties', () => { + var style = new CSSStyleDeclaration(); + var parts = ['Top', 'Right', 'Bottom', 'Left']; + var testParts = function(name, v, V) { + var expected; + for (var i = 0; i < 4; i++) { + style[name] = v; + style[name + parts[i]] = V; + expected = v.split(/ /); + expected[i] = V; + expected = expected.join(' '); + + expect(style[name]).toEqual(expected); + } + }; + testParts('padding', '1px 2px 3px 4px', '10px'); + testParts('margin', '1px 2px 3px 4px', '10px'); + testParts('margin', '1px 2px 3px 4px', 'auto'); + }); + + test('setting a value to 0 should return the string value', () => { + var style = new CSSStyleDeclaration(); + style.setProperty('fill-opacity', 0); + expect(style.fillOpacity).toEqual('0'); + }); + + test('onchange callback should be called when the csstext changes', () => { + var style = new CSSStyleDeclaration(function(cssText) { + expect(cssText).toEqual('opacity: 0;'); + }); + style.setProperty('opacity', 0); + }); + + test('setting float should work the same as cssfloat', () => { + var style = new CSSStyleDeclaration(); + style.float = 'left'; + expect(style.cssFloat).toEqual('left'); + }); + + test('setting improper css to csstext should not throw', () => { + var style = new CSSStyleDeclaration(); + style.cssText = 'color: '; + expect(style.cssText).toEqual(''); + style.color = 'black'; + style.cssText = 'float: '; + expect(style.cssText).toEqual(''); + }); + + test('url parsing works with quotes', () => { + var style = new CSSStyleDeclaration(); + style.backgroundImage = 'url(http://some/url/here1.png)'; + expect(style.backgroundImage).toEqual('url(http://some/url/here1.png)'); + style.backgroundImage = "url('http://some/url/here2.png')"; + expect(style.backgroundImage).toEqual('url(http://some/url/here2.png)'); + style.backgroundImage = 'url("http://some/url/here3.png")'; + expect(style.backgroundImage).toEqual('url(http://some/url/here3.png)'); + }); + + test('setting 0 to a padding or margin works', () => { + var style = new CSSStyleDeclaration(); + style.padding = 0; + expect(style.cssText).toEqual('padding: 0px;'); + style.margin = '1em'; + style.marginTop = '0'; + expect(style.marginTop).toEqual('0px'); + }); + + test('setting ex units to a padding or margin works', () => { + var style = new CSSStyleDeclaration(); + style.padding = '1ex'; + expect(style.cssText).toEqual('padding: 1ex;'); + style.margin = '1em'; + style.marginTop = '0.5ex'; + expect(style.marginTop).toEqual('0.5ex'); + }); + + test('setting null to background works', () => { + var style = new CSSStyleDeclaration(); + style.background = 'red'; + expect(style.cssText).toEqual('background: red;'); + style.background = null; + expect(style.cssText).toEqual(''); + }); + + test('flex properties should keep their values', () => { + var style = new CSSStyleDeclaration(); + style.flexDirection = 'column'; + expect(style.cssText).toEqual('flex-direction: column;'); + style.flexDirection = 'row'; + expect(style.cssText).toEqual('flex-direction: row;'); + }); + + test('camelcase properties are not assigned with `.setproperty()`', () => { + var style = new CSSStyleDeclaration(); + style.setProperty('fontSize', '12px'); + expect(style.cssText).toEqual(''); + }); + + test('casing is ignored in `.setproperty()`', () => { + var style = new CSSStyleDeclaration(); + style.setProperty('FoNt-SiZe', '12px'); + expect(style.fontSize).toEqual('12px'); + expect(style.getPropertyValue('font-size')).toEqual('12px'); + }); + + test('support non string entries in border-spacing', () => { + var style = new CSSStyleDeclaration(); + style.borderSpacing = 0; + expect(style.cssText).toEqual('border-spacing: 0px;'); + }); + + test('float should be valid property for `.setproperty()`', () => { + var style = new CSSStyleDeclaration(); + style.setProperty('float', 'left'); + expect(style.float).toEqual('left'); + expect(style.getPropertyValue('float')).toEqual('left'); + }); + + test('flex-shrink works', () => { + var style = new CSSStyleDeclaration(); + style.setProperty('flex-shrink', 0); + expect(style.getPropertyValue('flex-shrink')).toEqual('0'); + style.setProperty('flex-shrink', 1); + expect(style.getPropertyValue('flex-shrink')).toEqual('1'); + expect(style.cssText).toEqual('flex-shrink: 1;'); + }); + + test('flex-grow works', () => { + var style = new CSSStyleDeclaration(); + style.setProperty('flex-grow', 2); + expect(style.getPropertyValue('flex-grow')).toEqual('2'); + expect(style.cssText).toEqual('flex-grow: 2;'); + }); + + test('flex-basis works', () => { + var style = new CSSStyleDeclaration(); + style.setProperty('flex-basis', 0); + expect(style.getPropertyValue('flex-basis')).toEqual('0px'); + style.setProperty('flex-basis', '250px'); + expect(style.getPropertyValue('flex-basis')).toEqual('250px'); + style.setProperty('flex-basis', '10em'); + expect(style.getPropertyValue('flex-basis')).toEqual('10em'); + style.setProperty('flex-basis', '30%'); + expect(style.getPropertyValue('flex-basis')).toEqual('30%'); + expect(style.cssText).toEqual('flex-basis: 30%;'); + }); + + test('shorthand flex works', () => { + var style = new CSSStyleDeclaration(); + style.setProperty('flex', 'none'); + expect(style.getPropertyValue('flex-grow')).toEqual('0'); + expect(style.getPropertyValue('flex-shrink')).toEqual('0'); + expect(style.getPropertyValue('flex-basis')).toEqual('auto'); + style.removeProperty('flex'); + style.removeProperty('flex-basis'); + style.setProperty('flex', 'auto'); + expect(style.getPropertyValue('flex-grow')).toEqual(''); + expect(style.getPropertyValue('flex-shrink')).toEqual(''); + expect(style.getPropertyValue('flex-basis')).toEqual('auto'); + style.removeProperty('flex'); + style.setProperty('flex', '0 1 250px'); + expect(style.getPropertyValue('flex')).toEqual('0 1 250px'); + expect(style.getPropertyValue('flex-grow')).toEqual('0'); + expect(style.getPropertyValue('flex-shrink')).toEqual('1'); + expect(style.getPropertyValue('flex-basis')).toEqual('250px'); + style.removeProperty('flex'); + style.setProperty('flex', '2'); + expect(style.getPropertyValue('flex-grow')).toEqual('2'); + expect(style.getPropertyValue('flex-shrink')).toEqual(''); + expect(style.getPropertyValue('flex-basis')).toEqual(''); + style.removeProperty('flex'); + style.setProperty('flex', '20%'); + expect(style.getPropertyValue('flex-grow')).toEqual(''); + expect(style.getPropertyValue('flex-shrink')).toEqual(''); + expect(style.getPropertyValue('flex-basis')).toEqual('20%'); + style.removeProperty('flex'); + style.setProperty('flex', '2 2'); + expect(style.getPropertyValue('flex-grow')).toEqual('2'); + expect(style.getPropertyValue('flex-shrink')).toEqual('2'); + expect(style.getPropertyValue('flex-basis')).toEqual(''); + style.removeProperty('flex'); + }); + + test('font-size get a valid value', () => { + var style = new CSSStyleDeclaration(); + const invalidValue = '1r5px'; + style.cssText = 'font-size: 15px'; + expect(1).toEqual(style.length); + style.cssText = `font-size: ${invalidValue}`; + expect(0).toEqual(style.length); + expect(undefined).toEqual(style[0]); + }); + + test('getPropertyValue for custom properties in cssText', () => { + const style = new CSSStyleDeclaration(); + style.cssText = '--foo: red'; + + expect(style.getPropertyValue('--foo')).toEqual('red'); + }); + + test('getPropertyValue for custom properties with setProperty', () => { + const style = new CSSStyleDeclaration(); + style.setProperty('--bar', 'blue'); + + expect(style.getPropertyValue('--bar')).toEqual('blue'); + }); + + test('getPropertyValue for custom properties with object setter', () => { + const style = new CSSStyleDeclaration(); + style['--baz'] = 'yellow'; + + expect(style.getPropertyValue('--baz')).toEqual(''); + }); + + test('custom properties are case-sensitive', () => { + const style = new CSSStyleDeclaration(); + style.cssText = '--fOo: purple'; + + expect(style.getPropertyValue('--foo')).toEqual(''); + expect(style.getPropertyValue('--fOo')).toEqual('purple'); + }); + + test('supports calc', () => { + const style = new CSSStyleDeclaration(); + style.setProperty('width', 'calc(100% - 100px)'); + expect(style.getPropertyValue('width')).toEqual('calc(100% - 100px)'); + }); +}); diff --git a/node_modules/cssstyle/lib/allExtraProperties.js b/node_modules/cssstyle/lib/allExtraProperties.js new file mode 100644 index 0000000..44b9c29 --- /dev/null +++ b/node_modules/cssstyle/lib/allExtraProperties.js @@ -0,0 +1,67 @@ +'use strict'; + +/** + * This file contains all implemented properties that are not a part of any + * current specifications or drafts, but are handled by browsers nevertheless. + */ + +var allWebkitProperties = require('./allWebkitProperties'); + +module.exports = new Set( + [ + 'background-position-x', + 'background-position-y', + 'background-repeat-x', + 'background-repeat-y', + 'color-interpolation', + 'color-profile', + 'color-rendering', + 'css-float', + 'enable-background', + 'fill', + 'fill-opacity', + 'fill-rule', + 'glyph-orientation-horizontal', + 'image-rendering', + 'kerning', + 'marker', + 'marker-end', + 'marker-mid', + 'marker-offset', + 'marker-start', + 'marks', + 'pointer-events', + 'shape-rendering', + 'size', + 'src', + 'stop-color', + 'stop-opacity', + 'stroke', + 'stroke-dasharray', + 'stroke-dashoffset', + 'stroke-linecap', + 'stroke-linejoin', + 'stroke-miterlimit', + 'stroke-opacity', + 'stroke-width', + 'text-anchor', + 'text-line-through', + 'text-line-through-color', + 'text-line-through-mode', + 'text-line-through-style', + 'text-line-through-width', + 'text-overline', + 'text-overline-color', + 'text-overline-mode', + 'text-overline-style', + 'text-overline-width', + 'text-rendering', + 'text-underline', + 'text-underline-color', + 'text-underline-mode', + 'text-underline-style', + 'text-underline-width', + 'unicode-range', + 'vector-effect', + ].concat(allWebkitProperties) +); diff --git a/node_modules/cssstyle/lib/allProperties.js b/node_modules/cssstyle/lib/allProperties.js new file mode 100644 index 0000000..892a398 --- /dev/null +++ b/node_modules/cssstyle/lib/allProperties.js @@ -0,0 +1,462 @@ +'use strict'; + +// autogenerated - 4/29/2020 + +/* + * + * https://www.w3.org/Style/CSS/all-properties.en.html + */ + +module.exports = new Set([ + 'align-content', + 'align-items', + 'align-self', + 'alignment-baseline', + 'all', + 'animation', + 'animation-delay', + 'animation-direction', + 'animation-duration', + 'animation-fill-mode', + 'animation-iteration-count', + 'animation-name', + 'animation-play-state', + 'animation-timing-function', + 'appearance', + 'azimuth', + 'background', + 'background-attachment', + 'background-blend-mode', + 'background-clip', + 'background-color', + 'background-image', + 'background-origin', + 'background-position', + 'background-repeat', + 'background-size', + 'baseline-shift', + 'block-overflow', + 'block-size', + 'bookmark-label', + 'bookmark-level', + 'bookmark-state', + 'border', + 'border-block', + 'border-block-color', + 'border-block-end', + 'border-block-end-color', + 'border-block-end-style', + 'border-block-end-width', + 'border-block-start', + 'border-block-start-color', + 'border-block-start-style', + 'border-block-start-width', + 'border-block-style', + 'border-block-width', + 'border-bottom', + 'border-bottom-color', + 'border-bottom-left-radius', + 'border-bottom-right-radius', + 'border-bottom-style', + 'border-bottom-width', + 'border-boundary', + 'border-collapse', + 'border-color', + 'border-end-end-radius', + 'border-end-start-radius', + 'border-image', + 'border-image-outset', + 'border-image-repeat', + 'border-image-slice', + 'border-image-source', + 'border-image-width', + 'border-inline', + 'border-inline-color', + 'border-inline-end', + 'border-inline-end-color', + 'border-inline-end-style', + 'border-inline-end-width', + 'border-inline-start', + 'border-inline-start-color', + 'border-inline-start-style', + 'border-inline-start-width', + 'border-inline-style', + 'border-inline-width', + 'border-left', + 'border-left-color', + 'border-left-style', + 'border-left-width', + 'border-radius', + 'border-right', + 'border-right-color', + 'border-right-style', + 'border-right-width', + 'border-spacing', + 'border-start-end-radius', + 'border-start-start-radius', + 'border-style', + 'border-top', + 'border-top-color', + 'border-top-left-radius', + 'border-top-right-radius', + 'border-top-style', + 'border-top-width', + 'border-width', + 'bottom', + 'box-decoration-break', + 'box-shadow', + 'box-sizing', + 'box-snap', + 'break-after', + 'break-before', + 'break-inside', + 'caption-side', + 'caret', + 'caret-color', + 'caret-shape', + 'chains', + 'clear', + 'clip', + 'clip-path', + 'clip-rule', + 'color', + 'color-adjust', + 'color-interpolation-filters', + 'color-scheme', + 'column-count', + 'column-fill', + 'column-gap', + 'column-rule', + 'column-rule-color', + 'column-rule-style', + 'column-rule-width', + 'column-span', + 'column-width', + 'columns', + 'contain', + 'content', + 'continue', + 'counter-increment', + 'counter-reset', + 'counter-set', + 'cue', + 'cue-after', + 'cue-before', + 'cursor', + 'direction', + 'display', + 'dominant-baseline', + 'elevation', + 'empty-cells', + 'filter', + 'flex', + 'flex-basis', + 'flex-direction', + 'flex-flow', + 'flex-grow', + 'flex-shrink', + 'flex-wrap', + 'float', + 'flood-color', + 'flood-opacity', + 'flow', + 'flow-from', + 'flow-into', + 'font', + 'font-family', + 'font-feature-settings', + 'font-kerning', + 'font-language-override', + 'font-optical-sizing', + 'font-palette', + 'font-size', + 'font-size-adjust', + 'font-stretch', + 'font-style', + 'font-synthesis', + 'font-synthesis-small-caps', + 'font-synthesis-style', + 'font-synthesis-weight', + 'font-variant', + 'font-variant-alternates', + 'font-variant-caps', + 'font-variant-east-asian', + 'font-variant-emoji', + 'font-variant-ligatures', + 'font-variant-numeric', + 'font-variant-position', + 'font-variation-settings', + 'font-weight', + 'footnote-display', + 'footnote-policy', + 'forced-color-adjust', + 'gap', + 'glyph-orientation-vertical', + 'grid', + 'grid-area', + 'grid-auto-columns', + 'grid-auto-flow', + 'grid-auto-rows', + 'grid-column', + 'grid-column-end', + 'grid-column-start', + 'grid-row', + 'grid-row-end', + 'grid-row-start', + 'grid-template', + 'grid-template-areas', + 'grid-template-columns', + 'grid-template-rows', + 'hanging-punctuation', + 'height', + 'hyphenate-character', + 'hyphenate-limit-chars', + 'hyphenate-limit-last', + 'hyphenate-limit-lines', + 'hyphenate-limit-zone', + 'hyphens', + 'image-orientation', + 'image-rendering', + 'image-resolution', + 'initial-letters', + 'initial-letters-align', + 'initial-letters-wrap', + 'inline-size', + 'inline-sizing', + 'inset', + 'inset-block', + 'inset-block-end', + 'inset-block-start', + 'inset-inline', + 'inset-inline-end', + 'inset-inline-start', + 'isolation', + 'justify-content', + 'justify-items', + 'justify-self', + 'left', + 'letter-spacing', + 'lighting-color', + 'line-break', + 'line-clamp', + 'line-grid', + 'line-height', + 'line-padding', + 'line-snap', + 'list-style', + 'list-style-image', + 'list-style-position', + 'list-style-type', + 'margin', + 'margin-block', + 'margin-block-end', + 'margin-block-start', + 'margin-bottom', + 'margin-inline', + 'margin-inline-end', + 'margin-inline-start', + 'margin-left', + 'margin-right', + 'margin-top', + 'marker-side', + 'mask', + 'mask-border', + 'mask-border-mode', + 'mask-border-outset', + 'mask-border-repeat', + 'mask-border-slice', + 'mask-border-source', + 'mask-border-width', + 'mask-clip', + 'mask-composite', + 'mask-image', + 'mask-mode', + 'mask-origin', + 'mask-position', + 'mask-repeat', + 'mask-size', + 'mask-type', + 'max-block-size', + 'max-height', + 'max-inline-size', + 'max-lines', + 'max-width', + 'min-block-size', + 'min-height', + 'min-inline-size', + 'min-width', + 'mix-blend-mode', + 'nav-down', + 'nav-left', + 'nav-right', + 'nav-up', + 'object-fit', + 'object-position', + 'offset', + 'offset-after', + 'offset-anchor', + 'offset-before', + 'offset-distance', + 'offset-end', + 'offset-path', + 'offset-position', + 'offset-rotate', + 'offset-start', + 'opacity', + 'order', + 'orphans', + 'outline', + 'outline-color', + 'outline-offset', + 'outline-style', + 'outline-width', + 'overflow', + 'overflow-block', + 'overflow-inline', + 'overflow-wrap', + 'overflow-x', + 'overflow-y', + 'padding', + 'padding-block', + 'padding-block-end', + 'padding-block-start', + 'padding-bottom', + 'padding-inline', + 'padding-inline-end', + 'padding-inline-start', + 'padding-left', + 'padding-right', + 'padding-top', + 'page', + 'page-break-after', + 'page-break-before', + 'page-break-inside', + 'pause', + 'pause-after', + 'pause-before', + 'pitch', + 'pitch-range', + 'place-content', + 'place-items', + 'place-self', + 'play-during', + 'position', + 'quotes', + 'region-fragment', + 'resize', + 'rest', + 'rest-after', + 'rest-before', + 'richness', + 'right', + 'row-gap', + 'ruby-align', + 'ruby-merge', + 'ruby-position', + 'running', + 'scroll-behavior', + 'scroll-margin', + 'scroll-margin-block', + 'scroll-margin-block-end', + 'scroll-margin-block-start', + 'scroll-margin-bottom', + 'scroll-margin-inline', + 'scroll-margin-inline-end', + 'scroll-margin-inline-start', + 'scroll-margin-left', + 'scroll-margin-right', + 'scroll-margin-top', + 'scroll-padding', + 'scroll-padding-block', + 'scroll-padding-block-end', + 'scroll-padding-block-start', + 'scroll-padding-bottom', + 'scroll-padding-inline', + 'scroll-padding-inline-end', + 'scroll-padding-inline-start', + 'scroll-padding-left', + 'scroll-padding-right', + 'scroll-padding-top', + 'scroll-snap-align', + 'scroll-snap-stop', + 'scroll-snap-type', + 'shape-image-threshold', + 'shape-inside', + 'shape-margin', + 'shape-outside', + 'spatial-navigation-action', + 'spatial-navigation-contain', + 'spatial-navigation-function', + 'speak', + 'speak-as', + 'speak-header', + 'speak-numeral', + 'speak-punctuation', + 'speech-rate', + 'stress', + 'string-set', + 'tab-size', + 'table-layout', + 'text-align', + 'text-align-all', + 'text-align-last', + 'text-combine-upright', + 'text-decoration', + 'text-decoration-color', + 'text-decoration-line', + 'text-decoration-style', + 'text-emphasis', + 'text-emphasis-color', + 'text-emphasis-position', + 'text-emphasis-style', + 'text-group-align', + 'text-indent', + 'text-justify', + 'text-orientation', + 'text-overflow', + 'text-shadow', + 'text-space-collapse', + 'text-space-trim', + 'text-spacing', + 'text-transform', + 'text-underline-position', + 'text-wrap', + 'top', + 'transform', + 'transform-box', + 'transform-origin', + 'transition', + 'transition-delay', + 'transition-duration', + 'transition-property', + 'transition-timing-function', + 'unicode-bidi', + 'user-select', + 'vertical-align', + 'visibility', + 'voice-balance', + 'voice-duration', + 'voice-family', + 'voice-pitch', + 'voice-range', + 'voice-rate', + 'voice-stress', + 'voice-volume', + 'volume', + 'white-space', + 'widows', + 'width', + 'will-change', + 'word-boundary-detection', + 'word-boundary-expansion', + 'word-break', + 'word-spacing', + 'word-wrap', + 'wrap-after', + 'wrap-before', + 'wrap-flow', + 'wrap-inside', + 'wrap-through', + 'writing-mode', + 'z-index', +]); diff --git a/node_modules/cssstyle/lib/allWebkitProperties.js b/node_modules/cssstyle/lib/allWebkitProperties.js new file mode 100644 index 0000000..d6e71df --- /dev/null +++ b/node_modules/cssstyle/lib/allWebkitProperties.js @@ -0,0 +1,194 @@ +'use strict'; + +/** + * This file contains all implemented properties that are not a part of any + * current specifications or drafts, but are handled by browsers nevertheless. + */ + +module.exports = [ + 'animation', + 'animation-delay', + 'animation-direction', + 'animation-duration', + 'animation-fill-mode', + 'animation-iteration-count', + 'animation-name', + 'animation-play-state', + 'animation-timing-function', + 'appearance', + 'aspect-ratio', + 'backface-visibility', + 'background-clip', + 'background-composite', + 'background-origin', + 'background-size', + 'border-after', + 'border-after-color', + 'border-after-style', + 'border-after-width', + 'border-before', + 'border-before-color', + 'border-before-style', + 'border-before-width', + 'border-end', + 'border-end-color', + 'border-end-style', + 'border-end-width', + 'border-fit', + 'border-horizontal-spacing', + 'border-image', + 'border-radius', + 'border-start', + 'border-start-color', + 'border-start-style', + 'border-start-width', + 'border-vertical-spacing', + 'box-align', + 'box-direction', + 'box-flex', + 'box-flex-group', + 'box-lines', + 'box-ordinal-group', + 'box-orient', + 'box-pack', + 'box-reflect', + 'box-shadow', + 'color-correction', + 'column-axis', + 'column-break-after', + 'column-break-before', + 'column-break-inside', + 'column-count', + 'column-gap', + 'column-rule', + 'column-rule-color', + 'column-rule-style', + 'column-rule-width', + 'columns', + 'column-span', + 'column-width', + 'filter', + 'flex-align', + 'flex-direction', + 'flex-flow', + 'flex-item-align', + 'flex-line-pack', + 'flex-order', + 'flex-pack', + 'flex-wrap', + 'flow-from', + 'flow-into', + 'font-feature-settings', + 'font-kerning', + 'font-size-delta', + 'font-smoothing', + 'font-variant-ligatures', + 'highlight', + 'hyphenate-character', + 'hyphenate-limit-after', + 'hyphenate-limit-before', + 'hyphenate-limit-lines', + 'hyphens', + 'line-align', + 'line-box-contain', + 'line-break', + 'line-clamp', + 'line-grid', + 'line-snap', + 'locale', + 'logical-height', + 'logical-width', + 'margin-after', + 'margin-after-collapse', + 'margin-before', + 'margin-before-collapse', + 'margin-bottom-collapse', + 'margin-collapse', + 'margin-end', + 'margin-start', + 'margin-top-collapse', + 'marquee', + 'marquee-direction', + 'marquee-increment', + 'marquee-repetition', + 'marquee-speed', + 'marquee-style', + 'mask', + 'mask-attachment', + 'mask-box-image', + 'mask-box-image-outset', + 'mask-box-image-repeat', + 'mask-box-image-slice', + 'mask-box-image-source', + 'mask-box-image-width', + 'mask-clip', + 'mask-composite', + 'mask-image', + 'mask-origin', + 'mask-position', + 'mask-position-x', + 'mask-position-y', + 'mask-repeat', + 'mask-repeat-x', + 'mask-repeat-y', + 'mask-size', + 'match-nearest-mail-blockquote-color', + 'max-logical-height', + 'max-logical-width', + 'min-logical-height', + 'min-logical-width', + 'nbsp-mode', + 'overflow-scrolling', + 'padding-after', + 'padding-before', + 'padding-end', + 'padding-start', + 'perspective', + 'perspective-origin', + 'perspective-origin-x', + 'perspective-origin-y', + 'print-color-adjust', + 'region-break-after', + 'region-break-before', + 'region-break-inside', + 'region-overflow', + 'rtl-ordering', + 'svg-shadow', + 'tap-highlight-color', + 'text-combine', + 'text-decorations-in-effect', + 'text-emphasis', + 'text-emphasis-color', + 'text-emphasis-position', + 'text-emphasis-style', + 'text-fill-color', + 'text-orientation', + 'text-security', + 'text-size-adjust', + 'text-stroke', + 'text-stroke-color', + 'text-stroke-width', + 'transform', + 'transform-origin', + 'transform-origin-x', + 'transform-origin-y', + 'transform-origin-z', + 'transform-style', + 'transition', + 'transition-delay', + 'transition-duration', + 'transition-property', + 'transition-timing-function', + 'user-drag', + 'user-modify', + 'user-select', + 'wrap', + 'wrap-flow', + 'wrap-margin', + 'wrap-padding', + 'wrap-shape-inside', + 'wrap-shape-outside', + 'wrap-through', + 'writing-mode', + 'zoom', +].map(prop => 'webkit-' + prop); diff --git a/node_modules/cssstyle/lib/constants.js b/node_modules/cssstyle/lib/constants.js new file mode 100644 index 0000000..1b58869 --- /dev/null +++ b/node_modules/cssstyle/lib/constants.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports.POSITION_AT_SHORTHAND = { + first: 0, + second: 1, +}; diff --git a/node_modules/cssstyle/lib/implementedProperties.js b/node_modules/cssstyle/lib/implementedProperties.js new file mode 100644 index 0000000..3828a80 --- /dev/null +++ b/node_modules/cssstyle/lib/implementedProperties.js @@ -0,0 +1,90 @@ +'use strict'; + +// autogenerated - 4/29/2020 + +/* + * + * https://www.w3.org/Style/CSS/all-properties.en.html + */ + +var implementedProperties = new Set(); +implementedProperties.add("azimuth"); +implementedProperties.add("background"); +implementedProperties.add("background-attachment"); +implementedProperties.add("background-color"); +implementedProperties.add("background-image"); +implementedProperties.add("background-position"); +implementedProperties.add("background-repeat"); +implementedProperties.add("border"); +implementedProperties.add("border-bottom"); +implementedProperties.add("border-bottom-color"); +implementedProperties.add("border-bottom-style"); +implementedProperties.add("border-bottom-width"); +implementedProperties.add("border-collapse"); +implementedProperties.add("border-color"); +implementedProperties.add("border-left"); +implementedProperties.add("border-left-color"); +implementedProperties.add("border-left-style"); +implementedProperties.add("border-left-width"); +implementedProperties.add("border-right"); +implementedProperties.add("border-right-color"); +implementedProperties.add("border-right-style"); +implementedProperties.add("border-right-width"); +implementedProperties.add("border-spacing"); +implementedProperties.add("border-style"); +implementedProperties.add("border-top"); +implementedProperties.add("border-top-color"); +implementedProperties.add("border-top-style"); +implementedProperties.add("border-top-width"); +implementedProperties.add("border-width"); +implementedProperties.add("bottom"); +implementedProperties.add("clear"); +implementedProperties.add("clip"); +implementedProperties.add("color"); +implementedProperties.add("css-float"); +implementedProperties.add("flex"); +implementedProperties.add("flex-basis"); +implementedProperties.add("flex-grow"); +implementedProperties.add("flex-shrink"); +implementedProperties.add("float"); +implementedProperties.add("flood-color"); +implementedProperties.add("font"); +implementedProperties.add("font-family"); +implementedProperties.add("font-size"); +implementedProperties.add("font-style"); +implementedProperties.add("font-variant"); +implementedProperties.add("font-weight"); +implementedProperties.add("height"); +implementedProperties.add("left"); +implementedProperties.add("lighting-color"); +implementedProperties.add("line-height"); +implementedProperties.add("margin"); +implementedProperties.add("margin-bottom"); +implementedProperties.add("margin-left"); +implementedProperties.add("margin-right"); +implementedProperties.add("margin-top"); +implementedProperties.add("opacity"); +implementedProperties.add("outline-color"); +implementedProperties.add("padding"); +implementedProperties.add("padding-bottom"); +implementedProperties.add("padding-left"); +implementedProperties.add("padding-right"); +implementedProperties.add("padding-top"); +implementedProperties.add("right"); +implementedProperties.add("stop-color"); +implementedProperties.add("text-line-through-color"); +implementedProperties.add("text-overline-color"); +implementedProperties.add("text-underline-color"); +implementedProperties.add("top"); +implementedProperties.add("webkit-border-after-color"); +implementedProperties.add("webkit-border-before-color"); +implementedProperties.add("webkit-border-end-color"); +implementedProperties.add("webkit-border-start-color"); +implementedProperties.add("webkit-column-rule-color"); +implementedProperties.add("webkit-match-nearest-mail-blockquote-color"); +implementedProperties.add("webkit-tap-highlight-color"); +implementedProperties.add("webkit-text-emphasis-color"); +implementedProperties.add("webkit-text-fill-color"); +implementedProperties.add("webkit-text-stroke-color"); +implementedProperties.add("width"); +module.exports = implementedProperties; diff --git a/node_modules/cssstyle/lib/named_colors.json b/node_modules/cssstyle/lib/named_colors.json new file mode 100644 index 0000000..63667a5 --- /dev/null +++ b/node_modules/cssstyle/lib/named_colors.json @@ -0,0 +1,152 @@ +[ + "aliceblue", + "antiquewhite", + "aqua", + "aquamarine", + "azure", + "beige", + "bisque", + "black", + "blanchedalmond", + "blue", + "blueviolet", + "brown", + "burlywood", + "cadetblue", + "chartreuse", + "chocolate", + "coral", + "cornflowerblue", + "cornsilk", + "crimson", + "cyan", + "darkblue", + "darkcyan", + "darkgoldenrod", + "darkgray", + "darkgreen", + "darkgrey", + "darkkhaki", + "darkmagenta", + "darkolivegreen", + "darkorange", + "darkorchid", + "darkred", + "darksalmon", + "darkseagreen", + "darkslateblue", + "darkslategray", + "darkslategrey", + "darkturquoise", + "darkviolet", + "deeppink", + "deepskyblue", + "dimgray", + "dimgrey", + "dodgerblue", + "firebrick", + "floralwhite", + "forestgreen", + "fuchsia", + "gainsboro", + "ghostwhite", + "gold", + "goldenrod", + "gray", + "green", + "greenyellow", + "grey", + "honeydew", + "hotpink", + "indianred", + "indigo", + "ivory", + "khaki", + "lavender", + "lavenderblush", + "lawngreen", + "lemonchiffon", + "lightblue", + "lightcoral", + "lightcyan", + "lightgoldenrodyellow", + "lightgray", + "lightgreen", + "lightgrey", + "lightpink", + "lightsalmon", + "lightseagreen", + "lightskyblue", + "lightslategray", + "lightslategrey", + "lightsteelblue", + "lightyellow", + "lime", + "limegreen", + "linen", + "magenta", + "maroon", + "mediumaquamarine", + "mediumblue", + "mediumorchid", + "mediumpurple", + "mediumseagreen", + "mediumslateblue", + "mediumspringgreen", + "mediumturquoise", + "mediumvioletred", + "midnightblue", + "mintcream", + "mistyrose", + "moccasin", + "navajowhite", + "navy", + "oldlace", + "olive", + "olivedrab", + "orange", + "orangered", + "orchid", + "palegoldenrod", + "palegreen", + "paleturquoise", + "palevioletred", + "papayawhip", + "peachpuff", + "peru", + "pink", + "plum", + "powderblue", + "purple", + "rebeccapurple", + "red", + "rosybrown", + "royalblue", + "saddlebrown", + "salmon", + "sandybrown", + "seagreen", + "seashell", + "sienna", + "silver", + "skyblue", + "slateblue", + "slategray", + "slategrey", + "snow", + "springgreen", + "steelblue", + "tan", + "teal", + "thistle", + "tomato", + "turquoise", + "violet", + "wheat", + "white", + "whitesmoke", + "yellow", + "yellowgreen", + "transparent", + "currentcolor" +] diff --git a/node_modules/cssstyle/lib/parsers.js b/node_modules/cssstyle/lib/parsers.js new file mode 100644 index 0000000..8ecdf5e --- /dev/null +++ b/node_modules/cssstyle/lib/parsers.js @@ -0,0 +1,722 @@ +/********************************************************************* + * These are commonly used parsers for CSS Values they take a string * + * to parse and return a string after it's been converted, if needed * + ********************************************************************/ +'use strict'; + +const namedColors = require('./named_colors.json'); +const { hslToRgb } = require('./utils/colorSpace'); + +exports.TYPES = { + INTEGER: 1, + NUMBER: 2, + LENGTH: 3, + PERCENT: 4, + URL: 5, + COLOR: 6, + STRING: 7, + ANGLE: 8, + KEYWORD: 9, + NULL_OR_EMPTY_STR: 10, + CALC: 11, +}; + +// rough regular expressions +var integerRegEx = /^[-+]?[0-9]+$/; +var numberRegEx = /^[-+]?[0-9]*\.?[0-9]+$/; +var lengthRegEx = /^(0|[-+]?[0-9]*\.?[0-9]+(in|cm|em|mm|pt|pc|px|ex|rem|vh|vw|ch))$/; +var percentRegEx = /^[-+]?[0-9]*\.?[0-9]+%$/; +var urlRegEx = /^url\(\s*([^)]*)\s*\)$/; +var stringRegEx = /^("[^"]*"|'[^']*')$/; +var colorRegEx1 = /^#([0-9a-fA-F]{3,4}){1,2}$/; +var colorRegEx2 = /^rgb\(([^)]*)\)$/; +var colorRegEx3 = /^rgba\(([^)]*)\)$/; +var calcRegEx = /^calc\(([^)]*)\)$/; +var colorRegEx4 = /^hsla?\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*(,\s*(-?\d+|-?\d*.\d+)\s*)?\)/; +var angleRegEx = /^([-+]?[0-9]*\.?[0-9]+)(deg|grad|rad)$/; + +// This will return one of the above types based on the passed in string +exports.valueType = function valueType(val) { + if (val === '' || val === null) { + return exports.TYPES.NULL_OR_EMPTY_STR; + } + if (typeof val === 'number') { + val = val.toString(); + } + + if (typeof val !== 'string') { + return undefined; + } + + if (integerRegEx.test(val)) { + return exports.TYPES.INTEGER; + } + if (numberRegEx.test(val)) { + return exports.TYPES.NUMBER; + } + if (lengthRegEx.test(val)) { + return exports.TYPES.LENGTH; + } + if (percentRegEx.test(val)) { + return exports.TYPES.PERCENT; + } + if (urlRegEx.test(val)) { + return exports.TYPES.URL; + } + if (calcRegEx.test(val)) { + return exports.TYPES.CALC; + } + if (stringRegEx.test(val)) { + return exports.TYPES.STRING; + } + if (angleRegEx.test(val)) { + return exports.TYPES.ANGLE; + } + if (colorRegEx1.test(val)) { + return exports.TYPES.COLOR; + } + + var res = colorRegEx2.exec(val); + var parts; + if (res !== null) { + parts = res[1].split(/\s*,\s*/); + if (parts.length !== 3) { + return undefined; + } + if ( + parts.every(percentRegEx.test.bind(percentRegEx)) || + parts.every(integerRegEx.test.bind(integerRegEx)) + ) { + return exports.TYPES.COLOR; + } + return undefined; + } + res = colorRegEx3.exec(val); + if (res !== null) { + parts = res[1].split(/\s*,\s*/); + if (parts.length !== 4) { + return undefined; + } + if ( + parts.slice(0, 3).every(percentRegEx.test.bind(percentRegEx)) || + parts.slice(0, 3).every(integerRegEx.test.bind(integerRegEx)) + ) { + if (numberRegEx.test(parts[3])) { + return exports.TYPES.COLOR; + } + } + return undefined; + } + + if (colorRegEx4.test(val)) { + return exports.TYPES.COLOR; + } + + // could still be a color, one of the standard keyword colors + val = val.toLowerCase(); + + if (namedColors.includes(val)) { + return exports.TYPES.COLOR; + } + + switch (val) { + // the following are deprecated in CSS3 + case 'activeborder': + case 'activecaption': + case 'appworkspace': + case 'background': + case 'buttonface': + case 'buttonhighlight': + case 'buttonshadow': + case 'buttontext': + case 'captiontext': + case 'graytext': + case 'highlight': + case 'highlighttext': + case 'inactiveborder': + case 'inactivecaption': + case 'inactivecaptiontext': + case 'infobackground': + case 'infotext': + case 'menu': + case 'menutext': + case 'scrollbar': + case 'threeddarkshadow': + case 'threedface': + case 'threedhighlight': + case 'threedlightshadow': + case 'threedshadow': + case 'window': + case 'windowframe': + case 'windowtext': + return exports.TYPES.COLOR; + default: + return exports.TYPES.KEYWORD; + } +}; + +exports.parseInteger = function parseInteger(val) { + var type = exports.valueType(val); + if (type === exports.TYPES.NULL_OR_EMPTY_STR) { + return val; + } + if (type !== exports.TYPES.INTEGER) { + return undefined; + } + return String(parseInt(val, 10)); +}; + +exports.parseNumber = function parseNumber(val) { + var type = exports.valueType(val); + if (type === exports.TYPES.NULL_OR_EMPTY_STR) { + return val; + } + if (type !== exports.TYPES.NUMBER && type !== exports.TYPES.INTEGER) { + return undefined; + } + return String(parseFloat(val)); +}; + +exports.parseLength = function parseLength(val) { + if (val === 0 || val === '0') { + return '0px'; + } + var type = exports.valueType(val); + if (type === exports.TYPES.NULL_OR_EMPTY_STR) { + return val; + } + if (type !== exports.TYPES.LENGTH) { + return undefined; + } + return val; +}; + +exports.parsePercent = function parsePercent(val) { + if (val === 0 || val === '0') { + return '0%'; + } + var type = exports.valueType(val); + if (type === exports.TYPES.NULL_OR_EMPTY_STR) { + return val; + } + if (type !== exports.TYPES.PERCENT) { + return undefined; + } + return val; +}; + +// either a length or a percent +exports.parseMeasurement = function parseMeasurement(val) { + var type = exports.valueType(val); + if (type === exports.TYPES.CALC) { + return val; + } + + var length = exports.parseLength(val); + if (length !== undefined) { + return length; + } + return exports.parsePercent(val); +}; + +exports.parseUrl = function parseUrl(val) { + var type = exports.valueType(val); + if (type === exports.TYPES.NULL_OR_EMPTY_STR) { + return val; + } + var res = urlRegEx.exec(val); + // does it match the regex? + if (!res) { + return undefined; + } + var str = res[1]; + // if it starts with single or double quotes, does it end with the same? + if ((str[0] === '"' || str[0] === "'") && str[0] !== str[str.length - 1]) { + return undefined; + } + if (str[0] === '"' || str[0] === "'") { + str = str.substr(1, str.length - 2); + } + + var i; + for (i = 0; i < str.length; i++) { + switch (str[i]) { + case '(': + case ')': + case ' ': + case '\t': + case '\n': + case "'": + case '"': + return undefined; + case '\\': + i++; + break; + } + } + + return 'url(' + str + ')'; +}; + +exports.parseString = function parseString(val) { + var type = exports.valueType(val); + if (type === exports.TYPES.NULL_OR_EMPTY_STR) { + return val; + } + if (type !== exports.TYPES.STRING) { + return undefined; + } + var i; + for (i = 1; i < val.length - 1; i++) { + switch (val[i]) { + case val[0]: + return undefined; + case '\\': + i++; + while (i < val.length - 1 && /[0-9A-Fa-f]/.test(val[i])) { + i++; + } + break; + } + } + if (i >= val.length) { + return undefined; + } + return val; +}; + +exports.parseColor = function parseColor(val) { + var type = exports.valueType(val); + if (type === exports.TYPES.NULL_OR_EMPTY_STR) { + return val; + } + var red, + green, + blue, + hue, + saturation, + lightness, + alpha = 1; + var parts; + var res = colorRegEx1.exec(val); + // is it #aaa, #ababab, #aaaa, #abababaa + if (res) { + var defaultHex = val.substr(1); + var hex = val.substr(1); + if (hex.length === 3 || hex.length === 4) { + hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2]; + + if (defaultHex.length === 4) { + hex = hex + defaultHex[3] + defaultHex[3]; + } + } + red = parseInt(hex.substr(0, 2), 16); + green = parseInt(hex.substr(2, 2), 16); + blue = parseInt(hex.substr(4, 2), 16); + if (hex.length === 8) { + var hexAlpha = hex.substr(6, 2); + var hexAlphaToRgbaAlpha = Number((parseInt(hexAlpha, 16) / 255).toFixed(3)); + + return 'rgba(' + red + ', ' + green + ', ' + blue + ', ' + hexAlphaToRgbaAlpha + ')'; + } + return 'rgb(' + red + ', ' + green + ', ' + blue + ')'; + } + + res = colorRegEx2.exec(val); + if (res) { + parts = res[1].split(/\s*,\s*/); + if (parts.length !== 3) { + return undefined; + } + if (parts.every(percentRegEx.test.bind(percentRegEx))) { + red = Math.floor((parseFloat(parts[0].slice(0, -1)) * 255) / 100); + green = Math.floor((parseFloat(parts[1].slice(0, -1)) * 255) / 100); + blue = Math.floor((parseFloat(parts[2].slice(0, -1)) * 255) / 100); + } else if (parts.every(integerRegEx.test.bind(integerRegEx))) { + red = parseInt(parts[0], 10); + green = parseInt(parts[1], 10); + blue = parseInt(parts[2], 10); + } else { + return undefined; + } + red = Math.min(255, Math.max(0, red)); + green = Math.min(255, Math.max(0, green)); + blue = Math.min(255, Math.max(0, blue)); + return 'rgb(' + red + ', ' + green + ', ' + blue + ')'; + } + + res = colorRegEx3.exec(val); + if (res) { + parts = res[1].split(/\s*,\s*/); + if (parts.length !== 4) { + return undefined; + } + if (parts.slice(0, 3).every(percentRegEx.test.bind(percentRegEx))) { + red = Math.floor((parseFloat(parts[0].slice(0, -1)) * 255) / 100); + green = Math.floor((parseFloat(parts[1].slice(0, -1)) * 255) / 100); + blue = Math.floor((parseFloat(parts[2].slice(0, -1)) * 255) / 100); + alpha = parseFloat(parts[3]); + } else if (parts.slice(0, 3).every(integerRegEx.test.bind(integerRegEx))) { + red = parseInt(parts[0], 10); + green = parseInt(parts[1], 10); + blue = parseInt(parts[2], 10); + alpha = parseFloat(parts[3]); + } else { + return undefined; + } + if (isNaN(alpha)) { + alpha = 1; + } + red = Math.min(255, Math.max(0, red)); + green = Math.min(255, Math.max(0, green)); + blue = Math.min(255, Math.max(0, blue)); + alpha = Math.min(1, Math.max(0, alpha)); + if (alpha === 1) { + return 'rgb(' + red + ', ' + green + ', ' + blue + ')'; + } + return 'rgba(' + red + ', ' + green + ', ' + blue + ', ' + alpha + ')'; + } + + res = colorRegEx4.exec(val); + if (res) { + const [, _hue, _saturation, _lightness, _alphaString = ''] = res; + const _alpha = parseFloat(_alphaString.replace(',', '').trim()); + if (!_hue || !_saturation || !_lightness) { + return undefined; + } + hue = parseFloat(_hue); + saturation = parseInt(_saturation, 10); + lightness = parseInt(_lightness, 10); + if (_alpha && numberRegEx.test(_alpha)) { + alpha = parseFloat(_alpha); + } + + const [r, g, b] = hslToRgb(hue, saturation / 100, lightness / 100); + if (!_alphaString || alpha === 1) { + return 'rgb(' + r + ', ' + g + ', ' + b + ')'; + } + return 'rgba(' + r + ', ' + g + ', ' + b + ', ' + alpha + ')'; + } + + if (type === exports.TYPES.COLOR) { + return val; + } + return undefined; +}; + +exports.parseAngle = function parseAngle(val) { + var type = exports.valueType(val); + if (type === exports.TYPES.NULL_OR_EMPTY_STR) { + return val; + } + if (type !== exports.TYPES.ANGLE) { + return undefined; + } + var res = angleRegEx.exec(val); + var flt = parseFloat(res[1]); + if (res[2] === 'rad') { + flt *= 180 / Math.PI; + } else if (res[2] === 'grad') { + flt *= 360 / 400; + } + + while (flt < 0) { + flt += 360; + } + while (flt > 360) { + flt -= 360; + } + return flt + 'deg'; +}; + +exports.parseKeyword = function parseKeyword(val, valid_keywords) { + var type = exports.valueType(val); + if (type === exports.TYPES.NULL_OR_EMPTY_STR) { + return val; + } + if (type !== exports.TYPES.KEYWORD) { + return undefined; + } + val = val.toString().toLowerCase(); + var i; + for (i = 0; i < valid_keywords.length; i++) { + if (valid_keywords[i].toLowerCase() === val) { + return valid_keywords[i]; + } + } + return undefined; +}; + +// utility to translate from border-width to borderWidth +var dashedToCamelCase = function(dashed) { + var i; + var camel = ''; + var nextCap = false; + for (i = 0; i < dashed.length; i++) { + if (dashed[i] !== '-') { + camel += nextCap ? dashed[i].toUpperCase() : dashed[i]; + nextCap = false; + } else { + nextCap = true; + } + } + return camel; +}; +exports.dashedToCamelCase = dashedToCamelCase; + +var is_space = /\s/; +var opening_deliminators = ['"', "'", '(']; +var closing_deliminators = ['"', "'", ')']; +// this splits on whitespace, but keeps quoted and parened parts together +var getParts = function(str) { + var deliminator_stack = []; + var length = str.length; + var i; + var parts = []; + var current_part = ''; + var opening_index; + var closing_index; + for (i = 0; i < length; i++) { + opening_index = opening_deliminators.indexOf(str[i]); + closing_index = closing_deliminators.indexOf(str[i]); + if (is_space.test(str[i])) { + if (deliminator_stack.length === 0) { + if (current_part !== '') { + parts.push(current_part); + } + current_part = ''; + } else { + current_part += str[i]; + } + } else { + if (str[i] === '\\') { + i++; + current_part += str[i]; + } else { + current_part += str[i]; + if ( + closing_index !== -1 && + closing_index === deliminator_stack[deliminator_stack.length - 1] + ) { + deliminator_stack.pop(); + } else if (opening_index !== -1) { + deliminator_stack.push(opening_index); + } + } + } + } + if (current_part !== '') { + parts.push(current_part); + } + return parts; +}; + +/* + * this either returns undefined meaning that it isn't valid + * or returns an object where the keys are dashed short + * hand properties and the values are the values to set + * on them + */ +exports.shorthandParser = function parse(v, shorthand_for) { + var obj = {}; + var type = exports.valueType(v); + if (type === exports.TYPES.NULL_OR_EMPTY_STR) { + Object.keys(shorthand_for).forEach(function(property) { + obj[property] = ''; + }); + return obj; + } + + if (typeof v === 'number') { + v = v.toString(); + } + + if (typeof v !== 'string') { + return undefined; + } + + if (v.toLowerCase() === 'inherit') { + return {}; + } + var parts = getParts(v); + var valid = true; + parts.forEach(function(part, i) { + var part_valid = false; + Object.keys(shorthand_for).forEach(function(property) { + if (shorthand_for[property].isValid(part, i)) { + part_valid = true; + obj[property] = part; + } + }); + valid = valid && part_valid; + }); + if (!valid) { + return undefined; + } + return obj; +}; + +exports.shorthandSetter = function(property, shorthand_for) { + return function(v) { + var obj = exports.shorthandParser(v, shorthand_for); + if (obj === undefined) { + return; + } + //console.log('shorthandSetter for:', property, 'obj:', obj); + Object.keys(obj).forEach(function(subprop) { + // in case subprop is an implicit property, this will clear + // *its* subpropertiesX + var camel = dashedToCamelCase(subprop); + this[camel] = obj[subprop]; + // in case it gets translated into something else (0 -> 0px) + obj[subprop] = this[camel]; + this.removeProperty(subprop); + // don't add in empty properties + if (obj[subprop] !== '') { + this._values[subprop] = obj[subprop]; + } + }, this); + Object.keys(shorthand_for).forEach(function(subprop) { + if (!obj.hasOwnProperty(subprop)) { + this.removeProperty(subprop); + delete this._values[subprop]; + } + }, this); + // in case the value is something like 'none' that removes all values, + // check that the generated one is not empty, first remove the property + // if it already exists, then call the shorthandGetter, if it's an empty + // string, don't set the property + this.removeProperty(property); + var calculated = exports.shorthandGetter(property, shorthand_for).call(this); + if (calculated !== '') { + this._setProperty(property, calculated); + } + }; +}; + +exports.shorthandGetter = function(property, shorthand_for) { + return function() { + if (this._values[property] !== undefined) { + return this.getPropertyValue(property); + } + return Object.keys(shorthand_for) + .map(function(subprop) { + return this.getPropertyValue(subprop); + }, this) + .filter(function(value) { + return value !== ''; + }) + .join(' '); + }; +}; + +// isValid(){1,4} | inherit +// if one, it applies to all +// if two, the first applies to the top and bottom, and the second to left and right +// if three, the first applies to the top, the second to left and right, the third bottom +// if four, top, right, bottom, left +exports.implicitSetter = function(property_before, property_after, isValid, parser) { + property_after = property_after || ''; + if (property_after !== '') { + property_after = '-' + property_after; + } + var part_names = ['top', 'right', 'bottom', 'left']; + + return function(v) { + if (typeof v === 'number') { + v = v.toString(); + } + if (typeof v !== 'string') { + return undefined; + } + var parts; + if (v.toLowerCase() === 'inherit' || v === '') { + parts = [v]; + } else { + parts = getParts(v); + } + if (parts.length < 1 || parts.length > 4) { + return undefined; + } + + if (!parts.every(isValid)) { + return undefined; + } + + parts = parts.map(function(part) { + return parser(part); + }); + this._setProperty(property_before + property_after, parts.join(' ')); + if (parts.length === 1) { + parts[1] = parts[0]; + } + if (parts.length === 2) { + parts[2] = parts[0]; + } + if (parts.length === 3) { + parts[3] = parts[1]; + } + + for (var i = 0; i < 4; i++) { + var property = property_before + '-' + part_names[i] + property_after; + this.removeProperty(property); + if (parts[i] !== '') { + this._values[property] = parts[i]; + } + } + return v; + }; +}; + +// +// Companion to implicitSetter, but for the individual parts. +// This sets the individual value, and checks to see if all four +// sub-parts are set. If so, it sets the shorthand version and removes +// the individual parts from the cssText. +// +exports.subImplicitSetter = function(prefix, part, isValid, parser) { + var property = prefix + '-' + part; + var subparts = [prefix + '-top', prefix + '-right', prefix + '-bottom', prefix + '-left']; + + return function(v) { + if (typeof v === 'number') { + v = v.toString(); + } + if (typeof v !== 'string') { + return undefined; + } + if (!isValid(v)) { + return undefined; + } + v = parser(v); + this._setProperty(property, v); + var parts = []; + for (var i = 0; i < 4; i++) { + if (this._values[subparts[i]] == null || this._values[subparts[i]] === '') { + break; + } + parts.push(this._values[subparts[i]]); + } + if (parts.length === 4) { + for (i = 0; i < 4; i++) { + this.removeProperty(subparts[i]); + this._values[subparts[i]] = parts[i]; + } + this._setProperty(prefix, parts.join(' ')); + } + return v; + }; +}; + +var camel_to_dashed = /[A-Z]/g; +var first_segment = /^\([^-]\)-/; +var vendor_prefixes = ['o', 'moz', 'ms', 'webkit']; +exports.camelToDashed = function(camel_case) { + var match; + var dashed = camel_case.replace(camel_to_dashed, '-$&').toLowerCase(); + match = dashed.match(first_segment); + if (match && vendor_prefixes.indexOf(match[1]) !== -1) { + dashed = '-' + dashed; + } + return dashed; +}; diff --git a/node_modules/cssstyle/lib/parsers.test.js b/node_modules/cssstyle/lib/parsers.test.js new file mode 100644 index 0000000..926f7e7 --- /dev/null +++ b/node_modules/cssstyle/lib/parsers.test.js @@ -0,0 +1,139 @@ +'use strict'; + +const parsers = require('./parsers'); + +describe('valueType', () => { + it('returns color for red', () => { + let input = 'red'; + let output = parsers.valueType(input); + + expect(output).toEqual(parsers.TYPES.COLOR); + }); + + it('returns color for #nnnnnn', () => { + let input = '#fefefe'; + let output = parsers.valueType(input); + + expect(output).toEqual(parsers.TYPES.COLOR); + }); + + it('returns color for rgb(n, n, n)', () => { + let input = 'rgb(10, 10, 10)'; + let output = parsers.valueType(input); + + expect(output).toEqual(parsers.TYPES.COLOR); + }); + + it('returns color for rgb(p, p, p)', () => { + let input = 'rgb(10%, 10%, 10%)'; + let output = parsers.valueType(input); + + expect(output).toEqual(parsers.TYPES.COLOR); + }); + + it('returns color for rgba(n, n, n, n)', () => { + let input = 'rgba(10, 10, 10, 1)'; + let output = parsers.valueType(input); + + expect(output).toEqual(parsers.TYPES.COLOR); + }); + + it('returns color for rgba(n, n, n, n) with decimal alpha', () => { + let input = 'rgba(10, 10, 10, 0.5)'; + let output = parsers.valueType(input); + + expect(output).toEqual(parsers.TYPES.COLOR); + }); + + it('returns color for rgba(p, p, p, n)', () => { + let input = 'rgba(10%, 10%, 10%, 1)'; + let output = parsers.valueType(input); + + expect(output).toEqual(parsers.TYPES.COLOR); + }); + + it('returns color for rgba(p, p, p, n) with decimal alpha', () => { + let input = 'rgba(10%, 10%, 10%, 0.5)'; + let output = parsers.valueType(input); + + expect(output).toEqual(parsers.TYPES.COLOR); + }); + + it('returns length for 100ch', () => { + let input = '100ch'; + let output = parsers.valueType(input); + + expect(output).toEqual(parsers.TYPES.LENGTH); + }); + + it('returns calc from calc(100px * 2)', () => { + let input = 'calc(100px * 2)'; + let output = parsers.valueType(input); + + expect(output).toEqual(parsers.TYPES.CALC); + }); +}); +describe('parseInteger', () => { + it.todo('test'); +}); +describe('parseNumber', () => { + it.todo('test'); +}); +describe('parseLength', () => { + it.todo('test'); +}); +describe('parsePercent', () => { + it.todo('test'); +}); +describe('parseMeasurement', () => { + it.todo('test'); +}); +describe('parseUrl', () => { + it.todo('test'); +}); +describe('parseString', () => { + it.todo('test'); +}); +describe('parseColor', () => { + it('should convert hsl to rgb values', () => { + let input = 'hsla(0, 1%, 2%)'; + let output = parsers.parseColor(input); + + expect(output).toEqual('rgb(5, 5, 5)'); + }); + it('should convert hsla to rgba values', () => { + let input = 'hsla(0, 1%, 2%, 0.5)'; + let output = parsers.parseColor(input); + + expect(output).toEqual('rgba(5, 5, 5, 0.5)'); + }); + + it.todo('Add more tests'); +}); +describe('parseAngle', () => { + it.todo('test'); +}); +describe('parseKeyword', () => { + it.todo('test'); +}); +describe('dashedToCamelCase', () => { + it.todo('test'); +}); +describe('shorthandParser', () => { + it.todo('test'); +}); +describe('shorthandSetter', () => { + it.todo('test'); +}); +describe('shorthandGetter', () => { + it.todo('test'); +}); +describe('implicitSetter', () => { + it.todo('test'); +}); +describe('subImplicitSetter', () => { + it.todo('test'); +}); +describe('camelToDashed', () => { + it.todo('test'); +}); diff --git a/node_modules/cssstyle/lib/properties.js b/node_modules/cssstyle/lib/properties.js new file mode 100644 index 0000000..7f462f3 --- /dev/null +++ b/node_modules/cssstyle/lib/properties.js @@ -0,0 +1,1833 @@ +'use strict'; + +// autogenerated - 4/29/2020 + +/* + * + * https://www.w3.org/Style/CSS/all-properties.en.html + */ + +var external_dependency_parsers_0 = require("./parsers.js"); + +var external_dependency_constants_1 = require("./constants.js"); + +var azimuth_export_definition; +azimuth_export_definition = { + set: function (v) { + var valueType = external_dependency_parsers_0.valueType(v); + + if (valueType === external_dependency_parsers_0.TYPES.ANGLE) { + return this._setProperty('azimuth', external_dependency_parsers_0.parseAngle(v)); + } + + if (valueType === external_dependency_parsers_0.TYPES.KEYWORD) { + var keywords = v.toLowerCase().trim().split(/\s+/); + var hasBehind = false; + + if (keywords.length > 2) { + return; + } + + var behindIndex = keywords.indexOf('behind'); + hasBehind = behindIndex !== -1; + + if (keywords.length === 2) { + if (!hasBehind) { + return; + } + + keywords.splice(behindIndex, 1); + } + + if (keywords[0] === 'leftwards' || keywords[0] === 'rightwards') { + if (hasBehind) { + return; + } + + return this._setProperty('azimuth', keywords[0]); + } + + if (keywords[0] === 'behind') { + return this._setProperty('azimuth', '180deg'); + } + + switch (keywords[0]) { + case 'left-side': + return this._setProperty('azimuth', '270deg'); + + case 'far-left': + return this._setProperty('azimuth', (hasBehind ? 240 : 300) + 'deg'); + + case 'left': + return this._setProperty('azimuth', (hasBehind ? 220 : 320) + 'deg'); + + case 'center-left': + return this._setProperty('azimuth', (hasBehind ? 200 : 340) + 'deg'); + + case 'center': + return this._setProperty('azimuth', (hasBehind ? 180 : 0) + 'deg'); + + case 'center-right': + return this._setProperty('azimuth', (hasBehind ? 160 : 20) + 'deg'); + + case 'right': + return this._setProperty('azimuth', (hasBehind ? 140 : 40) + 'deg'); + + case 'far-right': + return this._setProperty('azimuth', (hasBehind ? 120 : 60) + 'deg'); + + case 'right-side': + return this._setProperty('azimuth', '90deg'); + + default: + return; + } + } + }, + get: function () { + return this.getPropertyValue('azimuth'); + }, + enumerable: true, + configurable: true +}; +var backgroundColor_export_isValid, backgroundColor_export_definition; + +var backgroundColor_local_var_parse = function parse(v) { + var parsed = external_dependency_parsers_0.parseColor(v); + + if (parsed !== undefined) { + return parsed; + } + + if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'transparent' || v.toLowerCase() === 'inherit')) { + return v; + } + + return undefined; +}; + +backgroundColor_export_isValid = function isValid(v) { + return backgroundColor_local_var_parse(v) !== undefined; +}; + +backgroundColor_export_definition = { + set: function (v) { + var parsed = backgroundColor_local_var_parse(v); + + if (parsed === undefined) { + return; + } + + this._setProperty('background-color', parsed); + }, + get: function () { + return this.getPropertyValue('background-color'); + }, + enumerable: true, + configurable: true +}; +var backgroundImage_export_isValid, backgroundImage_export_definition; + +var backgroundImage_local_var_parse = function parse(v) { + var parsed = external_dependency_parsers_0.parseUrl(v); + + if (parsed !== undefined) { + return parsed; + } + + if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'none' || v.toLowerCase() === 'inherit')) { + return v; + } + + return undefined; +}; + +backgroundImage_export_isValid = function isValid(v) { + return backgroundImage_local_var_parse(v) !== undefined; +}; + +backgroundImage_export_definition = { + set: function (v) { + this._setProperty('background-image', backgroundImage_local_var_parse(v)); + }, + get: function () { + return this.getPropertyValue('background-image'); + }, + enumerable: true, + configurable: true +}; +var backgroundRepeat_export_isValid, backgroundRepeat_export_definition; + +var backgroundRepeat_local_var_parse = function parse(v) { + if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'repeat' || v.toLowerCase() === 'repeat-x' || v.toLowerCase() === 'repeat-y' || v.toLowerCase() === 'no-repeat' || v.toLowerCase() === 'inherit')) { + return v; + } + + return undefined; +}; + +backgroundRepeat_export_isValid = function isValid(v) { + return backgroundRepeat_local_var_parse(v) !== undefined; +}; + +backgroundRepeat_export_definition = { + set: function (v) { + this._setProperty('background-repeat', backgroundRepeat_local_var_parse(v)); + }, + get: function () { + return this.getPropertyValue('background-repeat'); + }, + enumerable: true, + configurable: true +}; +var backgroundAttachment_export_isValid, backgroundAttachment_export_definition; + +var backgroundAttachment_local_var_isValid = backgroundAttachment_export_isValid = function isValid(v) { + return external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'scroll' || v.toLowerCase() === 'fixed' || v.toLowerCase() === 'inherit'); +}; + +backgroundAttachment_export_definition = { + set: function (v) { + if (!backgroundAttachment_local_var_isValid(v)) { + return; + } + + this._setProperty('background-attachment', v); + }, + get: function () { + return this.getPropertyValue('background-attachment'); + }, + enumerable: true, + configurable: true +}; +var backgroundPosition_export_isValid, backgroundPosition_export_definition; +var backgroundPosition_local_var_valid_keywords = ['top', 'center', 'bottom', 'left', 'right']; + +var backgroundPosition_local_var_parse = function parse(v) { + if (v === '' || v === null) { + return undefined; + } + + var parts = v.split(/\s+/); + + if (parts.length > 2 || parts.length < 1) { + return undefined; + } + + var types = []; + parts.forEach(function (part, index) { + types[index] = external_dependency_parsers_0.valueType(part); + }); + + if (parts.length === 1) { + if (types[0] === external_dependency_parsers_0.TYPES.LENGTH || types[0] === external_dependency_parsers_0.TYPES.PERCENT) { + return v; + } + + if (types[0] === external_dependency_parsers_0.TYPES.KEYWORD) { + if (backgroundPosition_local_var_valid_keywords.indexOf(v.toLowerCase()) !== -1 || v.toLowerCase() === 'inherit') { + return v; + } + } + + return undefined; + } + + if ((types[0] === external_dependency_parsers_0.TYPES.LENGTH || types[0] === external_dependency_parsers_0.TYPES.PERCENT) && (types[1] === external_dependency_parsers_0.TYPES.LENGTH || types[1] === external_dependency_parsers_0.TYPES.PERCENT)) { + return v; + } + + if (types[0] !== external_dependency_parsers_0.TYPES.KEYWORD || types[1] !== external_dependency_parsers_0.TYPES.KEYWORD) { + return undefined; + } + + if (backgroundPosition_local_var_valid_keywords.indexOf(parts[0]) !== -1 && backgroundPosition_local_var_valid_keywords.indexOf(parts[1]) !== -1) { + return v; + } + + return undefined; +}; + +backgroundPosition_export_isValid = function isValid(v) { + return backgroundPosition_local_var_parse(v) !== undefined; +}; + +backgroundPosition_export_definition = { + set: function (v) { + this._setProperty('background-position', backgroundPosition_local_var_parse(v)); + }, + get: function () { + return this.getPropertyValue('background-position'); + }, + enumerable: true, + configurable: true +}; +var background_export_definition; +var background_local_var_shorthand_for = { + 'background-color': { + isValid: backgroundColor_export_isValid, + definition: backgroundColor_export_definition + }, + 'background-image': { + isValid: backgroundImage_export_isValid, + definition: backgroundImage_export_definition + }, + 'background-repeat': { + isValid: backgroundRepeat_export_isValid, + definition: backgroundRepeat_export_definition + }, + 'background-attachment': { + isValid: backgroundAttachment_export_isValid, + definition: backgroundAttachment_export_definition + }, + 'background-position': { + isValid: backgroundPosition_export_isValid, + definition: backgroundPosition_export_definition + } +}; +background_export_definition = { + set: external_dependency_parsers_0.shorthandSetter('background', background_local_var_shorthand_for), + get: external_dependency_parsers_0.shorthandGetter('background', background_local_var_shorthand_for), + enumerable: true, + configurable: true +}; +var borderWidth_export_isValid, borderWidth_export_definition; +// the valid border-widths: +var borderWidth_local_var_widths = ['thin', 'medium', 'thick']; + +borderWidth_export_isValid = function parse(v) { + var length = external_dependency_parsers_0.parseLength(v); + + if (length !== undefined) { + return true; + } + + if (typeof v !== 'string') { + return false; + } + + if (v === '') { + return true; + } + + v = v.toLowerCase(); + + if (borderWidth_local_var_widths.indexOf(v) === -1) { + return false; + } + + return true; +}; + +var borderWidth_local_var_isValid = borderWidth_export_isValid; + +var borderWidth_local_var_parser = function (v) { + var length = external_dependency_parsers_0.parseLength(v); + + if (length !== undefined) { + return length; + } + + if (borderWidth_local_var_isValid(v)) { + return v.toLowerCase(); + } + + return undefined; +}; + +borderWidth_export_definition = { + set: external_dependency_parsers_0.implicitSetter('border', 'width', borderWidth_local_var_isValid, borderWidth_local_var_parser), + get: function () { + return this.getPropertyValue('border-width'); + }, + enumerable: true, + configurable: true +}; +var borderStyle_export_isValid, borderStyle_export_definition; +// the valid border-styles: +var borderStyle_local_var_styles = ['none', 'hidden', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset']; + +borderStyle_export_isValid = function parse(v) { + return typeof v === 'string' && (v === '' || borderStyle_local_var_styles.indexOf(v) !== -1); +}; + +var borderStyle_local_var_isValid = borderStyle_export_isValid; + +var borderStyle_local_var_parser = function (v) { + if (borderStyle_local_var_isValid(v)) { + return v.toLowerCase(); + } + + return undefined; +}; + +borderStyle_export_definition = { + set: external_dependency_parsers_0.implicitSetter('border', 'style', borderStyle_local_var_isValid, borderStyle_local_var_parser), + get: function () { + return this.getPropertyValue('border-style'); + }, + enumerable: true, + configurable: true +}; +var borderColor_export_isValid, borderColor_export_definition; + +borderColor_export_isValid = function parse(v) { + if (typeof v !== 'string') { + return false; + } + + return v === '' || v.toLowerCase() === 'transparent' || external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.COLOR; +}; + +var borderColor_local_var_isValid = borderColor_export_isValid; + +var borderColor_local_var_parser = function (v) { + if (borderColor_local_var_isValid(v)) { + return v.toLowerCase(); + } + + return undefined; +}; + +borderColor_export_definition = { + set: external_dependency_parsers_0.implicitSetter('border', 'color', borderColor_local_var_isValid, borderColor_local_var_parser), + get: function () { + return this.getPropertyValue('border-color'); + }, + enumerable: true, + configurable: true +}; +var border_export_definition; +var border_local_var_shorthand_for = { + 'border-width': { + isValid: borderWidth_export_isValid, + definition: borderWidth_export_definition + }, + 'border-style': { + isValid: borderStyle_export_isValid, + definition: borderStyle_export_definition + }, + 'border-color': { + isValid: borderColor_export_isValid, + definition: borderColor_export_definition + } +}; +var border_local_var_myShorthandSetter = external_dependency_parsers_0.shorthandSetter('border', border_local_var_shorthand_for); +var border_local_var_myShorthandGetter = external_dependency_parsers_0.shorthandGetter('border', border_local_var_shorthand_for); +border_export_definition = { + set: function (v) { + if (v.toString().toLowerCase() === 'none') { + v = ''; + } + + border_local_var_myShorthandSetter.call(this, v); + this.removeProperty('border-top'); + this.removeProperty('border-left'); + this.removeProperty('border-right'); + this.removeProperty('border-bottom'); + this._values['border-top'] = this._values.border; + this._values['border-left'] = this._values.border; + this._values['border-right'] = this._values.border; + this._values['border-bottom'] = this._values.border; + }, + get: border_local_var_myShorthandGetter, + enumerable: true, + configurable: true +}; +var borderBottomWidth_export_isValid, borderBottomWidth_export_definition; +var borderBottomWidth_local_var_isValid = borderBottomWidth_export_isValid = borderWidth_export_isValid; +borderBottomWidth_export_definition = { + set: function (v) { + if (borderBottomWidth_local_var_isValid(v)) { + this._setProperty('border-bottom-width', v); + } + }, + get: function () { + return this.getPropertyValue('border-bottom-width'); + }, + enumerable: true, + configurable: true +}; +var borderBottomStyle_export_isValid, borderBottomStyle_export_definition; +borderBottomStyle_export_isValid = borderStyle_export_isValid; +borderBottomStyle_export_definition = { + set: function (v) { + if (borderStyle_export_isValid(v)) { + if (v.toLowerCase() === 'none') { + v = ''; + this.removeProperty('border-bottom-width'); + } + + this._setProperty('border-bottom-style', v); + } + }, + get: function () { + return this.getPropertyValue('border-bottom-style'); + }, + enumerable: true, + configurable: true +}; +var borderBottomColor_export_isValid, borderBottomColor_export_definition; +var borderBottomColor_local_var_isValid = borderBottomColor_export_isValid = borderColor_export_isValid; +borderBottomColor_export_definition = { + set: function (v) { + if (borderBottomColor_local_var_isValid(v)) { + this._setProperty('border-bottom-color', v); + } + }, + get: function () { + return this.getPropertyValue('border-bottom-color'); + }, + enumerable: true, + configurable: true +}; +var borderBottom_export_definition; +var borderBottom_local_var_shorthand_for = { + 'border-bottom-width': { + isValid: borderBottomWidth_export_isValid, + definition: borderBottomWidth_export_definition + }, + 'border-bottom-style': { + isValid: borderBottomStyle_export_isValid, + definition: borderBottomStyle_export_definition + }, + 'border-bottom-color': { + isValid: borderBottomColor_export_isValid, + definition: borderBottomColor_export_definition + } +}; +borderBottom_export_definition = { + set: external_dependency_parsers_0.shorthandSetter('border-bottom', borderBottom_local_var_shorthand_for), + get: external_dependency_parsers_0.shorthandGetter('border-bottom', borderBottom_local_var_shorthand_for), + enumerable: true, + configurable: true +}; +var borderCollapse_export_definition; + +var borderCollapse_local_var_parse = function parse(v) { + if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'collapse' || v.toLowerCase() === 'separate' || v.toLowerCase() === 'inherit')) { + return v; + } + + return undefined; +}; + +borderCollapse_export_definition = { + set: function (v) { + this._setProperty('border-collapse', borderCollapse_local_var_parse(v)); + }, + get: function () { + return this.getPropertyValue('border-collapse'); + }, + enumerable: true, + configurable: true +}; +var borderLeftWidth_export_isValid, borderLeftWidth_export_definition; +var borderLeftWidth_local_var_isValid = borderLeftWidth_export_isValid = borderWidth_export_isValid; +borderLeftWidth_export_definition = { + set: function (v) { + if (borderLeftWidth_local_var_isValid(v)) { + this._setProperty('border-left-width', v); + } + }, + get: function () { + return this.getPropertyValue('border-left-width'); + }, + enumerable: true, + configurable: true +}; +var borderLeftStyle_export_isValid, borderLeftStyle_export_definition; +borderLeftStyle_export_isValid = borderStyle_export_isValid; +borderLeftStyle_export_definition = { + set: function (v) { + if (borderStyle_export_isValid(v)) { + if (v.toLowerCase() === 'none') { + v = ''; + this.removeProperty('border-left-width'); + } + + this._setProperty('border-left-style', v); + } + }, + get: function () { + return this.getPropertyValue('border-left-style'); + }, + enumerable: true, + configurable: true +}; +var borderLeftColor_export_isValid, borderLeftColor_export_definition; +var borderLeftColor_local_var_isValid = borderLeftColor_export_isValid = borderColor_export_isValid; +borderLeftColor_export_definition = { + set: function (v) { + if (borderLeftColor_local_var_isValid(v)) { + this._setProperty('border-left-color', v); + } + }, + get: function () { + return this.getPropertyValue('border-left-color'); + }, + enumerable: true, + configurable: true +}; +var borderLeft_export_definition; +var borderLeft_local_var_shorthand_for = { + 'border-left-width': { + isValid: borderLeftWidth_export_isValid, + definition: borderLeftWidth_export_definition + }, + 'border-left-style': { + isValid: borderLeftStyle_export_isValid, + definition: borderLeftStyle_export_definition + }, + 'border-left-color': { + isValid: borderLeftColor_export_isValid, + definition: borderLeftColor_export_definition + } +}; +borderLeft_export_definition = { + set: external_dependency_parsers_0.shorthandSetter('border-left', borderLeft_local_var_shorthand_for), + get: external_dependency_parsers_0.shorthandGetter('border-left', borderLeft_local_var_shorthand_for), + enumerable: true, + configurable: true +}; +var borderRightWidth_export_isValid, borderRightWidth_export_definition; +var borderRightWidth_local_var_isValid = borderRightWidth_export_isValid = borderWidth_export_isValid; +borderRightWidth_export_definition = { + set: function (v) { + if (borderRightWidth_local_var_isValid(v)) { + this._setProperty('border-right-width', v); + } + }, + get: function () { + return this.getPropertyValue('border-right-width'); + }, + enumerable: true, + configurable: true +}; +var borderRightStyle_export_isValid, borderRightStyle_export_definition; +borderRightStyle_export_isValid = borderStyle_export_isValid; +borderRightStyle_export_definition = { + set: function (v) { + if (borderStyle_export_isValid(v)) { + if (v.toLowerCase() === 'none') { + v = ''; + this.removeProperty('border-right-width'); + } + + this._setProperty('border-right-style', v); + } + }, + get: function () { + return this.getPropertyValue('border-right-style'); + }, + enumerable: true, + configurable: true +}; +var borderRightColor_export_isValid, borderRightColor_export_definition; +var borderRightColor_local_var_isValid = borderRightColor_export_isValid = borderColor_export_isValid; +borderRightColor_export_definition = { + set: function (v) { + if (borderRightColor_local_var_isValid(v)) { + this._setProperty('border-right-color', v); + } + }, + get: function () { + return this.getPropertyValue('border-right-color'); + }, + enumerable: true, + configurable: true +}; +var borderRight_export_definition; +var borderRight_local_var_shorthand_for = { + 'border-right-width': { + isValid: borderRightWidth_export_isValid, + definition: borderRightWidth_export_definition + }, + 'border-right-style': { + isValid: borderRightStyle_export_isValid, + definition: borderRightStyle_export_definition + }, + 'border-right-color': { + isValid: borderRightColor_export_isValid, + definition: borderRightColor_export_definition + } +}; +borderRight_export_definition = { + set: external_dependency_parsers_0.shorthandSetter('border-right', borderRight_local_var_shorthand_for), + get: external_dependency_parsers_0.shorthandGetter('border-right', borderRight_local_var_shorthand_for), + enumerable: true, + configurable: true +}; +var borderSpacing_export_definition; + +// ? | inherit +// if one, it applies to both horizontal and verical spacing +// if two, the first applies to the horizontal and the second applies to vertical spacing +var borderSpacing_local_var_parse = function parse(v) { + if (v === '' || v === null) { + return undefined; + } + + if (v === 0) { + return '0px'; + } + + if (v.toLowerCase() === 'inherit') { + return v; + } + + var parts = v.split(/\s+/); + + if (parts.length !== 1 && parts.length !== 2) { + return undefined; + } + + parts.forEach(function (part) { + if (external_dependency_parsers_0.valueType(part) !== external_dependency_parsers_0.TYPES.LENGTH) { + return undefined; + } + }); + return v; +}; + +borderSpacing_export_definition = { + set: function (v) { + this._setProperty('border-spacing', borderSpacing_local_var_parse(v)); + }, + get: function () { + return this.getPropertyValue('border-spacing'); + }, + enumerable: true, + configurable: true +}; +var borderTopWidth_export_isValid, borderTopWidth_export_definition; +borderTopWidth_export_isValid = borderWidth_export_isValid; +borderTopWidth_export_definition = { + set: function (v) { + if (borderWidth_export_isValid(v)) { + this._setProperty('border-top-width', v); + } + }, + get: function () { + return this.getPropertyValue('border-top-width'); + }, + enumerable: true, + configurable: true +}; +var borderTopStyle_export_isValid, borderTopStyle_export_definition; +borderTopStyle_export_isValid = borderStyle_export_isValid; +borderTopStyle_export_definition = { + set: function (v) { + if (borderStyle_export_isValid(v)) { + if (v.toLowerCase() === 'none') { + v = ''; + this.removeProperty('border-top-width'); + } + + this._setProperty('border-top-style', v); + } + }, + get: function () { + return this.getPropertyValue('border-top-style'); + }, + enumerable: true, + configurable: true +}; +var borderTopColor_export_isValid, borderTopColor_export_definition; +var borderTopColor_local_var_isValid = borderTopColor_export_isValid = borderColor_export_isValid; +borderTopColor_export_definition = { + set: function (v) { + if (borderTopColor_local_var_isValid(v)) { + this._setProperty('border-top-color', v); + } + }, + get: function () { + return this.getPropertyValue('border-top-color'); + }, + enumerable: true, + configurable: true +}; +var borderTop_export_definition; +var borderTop_local_var_shorthand_for = { + 'border-top-width': { + isValid: borderTopWidth_export_isValid, + definition: borderTopWidth_export_definition + }, + 'border-top-style': { + isValid: borderTopStyle_export_isValid, + definition: borderTopStyle_export_definition + }, + 'border-top-color': { + isValid: borderTopColor_export_isValid, + definition: borderTopColor_export_definition + } +}; +borderTop_export_definition = { + set: external_dependency_parsers_0.shorthandSetter('border-top', borderTop_local_var_shorthand_for), + get: external_dependency_parsers_0.shorthandGetter('border-top', borderTop_local_var_shorthand_for), + enumerable: true, + configurable: true +}; +var bottom_export_definition; +bottom_export_definition = { + set: function (v) { + this._setProperty('bottom', external_dependency_parsers_0.parseMeasurement(v)); + }, + get: function () { + return this.getPropertyValue('bottom'); + }, + enumerable: true, + configurable: true +}; +var clear_export_definition; +var clear_local_var_clear_keywords = ['none', 'left', 'right', 'both', 'inherit']; +clear_export_definition = { + set: function (v) { + this._setProperty('clear', external_dependency_parsers_0.parseKeyword(v, clear_local_var_clear_keywords)); + }, + get: function () { + return this.getPropertyValue('clear'); + }, + enumerable: true, + configurable: true +}; +var clip_export_definition; +var clip_local_var_shape_regex = /^rect\((.*)\)$/i; + +var clip_local_var_parse = function (val) { + if (val === '' || val === null) { + return val; + } + + if (typeof val !== 'string') { + return undefined; + } + + val = val.toLowerCase(); + + if (val === 'auto' || val === 'inherit') { + return val; + } + + var matches = val.match(clip_local_var_shape_regex); + + if (!matches) { + return undefined; + } + + var parts = matches[1].split(/\s*,\s*/); + + if (parts.length !== 4) { + return undefined; + } + + var valid = parts.every(function (part, index) { + var measurement = external_dependency_parsers_0.parseMeasurement(part); + parts[index] = measurement; + return measurement !== undefined; + }); + + if (!valid) { + return undefined; + } + + parts = parts.join(', '); + return val.replace(matches[1], parts); +}; + +clip_export_definition = { + set: function (v) { + this._setProperty('clip', clip_local_var_parse(v)); + }, + get: function () { + return this.getPropertyValue('clip'); + }, + enumerable: true, + configurable: true +}; +var color_export_definition; +color_export_definition = { + set: function (v) { + this._setProperty('color', external_dependency_parsers_0.parseColor(v)); + }, + get: function () { + return this.getPropertyValue('color'); + }, + enumerable: true, + configurable: true +}; +var cssFloat_export_definition; +cssFloat_export_definition = { + set: function (v) { + this._setProperty('float', v); + }, + get: function () { + return this.getPropertyValue('float'); + }, + enumerable: true, + configurable: true +}; +var flexGrow_export_isValid, flexGrow_export_definition; + +flexGrow_export_isValid = function isValid(v, positionAtFlexShorthand) { + return external_dependency_parsers_0.parseNumber(v) !== undefined && positionAtFlexShorthand === external_dependency_constants_1.POSITION_AT_SHORTHAND.first; +}; + +flexGrow_export_definition = { + set: function (v) { + this._setProperty('flex-grow', external_dependency_parsers_0.parseNumber(v)); + }, + get: function () { + return this.getPropertyValue('flex-grow'); + }, + enumerable: true, + configurable: true +}; +var flexShrink_export_isValid, flexShrink_export_definition; + +flexShrink_export_isValid = function isValid(v, positionAtFlexShorthand) { + return external_dependency_parsers_0.parseNumber(v) !== undefined && positionAtFlexShorthand === external_dependency_constants_1.POSITION_AT_SHORTHAND.second; +}; + +flexShrink_export_definition = { + set: function (v) { + this._setProperty('flex-shrink', external_dependency_parsers_0.parseNumber(v)); + }, + get: function () { + return this.getPropertyValue('flex-shrink'); + }, + enumerable: true, + configurable: true +}; +var flexBasis_export_isValid, flexBasis_export_definition; + +function flexBasis_local_fn_parse(v) { + if (String(v).toLowerCase() === 'auto') { + return 'auto'; + } + + if (String(v).toLowerCase() === 'inherit') { + return 'inherit'; + } + + return external_dependency_parsers_0.parseMeasurement(v); +} + +flexBasis_export_isValid = function isValid(v) { + return flexBasis_local_fn_parse(v) !== undefined; +}; + +flexBasis_export_definition = { + set: function (v) { + this._setProperty('flex-basis', flexBasis_local_fn_parse(v)); + }, + get: function () { + return this.getPropertyValue('flex-basis'); + }, + enumerable: true, + configurable: true +}; +var flex_export_isValid, flex_export_definition; +var flex_local_var_shorthand_for = { + 'flex-grow': { + isValid: flexGrow_export_isValid, + definition: flexGrow_export_definition + }, + 'flex-shrink': { + isValid: flexShrink_export_isValid, + definition: flexShrink_export_definition + }, + 'flex-basis': { + isValid: flexBasis_export_isValid, + definition: flexBasis_export_definition + } +}; +var flex_local_var_myShorthandSetter = external_dependency_parsers_0.shorthandSetter('flex', flex_local_var_shorthand_for); + +flex_export_isValid = function isValid(v) { + return external_dependency_parsers_0.shorthandParser(v, flex_local_var_shorthand_for) !== undefined; +}; + +flex_export_definition = { + set: function (v) { + var normalizedValue = String(v).trim().toLowerCase(); + + if (normalizedValue === 'none') { + flex_local_var_myShorthandSetter.call(this, '0 0 auto'); + return; + } + + if (normalizedValue === 'initial') { + flex_local_var_myShorthandSetter.call(this, '0 1 auto'); + return; + } + + if (normalizedValue === 'auto') { + this.removeProperty('flex-grow'); + this.removeProperty('flex-shrink'); + this.setProperty('flex-basis', normalizedValue); + return; + } + + flex_local_var_myShorthandSetter.call(this, v); + }, + get: external_dependency_parsers_0.shorthandGetter('flex', flex_local_var_shorthand_for), + enumerable: true, + configurable: true +}; +var float_export_definition; +float_export_definition = { + set: function (v) { + this._setProperty('float', v); + }, + get: function () { + return this.getPropertyValue('float'); + }, + enumerable: true, + configurable: true +}; +var floodColor_export_definition; +floodColor_export_definition = { + set: function (v) { + this._setProperty('flood-color', external_dependency_parsers_0.parseColor(v)); + }, + get: function () { + return this.getPropertyValue('flood-color'); + }, + enumerable: true, + configurable: true +}; +var fontFamily_export_isValid, fontFamily_export_definition; +var fontFamily_local_var_partsRegEx = /\s*,\s*/; + +fontFamily_export_isValid = function isValid(v) { + if (v === '' || v === null) { + return true; + } + + var parts = v.split(fontFamily_local_var_partsRegEx); + var len = parts.length; + var i; + var type; + + for (i = 0; i < len; i++) { + type = external_dependency_parsers_0.valueType(parts[i]); + + if (type === external_dependency_parsers_0.TYPES.STRING || type === external_dependency_parsers_0.TYPES.KEYWORD) { + return true; + } + } + + return false; +}; + +fontFamily_export_definition = { + set: function (v) { + this._setProperty('font-family', v); + }, + get: function () { + return this.getPropertyValue('font-family'); + }, + enumerable: true, + configurable: true +}; +var fontSize_export_isValid, fontSize_export_definition; +var fontSize_local_var_absoluteSizes = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']; +var fontSize_local_var_relativeSizes = ['larger', 'smaller']; + +fontSize_export_isValid = function (v) { + var type = external_dependency_parsers_0.valueType(v.toLowerCase()); + return type === external_dependency_parsers_0.TYPES.LENGTH || type === external_dependency_parsers_0.TYPES.PERCENT || type === external_dependency_parsers_0.TYPES.KEYWORD && fontSize_local_var_absoluteSizes.indexOf(v.toLowerCase()) !== -1 || type === external_dependency_parsers_0.TYPES.KEYWORD && fontSize_local_var_relativeSizes.indexOf(v.toLowerCase()) !== -1; +}; + +function fontSize_local_fn_parse(v) { + const valueAsString = String(v).toLowerCase(); + const optionalArguments = fontSize_local_var_absoluteSizes.concat(fontSize_local_var_relativeSizes); + const isOptionalArgument = optionalArguments.some(stringValue => stringValue.toLowerCase() === valueAsString); + return isOptionalArgument ? valueAsString : external_dependency_parsers_0.parseMeasurement(v); +} + +fontSize_export_definition = { + set: function (v) { + this._setProperty('font-size', fontSize_local_fn_parse(v)); + }, + get: function () { + return this.getPropertyValue('font-size'); + }, + enumerable: true, + configurable: true +}; +var fontStyle_export_isValid, fontStyle_export_definition; +var fontStyle_local_var_valid_styles = ['normal', 'italic', 'oblique', 'inherit']; + +fontStyle_export_isValid = function (v) { + return fontStyle_local_var_valid_styles.indexOf(v.toLowerCase()) !== -1; +}; + +fontStyle_export_definition = { + set: function (v) { + this._setProperty('font-style', v); + }, + get: function () { + return this.getPropertyValue('font-style'); + }, + enumerable: true, + configurable: true +}; +var fontVariant_export_isValid, fontVariant_export_definition; +var fontVariant_local_var_valid_variants = ['normal', 'small-caps', 'inherit']; + +fontVariant_export_isValid = function isValid(v) { + return fontVariant_local_var_valid_variants.indexOf(v.toLowerCase()) !== -1; +}; + +fontVariant_export_definition = { + set: function (v) { + this._setProperty('font-variant', v); + }, + get: function () { + return this.getPropertyValue('font-variant'); + }, + enumerable: true, + configurable: true +}; +var fontWeight_export_isValid, fontWeight_export_definition; +var fontWeight_local_var_valid_weights = ['normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900', 'inherit']; + +fontWeight_export_isValid = function isValid(v) { + return fontWeight_local_var_valid_weights.indexOf(v.toLowerCase()) !== -1; +}; + +fontWeight_export_definition = { + set: function (v) { + this._setProperty('font-weight', v); + }, + get: function () { + return this.getPropertyValue('font-weight'); + }, + enumerable: true, + configurable: true +}; +var lineHeight_export_isValid, lineHeight_export_definition; + +lineHeight_export_isValid = function isValid(v) { + var type = external_dependency_parsers_0.valueType(v); + return type === external_dependency_parsers_0.TYPES.KEYWORD && v.toLowerCase() === 'normal' || v.toLowerCase() === 'inherit' || type === external_dependency_parsers_0.TYPES.NUMBER || type === external_dependency_parsers_0.TYPES.LENGTH || type === external_dependency_parsers_0.TYPES.PERCENT; +}; + +lineHeight_export_definition = { + set: function (v) { + this._setProperty('line-height', v); + }, + get: function () { + return this.getPropertyValue('line-height'); + }, + enumerable: true, + configurable: true +}; +var font_export_definition; +var font_local_var_shorthand_for = { + 'font-family': { + isValid: fontFamily_export_isValid, + definition: fontFamily_export_definition + }, + 'font-size': { + isValid: fontSize_export_isValid, + definition: fontSize_export_definition + }, + 'font-style': { + isValid: fontStyle_export_isValid, + definition: fontStyle_export_definition + }, + 'font-variant': { + isValid: fontVariant_export_isValid, + definition: fontVariant_export_definition + }, + 'font-weight': { + isValid: fontWeight_export_isValid, + definition: fontWeight_export_definition + }, + 'line-height': { + isValid: lineHeight_export_isValid, + definition: lineHeight_export_definition + } +}; +var font_local_var_static_fonts = ['caption', 'icon', 'menu', 'message-box', 'small-caption', 'status-bar', 'inherit']; +var font_local_var_setter = external_dependency_parsers_0.shorthandSetter('font', font_local_var_shorthand_for); +font_export_definition = { + set: function (v) { + var short = external_dependency_parsers_0.shorthandParser(v, font_local_var_shorthand_for); + + if (short !== undefined) { + return font_local_var_setter.call(this, v); + } + + if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && font_local_var_static_fonts.indexOf(v.toLowerCase()) !== -1) { + this._setProperty('font', v); + } + }, + get: external_dependency_parsers_0.shorthandGetter('font', font_local_var_shorthand_for), + enumerable: true, + configurable: true +}; +var height_export_definition; + +function height_local_fn_parse(v) { + if (String(v).toLowerCase() === 'auto') { + return 'auto'; + } + + if (String(v).toLowerCase() === 'inherit') { + return 'inherit'; + } + + return external_dependency_parsers_0.parseMeasurement(v); +} + +height_export_definition = { + set: function (v) { + this._setProperty('height', height_local_fn_parse(v)); + }, + get: function () { + return this.getPropertyValue('height'); + }, + enumerable: true, + configurable: true +}; +var left_export_definition; +left_export_definition = { + set: function (v) { + this._setProperty('left', external_dependency_parsers_0.parseMeasurement(v)); + }, + get: function () { + return this.getPropertyValue('left'); + }, + enumerable: true, + configurable: true +}; +var lightingColor_export_definition; +lightingColor_export_definition = { + set: function (v) { + this._setProperty('lighting-color', external_dependency_parsers_0.parseColor(v)); + }, + get: function () { + return this.getPropertyValue('lighting-color'); + }, + enumerable: true, + configurable: true +}; +var margin_export_definition, margin_export_isValid, margin_export_parser; +var margin_local_var_TYPES = external_dependency_parsers_0.TYPES; + +var margin_local_var_isValid = function (v) { + if (v.toLowerCase() === 'auto') { + return true; + } + + var type = external_dependency_parsers_0.valueType(v); + return type === margin_local_var_TYPES.LENGTH || type === margin_local_var_TYPES.PERCENT || type === margin_local_var_TYPES.INTEGER && (v === '0' || v === 0); +}; + +var margin_local_var_parser = function (v) { + var V = v.toLowerCase(); + + if (V === 'auto') { + return V; + } + + return external_dependency_parsers_0.parseMeasurement(v); +}; + +var margin_local_var_mySetter = external_dependency_parsers_0.implicitSetter('margin', '', margin_local_var_isValid, margin_local_var_parser); +var margin_local_var_myGlobal = external_dependency_parsers_0.implicitSetter('margin', '', function () { + return true; +}, function (v) { + return v; +}); +margin_export_definition = { + set: function (v) { + if (typeof v === 'number') { + v = String(v); + } + + if (typeof v !== 'string') { + return; + } + + var V = v.toLowerCase(); + + switch (V) { + case 'inherit': + case 'initial': + case 'unset': + case '': + margin_local_var_myGlobal.call(this, V); + break; + + default: + margin_local_var_mySetter.call(this, v); + break; + } + }, + get: function () { + return this.getPropertyValue('margin'); + }, + enumerable: true, + configurable: true +}; +margin_export_isValid = margin_local_var_isValid; +margin_export_parser = margin_local_var_parser; +var marginBottom_export_definition; +marginBottom_export_definition = { + set: external_dependency_parsers_0.subImplicitSetter('margin', 'bottom', { + definition: margin_export_definition, + isValid: margin_export_isValid, + parser: margin_export_parser + }.isValid, { + definition: margin_export_definition, + isValid: margin_export_isValid, + parser: margin_export_parser + }.parser), + get: function () { + return this.getPropertyValue('margin-bottom'); + }, + enumerable: true, + configurable: true +}; +var marginLeft_export_definition; +marginLeft_export_definition = { + set: external_dependency_parsers_0.subImplicitSetter('margin', 'left', { + definition: margin_export_definition, + isValid: margin_export_isValid, + parser: margin_export_parser + }.isValid, { + definition: margin_export_definition, + isValid: margin_export_isValid, + parser: margin_export_parser + }.parser), + get: function () { + return this.getPropertyValue('margin-left'); + }, + enumerable: true, + configurable: true +}; +var marginRight_export_definition; +marginRight_export_definition = { + set: external_dependency_parsers_0.subImplicitSetter('margin', 'right', { + definition: margin_export_definition, + isValid: margin_export_isValid, + parser: margin_export_parser + }.isValid, { + definition: margin_export_definition, + isValid: margin_export_isValid, + parser: margin_export_parser + }.parser), + get: function () { + return this.getPropertyValue('margin-right'); + }, + enumerable: true, + configurable: true +}; +var marginTop_export_definition; +marginTop_export_definition = { + set: external_dependency_parsers_0.subImplicitSetter('margin', 'top', { + definition: margin_export_definition, + isValid: margin_export_isValid, + parser: margin_export_parser + }.isValid, { + definition: margin_export_definition, + isValid: margin_export_isValid, + parser: margin_export_parser + }.parser), + get: function () { + return this.getPropertyValue('margin-top'); + }, + enumerable: true, + configurable: true +}; +var opacity_export_definition; +opacity_export_definition = { + set: function (v) { + this._setProperty('opacity', external_dependency_parsers_0.parseNumber(v)); + }, + get: function () { + return this.getPropertyValue('opacity'); + }, + enumerable: true, + configurable: true +}; +var outlineColor_export_definition; +outlineColor_export_definition = { + set: function (v) { + this._setProperty('outline-color', external_dependency_parsers_0.parseColor(v)); + }, + get: function () { + return this.getPropertyValue('outline-color'); + }, + enumerable: true, + configurable: true +}; +var padding_export_definition, padding_export_isValid, padding_export_parser; +var padding_local_var_TYPES = external_dependency_parsers_0.TYPES; + +var padding_local_var_isValid = function (v) { + var type = external_dependency_parsers_0.valueType(v); + return type === padding_local_var_TYPES.LENGTH || type === padding_local_var_TYPES.PERCENT || type === padding_local_var_TYPES.INTEGER && (v === '0' || v === 0); +}; + +var padding_local_var_parser = function (v) { + return external_dependency_parsers_0.parseMeasurement(v); +}; + +var padding_local_var_mySetter = external_dependency_parsers_0.implicitSetter('padding', '', padding_local_var_isValid, padding_local_var_parser); +var padding_local_var_myGlobal = external_dependency_parsers_0.implicitSetter('padding', '', function () { + return true; +}, function (v) { + return v; +}); +padding_export_definition = { + set: function (v) { + if (typeof v === 'number') { + v = String(v); + } + + if (typeof v !== 'string') { + return; + } + + var V = v.toLowerCase(); + + switch (V) { + case 'inherit': + case 'initial': + case 'unset': + case '': + padding_local_var_myGlobal.call(this, V); + break; + + default: + padding_local_var_mySetter.call(this, v); + break; + } + }, + get: function () { + return this.getPropertyValue('padding'); + }, + enumerable: true, + configurable: true +}; +padding_export_isValid = padding_local_var_isValid; +padding_export_parser = padding_local_var_parser; +var paddingBottom_export_definition; +paddingBottom_export_definition = { + set: external_dependency_parsers_0.subImplicitSetter('padding', 'bottom', { + definition: padding_export_definition, + isValid: padding_export_isValid, + parser: padding_export_parser + }.isValid, { + definition: padding_export_definition, + isValid: padding_export_isValid, + parser: padding_export_parser + }.parser), + get: function () { + return this.getPropertyValue('padding-bottom'); + }, + enumerable: true, + configurable: true +}; +var paddingLeft_export_definition; +paddingLeft_export_definition = { + set: external_dependency_parsers_0.subImplicitSetter('padding', 'left', { + definition: padding_export_definition, + isValid: padding_export_isValid, + parser: padding_export_parser + }.isValid, { + definition: padding_export_definition, + isValid: padding_export_isValid, + parser: padding_export_parser + }.parser), + get: function () { + return this.getPropertyValue('padding-left'); + }, + enumerable: true, + configurable: true +}; +var paddingRight_export_definition; +paddingRight_export_definition = { + set: external_dependency_parsers_0.subImplicitSetter('padding', 'right', { + definition: padding_export_definition, + isValid: padding_export_isValid, + parser: padding_export_parser + }.isValid, { + definition: padding_export_definition, + isValid: padding_export_isValid, + parser: padding_export_parser + }.parser), + get: function () { + return this.getPropertyValue('padding-right'); + }, + enumerable: true, + configurable: true +}; +var paddingTop_export_definition; +paddingTop_export_definition = { + set: external_dependency_parsers_0.subImplicitSetter('padding', 'top', { + definition: padding_export_definition, + isValid: padding_export_isValid, + parser: padding_export_parser + }.isValid, { + definition: padding_export_definition, + isValid: padding_export_isValid, + parser: padding_export_parser + }.parser), + get: function () { + return this.getPropertyValue('padding-top'); + }, + enumerable: true, + configurable: true +}; +var right_export_definition; +right_export_definition = { + set: function (v) { + this._setProperty('right', external_dependency_parsers_0.parseMeasurement(v)); + }, + get: function () { + return this.getPropertyValue('right'); + }, + enumerable: true, + configurable: true +}; +var stopColor_export_definition; +stopColor_export_definition = { + set: function (v) { + this._setProperty('stop-color', external_dependency_parsers_0.parseColor(v)); + }, + get: function () { + return this.getPropertyValue('stop-color'); + }, + enumerable: true, + configurable: true +}; +var textLineThroughColor_export_definition; +textLineThroughColor_export_definition = { + set: function (v) { + this._setProperty('text-line-through-color', external_dependency_parsers_0.parseColor(v)); + }, + get: function () { + return this.getPropertyValue('text-line-through-color'); + }, + enumerable: true, + configurable: true +}; +var textOverlineColor_export_definition; +textOverlineColor_export_definition = { + set: function (v) { + this._setProperty('text-overline-color', external_dependency_parsers_0.parseColor(v)); + }, + get: function () { + return this.getPropertyValue('text-overline-color'); + }, + enumerable: true, + configurable: true +}; +var textUnderlineColor_export_definition; +textUnderlineColor_export_definition = { + set: function (v) { + this._setProperty('text-underline-color', external_dependency_parsers_0.parseColor(v)); + }, + get: function () { + return this.getPropertyValue('text-underline-color'); + }, + enumerable: true, + configurable: true +}; +var top_export_definition; +top_export_definition = { + set: function (v) { + this._setProperty('top', external_dependency_parsers_0.parseMeasurement(v)); + }, + get: function () { + return this.getPropertyValue('top'); + }, + enumerable: true, + configurable: true +}; +var webkitBorderAfterColor_export_definition; +webkitBorderAfterColor_export_definition = { + set: function (v) { + this._setProperty('-webkit-border-after-color', external_dependency_parsers_0.parseColor(v)); + }, + get: function () { + return this.getPropertyValue('-webkit-border-after-color'); + }, + enumerable: true, + configurable: true +}; +var webkitBorderBeforeColor_export_definition; +webkitBorderBeforeColor_export_definition = { + set: function (v) { + this._setProperty('-webkit-border-before-color', external_dependency_parsers_0.parseColor(v)); + }, + get: function () { + return this.getPropertyValue('-webkit-border-before-color'); + }, + enumerable: true, + configurable: true +}; +var webkitBorderEndColor_export_definition; +webkitBorderEndColor_export_definition = { + set: function (v) { + this._setProperty('-webkit-border-end-color', external_dependency_parsers_0.parseColor(v)); + }, + get: function () { + return this.getPropertyValue('-webkit-border-end-color'); + }, + enumerable: true, + configurable: true +}; +var webkitBorderStartColor_export_definition; +webkitBorderStartColor_export_definition = { + set: function (v) { + this._setProperty('-webkit-border-start-color', external_dependency_parsers_0.parseColor(v)); + }, + get: function () { + return this.getPropertyValue('-webkit-border-start-color'); + }, + enumerable: true, + configurable: true +}; +var webkitColumnRuleColor_export_definition; +webkitColumnRuleColor_export_definition = { + set: function (v) { + this._setProperty('-webkit-column-rule-color', external_dependency_parsers_0.parseColor(v)); + }, + get: function () { + return this.getPropertyValue('-webkit-column-rule-color'); + }, + enumerable: true, + configurable: true +}; +var webkitMatchNearestMailBlockquoteColor_export_definition; +webkitMatchNearestMailBlockquoteColor_export_definition = { + set: function (v) { + this._setProperty('-webkit-match-nearest-mail-blockquote-color', external_dependency_parsers_0.parseColor(v)); + }, + get: function () { + return this.getPropertyValue('-webkit-match-nearest-mail-blockquote-color'); + }, + enumerable: true, + configurable: true +}; +var webkitTapHighlightColor_export_definition; +webkitTapHighlightColor_export_definition = { + set: function (v) { + this._setProperty('-webkit-tap-highlight-color', external_dependency_parsers_0.parseColor(v)); + }, + get: function () { + return this.getPropertyValue('-webkit-tap-highlight-color'); + }, + enumerable: true, + configurable: true +}; +var webkitTextEmphasisColor_export_definition; +webkitTextEmphasisColor_export_definition = { + set: function (v) { + this._setProperty('-webkit-text-emphasis-color', external_dependency_parsers_0.parseColor(v)); + }, + get: function () { + return this.getPropertyValue('-webkit-text-emphasis-color'); + }, + enumerable: true, + configurable: true +}; +var webkitTextFillColor_export_definition; +webkitTextFillColor_export_definition = { + set: function (v) { + this._setProperty('-webkit-text-fill-color', external_dependency_parsers_0.parseColor(v)); + }, + get: function () { + return this.getPropertyValue('-webkit-text-fill-color'); + }, + enumerable: true, + configurable: true +}; +var webkitTextStrokeColor_export_definition; +webkitTextStrokeColor_export_definition = { + set: function (v) { + this._setProperty('-webkit-text-stroke-color', external_dependency_parsers_0.parseColor(v)); + }, + get: function () { + return this.getPropertyValue('-webkit-text-stroke-color'); + }, + enumerable: true, + configurable: true +}; +var width_export_definition; + +function width_local_fn_parse(v) { + if (String(v).toLowerCase() === 'auto') { + return 'auto'; + } + + if (String(v).toLowerCase() === 'inherit') { + return 'inherit'; + } + + return external_dependency_parsers_0.parseMeasurement(v); +} + +width_export_definition = { + set: function (v) { + this._setProperty('width', width_local_fn_parse(v)); + }, + get: function () { + return this.getPropertyValue('width'); + }, + enumerable: true, + configurable: true +}; + +module.exports = function (prototype) { + Object.defineProperties(prototype, { + azimuth: azimuth_export_definition, + backgroundColor: backgroundColor_export_definition, + "background-color": backgroundColor_export_definition, + backgroundImage: backgroundImage_export_definition, + "background-image": backgroundImage_export_definition, + backgroundRepeat: backgroundRepeat_export_definition, + "background-repeat": backgroundRepeat_export_definition, + backgroundAttachment: backgroundAttachment_export_definition, + "background-attachment": backgroundAttachment_export_definition, + backgroundPosition: backgroundPosition_export_definition, + "background-position": backgroundPosition_export_definition, + background: background_export_definition, + borderWidth: borderWidth_export_definition, + "border-width": borderWidth_export_definition, + borderStyle: borderStyle_export_definition, + "border-style": borderStyle_export_definition, + borderColor: borderColor_export_definition, + "border-color": borderColor_export_definition, + border: border_export_definition, + borderBottomWidth: borderBottomWidth_export_definition, + "border-bottom-width": borderBottomWidth_export_definition, + borderBottomStyle: borderBottomStyle_export_definition, + "border-bottom-style": borderBottomStyle_export_definition, + borderBottomColor: borderBottomColor_export_definition, + "border-bottom-color": borderBottomColor_export_definition, + borderBottom: borderBottom_export_definition, + "border-bottom": borderBottom_export_definition, + borderCollapse: borderCollapse_export_definition, + "border-collapse": borderCollapse_export_definition, + borderLeftWidth: borderLeftWidth_export_definition, + "border-left-width": borderLeftWidth_export_definition, + borderLeftStyle: borderLeftStyle_export_definition, + "border-left-style": borderLeftStyle_export_definition, + borderLeftColor: borderLeftColor_export_definition, + "border-left-color": borderLeftColor_export_definition, + borderLeft: borderLeft_export_definition, + "border-left": borderLeft_export_definition, + borderRightWidth: borderRightWidth_export_definition, + "border-right-width": borderRightWidth_export_definition, + borderRightStyle: borderRightStyle_export_definition, + "border-right-style": borderRightStyle_export_definition, + borderRightColor: borderRightColor_export_definition, + "border-right-color": borderRightColor_export_definition, + borderRight: borderRight_export_definition, + "border-right": borderRight_export_definition, + borderSpacing: borderSpacing_export_definition, + "border-spacing": borderSpacing_export_definition, + borderTopWidth: borderTopWidth_export_definition, + "border-top-width": borderTopWidth_export_definition, + borderTopStyle: borderTopStyle_export_definition, + "border-top-style": borderTopStyle_export_definition, + borderTopColor: borderTopColor_export_definition, + "border-top-color": borderTopColor_export_definition, + borderTop: borderTop_export_definition, + "border-top": borderTop_export_definition, + bottom: bottom_export_definition, + clear: clear_export_definition, + clip: clip_export_definition, + color: color_export_definition, + cssFloat: cssFloat_export_definition, + "css-float": cssFloat_export_definition, + flexGrow: flexGrow_export_definition, + "flex-grow": flexGrow_export_definition, + flexShrink: flexShrink_export_definition, + "flex-shrink": flexShrink_export_definition, + flexBasis: flexBasis_export_definition, + "flex-basis": flexBasis_export_definition, + flex: flex_export_definition, + float: float_export_definition, + floodColor: floodColor_export_definition, + "flood-color": floodColor_export_definition, + fontFamily: fontFamily_export_definition, + "font-family": fontFamily_export_definition, + fontSize: fontSize_export_definition, + "font-size": fontSize_export_definition, + fontStyle: fontStyle_export_definition, + "font-style": fontStyle_export_definition, + fontVariant: fontVariant_export_definition, + "font-variant": fontVariant_export_definition, + fontWeight: fontWeight_export_definition, + "font-weight": fontWeight_export_definition, + lineHeight: lineHeight_export_definition, + "line-height": lineHeight_export_definition, + font: font_export_definition, + height: height_export_definition, + left: left_export_definition, + lightingColor: lightingColor_export_definition, + "lighting-color": lightingColor_export_definition, + margin: margin_export_definition, + marginBottom: marginBottom_export_definition, + "margin-bottom": marginBottom_export_definition, + marginLeft: marginLeft_export_definition, + "margin-left": marginLeft_export_definition, + marginRight: marginRight_export_definition, + "margin-right": marginRight_export_definition, + marginTop: marginTop_export_definition, + "margin-top": marginTop_export_definition, + opacity: opacity_export_definition, + outlineColor: outlineColor_export_definition, + "outline-color": outlineColor_export_definition, + padding: padding_export_definition, + paddingBottom: paddingBottom_export_definition, + "padding-bottom": paddingBottom_export_definition, + paddingLeft: paddingLeft_export_definition, + "padding-left": paddingLeft_export_definition, + paddingRight: paddingRight_export_definition, + "padding-right": paddingRight_export_definition, + paddingTop: paddingTop_export_definition, + "padding-top": paddingTop_export_definition, + right: right_export_definition, + stopColor: stopColor_export_definition, + "stop-color": stopColor_export_definition, + textLineThroughColor: textLineThroughColor_export_definition, + "text-line-through-color": textLineThroughColor_export_definition, + textOverlineColor: textOverlineColor_export_definition, + "text-overline-color": textOverlineColor_export_definition, + textUnderlineColor: textUnderlineColor_export_definition, + "text-underline-color": textUnderlineColor_export_definition, + top: top_export_definition, + webkitBorderAfterColor: webkitBorderAfterColor_export_definition, + "webkit-border-after-color": webkitBorderAfterColor_export_definition, + webkitBorderBeforeColor: webkitBorderBeforeColor_export_definition, + "webkit-border-before-color": webkitBorderBeforeColor_export_definition, + webkitBorderEndColor: webkitBorderEndColor_export_definition, + "webkit-border-end-color": webkitBorderEndColor_export_definition, + webkitBorderStartColor: webkitBorderStartColor_export_definition, + "webkit-border-start-color": webkitBorderStartColor_export_definition, + webkitColumnRuleColor: webkitColumnRuleColor_export_definition, + "webkit-column-rule-color": webkitColumnRuleColor_export_definition, + webkitMatchNearestMailBlockquoteColor: webkitMatchNearestMailBlockquoteColor_export_definition, + "webkit-match-nearest-mail-blockquote-color": webkitMatchNearestMailBlockquoteColor_export_definition, + webkitTapHighlightColor: webkitTapHighlightColor_export_definition, + "webkit-tap-highlight-color": webkitTapHighlightColor_export_definition, + webkitTextEmphasisColor: webkitTextEmphasisColor_export_definition, + "webkit-text-emphasis-color": webkitTextEmphasisColor_export_definition, + webkitTextFillColor: webkitTextFillColor_export_definition, + "webkit-text-fill-color": webkitTextFillColor_export_definition, + webkitTextStrokeColor: webkitTextStrokeColor_export_definition, + "webkit-text-stroke-color": webkitTextStrokeColor_export_definition, + width: width_export_definition + }); +}; diff --git a/node_modules/cssstyle/lib/properties/azimuth.js b/node_modules/cssstyle/lib/properties/azimuth.js new file mode 100644 index 0000000..f23a68d --- /dev/null +++ b/node_modules/cssstyle/lib/properties/azimuth.js @@ -0,0 +1,67 @@ +'use strict'; + +var parsers = require('../parsers'); + +module.exports.definition = { + set: function(v) { + var valueType = parsers.valueType(v); + if (valueType === parsers.TYPES.ANGLE) { + return this._setProperty('azimuth', parsers.parseAngle(v)); + } + if (valueType === parsers.TYPES.KEYWORD) { + var keywords = v + .toLowerCase() + .trim() + .split(/\s+/); + var hasBehind = false; + if (keywords.length > 2) { + return; + } + var behindIndex = keywords.indexOf('behind'); + hasBehind = behindIndex !== -1; + + if (keywords.length === 2) { + if (!hasBehind) { + return; + } + keywords.splice(behindIndex, 1); + } + if (keywords[0] === 'leftwards' || keywords[0] === 'rightwards') { + if (hasBehind) { + return; + } + return this._setProperty('azimuth', keywords[0]); + } + if (keywords[0] === 'behind') { + return this._setProperty('azimuth', '180deg'); + } + switch (keywords[0]) { + case 'left-side': + return this._setProperty('azimuth', '270deg'); + case 'far-left': + return this._setProperty('azimuth', (hasBehind ? 240 : 300) + 'deg'); + case 'left': + return this._setProperty('azimuth', (hasBehind ? 220 : 320) + 'deg'); + case 'center-left': + return this._setProperty('azimuth', (hasBehind ? 200 : 340) + 'deg'); + case 'center': + return this._setProperty('azimuth', (hasBehind ? 180 : 0) + 'deg'); + case 'center-right': + return this._setProperty('azimuth', (hasBehind ? 160 : 20) + 'deg'); + case 'right': + return this._setProperty('azimuth', (hasBehind ? 140 : 40) + 'deg'); + case 'far-right': + return this._setProperty('azimuth', (hasBehind ? 120 : 60) + 'deg'); + case 'right-side': + return this._setProperty('azimuth', '90deg'); + default: + return; + } + } + }, + get: function() { + return this.getPropertyValue('azimuth'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/background.js b/node_modules/cssstyle/lib/properties/background.js new file mode 100644 index 0000000..b843e0c --- /dev/null +++ b/node_modules/cssstyle/lib/properties/background.js @@ -0,0 +1,19 @@ +'use strict'; + +var shorthandSetter = require('../parsers').shorthandSetter; +var shorthandGetter = require('../parsers').shorthandGetter; + +var shorthand_for = { + 'background-color': require('./backgroundColor'), + 'background-image': require('./backgroundImage'), + 'background-repeat': require('./backgroundRepeat'), + 'background-attachment': require('./backgroundAttachment'), + 'background-position': require('./backgroundPosition'), +}; + +module.exports.definition = { + set: shorthandSetter('background', shorthand_for), + get: shorthandGetter('background', shorthand_for), + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/backgroundAttachment.js b/node_modules/cssstyle/lib/properties/backgroundAttachment.js new file mode 100644 index 0000000..98c8f76 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/backgroundAttachment.js @@ -0,0 +1,24 @@ +'use strict'; + +var parsers = require('../parsers'); + +var isValid = (module.exports.isValid = function isValid(v) { + return ( + parsers.valueType(v) === parsers.TYPES.KEYWORD && + (v.toLowerCase() === 'scroll' || v.toLowerCase() === 'fixed' || v.toLowerCase() === 'inherit') + ); +}); + +module.exports.definition = { + set: function(v) { + if (!isValid(v)) { + return; + } + this._setProperty('background-attachment', v); + }, + get: function() { + return this.getPropertyValue('background-attachment'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/backgroundColor.js b/node_modules/cssstyle/lib/properties/backgroundColor.js new file mode 100644 index 0000000..5cee717 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/backgroundColor.js @@ -0,0 +1,36 @@ +'use strict'; + +var parsers = require('../parsers'); + +var parse = function parse(v) { + var parsed = parsers.parseColor(v); + if (parsed !== undefined) { + return parsed; + } + if ( + parsers.valueType(v) === parsers.TYPES.KEYWORD && + (v.toLowerCase() === 'transparent' || v.toLowerCase() === 'inherit') + ) { + return v; + } + return undefined; +}; + +module.exports.isValid = function isValid(v) { + return parse(v) !== undefined; +}; + +module.exports.definition = { + set: function(v) { + var parsed = parse(v); + if (parsed === undefined) { + return; + } + this._setProperty('background-color', parsed); + }, + get: function() { + return this.getPropertyValue('background-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/backgroundImage.js b/node_modules/cssstyle/lib/properties/backgroundImage.js new file mode 100644 index 0000000..b6479a1 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/backgroundImage.js @@ -0,0 +1,32 @@ +'use strict'; + +var parsers = require('../parsers'); + +var parse = function parse(v) { + var parsed = parsers.parseUrl(v); + if (parsed !== undefined) { + return parsed; + } + if ( + parsers.valueType(v) === parsers.TYPES.KEYWORD && + (v.toLowerCase() === 'none' || v.toLowerCase() === 'inherit') + ) { + return v; + } + return undefined; +}; + +module.exports.isValid = function isValid(v) { + return parse(v) !== undefined; +}; + +module.exports.definition = { + set: function(v) { + this._setProperty('background-image', parse(v)); + }, + get: function() { + return this.getPropertyValue('background-image'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/backgroundPosition.js b/node_modules/cssstyle/lib/properties/backgroundPosition.js new file mode 100644 index 0000000..4405fe6 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/backgroundPosition.js @@ -0,0 +1,58 @@ +'use strict'; + +var parsers = require('../parsers'); + +var valid_keywords = ['top', 'center', 'bottom', 'left', 'right']; + +var parse = function parse(v) { + if (v === '' || v === null) { + return undefined; + } + var parts = v.split(/\s+/); + if (parts.length > 2 || parts.length < 1) { + return undefined; + } + var types = []; + parts.forEach(function(part, index) { + types[index] = parsers.valueType(part); + }); + if (parts.length === 1) { + if (types[0] === parsers.TYPES.LENGTH || types[0] === parsers.TYPES.PERCENT) { + return v; + } + if (types[0] === parsers.TYPES.KEYWORD) { + if (valid_keywords.indexOf(v.toLowerCase()) !== -1 || v.toLowerCase() === 'inherit') { + return v; + } + } + return undefined; + } + if ( + (types[0] === parsers.TYPES.LENGTH || types[0] === parsers.TYPES.PERCENT) && + (types[1] === parsers.TYPES.LENGTH || types[1] === parsers.TYPES.PERCENT) + ) { + return v; + } + if (types[0] !== parsers.TYPES.KEYWORD || types[1] !== parsers.TYPES.KEYWORD) { + return undefined; + } + if (valid_keywords.indexOf(parts[0]) !== -1 && valid_keywords.indexOf(parts[1]) !== -1) { + return v; + } + return undefined; +}; + +module.exports.isValid = function isValid(v) { + return parse(v) !== undefined; +}; + +module.exports.definition = { + set: function(v) { + this._setProperty('background-position', parse(v)); + }, + get: function() { + return this.getPropertyValue('background-position'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/backgroundRepeat.js b/node_modules/cssstyle/lib/properties/backgroundRepeat.js new file mode 100644 index 0000000..379ade0 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/backgroundRepeat.js @@ -0,0 +1,32 @@ +'use strict'; + +var parsers = require('../parsers'); + +var parse = function parse(v) { + if ( + parsers.valueType(v) === parsers.TYPES.KEYWORD && + (v.toLowerCase() === 'repeat' || + v.toLowerCase() === 'repeat-x' || + v.toLowerCase() === 'repeat-y' || + v.toLowerCase() === 'no-repeat' || + v.toLowerCase() === 'inherit') + ) { + return v; + } + return undefined; +}; + +module.exports.isValid = function isValid(v) { + return parse(v) !== undefined; +}; + +module.exports.definition = { + set: function(v) { + this._setProperty('background-repeat', parse(v)); + }, + get: function() { + return this.getPropertyValue('background-repeat'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/border.js b/node_modules/cssstyle/lib/properties/border.js new file mode 100644 index 0000000..bf5b5d6 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/border.js @@ -0,0 +1,33 @@ +'use strict'; + +var shorthandSetter = require('../parsers').shorthandSetter; +var shorthandGetter = require('../parsers').shorthandGetter; + +var shorthand_for = { + 'border-width': require('./borderWidth'), + 'border-style': require('./borderStyle'), + 'border-color': require('./borderColor'), +}; + +var myShorthandSetter = shorthandSetter('border', shorthand_for); +var myShorthandGetter = shorthandGetter('border', shorthand_for); + +module.exports.definition = { + set: function(v) { + if (v.toString().toLowerCase() === 'none') { + v = ''; + } + myShorthandSetter.call(this, v); + this.removeProperty('border-top'); + this.removeProperty('border-left'); + this.removeProperty('border-right'); + this.removeProperty('border-bottom'); + this._values['border-top'] = this._values.border; + this._values['border-left'] = this._values.border; + this._values['border-right'] = this._values.border; + this._values['border-bottom'] = this._values.border; + }, + get: myShorthandGetter, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/borderBottom.js b/node_modules/cssstyle/lib/properties/borderBottom.js new file mode 100644 index 0000000..aae2e5f --- /dev/null +++ b/node_modules/cssstyle/lib/properties/borderBottom.js @@ -0,0 +1,17 @@ +'use strict'; + +var shorthandSetter = require('../parsers').shorthandSetter; +var shorthandGetter = require('../parsers').shorthandGetter; + +var shorthand_for = { + 'border-bottom-width': require('./borderBottomWidth'), + 'border-bottom-style': require('./borderBottomStyle'), + 'border-bottom-color': require('./borderBottomColor'), +}; + +module.exports.definition = { + set: shorthandSetter('border-bottom', shorthand_for), + get: shorthandGetter('border-bottom', shorthand_for), + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/borderBottomColor.js b/node_modules/cssstyle/lib/properties/borderBottomColor.js new file mode 100644 index 0000000..da5a4b5 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/borderBottomColor.js @@ -0,0 +1,16 @@ +'use strict'; + +var isValid = (module.exports.isValid = require('./borderColor').isValid); + +module.exports.definition = { + set: function(v) { + if (isValid(v)) { + this._setProperty('border-bottom-color', v); + } + }, + get: function() { + return this.getPropertyValue('border-bottom-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/borderBottomStyle.js b/node_modules/cssstyle/lib/properties/borderBottomStyle.js new file mode 100644 index 0000000..35c44f0 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/borderBottomStyle.js @@ -0,0 +1,21 @@ +'use strict'; + +var isValid = require('./borderStyle').isValid; +module.exports.isValid = isValid; + +module.exports.definition = { + set: function(v) { + if (isValid(v)) { + if (v.toLowerCase() === 'none') { + v = ''; + this.removeProperty('border-bottom-width'); + } + this._setProperty('border-bottom-style', v); + } + }, + get: function() { + return this.getPropertyValue('border-bottom-style'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/borderBottomWidth.js b/node_modules/cssstyle/lib/properties/borderBottomWidth.js new file mode 100644 index 0000000..db2e3b8 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/borderBottomWidth.js @@ -0,0 +1,16 @@ +'use strict'; + +var isValid = (module.exports.isValid = require('./borderWidth').isValid); + +module.exports.definition = { + set: function(v) { + if (isValid(v)) { + this._setProperty('border-bottom-width', v); + } + }, + get: function() { + return this.getPropertyValue('border-bottom-width'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/borderCollapse.js b/node_modules/cssstyle/lib/properties/borderCollapse.js new file mode 100644 index 0000000..49bdeb0 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/borderCollapse.js @@ -0,0 +1,26 @@ +'use strict'; + +var parsers = require('../parsers'); + +var parse = function parse(v) { + if ( + parsers.valueType(v) === parsers.TYPES.KEYWORD && + (v.toLowerCase() === 'collapse' || + v.toLowerCase() === 'separate' || + v.toLowerCase() === 'inherit') + ) { + return v; + } + return undefined; +}; + +module.exports.definition = { + set: function(v) { + this._setProperty('border-collapse', parse(v)); + }, + get: function() { + return this.getPropertyValue('border-collapse'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/borderColor.js b/node_modules/cssstyle/lib/properties/borderColor.js new file mode 100644 index 0000000..6605e07 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/borderColor.js @@ -0,0 +1,30 @@ +'use strict'; + +var parsers = require('../parsers'); +var implicitSetter = require('../parsers').implicitSetter; + +module.exports.isValid = function parse(v) { + if (typeof v !== 'string') { + return false; + } + return ( + v === '' || v.toLowerCase() === 'transparent' || parsers.valueType(v) === parsers.TYPES.COLOR + ); +}; +var isValid = module.exports.isValid; + +var parser = function(v) { + if (isValid(v)) { + return v.toLowerCase(); + } + return undefined; +}; + +module.exports.definition = { + set: implicitSetter('border', 'color', isValid, parser), + get: function() { + return this.getPropertyValue('border-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/borderLeft.js b/node_modules/cssstyle/lib/properties/borderLeft.js new file mode 100644 index 0000000..a05945e --- /dev/null +++ b/node_modules/cssstyle/lib/properties/borderLeft.js @@ -0,0 +1,17 @@ +'use strict'; + +var shorthandSetter = require('../parsers').shorthandSetter; +var shorthandGetter = require('../parsers').shorthandGetter; + +var shorthand_for = { + 'border-left-width': require('./borderLeftWidth'), + 'border-left-style': require('./borderLeftStyle'), + 'border-left-color': require('./borderLeftColor'), +}; + +module.exports.definition = { + set: shorthandSetter('border-left', shorthand_for), + get: shorthandGetter('border-left', shorthand_for), + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/borderLeftColor.js b/node_modules/cssstyle/lib/properties/borderLeftColor.js new file mode 100644 index 0000000..eb3f273 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/borderLeftColor.js @@ -0,0 +1,16 @@ +'use strict'; + +var isValid = (module.exports.isValid = require('./borderColor').isValid); + +module.exports.definition = { + set: function(v) { + if (isValid(v)) { + this._setProperty('border-left-color', v); + } + }, + get: function() { + return this.getPropertyValue('border-left-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/borderLeftStyle.js b/node_modules/cssstyle/lib/properties/borderLeftStyle.js new file mode 100644 index 0000000..5e8a113 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/borderLeftStyle.js @@ -0,0 +1,21 @@ +'use strict'; + +var isValid = require('./borderStyle').isValid; +module.exports.isValid = isValid; + +module.exports.definition = { + set: function(v) { + if (isValid(v)) { + if (v.toLowerCase() === 'none') { + v = ''; + this.removeProperty('border-left-width'); + } + this._setProperty('border-left-style', v); + } + }, + get: function() { + return this.getPropertyValue('border-left-style'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/borderLeftWidth.js b/node_modules/cssstyle/lib/properties/borderLeftWidth.js new file mode 100644 index 0000000..8c680b1 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/borderLeftWidth.js @@ -0,0 +1,16 @@ +'use strict'; + +var isValid = (module.exports.isValid = require('./borderWidth').isValid); + +module.exports.definition = { + set: function(v) { + if (isValid(v)) { + this._setProperty('border-left-width', v); + } + }, + get: function() { + return this.getPropertyValue('border-left-width'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/borderRight.js b/node_modules/cssstyle/lib/properties/borderRight.js new file mode 100644 index 0000000..17e26df --- /dev/null +++ b/node_modules/cssstyle/lib/properties/borderRight.js @@ -0,0 +1,17 @@ +'use strict'; + +var shorthandSetter = require('../parsers').shorthandSetter; +var shorthandGetter = require('../parsers').shorthandGetter; + +var shorthand_for = { + 'border-right-width': require('./borderRightWidth'), + 'border-right-style': require('./borderRightStyle'), + 'border-right-color': require('./borderRightColor'), +}; + +module.exports.definition = { + set: shorthandSetter('border-right', shorthand_for), + get: shorthandGetter('border-right', shorthand_for), + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/borderRightColor.js b/node_modules/cssstyle/lib/properties/borderRightColor.js new file mode 100644 index 0000000..7c188f2 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/borderRightColor.js @@ -0,0 +1,16 @@ +'use strict'; + +var isValid = (module.exports.isValid = require('./borderColor').isValid); + +module.exports.definition = { + set: function(v) { + if (isValid(v)) { + this._setProperty('border-right-color', v); + } + }, + get: function() { + return this.getPropertyValue('border-right-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/borderRightStyle.js b/node_modules/cssstyle/lib/properties/borderRightStyle.js new file mode 100644 index 0000000..68e8209 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/borderRightStyle.js @@ -0,0 +1,21 @@ +'use strict'; + +var isValid = require('./borderStyle').isValid; +module.exports.isValid = isValid; + +module.exports.definition = { + set: function(v) { + if (isValid(v)) { + if (v.toLowerCase() === 'none') { + v = ''; + this.removeProperty('border-right-width'); + } + this._setProperty('border-right-style', v); + } + }, + get: function() { + return this.getPropertyValue('border-right-style'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/borderRightWidth.js b/node_modules/cssstyle/lib/properties/borderRightWidth.js new file mode 100644 index 0000000..d1090d7 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/borderRightWidth.js @@ -0,0 +1,16 @@ +'use strict'; + +var isValid = (module.exports.isValid = require('./borderWidth').isValid); + +module.exports.definition = { + set: function(v) { + if (isValid(v)) { + this._setProperty('border-right-width', v); + } + }, + get: function() { + return this.getPropertyValue('border-right-width'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/borderSpacing.js b/node_modules/cssstyle/lib/properties/borderSpacing.js new file mode 100644 index 0000000..ff1ce88 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/borderSpacing.js @@ -0,0 +1,41 @@ +'use strict'; + +var parsers = require('../parsers'); + +// ? | inherit +// if one, it applies to both horizontal and verical spacing +// if two, the first applies to the horizontal and the second applies to vertical spacing + +var parse = function parse(v) { + if (v === '' || v === null) { + return undefined; + } + if (v === 0) { + return '0px'; + } + if (v.toLowerCase() === 'inherit') { + return v; + } + var parts = v.split(/\s+/); + if (parts.length !== 1 && parts.length !== 2) { + return undefined; + } + parts.forEach(function(part) { + if (parsers.valueType(part) !== parsers.TYPES.LENGTH) { + return undefined; + } + }); + + return v; +}; + +module.exports.definition = { + set: function(v) { + this._setProperty('border-spacing', parse(v)); + }, + get: function() { + return this.getPropertyValue('border-spacing'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/borderStyle.js b/node_modules/cssstyle/lib/properties/borderStyle.js new file mode 100644 index 0000000..6e3e674 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/borderStyle.js @@ -0,0 +1,38 @@ +'use strict'; + +var implicitSetter = require('../parsers').implicitSetter; + +// the valid border-styles: +var styles = [ + 'none', + 'hidden', + 'dotted', + 'dashed', + 'solid', + 'double', + 'groove', + 'ridge', + 'inset', + 'outset', +]; + +module.exports.isValid = function parse(v) { + return typeof v === 'string' && (v === '' || styles.indexOf(v) !== -1); +}; +var isValid = module.exports.isValid; + +var parser = function(v) { + if (isValid(v)) { + return v.toLowerCase(); + } + return undefined; +}; + +module.exports.definition = { + set: implicitSetter('border', 'style', isValid, parser), + get: function() { + return this.getPropertyValue('border-style'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/borderTop.js b/node_modules/cssstyle/lib/properties/borderTop.js new file mode 100644 index 0000000..c56d592 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/borderTop.js @@ -0,0 +1,17 @@ +'use strict'; + +var shorthandSetter = require('../parsers').shorthandSetter; +var shorthandGetter = require('../parsers').shorthandGetter; + +var shorthand_for = { + 'border-top-width': require('./borderTopWidth'), + 'border-top-style': require('./borderTopStyle'), + 'border-top-color': require('./borderTopColor'), +}; + +module.exports.definition = { + set: shorthandSetter('border-top', shorthand_for), + get: shorthandGetter('border-top', shorthand_for), + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/borderTopColor.js b/node_modules/cssstyle/lib/properties/borderTopColor.js new file mode 100644 index 0000000..cc35392 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/borderTopColor.js @@ -0,0 +1,16 @@ +'use strict'; + +var isValid = (module.exports.isValid = require('./borderColor').isValid); + +module.exports.definition = { + set: function(v) { + if (isValid(v)) { + this._setProperty('border-top-color', v); + } + }, + get: function() { + return this.getPropertyValue('border-top-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/borderTopStyle.js b/node_modules/cssstyle/lib/properties/borderTopStyle.js new file mode 100644 index 0000000..938ea40 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/borderTopStyle.js @@ -0,0 +1,21 @@ +'use strict'; + +var isValid = require('./borderStyle').isValid; +module.exports.isValid = isValid; + +module.exports.definition = { + set: function(v) { + if (isValid(v)) { + if (v.toLowerCase() === 'none') { + v = ''; + this.removeProperty('border-top-width'); + } + this._setProperty('border-top-style', v); + } + }, + get: function() { + return this.getPropertyValue('border-top-style'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/borderTopWidth.js b/node_modules/cssstyle/lib/properties/borderTopWidth.js new file mode 100644 index 0000000..9407253 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/borderTopWidth.js @@ -0,0 +1,17 @@ +'use strict'; + +var isValid = require('./borderWidth').isValid; +module.exports.isValid = isValid; + +module.exports.definition = { + set: function(v) { + if (isValid(v)) { + this._setProperty('border-top-width', v); + } + }, + get: function() { + return this.getPropertyValue('border-top-width'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/borderWidth.js b/node_modules/cssstyle/lib/properties/borderWidth.js new file mode 100644 index 0000000..2b6d871 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/borderWidth.js @@ -0,0 +1,46 @@ +'use strict'; + +var parsers = require('../parsers'); +var implicitSetter = require('../parsers').implicitSetter; + +// the valid border-widths: +var widths = ['thin', 'medium', 'thick']; + +module.exports.isValid = function parse(v) { + var length = parsers.parseLength(v); + if (length !== undefined) { + return true; + } + if (typeof v !== 'string') { + return false; + } + if (v === '') { + return true; + } + v = v.toLowerCase(); + if (widths.indexOf(v) === -1) { + return false; + } + return true; +}; +var isValid = module.exports.isValid; + +var parser = function(v) { + var length = parsers.parseLength(v); + if (length !== undefined) { + return length; + } + if (isValid(v)) { + return v.toLowerCase(); + } + return undefined; +}; + +module.exports.definition = { + set: implicitSetter('border', 'width', isValid, parser), + get: function() { + return this.getPropertyValue('border-width'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/bottom.js b/node_modules/cssstyle/lib/properties/bottom.js new file mode 100644 index 0000000..e9d72b2 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/bottom.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseMeasurement = require('../parsers').parseMeasurement; + +module.exports.definition = { + set: function(v) { + this._setProperty('bottom', parseMeasurement(v)); + }, + get: function() { + return this.getPropertyValue('bottom'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/clear.js b/node_modules/cssstyle/lib/properties/clear.js new file mode 100644 index 0000000..22d9802 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/clear.js @@ -0,0 +1,16 @@ +'use strict'; + +var parseKeyword = require('../parsers').parseKeyword; + +var clear_keywords = ['none', 'left', 'right', 'both', 'inherit']; + +module.exports.definition = { + set: function(v) { + this._setProperty('clear', parseKeyword(v, clear_keywords)); + }, + get: function() { + return this.getPropertyValue('clear'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/clip.js b/node_modules/cssstyle/lib/properties/clip.js new file mode 100644 index 0000000..91ba675 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/clip.js @@ -0,0 +1,47 @@ +'use strict'; + +var parseMeasurement = require('../parsers').parseMeasurement; + +var shape_regex = /^rect\((.*)\)$/i; + +var parse = function(val) { + if (val === '' || val === null) { + return val; + } + if (typeof val !== 'string') { + return undefined; + } + val = val.toLowerCase(); + if (val === 'auto' || val === 'inherit') { + return val; + } + var matches = val.match(shape_regex); + if (!matches) { + return undefined; + } + var parts = matches[1].split(/\s*,\s*/); + if (parts.length !== 4) { + return undefined; + } + var valid = parts.every(function(part, index) { + var measurement = parseMeasurement(part); + parts[index] = measurement; + return measurement !== undefined; + }); + if (!valid) { + return undefined; + } + parts = parts.join(', '); + return val.replace(matches[1], parts); +}; + +module.exports.definition = { + set: function(v) { + this._setProperty('clip', parse(v)); + }, + get: function() { + return this.getPropertyValue('clip'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/color.js b/node_modules/cssstyle/lib/properties/color.js new file mode 100644 index 0000000..1b5ca3d --- /dev/null +++ b/node_modules/cssstyle/lib/properties/color.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseColor = require('../parsers').parseColor; + +module.exports.definition = { + set: function(v) { + this._setProperty('color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/cssFloat.js b/node_modules/cssstyle/lib/properties/cssFloat.js new file mode 100644 index 0000000..1c619cc --- /dev/null +++ b/node_modules/cssstyle/lib/properties/cssFloat.js @@ -0,0 +1,12 @@ +'use strict'; + +module.exports.definition = { + set: function(v) { + this._setProperty('float', v); + }, + get: function() { + return this.getPropertyValue('float'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/flex.js b/node_modules/cssstyle/lib/properties/flex.js new file mode 100644 index 0000000..b56fd55 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/flex.js @@ -0,0 +1,45 @@ +'use strict'; + +var shorthandParser = require('../parsers').shorthandParser; +var shorthandSetter = require('../parsers').shorthandSetter; +var shorthandGetter = require('../parsers').shorthandGetter; + +var shorthand_for = { + 'flex-grow': require('./flexGrow'), + 'flex-shrink': require('./flexShrink'), + 'flex-basis': require('./flexBasis'), +}; + +var myShorthandSetter = shorthandSetter('flex', shorthand_for); + +module.exports.isValid = function isValid(v) { + return shorthandParser(v, shorthand_for) !== undefined; +}; + +module.exports.definition = { + set: function(v) { + var normalizedValue = String(v) + .trim() + .toLowerCase(); + + if (normalizedValue === 'none') { + myShorthandSetter.call(this, '0 0 auto'); + return; + } + if (normalizedValue === 'initial') { + myShorthandSetter.call(this, '0 1 auto'); + return; + } + if (normalizedValue === 'auto') { + this.removeProperty('flex-grow'); + this.removeProperty('flex-shrink'); + this.setProperty('flex-basis', normalizedValue); + return; + } + + myShorthandSetter.call(this, v); + }, + get: shorthandGetter('flex', shorthand_for), + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/flexBasis.js b/node_modules/cssstyle/lib/properties/flexBasis.js new file mode 100644 index 0000000..0c7cddf --- /dev/null +++ b/node_modules/cssstyle/lib/properties/flexBasis.js @@ -0,0 +1,28 @@ +'use strict'; + +var parseMeasurement = require('../parsers').parseMeasurement; + +function parse(v) { + if (String(v).toLowerCase() === 'auto') { + return 'auto'; + } + if (String(v).toLowerCase() === 'inherit') { + return 'inherit'; + } + return parseMeasurement(v); +} + +module.exports.isValid = function isValid(v) { + return parse(v) !== undefined; +}; + +module.exports.definition = { + set: function(v) { + this._setProperty('flex-basis', parse(v)); + }, + get: function() { + return this.getPropertyValue('flex-basis'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/flexGrow.js b/node_modules/cssstyle/lib/properties/flexGrow.js new file mode 100644 index 0000000..6e29663 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/flexGrow.js @@ -0,0 +1,19 @@ +'use strict'; + +var parseNumber = require('../parsers').parseNumber; +var POSITION_AT_SHORTHAND = require('../constants').POSITION_AT_SHORTHAND; + +module.exports.isValid = function isValid(v, positionAtFlexShorthand) { + return parseNumber(v) !== undefined && positionAtFlexShorthand === POSITION_AT_SHORTHAND.first; +}; + +module.exports.definition = { + set: function(v) { + this._setProperty('flex-grow', parseNumber(v)); + }, + get: function() { + return this.getPropertyValue('flex-grow'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/flexShrink.js b/node_modules/cssstyle/lib/properties/flexShrink.js new file mode 100644 index 0000000..63ff86f --- /dev/null +++ b/node_modules/cssstyle/lib/properties/flexShrink.js @@ -0,0 +1,19 @@ +'use strict'; + +var parseNumber = require('../parsers').parseNumber; +var POSITION_AT_SHORTHAND = require('../constants').POSITION_AT_SHORTHAND; + +module.exports.isValid = function isValid(v, positionAtFlexShorthand) { + return parseNumber(v) !== undefined && positionAtFlexShorthand === POSITION_AT_SHORTHAND.second; +}; + +module.exports.definition = { + set: function(v) { + this._setProperty('flex-shrink', parseNumber(v)); + }, + get: function() { + return this.getPropertyValue('flex-shrink'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/float.js b/node_modules/cssstyle/lib/properties/float.js new file mode 100644 index 0000000..1c619cc --- /dev/null +++ b/node_modules/cssstyle/lib/properties/float.js @@ -0,0 +1,12 @@ +'use strict'; + +module.exports.definition = { + set: function(v) { + this._setProperty('float', v); + }, + get: function() { + return this.getPropertyValue('float'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/floodColor.js b/node_modules/cssstyle/lib/properties/floodColor.js new file mode 100644 index 0000000..8a4f29c --- /dev/null +++ b/node_modules/cssstyle/lib/properties/floodColor.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseColor = require('../parsers').parseColor; + +module.exports.definition = { + set: function(v) { + this._setProperty('flood-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('flood-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/font.js b/node_modules/cssstyle/lib/properties/font.js new file mode 100644 index 0000000..9492dc6 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/font.js @@ -0,0 +1,43 @@ +'use strict'; + +var TYPES = require('../parsers').TYPES; +var valueType = require('../parsers').valueType; +var shorthandParser = require('../parsers').shorthandParser; +var shorthandSetter = require('../parsers').shorthandSetter; +var shorthandGetter = require('../parsers').shorthandGetter; + +var shorthand_for = { + 'font-family': require('./fontFamily'), + 'font-size': require('./fontSize'), + 'font-style': require('./fontStyle'), + 'font-variant': require('./fontVariant'), + 'font-weight': require('./fontWeight'), + 'line-height': require('./lineHeight'), +}; + +var static_fonts = [ + 'caption', + 'icon', + 'menu', + 'message-box', + 'small-caption', + 'status-bar', + 'inherit', +]; + +var setter = shorthandSetter('font', shorthand_for); + +module.exports.definition = { + set: function(v) { + var short = shorthandParser(v, shorthand_for); + if (short !== undefined) { + return setter.call(this, v); + } + if (valueType(v) === TYPES.KEYWORD && static_fonts.indexOf(v.toLowerCase()) !== -1) { + this._setProperty('font', v); + } + }, + get: shorthandGetter('font', shorthand_for), + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/fontFamily.js b/node_modules/cssstyle/lib/properties/fontFamily.js new file mode 100644 index 0000000..40bd1c1 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/fontFamily.js @@ -0,0 +1,33 @@ +'use strict'; + +var TYPES = require('../parsers').TYPES; +var valueType = require('../parsers').valueType; + +var partsRegEx = /\s*,\s*/; +module.exports.isValid = function isValid(v) { + if (v === '' || v === null) { + return true; + } + var parts = v.split(partsRegEx); + var len = parts.length; + var i; + var type; + for (i = 0; i < len; i++) { + type = valueType(parts[i]); + if (type === TYPES.STRING || type === TYPES.KEYWORD) { + return true; + } + } + return false; +}; + +module.exports.definition = { + set: function(v) { + this._setProperty('font-family', v); + }, + get: function() { + return this.getPropertyValue('font-family'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/fontSize.js b/node_modules/cssstyle/lib/properties/fontSize.js new file mode 100644 index 0000000..c956324 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/fontSize.js @@ -0,0 +1,38 @@ +'use strict'; + +var TYPES = require('../parsers').TYPES; +var valueType = require('../parsers').valueType; +var parseMeasurement = require('../parsers').parseMeasurement; + +var absoluteSizes = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']; +var relativeSizes = ['larger', 'smaller']; + +module.exports.isValid = function(v) { + var type = valueType(v.toLowerCase()); + return ( + type === TYPES.LENGTH || + type === TYPES.PERCENT || + (type === TYPES.KEYWORD && absoluteSizes.indexOf(v.toLowerCase()) !== -1) || + (type === TYPES.KEYWORD && relativeSizes.indexOf(v.toLowerCase()) !== -1) + ); +}; + +function parse(v) { + const valueAsString = String(v).toLowerCase(); + const optionalArguments = absoluteSizes.concat(relativeSizes); + const isOptionalArgument = optionalArguments.some( + stringValue => stringValue.toLowerCase() === valueAsString + ); + return isOptionalArgument ? valueAsString : parseMeasurement(v); +} + +module.exports.definition = { + set: function(v) { + this._setProperty('font-size', parse(v)); + }, + get: function() { + return this.getPropertyValue('font-size'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/fontStyle.js b/node_modules/cssstyle/lib/properties/fontStyle.js new file mode 100644 index 0000000..63d5e92 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/fontStyle.js @@ -0,0 +1,18 @@ +'use strict'; + +var valid_styles = ['normal', 'italic', 'oblique', 'inherit']; + +module.exports.isValid = function(v) { + return valid_styles.indexOf(v.toLowerCase()) !== -1; +}; + +module.exports.definition = { + set: function(v) { + this._setProperty('font-style', v); + }, + get: function() { + return this.getPropertyValue('font-style'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/fontVariant.js b/node_modules/cssstyle/lib/properties/fontVariant.js new file mode 100644 index 0000000..f03b5ea --- /dev/null +++ b/node_modules/cssstyle/lib/properties/fontVariant.js @@ -0,0 +1,18 @@ +'use strict'; + +var valid_variants = ['normal', 'small-caps', 'inherit']; + +module.exports.isValid = function isValid(v) { + return valid_variants.indexOf(v.toLowerCase()) !== -1; +}; + +module.exports.definition = { + set: function(v) { + this._setProperty('font-variant', v); + }, + get: function() { + return this.getPropertyValue('font-variant'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/fontWeight.js b/node_modules/cssstyle/lib/properties/fontWeight.js new file mode 100644 index 0000000..b854f6a --- /dev/null +++ b/node_modules/cssstyle/lib/properties/fontWeight.js @@ -0,0 +1,33 @@ +'use strict'; + +var valid_weights = [ + 'normal', + 'bold', + 'bolder', + 'lighter', + '100', + '200', + '300', + '400', + '500', + '600', + '700', + '800', + '900', + 'inherit', +]; + +module.exports.isValid = function isValid(v) { + return valid_weights.indexOf(v.toLowerCase()) !== -1; +}; + +module.exports.definition = { + set: function(v) { + this._setProperty('font-weight', v); + }, + get: function() { + return this.getPropertyValue('font-weight'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/height.js b/node_modules/cssstyle/lib/properties/height.js new file mode 100644 index 0000000..82543c0 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/height.js @@ -0,0 +1,24 @@ +'use strict'; + +var parseMeasurement = require('../parsers').parseMeasurement; + +function parse(v) { + if (String(v).toLowerCase() === 'auto') { + return 'auto'; + } + if (String(v).toLowerCase() === 'inherit') { + return 'inherit'; + } + return parseMeasurement(v); +} + +module.exports.definition = { + set: function(v) { + this._setProperty('height', parse(v)); + }, + get: function() { + return this.getPropertyValue('height'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/left.js b/node_modules/cssstyle/lib/properties/left.js new file mode 100644 index 0000000..72bb2fa --- /dev/null +++ b/node_modules/cssstyle/lib/properties/left.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseMeasurement = require('../parsers').parseMeasurement; + +module.exports.definition = { + set: function(v) { + this._setProperty('left', parseMeasurement(v)); + }, + get: function() { + return this.getPropertyValue('left'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/lightingColor.js b/node_modules/cssstyle/lib/properties/lightingColor.js new file mode 100644 index 0000000..9f9643d --- /dev/null +++ b/node_modules/cssstyle/lib/properties/lightingColor.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseColor = require('../parsers').parseColor; + +module.exports.definition = { + set: function(v) { + this._setProperty('lighting-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('lighting-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/lineHeight.js b/node_modules/cssstyle/lib/properties/lineHeight.js new file mode 100644 index 0000000..6f7a037 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/lineHeight.js @@ -0,0 +1,26 @@ +'use strict'; + +var TYPES = require('../parsers').TYPES; +var valueType = require('../parsers').valueType; + +module.exports.isValid = function isValid(v) { + var type = valueType(v); + return ( + (type === TYPES.KEYWORD && v.toLowerCase() === 'normal') || + v.toLowerCase() === 'inherit' || + type === TYPES.NUMBER || + type === TYPES.LENGTH || + type === TYPES.PERCENT + ); +}; + +module.exports.definition = { + set: function(v) { + this._setProperty('line-height', v); + }, + get: function() { + return this.getPropertyValue('line-height'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/margin.js b/node_modules/cssstyle/lib/properties/margin.js new file mode 100644 index 0000000..2a8f972 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/margin.js @@ -0,0 +1,68 @@ +'use strict'; + +var parsers = require('../parsers.js'); +var TYPES = parsers.TYPES; + +var isValid = function(v) { + if (v.toLowerCase() === 'auto') { + return true; + } + var type = parsers.valueType(v); + return ( + type === TYPES.LENGTH || + type === TYPES.PERCENT || + (type === TYPES.INTEGER && (v === '0' || v === 0)) + ); +}; + +var parser = function(v) { + var V = v.toLowerCase(); + if (V === 'auto') { + return V; + } + return parsers.parseMeasurement(v); +}; + +var mySetter = parsers.implicitSetter('margin', '', isValid, parser); +var myGlobal = parsers.implicitSetter( + 'margin', + '', + function() { + return true; + }, + function(v) { + return v; + } +); + +module.exports.definition = { + set: function(v) { + if (typeof v === 'number') { + v = String(v); + } + if (typeof v !== 'string') { + return; + } + var V = v.toLowerCase(); + switch (V) { + case 'inherit': + case 'initial': + case 'unset': + case '': + myGlobal.call(this, V); + break; + + default: + mySetter.call(this, v); + break; + } + }, + get: function() { + return this.getPropertyValue('margin'); + }, + enumerable: true, + configurable: true, +}; + +module.exports.isValid = isValid; +module.exports.parser = parser; diff --git a/node_modules/cssstyle/lib/properties/marginBottom.js b/node_modules/cssstyle/lib/properties/marginBottom.js new file mode 100644 index 0000000..378172e --- /dev/null +++ b/node_modules/cssstyle/lib/properties/marginBottom.js @@ -0,0 +1,13 @@ +'use strict'; + +var margin = require('./margin.js'); +var parsers = require('../parsers.js'); + +module.exports.definition = { + set: parsers.subImplicitSetter('margin', 'bottom', margin.isValid, margin.parser), + get: function() { + return this.getPropertyValue('margin-bottom'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/marginLeft.js b/node_modules/cssstyle/lib/properties/marginLeft.js new file mode 100644 index 0000000..0c67317 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/marginLeft.js @@ -0,0 +1,13 @@ +'use strict'; + +var margin = require('./margin.js'); +var parsers = require('../parsers.js'); + +module.exports.definition = { + set: parsers.subImplicitSetter('margin', 'left', margin.isValid, margin.parser), + get: function() { + return this.getPropertyValue('margin-left'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/marginRight.js b/node_modules/cssstyle/lib/properties/marginRight.js new file mode 100644 index 0000000..6cdf26b --- /dev/null +++ b/node_modules/cssstyle/lib/properties/marginRight.js @@ -0,0 +1,13 @@ +'use strict'; + +var margin = require('./margin.js'); +var parsers = require('../parsers.js'); + +module.exports.definition = { + set: parsers.subImplicitSetter('margin', 'right', margin.isValid, margin.parser), + get: function() { + return this.getPropertyValue('margin-right'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/marginTop.js b/node_modules/cssstyle/lib/properties/marginTop.js new file mode 100644 index 0000000..6a57621 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/marginTop.js @@ -0,0 +1,13 @@ +'use strict'; + +var margin = require('./margin.js'); +var parsers = require('../parsers.js'); + +module.exports.definition = { + set: parsers.subImplicitSetter('margin', 'top', margin.isValid, margin.parser), + get: function() { + return this.getPropertyValue('margin-top'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/opacity.js b/node_modules/cssstyle/lib/properties/opacity.js new file mode 100644 index 0000000..b26a3b6 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/opacity.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseNumber = require('../parsers').parseNumber; + +module.exports.definition = { + set: function(v) { + this._setProperty('opacity', parseNumber(v)); + }, + get: function() { + return this.getPropertyValue('opacity'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/outlineColor.js b/node_modules/cssstyle/lib/properties/outlineColor.js new file mode 100644 index 0000000..fc8093d --- /dev/null +++ b/node_modules/cssstyle/lib/properties/outlineColor.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseColor = require('../parsers').parseColor; + +module.exports.definition = { + set: function(v) { + this._setProperty('outline-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('outline-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/padding.js b/node_modules/cssstyle/lib/properties/padding.js new file mode 100644 index 0000000..1287b19 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/padding.js @@ -0,0 +1,61 @@ +'use strict'; + +var parsers = require('../parsers.js'); +var TYPES = parsers.TYPES; + +var isValid = function(v) { + var type = parsers.valueType(v); + return ( + type === TYPES.LENGTH || + type === TYPES.PERCENT || + (type === TYPES.INTEGER && (v === '0' || v === 0)) + ); +}; + +var parser = function(v) { + return parsers.parseMeasurement(v); +}; + +var mySetter = parsers.implicitSetter('padding', '', isValid, parser); +var myGlobal = parsers.implicitSetter( + 'padding', + '', + function() { + return true; + }, + function(v) { + return v; + } +); + +module.exports.definition = { + set: function(v) { + if (typeof v === 'number') { + v = String(v); + } + if (typeof v !== 'string') { + return; + } + var V = v.toLowerCase(); + switch (V) { + case 'inherit': + case 'initial': + case 'unset': + case '': + myGlobal.call(this, V); + break; + + default: + mySetter.call(this, v); + break; + } + }, + get: function() { + return this.getPropertyValue('padding'); + }, + enumerable: true, + configurable: true, +}; + +module.exports.isValid = isValid; +module.exports.parser = parser; diff --git a/node_modules/cssstyle/lib/properties/paddingBottom.js b/node_modules/cssstyle/lib/properties/paddingBottom.js new file mode 100644 index 0000000..3ce88e5 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/paddingBottom.js @@ -0,0 +1,13 @@ +'use strict'; + +var padding = require('./padding.js'); +var parsers = require('../parsers.js'); + +module.exports.definition = { + set: parsers.subImplicitSetter('padding', 'bottom', padding.isValid, padding.parser), + get: function() { + return this.getPropertyValue('padding-bottom'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/paddingLeft.js b/node_modules/cssstyle/lib/properties/paddingLeft.js new file mode 100644 index 0000000..0436338 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/paddingLeft.js @@ -0,0 +1,13 @@ +'use strict'; + +var padding = require('./padding.js'); +var parsers = require('../parsers.js'); + +module.exports.definition = { + set: parsers.subImplicitSetter('padding', 'left', padding.isValid, padding.parser), + get: function() { + return this.getPropertyValue('padding-left'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/paddingRight.js b/node_modules/cssstyle/lib/properties/paddingRight.js new file mode 100644 index 0000000..ff9bd34 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/paddingRight.js @@ -0,0 +1,13 @@ +'use strict'; + +var padding = require('./padding.js'); +var parsers = require('../parsers.js'); + +module.exports.definition = { + set: parsers.subImplicitSetter('padding', 'right', padding.isValid, padding.parser), + get: function() { + return this.getPropertyValue('padding-right'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/paddingTop.js b/node_modules/cssstyle/lib/properties/paddingTop.js new file mode 100644 index 0000000..eca8781 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/paddingTop.js @@ -0,0 +1,13 @@ +'use strict'; + +var padding = require('./padding.js'); +var parsers = require('../parsers.js'); + +module.exports.definition = { + set: parsers.subImplicitSetter('padding', 'top', padding.isValid, padding.parser), + get: function() { + return this.getPropertyValue('padding-top'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/right.js b/node_modules/cssstyle/lib/properties/right.js new file mode 100644 index 0000000..eb4c3d4 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/right.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseMeasurement = require('../parsers').parseMeasurement; + +module.exports.definition = { + set: function(v) { + this._setProperty('right', parseMeasurement(v)); + }, + get: function() { + return this.getPropertyValue('right'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/stopColor.js b/node_modules/cssstyle/lib/properties/stopColor.js new file mode 100644 index 0000000..912d8e2 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/stopColor.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseColor = require('../parsers').parseColor; + +module.exports.definition = { + set: function(v) { + this._setProperty('stop-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('stop-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/textLineThroughColor.js b/node_modules/cssstyle/lib/properties/textLineThroughColor.js new file mode 100644 index 0000000..ae53dbb --- /dev/null +++ b/node_modules/cssstyle/lib/properties/textLineThroughColor.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseColor = require('../parsers').parseColor; + +module.exports.definition = { + set: function(v) { + this._setProperty('text-line-through-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('text-line-through-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/textOverlineColor.js b/node_modules/cssstyle/lib/properties/textOverlineColor.js new file mode 100644 index 0000000..c6adf7c --- /dev/null +++ b/node_modules/cssstyle/lib/properties/textOverlineColor.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseColor = require('../parsers').parseColor; + +module.exports.definition = { + set: function(v) { + this._setProperty('text-overline-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('text-overline-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/textUnderlineColor.js b/node_modules/cssstyle/lib/properties/textUnderlineColor.js new file mode 100644 index 0000000..a243a9c --- /dev/null +++ b/node_modules/cssstyle/lib/properties/textUnderlineColor.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseColor = require('../parsers').parseColor; + +module.exports.definition = { + set: function(v) { + this._setProperty('text-underline-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('text-underline-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/top.js b/node_modules/cssstyle/lib/properties/top.js new file mode 100644 index 0000000..f71986f --- /dev/null +++ b/node_modules/cssstyle/lib/properties/top.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseMeasurement = require('../parsers').parseMeasurement; + +module.exports.definition = { + set: function(v) { + this._setProperty('top', parseMeasurement(v)); + }, + get: function() { + return this.getPropertyValue('top'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderAfterColor.js b/node_modules/cssstyle/lib/properties/webkitBorderAfterColor.js new file mode 100644 index 0000000..ed02194 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/webkitBorderAfterColor.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseColor = require('../parsers').parseColor; + +module.exports.definition = { + set: function(v) { + this._setProperty('-webkit-border-after-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('-webkit-border-after-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderBeforeColor.js b/node_modules/cssstyle/lib/properties/webkitBorderBeforeColor.js new file mode 100644 index 0000000..a4507a1 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/webkitBorderBeforeColor.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseColor = require('../parsers').parseColor; + +module.exports.definition = { + set: function(v) { + this._setProperty('-webkit-border-before-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('-webkit-border-before-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderEndColor.js b/node_modules/cssstyle/lib/properties/webkitBorderEndColor.js new file mode 100644 index 0000000..499545d --- /dev/null +++ b/node_modules/cssstyle/lib/properties/webkitBorderEndColor.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseColor = require('../parsers').parseColor; + +module.exports.definition = { + set: function(v) { + this._setProperty('-webkit-border-end-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('-webkit-border-end-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderStartColor.js b/node_modules/cssstyle/lib/properties/webkitBorderStartColor.js new file mode 100644 index 0000000..8429e32 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/webkitBorderStartColor.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseColor = require('../parsers').parseColor; + +module.exports.definition = { + set: function(v) { + this._setProperty('-webkit-border-start-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('-webkit-border-start-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/webkitColumnRuleColor.js b/node_modules/cssstyle/lib/properties/webkitColumnRuleColor.js new file mode 100644 index 0000000..7130d5f --- /dev/null +++ b/node_modules/cssstyle/lib/properties/webkitColumnRuleColor.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseColor = require('../parsers').parseColor; + +module.exports.definition = { + set: function(v) { + this._setProperty('-webkit-column-rule-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('-webkit-column-rule-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/webkitMatchNearestMailBlockquoteColor.js b/node_modules/cssstyle/lib/properties/webkitMatchNearestMailBlockquoteColor.js new file mode 100644 index 0000000..e075891 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/webkitMatchNearestMailBlockquoteColor.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseColor = require('../parsers').parseColor; + +module.exports.definition = { + set: function(v) { + this._setProperty('-webkit-match-nearest-mail-blockquote-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('-webkit-match-nearest-mail-blockquote-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/webkitTapHighlightColor.js b/node_modules/cssstyle/lib/properties/webkitTapHighlightColor.js new file mode 100644 index 0000000..d019329 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/webkitTapHighlightColor.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseColor = require('../parsers').parseColor; + +module.exports.definition = { + set: function(v) { + this._setProperty('-webkit-tap-highlight-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('-webkit-tap-highlight-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/webkitTextEmphasisColor.js b/node_modules/cssstyle/lib/properties/webkitTextEmphasisColor.js new file mode 100644 index 0000000..cdeab53 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/webkitTextEmphasisColor.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseColor = require('../parsers').parseColor; + +module.exports.definition = { + set: function(v) { + this._setProperty('-webkit-text-emphasis-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('-webkit-text-emphasis-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/webkitTextFillColor.js b/node_modules/cssstyle/lib/properties/webkitTextFillColor.js new file mode 100644 index 0000000..ef5bd67 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/webkitTextFillColor.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseColor = require('../parsers').parseColor; + +module.exports.definition = { + set: function(v) { + this._setProperty('-webkit-text-fill-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('-webkit-text-fill-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/webkitTextStrokeColor.js b/node_modules/cssstyle/lib/properties/webkitTextStrokeColor.js new file mode 100644 index 0000000..72a2277 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/webkitTextStrokeColor.js @@ -0,0 +1,14 @@ +'use strict'; + +var parseColor = require('../parsers').parseColor; + +module.exports.definition = { + set: function(v) { + this._setProperty('-webkit-text-stroke-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('-webkit-text-stroke-color'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/width.js b/node_modules/cssstyle/lib/properties/width.js new file mode 100644 index 0000000..a8c365d --- /dev/null +++ b/node_modules/cssstyle/lib/properties/width.js @@ -0,0 +1,24 @@ +'use strict'; + +var parseMeasurement = require('../parsers').parseMeasurement; + +function parse(v) { + if (String(v).toLowerCase() === 'auto') { + return 'auto'; + } + if (String(v).toLowerCase() === 'inherit') { + return 'inherit'; + } + return parseMeasurement(v); +} + +module.exports.definition = { + set: function(v) { + this._setProperty('width', parse(v)); + }, + get: function() { + return this.getPropertyValue('width'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/utils/colorSpace.js b/node_modules/cssstyle/lib/utils/colorSpace.js new file mode 100644 index 0000000..92ca7bd --- /dev/null +++ b/node_modules/cssstyle/lib/utils/colorSpace.js @@ -0,0 +1,21 @@ +'use strict'; + +const hueToRgb = (t1, t2, hue) => { + if (hue < 0) hue += 6; + if (hue >= 6) hue -= 6; + + if (hue < 1) return (t2 - t1) * hue + t1; + else if (hue < 3) return t2; + else if (hue < 4) return (t2 - t1) * (4 - hue) + t1; + else return t1; +}; + +// https://www.w3.org/TR/css-color-4/#hsl-to-rgb +exports.hslToRgb = (hue, sat, light) => { + const t2 = light <= 0.5 ? light * (sat + 1) : light + sat - light * sat; + const t1 = light * 2 - t2; + const r = hueToRgb(t1, t2, hue + 2); + const g = hueToRgb(t1, t2, hue); + const b = hueToRgb(t1, t2, hue - 2); + return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)]; +}; diff --git a/node_modules/cssstyle/lib/utils/getBasicPropertyDescriptor.js b/node_modules/cssstyle/lib/utils/getBasicPropertyDescriptor.js new file mode 100644 index 0000000..ded2cc4 --- /dev/null +++ b/node_modules/cssstyle/lib/utils/getBasicPropertyDescriptor.js @@ -0,0 +1,14 @@ +'use strict'; + +module.exports = function getBasicPropertyDescriptor(name) { + return { + set: function(v) { + this._setProperty(name, v); + }, + get: function() { + return this.getPropertyValue(name); + }, + enumerable: true, + configurable: true, + }; +}; diff --git a/node_modules/cssstyle/node_modules/cssom/LICENSE.txt b/node_modules/cssstyle/node_modules/cssom/LICENSE.txt new file mode 100644 index 0000000..bc57aac --- /dev/null +++ b/node_modules/cssstyle/node_modules/cssom/LICENSE.txt @@ -0,0 +1,20 @@ +Copyright (c) Nikita Vasilyev + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/cssstyle/node_modules/cssom/README.mdown b/node_modules/cssstyle/node_modules/cssom/README.mdown new file mode 100644 index 0000000..83af16b --- /dev/null +++ b/node_modules/cssstyle/node_modules/cssom/README.mdown @@ -0,0 +1,67 @@ +# CSSOM + +CSSOM.js is a CSS parser written in pure JavaScript. It is also a partial implementation of [CSS Object Model](http://dev.w3.org/csswg/cssom/). + + CSSOM.parse("body {color: black}") + -> { + cssRules: [ + { + selectorText: "body", + style: { + 0: "color", + color: "black", + length: 1 + } + } + ] + } + + +## [Parser demo](http://nv.github.com/CSSOM/docs/parse.html) + +Works well in Google Chrome 6+, Safari 5+, Firefox 3.6+, Opera 10.63+. +Doesn't work in IE < 9 because of unsupported getters/setters. + +To use CSSOM.js in the browser you might want to build a one-file version that exposes a single `CSSOM` global variable: + + ➤ git clone https://github.com/NV/CSSOM.git + ➤ cd CSSOM + ➤ node build.js + build/CSSOM.js is done + +To use it with Node.js or any other CommonJS loader: + + ➤ npm install cssom + +## Don’t use it if... + +You parse CSS to mungle, minify or reformat code like this: + +```css +div { + background: gray; + background: linear-gradient(to bottom, white 0%, black 100%); +} +``` + +This pattern is often used to give browsers that don’t understand linear gradients a fallback solution (e.g. gray color in the example). +In CSSOM, `background: gray` [gets overwritten](http://nv.github.io/CSSOM/docs/parse.html#css=div%20%7B%0A%20%20%20%20%20%20background%3A%20gray%3B%0A%20%20%20%20background%3A%20linear-gradient(to%20bottom%2C%20white%200%25%2C%20black%20100%25)%3B%0A%7D). +It doesn't get preserved. + +If you do CSS mungling, minification, image inlining, and such, CSSOM.js is no good for you, considere using one of the following: + + * [postcss](https://github.com/postcss/postcss) + * [reworkcss/css](https://github.com/reworkcss/css) + * [csso](https://github.com/css/csso) + * [mensch](https://github.com/brettstimmerman/mensch) + + +## [Tests](http://nv.github.com/CSSOM/spec/) + +To run tests locally: + + ➤ git submodule init + ➤ git submodule update + + +## [Who uses CSSOM.js](https://github.com/NV/CSSOM/wiki/Who-uses-CSSOM.js) diff --git a/node_modules/cssstyle/node_modules/cssom/lib/CSSDocumentRule.js b/node_modules/cssstyle/node_modules/cssom/lib/CSSDocumentRule.js new file mode 100644 index 0000000..aec0776 --- /dev/null +++ b/node_modules/cssstyle/node_modules/cssom/lib/CSSDocumentRule.js @@ -0,0 +1,39 @@ +//.CommonJS +var CSSOM = { + CSSRule: require("./CSSRule").CSSRule, + MatcherList: require("./MatcherList").MatcherList +}; +///CommonJS + + +/** + * @constructor + * @see https://developer.mozilla.org/en/CSS/@-moz-document + */ +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; +//FIXME +//CSSOM.CSSDocumentRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; +//CSSOM.CSSDocumentRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; + +Object.defineProperty(CSSOM.CSSDocumentRule.prototype, "cssText", { + get: function() { + var cssTexts = []; + for (var i=0, length=this.cssRules.length; i < length; i++) { + cssTexts.push(this.cssRules[i].cssText); + } + return "@-moz-document " + this.matcher.matcherText + " {" + cssTexts.join("") + "}"; + } +}); + + +//.CommonJS +exports.CSSDocumentRule = CSSOM.CSSDocumentRule; +///CommonJS diff --git a/node_modules/cssstyle/node_modules/cssom/lib/CSSFontFaceRule.js b/node_modules/cssstyle/node_modules/cssom/lib/CSSFontFaceRule.js new file mode 100644 index 0000000..7a537fb --- /dev/null +++ b/node_modules/cssstyle/node_modules/cssom/lib/CSSFontFaceRule.js @@ -0,0 +1,36 @@ +//.CommonJS +var CSSOM = { + CSSStyleDeclaration: require("./CSSStyleDeclaration").CSSStyleDeclaration, + CSSRule: require("./CSSRule").CSSRule +}; +///CommonJS + + +/** + * @constructor + * @see http://dev.w3.org/csswg/cssom/#css-font-face-rule + */ +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; +//FIXME +//CSSOM.CSSFontFaceRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; +//CSSOM.CSSFontFaceRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; + +// http://www.opensource.apple.com/source/WebCore/WebCore-955.66.1/css/WebKitCSSFontFaceRule.cpp +Object.defineProperty(CSSOM.CSSFontFaceRule.prototype, "cssText", { + get: function() { + return "@font-face {" + this.style.cssText + "}"; + } +}); + + +//.CommonJS +exports.CSSFontFaceRule = CSSOM.CSSFontFaceRule; +///CommonJS diff --git a/node_modules/cssstyle/node_modules/cssom/lib/CSSHostRule.js b/node_modules/cssstyle/node_modules/cssom/lib/CSSHostRule.js new file mode 100644 index 0000000..365304f --- /dev/null +++ b/node_modules/cssstyle/node_modules/cssom/lib/CSSHostRule.js @@ -0,0 +1,37 @@ +//.CommonJS +var CSSOM = { + CSSRule: require("./CSSRule").CSSRule +}; +///CommonJS + + +/** + * @constructor + * @see http://www.w3.org/TR/shadow-dom/#host-at-rule + */ +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; +//FIXME +//CSSOM.CSSHostRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; +//CSSOM.CSSHostRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; + +Object.defineProperty(CSSOM.CSSHostRule.prototype, "cssText", { + get: function() { + var cssTexts = []; + for (var i=0, length=this.cssRules.length; i < length; i++) { + cssTexts.push(this.cssRules[i].cssText); + } + return "@host {" + cssTexts.join("") + "}"; + } +}); + + +//.CommonJS +exports.CSSHostRule = CSSOM.CSSHostRule; +///CommonJS diff --git a/node_modules/cssstyle/node_modules/cssom/lib/CSSImportRule.js b/node_modules/cssstyle/node_modules/cssom/lib/CSSImportRule.js new file mode 100644 index 0000000..0398105 --- /dev/null +++ b/node_modules/cssstyle/node_modules/cssom/lib/CSSImportRule.js @@ -0,0 +1,132 @@ +//.CommonJS +var CSSOM = { + CSSRule: require("./CSSRule").CSSRule, + CSSStyleSheet: require("./CSSStyleSheet").CSSStyleSheet, + MediaList: require("./MediaList").MediaList +}; +///CommonJS + + +/** + * @constructor + * @see http://dev.w3.org/csswg/cssom/#cssimportrule + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSImportRule + */ +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 i = 0; + + /** + * @import url(partial.css) screen, handheld; + * || | + * after-import media + * | + * url + */ + var state = ''; + + var buffer = ''; + var index; + for (var character; (character = cssText.charAt(i)); i++) { + + switch (character) { + case ' ': + case '\t': + case '\r': + case '\n': + case '\f': + if (state === 'after-import') { + state = 'url'; + } else { + buffer += character; + } + break; + + case '@': + if (!state && cssText.indexOf('@import', i) === i) { + state = 'after-import'; + i += 'import'.length; + buffer = ''; + } + break; + + case 'u': + if (state === 'url' && cssText.indexOf('url(', i) === i) { + index = cssText.indexOf(')', i + 1); + if (index === -1) { + throw i + ': ")" not found'; + } + i += 'url('.length; + var url = cssText.slice(i, index); + if (url[0] === url[url.length - 1]) { + if (url[0] === '"' || url[0] === "'") { + url = url.slice(1, -1); + } + } + this.href = url; + i = index; + state = 'media'; + } + break; + + case '"': + if (state === 'url') { + index = cssText.indexOf('"', i + 1); + if (!index) { + throw i + ": '\"' not found"; + } + this.href = cssText.slice(i + 1, index); + i = index; + state = 'media'; + } + break; + + case "'": + if (state === 'url') { + index = cssText.indexOf("'", i + 1); + if (!index) { + throw i + ': "\'" not found'; + } + this.href = cssText.slice(i + 1, index); + i = index; + state = 'media'; + } + break; + + case ';': + if (state === 'media') { + if (buffer) { + this.media.mediaText = buffer.trim(); + } + } + break; + + default: + if (state === 'media') { + buffer += character; + } + break; + } + } + } +}); + + +//.CommonJS +exports.CSSImportRule = CSSOM.CSSImportRule; +///CommonJS diff --git a/node_modules/cssstyle/node_modules/cssom/lib/CSSKeyframeRule.js b/node_modules/cssstyle/node_modules/cssom/lib/CSSKeyframeRule.js new file mode 100644 index 0000000..c22f2f5 --- /dev/null +++ b/node_modules/cssstyle/node_modules/cssom/lib/CSSKeyframeRule.js @@ -0,0 +1,37 @@ +//.CommonJS +var CSSOM = { + CSSRule: require("./CSSRule").CSSRule, + CSSStyleDeclaration: require('./CSSStyleDeclaration').CSSStyleDeclaration +}; +///CommonJS + + +/** + * @constructor + * @see http://www.w3.org/TR/css3-animations/#DOM-CSSKeyframeRule + */ +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 = 9; +//FIXME +//CSSOM.CSSKeyframeRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; +//CSSOM.CSSKeyframeRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; + +// http://www.opensource.apple.com/source/WebCore/WebCore-955.66.1/css/WebKitCSSKeyframeRule.cpp +Object.defineProperty(CSSOM.CSSKeyframeRule.prototype, "cssText", { + get: function() { + return this.keyText + " {" + this.style.cssText + "} "; + } +}); + + +//.CommonJS +exports.CSSKeyframeRule = CSSOM.CSSKeyframeRule; +///CommonJS diff --git a/node_modules/cssstyle/node_modules/cssom/lib/CSSKeyframesRule.js b/node_modules/cssstyle/node_modules/cssom/lib/CSSKeyframesRule.js new file mode 100644 index 0000000..7e42717 --- /dev/null +++ b/node_modules/cssstyle/node_modules/cssom/lib/CSSKeyframesRule.js @@ -0,0 +1,39 @@ +//.CommonJS +var CSSOM = { + CSSRule: require("./CSSRule").CSSRule +}; +///CommonJS + + +/** + * @constructor + * @see http://www.w3.org/TR/css3-animations/#DOM-CSSKeyframesRule + */ +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 = 8; +//FIXME +//CSSOM.CSSKeyframesRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; +//CSSOM.CSSKeyframesRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; + +// http://www.opensource.apple.com/source/WebCore/WebCore-955.66.1/css/WebKitCSSKeyframesRule.cpp +Object.defineProperty(CSSOM.CSSKeyframesRule.prototype, "cssText", { + get: function() { + var cssTexts = []; + for (var i=0, length=this.cssRules.length; i < length; i++) { + cssTexts.push(" " + this.cssRules[i].cssText); + } + return "@" + (this._vendorPrefix || '') + "keyframes " + this.name + " { \n" + cssTexts.join("\n") + "\n}"; + } +}); + + +//.CommonJS +exports.CSSKeyframesRule = CSSOM.CSSKeyframesRule; +///CommonJS diff --git a/node_modules/cssstyle/node_modules/cssom/lib/CSSMediaRule.js b/node_modules/cssstyle/node_modules/cssom/lib/CSSMediaRule.js new file mode 100644 index 0000000..367a35e --- /dev/null +++ b/node_modules/cssstyle/node_modules/cssom/lib/CSSMediaRule.js @@ -0,0 +1,41 @@ +//.CommonJS +var CSSOM = { + CSSRule: require("./CSSRule").CSSRule, + MediaList: require("./MediaList").MediaList +}; +///CommonJS + + +/** + * @constructor + * @see http://dev.w3.org/csswg/cssom/#cssmediarule + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSMediaRule + */ +CSSOM.CSSMediaRule = function CSSMediaRule() { + CSSOM.CSSRule.call(this); + this.media = new CSSOM.MediaList(); + this.cssRules = []; +}; + +CSSOM.CSSMediaRule.prototype = new CSSOM.CSSRule(); +CSSOM.CSSMediaRule.prototype.constructor = CSSOM.CSSMediaRule; +CSSOM.CSSMediaRule.prototype.type = 4; +//FIXME +//CSSOM.CSSMediaRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule; +//CSSOM.CSSMediaRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule; + +// http://opensource.apple.com/source/WebCore/WebCore-658.28/css/CSSMediaRule.cpp +Object.defineProperty(CSSOM.CSSMediaRule.prototype, "cssText", { + get: function() { + var cssTexts = []; + for (var i=0, length=this.cssRules.length; i < length; i++) { + cssTexts.push(this.cssRules[i].cssText); + } + return "@media " + this.media.mediaText + " {" + cssTexts.join("") + "}"; + } +}); + + +//.CommonJS +exports.CSSMediaRule = CSSOM.CSSMediaRule; +///CommonJS diff --git a/node_modules/cssstyle/node_modules/cssom/lib/CSSOM.js b/node_modules/cssstyle/node_modules/cssom/lib/CSSOM.js new file mode 100644 index 0000000..95f3563 --- /dev/null +++ b/node_modules/cssstyle/node_modules/cssom/lib/CSSOM.js @@ -0,0 +1,3 @@ +var CSSOM = {}; + + diff --git a/node_modules/cssstyle/node_modules/cssom/lib/CSSRule.js b/node_modules/cssstyle/node_modules/cssom/lib/CSSRule.js new file mode 100644 index 0000000..0b5e25b --- /dev/null +++ b/node_modules/cssstyle/node_modules/cssom/lib/CSSRule.js @@ -0,0 +1,43 @@ +//.CommonJS +var CSSOM = {}; +///CommonJS + + +/** + * @constructor + * @see http://dev.w3.org/csswg/cssom/#the-cssrule-interface + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule + */ +CSSOM.CSSRule = function CSSRule() { + this.parentRule = null; + this.parentStyleSheet = null; +}; + +CSSOM.CSSRule.UNKNOWN_RULE = 0; // obsolete +CSSOM.CSSRule.STYLE_RULE = 1; +CSSOM.CSSRule.CHARSET_RULE = 2; // obsolete +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 + //FIXME +}; + + +//.CommonJS +exports.CSSRule = CSSOM.CSSRule; +///CommonJS diff --git a/node_modules/cssstyle/node_modules/cssom/lib/CSSStyleDeclaration.js b/node_modules/cssstyle/node_modules/cssom/lib/CSSStyleDeclaration.js new file mode 100644 index 0000000..b43b9af --- /dev/null +++ b/node_modules/cssstyle/node_modules/cssom/lib/CSSStyleDeclaration.js @@ -0,0 +1,148 @@ +//.CommonJS +var CSSOM = {}; +///CommonJS + + +/** + * @constructor + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration + */ +CSSOM.CSSStyleDeclaration = function CSSStyleDeclaration(){ + this.length = 0; + this.parentRule = null; + + // NON-STANDARD + this._importants = {}; +}; + + +CSSOM.CSSStyleDeclaration.prototype = { + + constructor: CSSOM.CSSStyleDeclaration, + + /** + * + * @param {string} name + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-getPropertyValue + * @return {string} the value of the property if it has been explicitly set for this declaration block. + * Returns the empty string if the property has not been set. + */ + getPropertyValue: function(name) { + return this[name] || ""; + }, + + /** + * + * @param {string} name + * @param {string} value + * @param {string} [priority=null] "important" or null + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-setProperty + */ + setProperty: function(name, value, priority) { + if (this[name]) { + // Property already exist. Overwrite it. + var index = Array.prototype.indexOf.call(this, name); + if (index < 0) { + this[this.length] = name; + this.length++; + } + } else { + // New property. + this[this.length] = name; + this.length++; + } + this[name] = value + ""; + this._importants[name] = priority; + }, + + /** + * + * @param {string} name + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-removeProperty + * @return {string} the value of the property if it has been explicitly set for this declaration block. + * Returns the empty string if the property has not been set or the property name does not correspond to a known CSS property. + */ + 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] = ""; + + // That's what WebKit and Opera do + Array.prototype.splice.call(this, index, 1); + + // That's what Firefox does + //this[index] = "" + + return prevValue; + }, + + getPropertyCSSValue: function() { + //FIXME + }, + + /** + * + * @param {String} name + */ + getPropertyPriority: function(name) { + return this._importants[name] || ""; + }, + + + /** + * element.style.overflow = "auto" + * element.style.getPropertyShorthand("overflow-x") + * -> "overflow" + */ + getPropertyShorthand: function() { + //FIXME + }, + + isPropertyImplicit: function() { + //FIXME + }, + + // Doesn't work in IE < 9 + get cssText(){ + var properties = []; + for (var i=0, length=this.length; i < length; ++i) { + var name = this[i]; + var value = this.getPropertyValue(name); + var priority = this.getPropertyPriority(name); + if (priority) { + priority = " !" + priority; + } + properties[i] = name + ": " + value + priority + ";"; + } + return properties.join(" "); + }, + + set cssText(text){ + var i, name; + for (i = this.length; i--;) { + name = this[i]; + 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 (i = 0; i < length; ++i) { + name = dummyRule[i]; + this.setProperty(dummyRule[i], dummyRule.getPropertyValue(name), dummyRule.getPropertyPriority(name)); + } + } +}; + + +//.CommonJS +exports.CSSStyleDeclaration = CSSOM.CSSStyleDeclaration; +CSSOM.parse = require('./parse').parse; // Cannot be included sooner due to the mutual dependency between parse.js and CSSStyleDeclaration.js +///CommonJS diff --git a/node_modules/cssstyle/node_modules/cssom/lib/CSSStyleRule.js b/node_modules/cssstyle/node_modules/cssom/lib/CSSStyleRule.js new file mode 100644 index 0000000..630b3f8 --- /dev/null +++ b/node_modules/cssstyle/node_modules/cssom/lib/CSSStyleRule.js @@ -0,0 +1,190 @@ +//.CommonJS +var CSSOM = { + CSSStyleDeclaration: require("./CSSStyleDeclaration").CSSStyleDeclaration, + CSSRule: require("./CSSRule").CSSRule +}; +///CommonJS + + +/** + * @constructor + * @see http://dev.w3.org/csswg/cssom/#cssstylerule + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleRule + */ +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; + } +}); + + +/** + * NON-STANDARD + * lightweight version of parse.js. + * @param {string} ruleText + * @return CSSStyleRule + */ +CSSOM.CSSStyleRule.parse = function(ruleText) { + var i = 0; + var state = "selector"; + var index; + var j = i; + var buffer = ""; + + var SIGNIFICANT_WHITESPACE = { + "selector": true, + "value": true + }; + + var styleRule = new CSSOM.CSSStyleRule(); + var name, priority=""; + + for (var character; (character = ruleText.charAt(i)); i++) { + + switch (character) { + + case " ": + case "\t": + case "\r": + case "\n": + case "\f": + if (SIGNIFICANT_WHITESPACE[state]) { + // Squash 2 or more white-spaces in the row into 1 + switch (ruleText.charAt(i - 1)) { + case " ": + case "\t": + case "\r": + case "\n": + case "\f": + break; + default: + buffer += " "; + break; + } + } + break; + + // String + case '"': + j = i + 1; + index = ruleText.indexOf('"', j) + 1; + if (!index) { + throw '" is missing'; + } + buffer += ruleText.slice(i, index); + i = index - 1; + break; + + case "'": + j = i + 1; + index = ruleText.indexOf("'", j) + 1; + if (!index) { + throw "' is missing"; + } + buffer += ruleText.slice(i, index); + i = index - 1; + break; + + // Comment + case "/": + if (ruleText.charAt(i + 1) === "*") { + i += 2; + index = ruleText.indexOf("*/", i); + if (index === -1) { + throw new SyntaxError("Missing */"); + } else { + i = 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", i) === i) { + priority = "important"; + i += "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; + +}; + + +//.CommonJS +exports.CSSStyleRule = CSSOM.CSSStyleRule; +///CommonJS diff --git a/node_modules/cssstyle/node_modules/cssom/lib/CSSStyleSheet.js b/node_modules/cssstyle/node_modules/cssom/lib/CSSStyleSheet.js new file mode 100644 index 0000000..f0e0dfc --- /dev/null +++ b/node_modules/cssstyle/node_modules/cssom/lib/CSSStyleSheet.js @@ -0,0 +1,88 @@ +//.CommonJS +var CSSOM = { + StyleSheet: require("./StyleSheet").StyleSheet, + CSSStyleRule: require("./CSSStyleRule").CSSStyleRule +}; +///CommonJS + + +/** + * @constructor + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet + */ +CSSOM.CSSStyleSheet = function CSSStyleSheet() { + CSSOM.StyleSheet.call(this); + this.cssRules = []; +}; + + +CSSOM.CSSStyleSheet.prototype = new CSSOM.StyleSheet(); +CSSOM.CSSStyleSheet.prototype.constructor = CSSOM.CSSStyleSheet; + + +/** + * Used to insert a new rule into the style sheet. The new rule now becomes part of the cascade. + * + * sheet = new Sheet("body {margin: 0}") + * sheet.toString() + * -> "body{margin:0;}" + * sheet.insertRule("img {border: none}", 0) + * -> 0 + * sheet.toString() + * -> "img{border:none;}body{margin:0;}" + * + * @param {string} rule + * @param {number} index + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet-insertRule + * @return {number} The index within the style sheet's rule collection of the newly inserted rule. + */ +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; +}; + + +/** + * Used to delete a rule from the style sheet. + * + * sheet = new Sheet("img{border:none} body{margin:0}") + * sheet.toString() + * -> "img{border:none;}body{margin:0;}" + * sheet.deleteRule(0) + * sheet.toString() + * -> "body{margin:0;}" + * + * @param {number} index within the style sheet's rule list of the rule to remove. + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet-deleteRule + */ +CSSOM.CSSStyleSheet.prototype.deleteRule = function(index) { + if (index < 0 || index >= this.cssRules.length) { + throw new RangeError("INDEX_SIZE_ERR"); + } + this.cssRules.splice(index, 1); +}; + + +/** + * NON-STANDARD + * @return {string} serialize stylesheet + */ +CSSOM.CSSStyleSheet.prototype.toString = function() { + var result = ""; + var rules = this.cssRules; + for (var i=0; i 1000 ? '1000px' : 'auto'); + * } + */ +CSSOM.CSSValueExpression.prototype.parse = function() { + var token = this._token, + idx = this._idx; + + var character = '', + expression = '', + error = '', + info, + paren = []; + + + for (; ; ++idx) { + character = token.charAt(idx); + + // end of token + 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))) { // comment? + if (info.error) { + error = 'css expression error: unfinished comment in expression!'; + } else { + idx = info.idx; + // ignore the comment + } + } else if ((info = this._parseJSRexExp(token, idx))) { // regexp + idx = info.idx; + expression += info.text; + } else { // other + expression += character; + } + break; + + case "'": + case '"': + info = this._parseJSString(token, idx, character); + if (info) { // string + idx = info.idx; + expression += info.text; + } else { + expression += character; + } + break; + + default: + expression += character; + break; + } + + if (error) { + break; + } + + // end of expression + if (paren.length === 0) { + break; + } + } + + var ret; + if (error) { + ret = { + error: error + }; + } else { + ret = { + idx: idx, + expression: expression + }; + } + + return ret; +}; + + +/** + * + * @return {Object|false} + * - idx: + * - text: + * or + * - error: + * or + * false + * + */ +CSSOM.CSSValueExpression.prototype._parseJSComment = function(token, idx) { + var nextChar = token.charAt(idx + 1), + text; + + if (nextChar === '/' || nextChar === '*') { + var startIdx = idx, + endIdx, + commentEndChar; + + if (nextChar === '/') { // line comment + commentEndChar = '\n'; + } else if (nextChar === '*') { // block comment + 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: text + }; + } else { + var error = 'css expression error: unfinished comment in expression!'; + return { + error: error + }; + } + } else { + return false; + } +}; + + +/** + * + * @return {Object|false} + * - idx: + * - text: + * or + * 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: text + }; + } +}; + + +/** + * parse regexp in css expression + * + * @return {Object|false} + * - idx: + * - regExp: + * or + * false + */ + +/* + +all legal RegExp + +/a/ +(/a/) +[/a/] +[12, /a/] + +!/a/ + ++/a/ +-/a/ +* /a/ +/ /a/ +%/a/ + +===/a/ +!==/a/ +==/a/ +!=/a/ +>/a/ +>=/a/ +>/a/ +>>>/a/ + +&&/a/ +||/a/ +?/a/ +=/a/ +,/a/ + + delete /a/ + in /a/ +instanceof /a/ + new /a/ + typeof /a/ + void /a/ + +*/ +CSSOM.CSSValueExpression.prototype._parseJSRexExp = function(token, idx) { + var before = token.substring(0, idx).replace(/\s+$/, ""), + legalRegx = [ + /^$/, + /\($/, + /\[$/, + /\!$/, + /\+$/, + /\-$/, + /\*$/, + /\/\s+/, + /\%$/, + /\=$/, + /\>$/, + /<$/, + /\&$/, + /\|$/, + /\^$/, + /\~$/, + /\?$/, + /\,$/, + /delete$/, + /in$/, + /instanceof$/, + /new$/, + /typeof$/, + /void$/ + ]; + + var isLegal = legalRegx.some(function(reg) { + return reg.test(before); + }); + + if (!isLegal) { + return false; + } else { + var sep = '/'; + + // same logic as string + return this._parseJSString(token, idx, sep); + } +}; + + +/** + * + * find next sep(same line) index in `token` + * + * @return {Number} + * + */ +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) { // not found + endIdx = NOT_FOUND; + break; + } else { + var text = token.substring(idx + 1, endIdx), + matched = text.match(/\\+$/); + if (!matched || matched[0] % 2 === 0) { // not escaped + break; + } else { + startIdx = endIdx; + } + } + } + + // boundary must be in the same line(js sting or regexp) + var nextNewLineIdx = token.indexOf('\n', idx + 1); + if (nextNewLineIdx < endIdx) { + endIdx = NOT_FOUND; + } + + + return endIdx; +}; + + + + +//.CommonJS +exports.CSSValueExpression = CSSOM.CSSValueExpression; +///CommonJS diff --git a/node_modules/cssstyle/node_modules/cssom/lib/MatcherList.js b/node_modules/cssstyle/node_modules/cssom/lib/MatcherList.js new file mode 100644 index 0000000..a791585 --- /dev/null +++ b/node_modules/cssstyle/node_modules/cssom/lib/MatcherList.js @@ -0,0 +1,62 @@ +//.CommonJS +var CSSOM = {}; +///CommonJS + + +/** + * @constructor + * @see https://developer.mozilla.org/en/CSS/@-moz-document + */ +CSSOM.MatcherList = function MatcherList(){ + this.length = 0; +}; + +CSSOM.MatcherList.prototype = { + + constructor: CSSOM.MatcherList, + + /** + * @return {string} + */ + get matcherText() { + return Array.prototype.join.call(this, ", "); + }, + + /** + * @param {string} value + */ + set matcherText(value) { + // just a temporary solution, actually it may be wrong by just split the value with ',', because a url can include ','. + var values = value.split(","); + var length = this.length = values.length; + for (var i=0; i 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 = i + 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 = i; + break; + case "before-name": + state = "name"; + break; + case "before-value": + state = "value"; + break; + case "importRule-begin": + state = "importRule"; + break; + } + buffer += character; + break; + } + } + + return styleSheet; +}; + + +//.CommonJS +exports.parse = CSSOM.parse; +// The following modules cannot be included sooner due to the mutual dependency with parse.js +CSSOM.CSSStyleSheet = require("./CSSStyleSheet").CSSStyleSheet; +CSSOM.CSSStyleRule = require("./CSSStyleRule").CSSStyleRule; +CSSOM.CSSImportRule = require("./CSSImportRule").CSSImportRule; +CSSOM.CSSMediaRule = require("./CSSMediaRule").CSSMediaRule; +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; +///CommonJS diff --git a/node_modules/cssstyle/node_modules/cssom/package.json b/node_modules/cssstyle/node_modules/cssom/package.json new file mode 100644 index 0000000..142e0e3 --- /dev/null +++ b/node_modules/cssstyle/node_modules/cssom/package.json @@ -0,0 +1,18 @@ +{ + "name": "cssom", + "description": "CSS Object Model implementation and CSS parser", + "keywords": [ + "CSS", + "CSSOM", + "parser", + "styleSheet" + ], + "version": "0.3.8", + "author": "Nikita Vasilyev ", + "repository": "NV/CSSOM", + "files": [ + "lib/" + ], + "main": "./lib/index.js", + "license": "MIT" +} diff --git a/node_modules/cssstyle/package.json b/node_modules/cssstyle/package.json new file mode 100644 index 0000000..7ded307 --- /dev/null +++ b/node_modules/cssstyle/package.json @@ -0,0 +1,72 @@ +{ + "name": "cssstyle", + "description": "CSSStyleDeclaration Object Model implementation", + "keywords": [ + "CSS", + "CSSStyleDeclaration", + "StyleSheet" + ], + "version": "2.3.0", + "homepage": "https://github.com/jsdom/cssstyle", + "maintainers": [ + { + "name": "Jon Sakas", + "email": "jon.sakas@gmail.com", + "url": "https://jon.sakas.co/" + }, + { + "name": "Rafał Ruciński", + "email": "fatfisz@gmail.com", + "url": "https://fatfisz.com" + } + ], + "contributors": [ + { + "name": "Chad Walker", + "email": "chad@chad-cat-lore-eddie.com", + "url": "https://github.com/chad3814" + } + ], + "repository": "jsdom/cssstyle", + "bugs": "https://github.com/jsdom/cssstyle/issues", + "directories": { + "lib": "./lib" + }, + "files": [ + "lib/" + ], + "main": "./lib/CSSStyleDeclaration.js", + "dependencies": { + "cssom": "~0.3.6" + }, + "devDependencies": { + "babel-generator": "~6.26.1", + "babel-traverse": "~6.26.0", + "babel-types": "~6.26.0", + "babylon": "~6.18.0", + "eslint": "~6.0.0", + "eslint-config-prettier": "~6.0.0", + "eslint-plugin-prettier": "~3.1.0", + "jest": "^24.8.0", + "npm-run-all": "^4.1.5", + "prettier": "~1.18.0", + "request": "^2.88.0", + "resolve": "~1.11.1" + }, + "scripts": { + "download": "node ./scripts/download_latest_properties.js && eslint lib/allProperties.js --fix", + "generate": "run-p generate:*", + "generate:implemented_properties": "node ./scripts/generate_implemented_properties.js", + "generate:properties": "node ./scripts/generate_properties.js", + "lint": "npm run generate && eslint . --max-warnings 0", + "lint:fix": "eslint . --fix --max-warnings 0", + "prepublishOnly": "npm run lint && npm run test", + "test": "npm run generate && jest", + "test-ci": "npm run lint && npm run test && codecov", + "update-authors": "git log --format=\"%aN <%aE>\" | sort -f | uniq > AUTHORS" + }, + "license": "MIT", + "engines": { + "node": ">=8" + } +} diff --git a/node_modules/data-urls/LICENSE.txt b/node_modules/data-urls/LICENSE.txt new file mode 100644 index 0000000..d394616 --- /dev/null +++ b/node_modules/data-urls/LICENSE.txt @@ -0,0 +1,7 @@ +Copyright © 2017–2020 Domenic Denicola + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/data-urls/README.md b/node_modules/data-urls/README.md new file mode 100644 index 0000000..2e7fac7 --- /dev/null +++ b/node_modules/data-urls/README.md @@ -0,0 +1,64 @@ +# Parse `data:` URLs + +This package helps you parse `data:` URLs [according to the WHATWG Fetch Standard](https://fetch.spec.whatwg.org/#data-urls): + +```js +const parseDataURL = require("data-urls"); + +const textExample = parseDataURL("data:,Hello%2C%20World!"); +console.log(textExample.mimeType.toString()); // "text/plain;charset=US-ASCII" +console.log(textExample.body.toString()); // "Hello, World!" + +const htmlExample = dataURL("data:text/html,%3Ch1%3EHello%2C%20World!%3C%2Fh1%3E"); +console.log(htmlExample.mimeType.toString()); // "text/html" +console.log(htmlExample.body.toString()); //

      Hello, World!

      + +const pngExample = parseDataURL("data:image/png;base64,iVBORw0KGgoAAA" + + "ANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4" + + "//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU" + + "5ErkJggg=="); +console.log(pngExample.mimeType.toString()); // "image/png" +console.log(pngExample.body); // +``` + +## API + +This package's main module's default export is a function that accepts a string and returns a `{ mimeType, body }` object, or `null` if the result cannot be parsed as a `data:` URL. + +- The `mimeType` property is an instance of [whatwg-mimetype](https://www.npmjs.com/package/whatwg-mimetype)'s `MIMEType` class. +- The `body` property is a Node.js [`Buffer`](https://nodejs.org/docs/latest/api/buffer.html) instance. + +As shown in the examples above, both of these have useful `toString()` methods for manipulating them as string values. However… + +### A word of caution on string decoding + +Because Node.js's `Buffer.prototype.toString()` assumes a UTF-8 encoding, simply doing `dataURL.body.toString()` may not work correctly if the `data:` URL's contents were not originally written in UTF-8. This includes if the encoding is "US-ASCII", [aka windows-1252](https://encoding.spec.whatwg.org/#names-and-labels), which is notable for being the default in many cases. + +A more complete decoding example would use the [whatwg-encoding](https://www.npmjs.com/package/whatwg-encoding) package as follows: + +```js +const parseDataURL = require("data-urls"); +const { labelToName, decode } = require("whatwg-encoding"); + +const dataURL = parseDataURL(arbitraryString); +const encodingName = labelToName(dataURL.mimeType.parameters.get("charset")); +const bodyDecoded = decode(dataURL.body, encodingName); +``` + +For example, given an `arbitraryString` of `data:,Hello!`, this will produce a `bodyDecoded` of `"Hello!"`, as expected. But given an `arbitraryString` of `"data:,Héllo!"`, this will correctly produce a `bodyDecoded` of `"Héllo!"`, whereas just doing `dataURL.body.toString()` will give back `"Héllo!"`. + +In summary, only use `dataURL.body.toString()` when you are very certain your data is inside the ASCII range (i.e. code points within the range U+0000 to U+007F). + +### Advanced functionality: parsing from a URL record + +If you are using the [whatwg-url](https://github.com/jsdom/whatwg-url) package, you may already have a "URL record" object on hand, as produced by that package's `parseURL` export. In that case, you can use this package's `fromURLRecord` export to save a bit of work: + +```js +const { parseURL } = require("whatwg-url"); +const dataURLFromURLRecord = require("data-urls").fromURLRecord; + +const urlRecord = parseURL("data:,Hello%2C%20World!"); +const dataURL = dataURLFromURLRecord(urlRecord); +``` + +In practice, we expect this functionality only to be used by consumers like [jsdom](https://www.npmjs.com/package/jsdom), which are using these packages at a very low level. diff --git a/node_modules/data-urls/lib/parser.js b/node_modules/data-urls/lib/parser.js new file mode 100644 index 0000000..37be0ef --- /dev/null +++ b/node_modules/data-urls/lib/parser.js @@ -0,0 +1,74 @@ +"use strict"; +const MIMEType = require("whatwg-mimetype"); +const { parseURL, serializeURL } = require("whatwg-url"); +const { + stripLeadingAndTrailingASCIIWhitespace, + stringPercentDecode, + isomorphicDecode, + forgivingBase64Decode +} = require("./utils.js"); + +module.exports = stringInput => { + const urlRecord = parseURL(stringInput); + + if (urlRecord === null) { + return null; + } + + return module.exports.fromURLRecord(urlRecord); +}; + +module.exports.fromURLRecord = urlRecord => { + if (urlRecord.scheme !== "data") { + return null; + } + + const input = serializeURL(urlRecord, true).substring("data:".length); + + let position = 0; + + let mimeType = ""; + while (position < input.length && input[position] !== ",") { + mimeType += input[position]; + ++position; + } + mimeType = stripLeadingAndTrailingASCIIWhitespace(mimeType); + + if (position === input.length) { + return null; + } + + ++position; + + const encodedBody = input.substring(position); + + let body = stringPercentDecode(encodedBody); + + // Can't use /i regexp flag because it isn't restricted to ASCII. + const mimeTypeBase64MatchResult = /(.*); *[Bb][Aa][Ss][Ee]64$/.exec(mimeType); + if (mimeTypeBase64MatchResult) { + const stringBody = isomorphicDecode(body); + body = forgivingBase64Decode(stringBody); + + if (body === null) { + return null; + } + mimeType = mimeTypeBase64MatchResult[1]; + } + + if (mimeType.startsWith(";")) { + mimeType = "text/plain" + mimeType; + } + + let mimeTypeRecord; + try { + mimeTypeRecord = new MIMEType(mimeType); + } catch (e) { + mimeTypeRecord = new MIMEType("text/plain;charset=US-ASCII"); + } + + return { + mimeType: mimeTypeRecord, + body + }; +}; diff --git a/node_modules/data-urls/lib/utils.js b/node_modules/data-urls/lib/utils.js new file mode 100644 index 0000000..213029f --- /dev/null +++ b/node_modules/data-urls/lib/utils.js @@ -0,0 +1,23 @@ +"use strict"; +const { percentDecode } = require("whatwg-url"); +const { atob } = require("abab"); + +exports.stripLeadingAndTrailingASCIIWhitespace = string => { + return string.replace(/^[ \t\n\f\r]+/, "").replace(/[ \t\n\f\r]+$/, ""); +}; + +exports.stringPercentDecode = input => { + return percentDecode(Buffer.from(input, "utf-8")); +}; + +exports.isomorphicDecode = input => { + return input.toString("binary"); +}; + +exports.forgivingBase64Decode = data => { + const asString = atob(data); + if (asString === null) { + return null; + } + return Buffer.from(asString, "binary"); +}; diff --git a/node_modules/data-urls/package.json b/node_modules/data-urls/package.json new file mode 100644 index 0000000..3e2d9d1 --- /dev/null +++ b/node_modules/data-urls/package.json @@ -0,0 +1,53 @@ +{ + "name": "data-urls", + "description": "Parses data: URLs", + "keywords": [ + "data url", + "data uri", + "data:", + "http", + "fetch", + "whatwg" + ], + "version": "2.0.0", + "author": "Domenic Denicola (https://domenic.me/)", + "license": "MIT", + "repository": "jsdom/data-urls", + "main": "lib/parser.js", + "files": [ + "lib/" + ], + "scripts": { + "test": "jest", + "coverage": "jest --coverage", + "lint": "eslint .", + "pretest": "node scripts/get-latest-platform-tests.js" + }, + "dependencies": { + "abab": "^2.0.3", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.0.0" + }, + "devDependencies": { + "eslint": "^6.8.0", + "jest": "^24.9.0", + "request": "^2.88.0" + }, + "engines": { + "node": ">=10" + }, + "jest": { + "coverageDirectory": "coverage", + "coverageReporters": [ + "lcov", + "text-summary" + ], + "testEnvironment": "node", + "testMatch": [ + "/test/**/*.js" + ], + "coveragePathIgnorePatterns": [ + "/node_modules/(?!(abab/lib/atob.js))" + ] + } +} diff --git a/node_modules/debug/LICENSE b/node_modules/debug/LICENSE new file mode 100644 index 0000000..658c933 --- /dev/null +++ b/node_modules/debug/LICENSE @@ -0,0 +1,19 @@ +(The MIT License) + +Copyright (c) 2014 TJ Holowaychuk + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software +and associated documentation files (the 'Software'), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/node_modules/debug/README.md b/node_modules/debug/README.md new file mode 100644 index 0000000..88dae35 --- /dev/null +++ b/node_modules/debug/README.md @@ -0,0 +1,455 @@ +# debug +[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) +[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) + + + +A tiny JavaScript debugging utility modelled after Node.js core's debugging +technique. Works in Node.js and web browsers. + +## Installation + +```bash +$ npm install debug +``` + +## Usage + +`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. + +Example [_app.js_](./examples/node/app.js): + +```js +var debug = require('debug')('http') + , http = require('http') + , name = 'My App'; + +// fake app + +debug('booting %o', name); + +http.createServer(function(req, res){ + debug(req.method + ' ' + req.url); + res.end('hello\n'); +}).listen(3000, function(){ + debug('listening'); +}); + +// fake worker of some kind + +require('./worker'); +``` + +Example [_worker.js_](./examples/node/worker.js): + +```js +var a = require('debug')('worker:a') + , b = require('debug')('worker:b'); + +function work() { + a('doing lots of uninteresting work'); + setTimeout(work, Math.random() * 1000); +} + +work(); + +function workb() { + b('doing some work'); + setTimeout(workb, Math.random() * 2000); +} + +workb(); +``` + +The `DEBUG` environment variable is then used to enable these based on space or +comma-delimited names. + +Here are some examples: + +screen shot 2017-08-08 at 12 53 04 pm +screen shot 2017-08-08 at 12 53 38 pm +screen shot 2017-08-08 at 12 53 25 pm + +#### Windows command prompt notes + +##### CMD + +On Windows the environment variable is set using the `set` command. + +```cmd +set DEBUG=*,-not_this +``` + +Example: + +```cmd +set DEBUG=* & node app.js +``` + +##### PowerShell (VS Code default) + +PowerShell uses different syntax to set environment variables. + +```cmd +$env:DEBUG = "*,-not_this" +``` + +Example: + +```cmd +$env:DEBUG='app';node app.js +``` + +Then, run the program to be debugged as usual. + +npm script example: +```js + "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", +``` + +## Namespace Colors + +Every debug instance has a color generated for it based on its namespace name. +This helps when visually parsing the debug output to identify which debug instance +a debug line belongs to. + +#### Node.js + +In Node.js, colors are enabled when stderr is a TTY. You also _should_ install +the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, +otherwise debug will only use a small handful of basic colors. + + + +#### Web Browser + +Colors are also enabled on "Web Inspectors" that understand the `%c` formatting +option. These are WebKit web inspectors, Firefox ([since version +31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) +and the Firebug plugin for Firefox (any version). + + + + +## Millisecond diff + +When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. + + + +When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: + + + + +## Conventions + +If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. + +## Wildcards + +The `*` character may be used as a wildcard. Suppose for example your library has +debuggers named "connect:bodyParser", "connect:compress", "connect:session", +instead of listing all three with +`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do +`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. + +You can also exclude specific debuggers by prefixing them with a "-" character. +For example, `DEBUG=*,-connect:*` would include all debuggers except those +starting with "connect:". + +## Environment Variables + +When running through Node.js, you can set a few environment variables that will +change the behavior of the debug logging: + +| Name | Purpose | +|-----------|-------------------------------------------------| +| `DEBUG` | Enables/disables specific debugging namespaces. | +| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | +| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | +| `DEBUG_DEPTH` | Object inspection depth. | +| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | + + +__Note:__ The environment variables beginning with `DEBUG_` end up being +converted into an Options object that gets used with `%o`/`%O` formatters. +See the Node.js documentation for +[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) +for the complete list. + +## Formatters + +Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. +Below are the officially supported formatters: + +| Formatter | Representation | +|-----------|----------------| +| `%O` | Pretty-print an Object on multiple lines. | +| `%o` | Pretty-print an Object all on a single line. | +| `%s` | String. | +| `%d` | Number (both integer and float). | +| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | +| `%%` | Single percent sign ('%'). This does not consume an argument. | + + +### Custom formatters + +You can add custom formatters by extending the `debug.formatters` object. +For example, if you wanted to add support for rendering a Buffer as hex with +`%h`, you could do something like: + +```js +const createDebug = require('debug') +createDebug.formatters.h = (v) => { + return v.toString('hex') +} + +// …elsewhere +const debug = createDebug('foo') +debug('this is hex: %h', new Buffer('hello world')) +// foo this is hex: 68656c6c6f20776f726c6421 +0ms +``` + + +## Browser Support + +You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), +or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), +if you don't want to build it yourself. + +Debug's enable state is currently persisted by `localStorage`. +Consider the situation shown below where you have `worker:a` and `worker:b`, +and wish to debug both. You can enable this using `localStorage.debug`: + +```js +localStorage.debug = 'worker:*' +``` + +And then refresh the page. + +```js +a = debug('worker:a'); +b = debug('worker:b'); + +setInterval(function(){ + a('doing some work'); +}, 1000); + +setInterval(function(){ + b('doing some work'); +}, 1200); +``` + + +## Output streams + + By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: + +Example [_stdout.js_](./examples/node/stdout.js): + +```js +var debug = require('debug'); +var error = debug('app:error'); + +// by default stderr is used +error('goes to stderr!'); + +var log = debug('app:log'); +// set this namespace to log via console.log +log.log = console.log.bind(console); // don't forget to bind to console! +log('goes to stdout'); +error('still goes to stderr!'); + +// set all output to go via console.info +// overrides all per-namespace log settings +debug.log = console.info.bind(console); +error('now goes to stdout via console.info'); +log('still goes to stdout, but via console.info now'); +``` + +## Extend +You can simply extend debugger +```js +const log = require('debug')('auth'); + +//creates new debug instance with extended namespace +const logSign = log.extend('sign'); +const logLogin = log.extend('login'); + +log('hello'); // auth hello +logSign('hello'); //auth:sign hello +logLogin('hello'); //auth:login hello +``` + +## Set dynamically + +You can also enable debug dynamically by calling the `enable()` method : + +```js +let debug = require('debug'); + +console.log(1, debug.enabled('test')); + +debug.enable('test'); +console.log(2, debug.enabled('test')); + +debug.disable(); +console.log(3, debug.enabled('test')); + +``` + +print : +``` +1 false +2 true +3 false +``` + +Usage : +`enable(namespaces)` +`namespaces` can include modes separated by a colon and wildcards. + +Note that calling `enable()` completely overrides previously set DEBUG variable : + +``` +$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' +=> false +``` + +`disable()` + +Will disable all namespaces. The functions returns the namespaces currently +enabled (and skipped). This can be useful if you want to disable debugging +temporarily without knowing what was enabled to begin with. + +For example: + +```js +let debug = require('debug'); +debug.enable('foo:*,-foo:bar'); +let namespaces = debug.disable(); +debug.enable(namespaces); +``` + +Note: There is no guarantee that the string will be identical to the initial +enable string, but semantically they will be identical. + +## Checking whether a debug target is enabled + +After you've created a debug instance, you can determine whether or not it is +enabled by checking the `enabled` property: + +```javascript +const debug = require('debug')('http'); + +if (debug.enabled) { + // do stuff... +} +``` + +You can also manually toggle this property to force the debug instance to be +enabled or disabled. + + +## Authors + + - TJ Holowaychuk + - Nathan Rajlich + - Andrew Rhyne + +## Backers + +Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Sponsors + +Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## License + +(The MIT License) + +Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/debug/package.json b/node_modules/debug/package.json new file mode 100644 index 0000000..da809d2 --- /dev/null +++ b/node_modules/debug/package.json @@ -0,0 +1,59 @@ +{ + "name": "debug", + "version": "4.3.1", + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/debug.git" + }, + "description": "small debugging utility", + "keywords": [ + "debug", + "log", + "debugger" + ], + "files": [ + "src", + "LICENSE", + "README.md" + ], + "author": "TJ Holowaychuk ", + "contributors": [ + "Nathan Rajlich (http://n8.io)", + "Andrew Rhyne ", + "Josh Junon " + ], + "license": "MIT", + "scripts": { + "lint": "xo", + "test": "npm run test:node && npm run test:browser && npm run lint", + "test:node": "istanbul cover _mocha -- test.js", + "test:browser": "karma start --single-run", + "test:coverage": "cat ./coverage/lcov.info | coveralls" + }, + "dependencies": { + "ms": "2.1.2" + }, + "devDependencies": { + "brfs": "^2.0.1", + "browserify": "^16.2.3", + "coveralls": "^3.0.2", + "istanbul": "^0.4.5", + "karma": "^3.1.4", + "karma-browserify": "^6.0.0", + "karma-chrome-launcher": "^2.2.0", + "karma-mocha": "^1.3.0", + "mocha": "^5.2.0", + "mocha-lcov-reporter": "^1.2.0", + "xo": "^0.23.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + }, + "main": "./src/index.js", + "browser": "./src/browser.js", + "engines": { + "node": ">=6.0" + } +} diff --git a/node_modules/debug/src/browser.js b/node_modules/debug/src/browser.js new file mode 100644 index 0000000..cd0fc35 --- /dev/null +++ b/node_modules/debug/src/browser.js @@ -0,0 +1,269 @@ +/* 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 = require('./common')(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; + } +}; diff --git a/node_modules/debug/src/common.js b/node_modules/debug/src/common.js new file mode 100644 index 0000000..392a8e0 --- /dev/null +++ b/node_modules/debug/src/common.js @@ -0,0 +1,261 @@ + +/** + * 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 = require('ms'); + 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 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; + + 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: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride, + 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.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; diff --git a/node_modules/debug/src/index.js b/node_modules/debug/src/index.js new file mode 100644 index 0000000..bf4c57f --- /dev/null +++ b/node_modules/debug/src/index.js @@ -0,0 +1,10 @@ +/** + * 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 = require('./browser.js'); +} else { + module.exports = require('./node.js'); +} diff --git a/node_modules/debug/src/node.js b/node_modules/debug/src/node.js new file mode 100644 index 0000000..79bc085 --- /dev/null +++ b/node_modules/debug/src/node.js @@ -0,0 +1,263 @@ +/** + * Module dependencies. + */ + +const tty = require('tty'); +const util = require('util'); + +/** + * 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 = require('supports-color'); + + 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 = require('./common')(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); +}; diff --git a/node_modules/decimal.js/CHANGELOG.md b/node_modules/decimal.js/CHANGELOG.md new file mode 100644 index 0000000..ae040cf --- /dev/null +++ b/node_modules/decimal.js/CHANGELOG.md @@ -0,0 +1,213 @@ +#### 10.2.1 +* 28/09/2020 +* Correct `sqrt` initial estimate. + +#### 10.2.0 +* 08/05/2019 +* #128 Workaround V8 `Math.pow` change. +* #93 Accept `+` prefix when parsing string values. +* #129 Fix typo. + +#### 10.1.1 +* 27/02/2019 +* Check `Symbol` properly. + +#### 10.1.0 +* 26/02/2019 +* #122 Add custom `util.inspect()` function. +* Add `Symbol.toStringTag`. +* #121 Constructor: add range check for arguments of type number and Decimal. +* Remove premable from uglifyjs build script. +* Move *decimal.min.js.map* to root directory. + +#### 10.0.2 +* 13/12/2018 +* #114 Remove soureMappingURL from *decimal.min.js*. +* Remove *bower.json*. + +#### 10.0.1 +* 24/05/2018 +* Add `browser` field to *package.json*. + +#### 10.0.0 +* 10/03/2018 +* #88 `toNearest` to return the nearest multiple in the direction of the rounding mode. +* #82 #91 `const` to `var`. +* Add trigonometric precision limit explanantion to documentation. +* Put global ts definitions in separate file (see *bignumber.js* #143). + +#### 9.0.1 +* 15/12/2017 +* #80 Typings: correct return type. + +#### 9.0.0 +* 14/12/2017 +* #78 Typings: remove `toFormat`. + +#### 8.0.0 +* 10/12/2017 +* Correct typings: `toFraction` returns `Decimal[]`. +* Type-checking: add `Decimal.isDecimal` method. +* Enable configuration reset with `defaults: true`. +* Add named export, Decimal, to *decimal.mjs*. + +#### 7.5.1 +* 03/12/2017 +* Remove typo. + +#### 7.5.0 +* 03/12/2017 +* Use TypeScript declarations outside modules. + +#### 7.4.0 +* 25/11/2017 +* Add TypeScript typings. + +#### 7.3.0 +* 26/09/2017 +* Rename *decimal.es6.js* to *decimal.mjs*. +* Amend *.travis.yml*. + +#### 7.2.4 +* 09/09/2017 +* Update docs regarding `global.crypto`. +* Fix `import` issues. + +#### 7.2.3 +* 27/06/2017 +* Bugfix: #58 `pow` sometimes throws when result is `Infinity`. + +#### 7.2.2 +* 25/06/2017 +* Bugfix: #57 Powers of -1 for integers over `Number.MAX_SAFE_INTEGER`. + +#### 7.2.1 +* 04/05/2017 +* Fix *README* badges. + +#### 7.2.0 +* 09/04/2017 +* Add *decimal.es6.js* + +#### 7.1.2 +* 05/04/2017 +* `Decimal.default` to `Decimal['default']` IE8 issue + +#### 7.1.1 +* 10/01/2017 +* Remove duplicated for-loop +* Minor refactoring + +#### 7.1.0 +* 09/11/2016 +* Support ES6 imports. + +#### 7.0.0 +* 09/11/2016 +* Remove `require('crypto')` - leave it to the user +* Default `Decimal.crypto` to `false` +* Add `Decimal.set` as `Decimal.config` alias + +#### 6.0.0 +* 30/06/2016 +* Removed base-88 serialization format +* Amended `toJSON` and removed `Decimal.fromJSON` accordingly + +#### 5.0.8 +* 09/03/2016 +* Add newline to single test results +* Correct year + +#### 5.0.7 +* 29/02/2016 +* Add decimal.js-light link +* Remove outdated example from docs + +#### 5.0.6 +* 22/02/2016 +* Add bower.json + +#### 5.0.5 +* 20/02/2016 +* Bugfix: #26 wrong precision applied + +#### 5.0.4 +* 14/02/2016 +* Bugfix: #26 clone + +#### 5.0.3 +* 06/02/2016 +* Refactor tests + +#### 5.0.2 +* 05/02/2016 +* Added immutability tests +* Minor *decimal.js* clean-up + +#### 5.0.1 +* 28/01/2016 +* Bugfix: #20 cos mutates value +* Add pi info to docs + +#### 5.0.0 +* 25/01/2016 +* Added trigonometric functions and `cubeRoot` method +* Added most of JavaScript's `Math` object methods as Decimal methods +* Added `toBinary`, `toHexadecimal` and `toOctal` methods +* Added `isPositive` method +* Removed the 15 significant digit limit for numbers +* `toFraction` now returns an array of two Decimals, not two strings +* String values containing whitespace or a plus sign are no longer accepted +* `valueOf` now returns `'-0'` for minus zero +* `comparedTo` now returns `NaN` not `null` for comparisons with `NaN` +* `Decimal.max` and `Decimal.min` no longer accept an array +* The Decimal constructor and `toString` no longer accept a base argument +* Binary, hexadecimal and octal prefixes are now recognised for string values +* Removed `Decimal.errors` configuration property +* Removed `toFormat` method +* Removed `Decimal.ONE` +* Renamed `exponential` method to `naturalExponential` +* Renamed `Decimal.constructor` method to `Decimal.clone` +* Simplified error handling and amended error messages +* Refactored the test suite +* `Decimal.crypto` is now `undefined` by default, and the `crypto` object will be used if available +* Major internal refactoring +* Removed *bower.json* + +#### 4.0.2 +* 20/02/2015 Add bower.json. Add source map. Amend travis CI. Amend doc/comments + +#### 4.0.1 +* 11/12/2014 Assign correct constructor when duplicating a Decimal + +#### 4.0.0 +* 10/11/2014 `toFormat` amended to use `Decimal.format` object for more flexible configuration + +#### 3.0.1 +* 8/06/2014 Surround crypto require in try catch. See issue #5 + +#### 3.0.0 +* 4/06/2014 `random` simplified. Major internal changes mean the properties of a Decimal must now be considered read-only + +#### 2.1.0 +* 4/06/2014 Amend UMD + +#### 2.0.3 +* 8/05/2014 Fix NaN toNumber + +#### 2.0.2 +* 30/04/2014 Correct doc links + +#### 2.0.1 +* 10/04/2014 Update npmignore + +#### 2.0.0 +* 10/04/2014 Add `toSignificantDigits` +* Remove `toInteger` +* No arguments to `ceil`, `floor`, `round` and `trunc` + +#### 1.0.1 +* 07/04/2014 Minor documentation clean-up + +#### 1.0.0 +* 02/04/2014 Initial release diff --git a/node_modules/decimal.js/LICENCE.md b/node_modules/decimal.js/LICENCE.md new file mode 100644 index 0000000..21b07bb --- /dev/null +++ b/node_modules/decimal.js/LICENCE.md @@ -0,0 +1,23 @@ +The MIT Licence. + +Copyright (c) 2020 Michael Mclaughlin + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/node_modules/decimal.js/README.md b/node_modules/decimal.js/README.md new file mode 100644 index 0000000..82f1372 --- /dev/null +++ b/node_modules/decimal.js/README.md @@ -0,0 +1,244 @@ +![decimal.js](https://raw.githubusercontent.com/MikeMcl/decimal.js/gh-pages/decimaljs.png) + +An arbitrary-precision Decimal type for JavaScript. + +[![npm version](https://img.shields.io/npm/v/decimal.js.svg)](https://www.npmjs.com/package/decimal.js) +[![npm downloads](https://img.shields.io/npm/dw/decimal.js)](https://www.npmjs.com/package/decimal.js) +[![Build Status](https://travis-ci.org/MikeMcl/decimal.js.svg)](https://travis-ci.org/MikeMcl/decimal.js) +[![CDNJS](https://img.shields.io/cdnjs/v/decimal.js.svg)](https://cdnjs.com/libraries/decimal.js) + +
      + +## Features + + - Integers and floats + - Simple but full-featured API + - Replicates many of the methods of JavaScript's `Number.prototype` and `Math` objects + - Also handles hexadecimal, binary and octal values + - Faster, smaller, and perhaps easier to use than JavaScript versions of Java's BigDecimal + - No dependencies + - Wide platform compatibility: uses JavaScript 1.5 (ECMAScript 3) features only + - Comprehensive [documentation](http://mikemcl.github.io/decimal.js/) and test set + - Includes a TypeScript declaration file: *decimal.d.ts* + +![API](https://raw.githubusercontent.com/MikeMcl/decimal.js/gh-pages/API.png) + +The library is similar to [bignumber.js](https://github.com/MikeMcl/bignumber.js/), but here +precision is specified in terms of significant digits rather than decimal places, and all +calculations are rounded to the precision (similar to Python's decimal module) rather than just +those involving division. + +This library also adds the trigonometric functions, among others, and supports non-integer powers, +which makes it a significantly larger library than *bignumber.js* and the even smaller +[big.js](https://github.com/MikeMcl/big.js/). + +For a lighter version of this library without the trigonometric functions see [decimal.js-light](https://github.com/MikeMcl/decimal.js-light/). + +## Load + +The library is the single JavaScript file *decimal.js* or ES module *decimal.mjs*. + +Browser: + +```html + +``` + +```html + +``` + +[Node.js](http://nodejs.org): + +```bash +$ npm install decimal.js +``` + +```js +var Decimal = require('decimal.js'); +``` + +ES module: + +```js +//import Decimal from 'decimal.js'; +import {Decimal} from 'decimal.js'; +``` + +AMD loader libraries such as [requireJS](http://requirejs.org/): + +```js +require(['decimal'], function(Decimal) { + // Use Decimal here in local scope. No global Decimal. +}); +``` + +## Use + +*In all examples below, `var`, semicolons and `toString` calls are not shown. +If a commented-out value is in quotes it means `toString` has been called on the preceding expression.* + +The library exports a single function object, `Decimal`, the constructor of Decimal instances. + +It accepts a value of type number, string or Decimal. + +```js +x = new Decimal(123.4567) +y = new Decimal('123456.7e-3') +z = new Decimal(x) +x.equals(y) && y.equals(z) && x.equals(z) // true +``` + +A value can also be in binary, hexadecimal or octal if the appropriate prefix is included. + +```js +x = new Decimal('0xff.f') // '255.9375' +y = new Decimal('0b10101100') // '172' +z = x.plus(y) // '427.9375' + +z.toBinary() // '0b110101011.1111' +z.toBinary(13) // '0b1.101010111111p+8' +``` + +Using binary exponential notation to create a Decimal with the value of `Number.MAX_VALUE`: + +```js +x = new Decimal('0b1.1111111111111111111111111111111111111111111111111111p+1023') +``` + +A Decimal is immutable in the sense that it is not changed by its methods. + +```js +0.3 - 0.1 // 0.19999999999999998 +x = new Decimal(0.3) +x.minus(0.1) // '0.2' +x // '0.3' +``` + +The methods that return a Decimal can be chained. + +```js +x.dividedBy(y).plus(z).times(9).floor() +x.times('1.23456780123456789e+9').plus(9876.5432321).dividedBy('4444562598.111772').ceil() +``` + +Many method names have a shorter alias. + +```js +x.squareRoot().dividedBy(y).toPower(3).equals(x.sqrt().div(y).pow(3)) // true +x.cmp(y.mod(z).neg()) == 1 && x.comparedTo(y.modulo(z).negated()) == 1 // true +``` + +Like JavaScript's Number type, there are `toExponential`, `toFixed` and `toPrecision` methods, + +```js +x = new Decimal(255.5) +x.toExponential(5) // '2.55500e+2' +x.toFixed(5) // '255.50000' +x.toPrecision(5) // '255.50' +``` + +and almost all of the methods of JavaScript's Math object are also replicated. + +```js +Decimal.sqrt('6.98372465832e+9823') // '8.3568682281821340204e+4911' +Decimal.pow(2, 0.0979843) // '1.0702770511687781839' +``` + +There are `isNaN` and `isFinite` methods, as `NaN` and `Infinity` are valid `Decimal` values, + +```js +x = new Decimal(NaN) // 'NaN' +y = new Decimal(Infinity) // 'Infinity' +x.isNaN() && !y.isNaN() && !x.isFinite() && !y.isFinite() // true +``` + +and a `toFraction` method with an optional *maximum denominator* argument + +```js +z = new Decimal(355) +pi = z.dividedBy(113) // '3.1415929204' +pi.toFraction() // [ '7853982301', '2500000000' ] +pi.toFraction(1000) // [ '355', '113' ] +``` + +All calculations are rounded according to the number of significant digits and rounding mode +specified by the `precision` and `rounding` properties of the Decimal constructor. + +For advanced usage, multiple Decimal constructors can be created, each with their own independent configuration which +applies to all Decimal numbers created from it. + +```js +// Set the precision and rounding of the default Decimal constructor +Decimal.set({ precision: 5, rounding: 4 }) + +// Create another Decimal constructor, optionally passing in a configuration object +Decimal9 = Decimal.clone({ precision: 9, rounding: 1 }) + +x = new Decimal(5) +y = new Decimal9(5) + +x.div(3) // '1.6667' +y.div(3) // '1.66666666' +``` + +The value of a Decimal is stored in a floating point format in terms of its digits, exponent and sign. + +```js +x = new Decimal(-12345.67); +x.d // [ 12345, 6700000 ] digits (base 10000000) +x.e // 4 exponent (base 10) +x.s // -1 sign +``` + +For further information see the [API](http://mikemcl.github.io/decimal.js/) reference in the *doc* directory. + +## Test + +The library can be tested using Node.js or a browser. + +The *test* directory contains the file *test.js* which runs all the tests when executed by Node, +and the file *test.html* which runs all the tests when opened in a browser. + +To run all the tests, from a command-line at the root directory using npm + +```bash +$ npm test +``` + +or at the *test* directory using Node + +```bash +$ node test +``` + +Each separate test module can also be executed individually, for example, at the *test/modules* directory + +```bash +$ node toFraction +``` + +## Build + +For Node, if [uglify-js](https://github.com/mishoo/UglifyJS2) is installed + +```bash +npm install uglify-js -g +``` + +then + +```bash +npm run build +``` + +will create *decimal.min.js*, and a source map will also be added to the *doc* directory. + +## Licence + +MIT. + +See *LICENCE.md* diff --git a/node_modules/decimal.js/decimal.d.ts b/node_modules/decimal.js/decimal.d.ts new file mode 100644 index 0000000..428089d --- /dev/null +++ b/node_modules/decimal.js/decimal.d.ts @@ -0,0 +1,295 @@ +// Type definitions for decimal.js >=7.0.0 +// Project: https://github.com/MikeMcl/decimal.js +// Definitions by: Michael Mclaughlin +// Definitions: https://github.com/MikeMcl/decimal.js +// +// Documentation: http://mikemcl.github.io/decimal.js/ +// +// Exports: +// +// class Decimal (default export) +// type Decimal.Constructor +// type Decimal.Instance +// type Decimal.Modulo +// type Decimal.Rounding +// type Decimal.Value +// interface Decimal.Config +// +// Example (alternative syntax commented-out): +// +// import {Decimal} from "decimal.js" +// //import Decimal from "decimal.js" +// +// let r: Decimal.Rounding = Decimal.ROUND_UP; +// let c: Decimal.Configuration = {precision: 4, rounding: r}; +// Decimal.set(c); +// let v: Decimal.Value = '12345.6789'; +// let d: Decimal = new Decimal(v); +// //let d: Decimal.Instance = new Decimal(v); +// +// The use of compiler option `--strictNullChecks` is recommended. + +export default Decimal; + +export namespace Decimal { + export type Constructor = typeof Decimal; + export type Instance = Decimal; + export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; + export type Modulo = Rounding | 9; + export type Value = string | number | Decimal; + + // http://mikemcl.github.io/decimal.js/#constructor-properties + export interface Config { + precision?: number; + rounding?: Rounding; + toExpNeg?: number; + toExpPos?: number; + minE?: number; + maxE?: number; + crypto?: boolean; + modulo?: Modulo; + defaults?: boolean; + } +} + +export declare class Decimal { + readonly d: number[]; + readonly e: number; + readonly s: number; + private readonly name: string; + + constructor(n: Decimal.Value); + + absoluteValue(): Decimal; + abs(): Decimal; + + ceil(): Decimal; + + comparedTo(n: Decimal.Value): number; + cmp(n: Decimal.Value): number; + + cosine(): Decimal; + cos(): Decimal; + + cubeRoot(): Decimal; + cbrt(): Decimal; + + decimalPlaces(): number; + dp(): number; + + dividedBy(n: Decimal.Value): Decimal; + div(n: Decimal.Value): Decimal; + + dividedToIntegerBy(n: Decimal.Value): Decimal; + divToInt(n: Decimal.Value): Decimal; + + equals(n: Decimal.Value): boolean; + eq(n: Decimal.Value): boolean; + + floor(): Decimal; + + greaterThan(n: Decimal.Value): boolean; + gt(n: Decimal.Value): boolean; + + greaterThanOrEqualTo(n: Decimal.Value): boolean; + gte(n: Decimal.Value): boolean; + + hyperbolicCosine(): Decimal; + cosh(): Decimal; + + hyperbolicSine(): Decimal; + sinh(): Decimal; + + hyperbolicTangent(): Decimal; + tanh(): Decimal; + + inverseCosine(): Decimal; + acos(): Decimal; + + inverseHyperbolicCosine(): Decimal; + acosh(): Decimal; + + inverseHyperbolicSine(): Decimal; + asinh(): Decimal; + + inverseHyperbolicTangent(): Decimal; + atanh(): Decimal; + + inverseSine(): Decimal; + asin(): Decimal; + + inverseTangent(): Decimal; + atan(): Decimal; + + isFinite(): boolean; + + isInteger(): boolean; + isInt(): boolean; + + isNaN(): boolean; + + isNegative(): boolean; + isNeg(): boolean; + + isPositive(): boolean; + isPos(): boolean; + + isZero(): boolean; + + lessThan(n: Decimal.Value): boolean; + lt(n: Decimal.Value): boolean; + + lessThanOrEqualTo(n: Decimal.Value): boolean; + lte(n: Decimal.Value): boolean; + + logarithm(n?: Decimal.Value): Decimal; + log(n?: Decimal.Value): Decimal; + + minus(n: Decimal.Value): Decimal; + sub(n: Decimal.Value): Decimal; + + modulo(n: Decimal.Value): Decimal; + mod(n: Decimal.Value): Decimal; + + naturalExponential(): Decimal; + exp(): Decimal; + + naturalLogarithm(): Decimal; + ln(): Decimal; + + negated(): Decimal; + neg(): Decimal; + + plus(n: Decimal.Value): Decimal; + add(n: Decimal.Value): Decimal; + + precision(includeZeros?: boolean): number; + sd(includeZeros?: boolean): number; + + round(): Decimal; + + sine() : Decimal; + sin() : Decimal; + + squareRoot(): Decimal; + sqrt(): Decimal; + + tangent() : Decimal; + tan() : Decimal; + + times(n: Decimal.Value): Decimal; + mul(n: Decimal.Value) : Decimal; + + toBinary(significantDigits?: number): string; + toBinary(significantDigits: number, rounding: Decimal.Rounding): string; + + toDecimalPlaces(decimalPlaces?: number): Decimal; + toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; + toDP(decimalPlaces?: number): Decimal; + toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; + + toExponential(decimalPlaces?: number): string; + toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; + + toFixed(decimalPlaces?: number): string; + toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; + + toFraction(max_denominator?: Decimal.Value): Decimal[]; + + toHexadecimal(significantDigits?: number): string; + toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; + toHex(significantDigits?: number): string; + toHex(significantDigits: number, rounding?: Decimal.Rounding): string; + + toJSON(): string; + + toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; + + toNumber(): number; + + toOctal(significantDigits?: number): string; + toOctal(significantDigits: number, rounding: Decimal.Rounding): string; + + toPower(n: Decimal.Value): Decimal; + pow(n: Decimal.Value): Decimal; + + toPrecision(significantDigits?: number): string; + toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; + + toSignificantDigits(significantDigits?: number): Decimal; + toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; + toSD(significantDigits?: number): Decimal; + toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; + + toString(): string; + + truncated(): Decimal; + trunc(): Decimal; + + valueOf(): string; + + static abs(n: Decimal.Value): Decimal; + static acos(n: Decimal.Value): Decimal; + static acosh(n: Decimal.Value): Decimal; + static add(x: Decimal.Value, y: Decimal.Value): Decimal; + static asin(n: Decimal.Value): Decimal; + static asinh(n: Decimal.Value): Decimal; + static atan(n: Decimal.Value): Decimal; + static atanh(n: Decimal.Value): Decimal; + static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; + static cbrt(n: Decimal.Value): Decimal; + static ceil(n: Decimal.Value): Decimal; + static clone(object?: Decimal.Config): Decimal.Constructor; + static config(object: Decimal.Config): Decimal.Constructor; + static cos(n: Decimal.Value): Decimal; + static cosh(n: Decimal.Value): Decimal; + static div(x: Decimal.Value, y: Decimal.Value): Decimal; + static exp(n: Decimal.Value): Decimal; + static floor(n: Decimal.Value): Decimal; + static hypot(...n: Decimal.Value[]): Decimal; + static isDecimal(object: any): boolean + static ln(n: Decimal.Value): Decimal; + static log(n: Decimal.Value, base?: Decimal.Value): Decimal; + static log2(n: Decimal.Value): Decimal; + static log10(n: Decimal.Value): Decimal; + static max(...n: Decimal.Value[]): Decimal; + static min(...n: Decimal.Value[]): Decimal; + static mod(x: Decimal.Value, y: Decimal.Value): Decimal; + static mul(x: Decimal.Value, y: Decimal.Value): Decimal; + static noConflict(): Decimal.Constructor; // Browser only + static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; + static random(significantDigits?: number): Decimal; + static round(n: Decimal.Value): Decimal; + static set(object: Decimal.Config): Decimal.Constructor; + static sign(n: Decimal.Value): Decimal; + static sin(n: Decimal.Value): Decimal; + static sinh(n: Decimal.Value): Decimal; + static sqrt(n: Decimal.Value): Decimal; + static sub(x: Decimal.Value, y: Decimal.Value): Decimal; + static tan(n: Decimal.Value): Decimal; + static tanh(n: Decimal.Value): Decimal; + static trunc(n: Decimal.Value): Decimal; + + static readonly default?: Decimal.Constructor; + static readonly Decimal?: Decimal.Constructor; + + static readonly precision: number; + static readonly rounding: Decimal.Rounding; + static readonly toExpNeg: number; + static readonly toExpPos: number; + static readonly minE: number; + static readonly maxE: number; + static readonly crypto: boolean; + static readonly modulo: Decimal.Modulo; + + static readonly ROUND_UP: 0; + static readonly ROUND_DOWN: 1; + static readonly ROUND_CEIL: 2; + static readonly ROUND_FLOOR: 3; + static readonly ROUND_HALF_UP: 4; + static readonly ROUND_HALF_DOWN: 5; + static readonly ROUND_HALF_EVEN: 6; + static readonly ROUND_HALF_CEIL: 7; + static readonly ROUND_HALF_FLOOR: 8; + static readonly EUCLID: 9; +} diff --git a/node_modules/decimal.js/decimal.global.d.ts b/node_modules/decimal.js/decimal.global.d.ts new file mode 100644 index 0000000..0b0446b --- /dev/null +++ b/node_modules/decimal.js/decimal.global.d.ts @@ -0,0 +1,316 @@ +// Type definitions for decimal.js >=7.0.0 +// Project: https://github.com/MikeMcl/decimal.js +// Definitions by: Michael Mclaughlin +// Definitions: https://github.com/MikeMcl/decimal.js +// +// Documentation: http://mikemcl.github.io/decimal.js/ +// +// Exports (available globally or when using import): +// +// class Decimal (default export) +// type Decimal.Constructor +// type Decimal.Instance +// type Decimal.Modulo +// type Decimal.Rounding +// type Decimal.Value +// interface Decimal.Config +// +// Example (alternative syntax commented-out): +// +// import {Decimal} from "decimal.js" +// //import Decimal from "decimal.js" +// +// let r: Decimal.Rounding = Decimal.ROUND_UP; +// let c: Decimal.Configuration = {precision: 4, rounding: r}; +// Decimal.set(c); +// let v: Decimal.Value = '12345.6789'; +// let d: Decimal = new Decimal(v); +// //let d: Decimal.Instance = new Decimal(v); +// +// The use of compiler option `--strictNullChecks` is recommended. + +export default Decimal; + +export namespace Decimal { + export type Config = DecimalConfig; + export type Constructor = DecimalConstructor; + export type Instance = DecimalInstance; + export type Modulo = DecimalModulo; + export type Rounding = DecimalRounding; + export type Value = DecimalValue; +} + +declare global { + const Decimal: DecimalConstructor; + type Decimal = DecimalInstance; + + namespace Decimal { + type Config = DecimalConfig; + type Constructor = DecimalConstructor; + type Instance = DecimalInstance; + type Modulo = DecimalModulo; + type Rounding = DecimalRounding; + type Value = DecimalValue; + } +} + +type DecimalInstance = Decimal; +type DecimalConstructor = typeof Decimal; +type DecimalValue = string | number | Decimal; +type DecimalRounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; +type DecimalModulo = DecimalRounding | 9; + +// http://mikemcl.github.io/decimal.js/#constructor-properties +interface DecimalConfig { + precision?: number; + rounding?: DecimalRounding; + toExpNeg?: number; + toExpPos?: number; + minE?: number; + maxE?: number; + crypto?: boolean; + modulo?: DecimalModulo; + defaults?: boolean; +} + +export declare class Decimal { + readonly d: number[]; + readonly e: number; + readonly s: number; + private readonly name: string; + + constructor(n: DecimalValue); + + absoluteValue(): Decimal; + abs(): Decimal; + + ceil(): Decimal; + + comparedTo(n: DecimalValue): number; + cmp(n: DecimalValue): number; + + cosine(): Decimal; + cos(): Decimal; + + cubeRoot(): Decimal; + cbrt(): Decimal; + + decimalPlaces(): number; + dp(): number; + + dividedBy(n: DecimalValue): Decimal; + div(n: DecimalValue): Decimal; + + dividedToIntegerBy(n: DecimalValue): Decimal; + divToInt(n: DecimalValue): Decimal; + + equals(n: DecimalValue): boolean; + eq(n: DecimalValue): boolean; + + floor(): Decimal; + + greaterThan(n: DecimalValue): boolean; + gt(n: DecimalValue): boolean; + + greaterThanOrEqualTo(n: DecimalValue): boolean; + gte(n: DecimalValue): boolean; + + hyperbolicCosine(): Decimal; + cosh(): Decimal; + + hyperbolicSine(): Decimal; + sinh(): Decimal; + + hyperbolicTangent(): Decimal; + tanh(): Decimal; + + inverseCosine(): Decimal; + acos(): Decimal; + + inverseHyperbolicCosine(): Decimal; + acosh(): Decimal; + + inverseHyperbolicSine(): Decimal; + asinh(): Decimal; + + inverseHyperbolicTangent(): Decimal; + atanh(): Decimal; + + inverseSine(): Decimal; + asin(): Decimal; + + inverseTangent(): Decimal; + atan(): Decimal; + + isFinite(): boolean; + + isInteger(): boolean; + isInt(): boolean; + + isNaN(): boolean; + + isNegative(): boolean; + isNeg(): boolean; + + isPositive(): boolean; + isPos(): boolean; + + isZero(): boolean; + + lessThan(n: DecimalValue): boolean; + lt(n: DecimalValue): boolean; + + lessThanOrEqualTo(n: DecimalValue): boolean; + lte(n: DecimalValue): boolean; + + logarithm(n?: DecimalValue): Decimal; + log(n?: DecimalValue): Decimal; + + minus(n: DecimalValue): Decimal; + sub(n: DecimalValue): Decimal; + + modulo(n: DecimalValue): Decimal; + mod(n: DecimalValue): Decimal; + + naturalExponential(): Decimal; + exp(): Decimal; + + naturalLogarithm(): Decimal; + ln(): Decimal; + + negated(): Decimal; + neg(): Decimal; + + plus(n: DecimalValue): Decimal; + add(n: DecimalValue): Decimal; + + precision(includeZeros?: boolean): number; + sd(includeZeros?: boolean): number; + + round(): Decimal; + + sine() : Decimal; + sin() : Decimal; + + squareRoot(): Decimal; + sqrt(): Decimal; + + tangent() : Decimal; + tan() : Decimal; + + times(n: DecimalValue): Decimal; + mul(n: DecimalValue) : Decimal; + + toBinary(significantDigits?: number): string; + toBinary(significantDigits: number, rounding: DecimalRounding): string; + + toDecimalPlaces(decimalPlaces?: number): Decimal; + toDecimalPlaces(decimalPlaces: number, rounding: DecimalRounding): Decimal; + toDP(decimalPlaces?: number): Decimal; + toDP(decimalPlaces: number, rounding: DecimalRounding): Decimal; + + toExponential(decimalPlaces?: number): string; + toExponential(decimalPlaces: number, rounding: DecimalRounding): string; + + toFixed(decimalPlaces?: number): string; + toFixed(decimalPlaces: number, rounding: DecimalRounding): string; + + toFraction(max_denominator?: DecimalValue): Decimal[]; + + toHexadecimal(significantDigits?: number): string; + toHexadecimal(significantDigits: number, rounding: DecimalRounding): string; + toHex(significantDigits?: number): string; + toHex(significantDigits: number, rounding?: DecimalRounding): string; + + toJSON(): string; + + toNearest(n: DecimalValue, rounding?: DecimalRounding): Decimal; + + toNumber(): number; + + toOctal(significantDigits?: number): string; + toOctal(significantDigits: number, rounding: DecimalRounding): string; + + toPower(n: DecimalValue): Decimal; + pow(n: DecimalValue): Decimal; + + toPrecision(significantDigits?: number): string; + toPrecision(significantDigits: number, rounding: DecimalRounding): string; + + toSignificantDigits(significantDigits?: number): Decimal; + toSignificantDigits(significantDigits: number, rounding: DecimalRounding): Decimal; + toSD(significantDigits?: number): Decimal; + toSD(significantDigits: number, rounding: DecimalRounding): Decimal; + + toString(): string; + + truncated(): Decimal; + trunc(): Decimal; + + valueOf(): string; + + static abs(n: DecimalValue): Decimal; + static acos(n: DecimalValue): Decimal; + static acosh(n: DecimalValue): Decimal; + static add(x: DecimalValue, y: DecimalValue): Decimal; + static asin(n: DecimalValue): Decimal; + static asinh(n: DecimalValue): Decimal; + static atan(n: DecimalValue): Decimal; + static atanh(n: DecimalValue): Decimal; + static atan2(y: DecimalValue, x: DecimalValue): Decimal; + static cbrt(n: DecimalValue): Decimal; + static ceil(n: DecimalValue): Decimal; + static clone(object?: DecimalConfig): DecimalConstructor; + static config(object: DecimalConfig): DecimalConstructor; + static cos(n: DecimalValue): Decimal; + static cosh(n: DecimalValue): Decimal; + static div(x: DecimalValue, y: DecimalValue): Decimal; + static exp(n: DecimalValue): Decimal; + static floor(n: DecimalValue): Decimal; + static hypot(...n: DecimalValue[]): Decimal; + static isDecimal(object: any): boolean + static ln(n: DecimalValue): Decimal; + static log(n: DecimalValue, base?: DecimalValue): Decimal; + static log2(n: DecimalValue): Decimal; + static log10(n: DecimalValue): Decimal; + static max(...n: DecimalValue[]): Decimal; + static min(...n: DecimalValue[]): Decimal; + static mod(x: DecimalValue, y: DecimalValue): Decimal; + static mul(x: DecimalValue, y: DecimalValue): Decimal; + static noConflict(): DecimalConstructor; // Browser only + static pow(base: DecimalValue, exponent: DecimalValue): Decimal; + static random(significantDigits?: number): Decimal; + static round(n: DecimalValue): Decimal; + static set(object: DecimalConfig): DecimalConstructor; + static sign(n: DecimalValue): Decimal; + static sin(n: DecimalValue): Decimal; + static sinh(n: DecimalValue): Decimal; + static sqrt(n: DecimalValue): Decimal; + static sub(x: DecimalValue, y: DecimalValue): Decimal; + static tan(n: DecimalValue): Decimal; + static tanh(n: DecimalValue): Decimal; + static trunc(n: DecimalValue): Decimal; + + static readonly default?: DecimalConstructor; + static readonly Decimal?: DecimalConstructor; + + static readonly precision: number; + static readonly rounding: DecimalRounding; + static readonly toExpNeg: number; + static readonly toExpPos: number; + static readonly minE: number; + static readonly maxE: number; + static readonly crypto: boolean; + static readonly modulo: DecimalModulo; + + static readonly ROUND_UP: 0; + static readonly ROUND_DOWN: 1; + static readonly ROUND_CEIL: 2; + static readonly ROUND_FLOOR: 3; + static readonly ROUND_HALF_UP: 4; + static readonly ROUND_HALF_DOWN: 5; + static readonly ROUND_HALF_EVEN: 6; + static readonly ROUND_HALF_CEIL: 7; + static readonly ROUND_HALF_FLOOR: 8; + static readonly EUCLID: 9; +} diff --git a/node_modules/decimal.js/decimal.js b/node_modules/decimal.js/decimal.js new file mode 100644 index 0000000..c5361ee --- /dev/null +++ b/node_modules/decimal.js/decimal.js @@ -0,0 +1,4877 @@ +;(function (globalScope) { + 'use strict'; + + + /* + * decimal.js v10.2.1 + * An arbitrary-precision Decimal type for JavaScript. + * https://github.com/MikeMcl/decimal.js + * Copyright (c) 2020 Michael Mclaughlin + * MIT Licence + */ + + + // ----------------------------------- EDITABLE DEFAULTS ------------------------------------ // + + + // The maximum exponent magnitude. + // The limit on the value of `toExpNeg`, `toExpPos`, `minE` and `maxE`. + var EXP_LIMIT = 9e15, // 0 to 9e15 + + // The limit on the value of `precision`, and on the value of the first argument to + // `toDecimalPlaces`, `toExponential`, `toFixed`, `toPrecision` and `toSignificantDigits`. + MAX_DIGITS = 1e9, // 0 to 1e9 + + // Base conversion alphabet. + NUMERALS = '0123456789abcdef', + + // The natural logarithm of 10 (1025 digits). + LN10 = '2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058', + + // Pi (1025 digits). + PI = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789', + + + // The initial configuration properties of the Decimal constructor. + DEFAULTS = { + + // These values must be integers within the stated ranges (inclusive). + // Most of these values can be changed at run-time using the `Decimal.config` method. + + // The maximum number of significant digits of the result of a calculation or base conversion. + // E.g. `Decimal.config({ precision: 20 });` + precision: 20, // 1 to MAX_DIGITS + + // The rounding mode used when rounding to `precision`. + // + // ROUND_UP 0 Away from zero. + // ROUND_DOWN 1 Towards zero. + // ROUND_CEIL 2 Towards +Infinity. + // ROUND_FLOOR 3 Towards -Infinity. + // ROUND_HALF_UP 4 Towards nearest neighbour. If equidistant, up. + // ROUND_HALF_DOWN 5 Towards nearest neighbour. If equidistant, down. + // ROUND_HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour. + // ROUND_HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity. + // ROUND_HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity. + // + // E.g. + // `Decimal.rounding = 4;` + // `Decimal.rounding = Decimal.ROUND_HALF_UP;` + rounding: 4, // 0 to 8 + + // The modulo mode used when calculating the modulus: a mod n. + // The quotient (q = a / n) is calculated according to the corresponding rounding mode. + // The remainder (r) is calculated as: r = a - n * q. + // + // UP 0 The remainder is positive if the dividend is negative, else is negative. + // DOWN 1 The remainder has the same sign as the dividend (JavaScript %). + // FLOOR 3 The remainder has the same sign as the divisor (Python %). + // HALF_EVEN 6 The IEEE 754 remainder function. + // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). Always positive. + // + // Truncated division (1), floored division (3), the IEEE 754 remainder (6), and Euclidian + // division (9) are commonly used for the modulus operation. The other rounding modes can also + // be used, but they may not give useful results. + modulo: 1, // 0 to 9 + + // The exponent value at and beneath which `toString` returns exponential notation. + // JavaScript numbers: -7 + toExpNeg: -7, // 0 to -EXP_LIMIT + + // The exponent value at and above which `toString` returns exponential notation. + // JavaScript numbers: 21 + toExpPos: 21, // 0 to EXP_LIMIT + + // The minimum exponent value, beneath which underflow to zero occurs. + // JavaScript numbers: -324 (5e-324) + minE: -EXP_LIMIT, // -1 to -EXP_LIMIT + + // The maximum exponent value, above which overflow to Infinity occurs. + // JavaScript numbers: 308 (1.7976931348623157e+308) + maxE: EXP_LIMIT, // 1 to EXP_LIMIT + + // Whether to use cryptographically-secure random number generation, if available. + crypto: false // true/false + }, + + + // ----------------------------------- END OF EDITABLE DEFAULTS ------------------------------- // + + + Decimal, inexact, noConflict, quadrant, + external = true, + + decimalError = '[DecimalError] ', + invalidArgument = decimalError + 'Invalid argument: ', + precisionLimitExceeded = decimalError + 'Precision limit exceeded', + cryptoUnavailable = decimalError + 'crypto unavailable', + + mathfloor = Math.floor, + mathpow = Math.pow, + + isBinary = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, + isHex = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, + isOctal = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, + isDecimal = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, + + BASE = 1e7, + LOG_BASE = 7, + MAX_SAFE_INTEGER = 9007199254740991, + + LN10_PRECISION = LN10.length - 1, + PI_PRECISION = PI.length - 1, + + // Decimal.prototype object + P = { name: '[object Decimal]' }; + + + // Decimal prototype methods + + + /* + * absoluteValue abs + * ceil + * comparedTo cmp + * cosine cos + * cubeRoot cbrt + * decimalPlaces dp + * dividedBy div + * dividedToIntegerBy divToInt + * equals eq + * floor + * greaterThan gt + * greaterThanOrEqualTo gte + * hyperbolicCosine cosh + * hyperbolicSine sinh + * hyperbolicTangent tanh + * inverseCosine acos + * inverseHyperbolicCosine acosh + * inverseHyperbolicSine asinh + * inverseHyperbolicTangent atanh + * inverseSine asin + * inverseTangent atan + * isFinite + * isInteger isInt + * isNaN + * isNegative isNeg + * isPositive isPos + * isZero + * lessThan lt + * lessThanOrEqualTo lte + * logarithm log + * [maximum] [max] + * [minimum] [min] + * minus sub + * modulo mod + * naturalExponential exp + * naturalLogarithm ln + * negated neg + * plus add + * precision sd + * round + * sine sin + * squareRoot sqrt + * tangent tan + * times mul + * toBinary + * toDecimalPlaces toDP + * toExponential + * toFixed + * toFraction + * toHexadecimal toHex + * toNearest + * toNumber + * toOctal + * toPower pow + * toPrecision + * toSignificantDigits toSD + * toString + * truncated trunc + * valueOf toJSON + */ + + + /* + * Return a new Decimal whose value is the absolute value of this Decimal. + * + */ + P.absoluteValue = P.abs = function () { + var x = new this.constructor(this); + if (x.s < 0) x.s = 1; + return finalise(x); + }; + + + /* + * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the + * direction of positive Infinity. + * + */ + P.ceil = function () { + return finalise(new this.constructor(this), this.e + 1, 2); + }; + + + /* + * Return + * 1 if the value of this Decimal is greater than the value of `y`, + * -1 if the value of this Decimal is less than the value of `y`, + * 0 if they have the same value, + * NaN if the value of either Decimal is NaN. + * + */ + P.comparedTo = P.cmp = function (y) { + var i, j, xdL, ydL, + x = this, + xd = x.d, + yd = (y = new x.constructor(y)).d, + xs = x.s, + ys = y.s; + + // Either NaN or ±Infinity? + if (!xd || !yd) { + return !xs || !ys ? NaN : xs !== ys ? xs : xd === yd ? 0 : !xd ^ xs < 0 ? 1 : -1; + } + + // Either zero? + if (!xd[0] || !yd[0]) return xd[0] ? xs : yd[0] ? -ys : 0; + + // Signs differ? + if (xs !== ys) return xs; + + // Compare exponents. + if (x.e !== y.e) return x.e > y.e ^ xs < 0 ? 1 : -1; + + xdL = xd.length; + ydL = yd.length; + + // Compare digit by digit. + for (i = 0, j = xdL < ydL ? xdL : ydL; i < j; ++i) { + if (xd[i] !== yd[i]) return xd[i] > yd[i] ^ xs < 0 ? 1 : -1; + } + + // Compare lengths. + return xdL === ydL ? 0 : xdL > ydL ^ xs < 0 ? 1 : -1; + }; + + + /* + * Return a new Decimal whose value is the cosine of the value in radians of this Decimal. + * + * Domain: [-Infinity, Infinity] + * Range: [-1, 1] + * + * cos(0) = 1 + * cos(-0) = 1 + * cos(Infinity) = NaN + * cos(-Infinity) = NaN + * cos(NaN) = NaN + * + */ + P.cosine = P.cos = function () { + var pr, rm, + x = this, + Ctor = x.constructor; + + if (!x.d) return new Ctor(NaN); + + // cos(0) = cos(-0) = 1 + if (!x.d[0]) return new Ctor(1); + + pr = Ctor.precision; + rm = Ctor.rounding; + Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE; + Ctor.rounding = 1; + + x = cosine(Ctor, toLessThanHalfPi(Ctor, x)); + + Ctor.precision = pr; + Ctor.rounding = rm; + + return finalise(quadrant == 2 || quadrant == 3 ? x.neg() : x, pr, rm, true); + }; + + + /* + * + * Return a new Decimal whose value is the cube root of the value of this Decimal, rounded to + * `precision` significant digits using rounding mode `rounding`. + * + * cbrt(0) = 0 + * cbrt(-0) = -0 + * cbrt(1) = 1 + * cbrt(-1) = -1 + * cbrt(N) = N + * cbrt(-I) = -I + * cbrt(I) = I + * + * Math.cbrt(x) = (x < 0 ? -Math.pow(-x, 1/3) : Math.pow(x, 1/3)) + * + */ + P.cubeRoot = P.cbrt = function () { + var e, m, n, r, rep, s, sd, t, t3, t3plusx, + x = this, + Ctor = x.constructor; + + if (!x.isFinite() || x.isZero()) return new Ctor(x); + external = false; + + // Initial estimate. + s = x.s * mathpow(x.s * x, 1 / 3); + + // Math.cbrt underflow/overflow? + // Pass x to Math.pow as integer, then adjust the exponent of the result. + if (!s || Math.abs(s) == 1 / 0) { + n = digitsToString(x.d); + e = x.e; + + // Adjust n exponent so it is a multiple of 3 away from x exponent. + if (s = (e - n.length + 1) % 3) n += (s == 1 || s == -2 ? '0' : '00'); + s = mathpow(n, 1 / 3); + + // Rarely, e may be one less than the result exponent value. + e = mathfloor((e + 1) / 3) - (e % 3 == (e < 0 ? -1 : 2)); + + if (s == 1 / 0) { + n = '5e' + e; + } else { + n = s.toExponential(); + n = n.slice(0, n.indexOf('e') + 1) + e; + } + + r = new Ctor(n); + r.s = x.s; + } else { + r = new Ctor(s.toString()); + } + + sd = (e = Ctor.precision) + 3; + + // Halley's method. + // TODO? Compare Newton's method. + for (;;) { + t = r; + t3 = t.times(t).times(t); + t3plusx = t3.plus(x); + r = divide(t3plusx.plus(x).times(t), t3plusx.plus(t3), sd + 2, 1); + + // TODO? Replace with for-loop and checkRoundingDigits. + if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) { + n = n.slice(sd - 3, sd + 1); + + // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or 4999 + // , i.e. approaching a rounding boundary, continue the iteration. + if (n == '9999' || !rep && n == '4999') { + + // On the first iteration only, check to see if rounding up gives the exact result as the + // nines may infinitely repeat. + if (!rep) { + finalise(t, e + 1, 0); + + if (t.times(t).times(t).eq(x)) { + r = t; + break; + } + } + + sd += 4; + rep = 1; + } else { + + // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result. + // If not, then there are further digits and m will be truthy. + if (!+n || !+n.slice(1) && n.charAt(0) == '5') { + + // Truncate to the first rounding digit. + finalise(r, e + 1, 1); + m = !r.times(r).times(r).eq(x); + } + + break; + } + } + } + + external = true; + + return finalise(r, e, Ctor.rounding, m); + }; + + + /* + * Return the number of decimal places of the value of this Decimal. + * + */ + P.decimalPlaces = P.dp = function () { + var w, + d = this.d, + n = NaN; + + if (d) { + w = d.length - 1; + n = (w - mathfloor(this.e / LOG_BASE)) * LOG_BASE; + + // Subtract the number of trailing zeros of the last word. + w = d[w]; + if (w) for (; w % 10 == 0; w /= 10) n--; + if (n < 0) n = 0; + } + + return n; + }; + + + /* + * n / 0 = I + * n / N = N + * n / I = 0 + * 0 / n = 0 + * 0 / 0 = N + * 0 / N = N + * 0 / I = 0 + * N / n = N + * N / 0 = N + * N / N = N + * N / I = N + * I / n = I + * I / 0 = I + * I / N = N + * I / I = N + * + * Return a new Decimal whose value is the value of this Decimal divided by `y`, rounded to + * `precision` significant digits using rounding mode `rounding`. + * + */ + P.dividedBy = P.div = function (y) { + return divide(this, new this.constructor(y)); + }; + + + /* + * Return a new Decimal whose value is the integer part of dividing the value of this Decimal + * by the value of `y`, rounded to `precision` significant digits using rounding mode `rounding`. + * + */ + P.dividedToIntegerBy = P.divToInt = function (y) { + var x = this, + Ctor = x.constructor; + return finalise(divide(x, new Ctor(y), 0, 1, 1), Ctor.precision, Ctor.rounding); + }; + + + /* + * Return true if the value of this Decimal is equal to the value of `y`, otherwise return false. + * + */ + P.equals = P.eq = function (y) { + return this.cmp(y) === 0; + }; + + + /* + * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the + * direction of negative Infinity. + * + */ + P.floor = function () { + return finalise(new this.constructor(this), this.e + 1, 3); + }; + + + /* + * Return true if the value of this Decimal is greater than the value of `y`, otherwise return + * false. + * + */ + P.greaterThan = P.gt = function (y) { + return this.cmp(y) > 0; + }; + + + /* + * Return true if the value of this Decimal is greater than or equal to the value of `y`, + * otherwise return false. + * + */ + P.greaterThanOrEqualTo = P.gte = function (y) { + var k = this.cmp(y); + return k == 1 || k === 0; + }; + + + /* + * Return a new Decimal whose value is the hyperbolic cosine of the value in radians of this + * Decimal. + * + * Domain: [-Infinity, Infinity] + * Range: [1, Infinity] + * + * cosh(x) = 1 + x^2/2! + x^4/4! + x^6/6! + ... + * + * cosh(0) = 1 + * cosh(-0) = 1 + * cosh(Infinity) = Infinity + * cosh(-Infinity) = Infinity + * cosh(NaN) = NaN + * + * x time taken (ms) result + * 1000 9 9.8503555700852349694e+433 + * 10000 25 4.4034091128314607936e+4342 + * 100000 171 1.4033316802130615897e+43429 + * 1000000 3817 1.5166076984010437725e+434294 + * 10000000 abandoned after 2 minute wait + * + * TODO? Compare performance of cosh(x) = 0.5 * (exp(x) + exp(-x)) + * + */ + P.hyperbolicCosine = P.cosh = function () { + var k, n, pr, rm, len, + x = this, + Ctor = x.constructor, + one = new Ctor(1); + + if (!x.isFinite()) return new Ctor(x.s ? 1 / 0 : NaN); + if (x.isZero()) return one; + + pr = Ctor.precision; + rm = Ctor.rounding; + Ctor.precision = pr + Math.max(x.e, x.sd()) + 4; + Ctor.rounding = 1; + len = x.d.length; + + // Argument reduction: cos(4x) = 1 - 8cos^2(x) + 8cos^4(x) + 1 + // i.e. cos(x) = 1 - cos^2(x/4)(8 - 8cos^2(x/4)) + + // Estimate the optimum number of times to use the argument reduction. + // TODO? Estimation reused from cosine() and may not be optimal here. + if (len < 32) { + k = Math.ceil(len / 3); + n = (1 / tinyPow(4, k)).toString(); + } else { + k = 16; + n = '2.3283064365386962890625e-10'; + } + + x = taylorSeries(Ctor, 1, x.times(n), new Ctor(1), true); + + // Reverse argument reduction + var cosh2_x, + i = k, + d8 = new Ctor(8); + for (; i--;) { + cosh2_x = x.times(x); + x = one.minus(cosh2_x.times(d8.minus(cosh2_x.times(d8)))); + } + + return finalise(x, Ctor.precision = pr, Ctor.rounding = rm, true); + }; + + + /* + * Return a new Decimal whose value is the hyperbolic sine of the value in radians of this + * Decimal. + * + * Domain: [-Infinity, Infinity] + * Range: [-Infinity, Infinity] + * + * sinh(x) = x + x^3/3! + x^5/5! + x^7/7! + ... + * + * sinh(0) = 0 + * sinh(-0) = -0 + * sinh(Infinity) = Infinity + * sinh(-Infinity) = -Infinity + * sinh(NaN) = NaN + * + * x time taken (ms) + * 10 2 ms + * 100 5 ms + * 1000 14 ms + * 10000 82 ms + * 100000 886 ms 1.4033316802130615897e+43429 + * 200000 2613 ms + * 300000 5407 ms + * 400000 8824 ms + * 500000 13026 ms 8.7080643612718084129e+217146 + * 1000000 48543 ms + * + * TODO? Compare performance of sinh(x) = 0.5 * (exp(x) - exp(-x)) + * + */ + P.hyperbolicSine = P.sinh = function () { + var k, pr, rm, len, + x = this, + Ctor = x.constructor; + + if (!x.isFinite() || x.isZero()) return new Ctor(x); + + pr = Ctor.precision; + rm = Ctor.rounding; + Ctor.precision = pr + Math.max(x.e, x.sd()) + 4; + Ctor.rounding = 1; + len = x.d.length; + + if (len < 3) { + x = taylorSeries(Ctor, 2, x, x, true); + } else { + + // Alternative argument reduction: sinh(3x) = sinh(x)(3 + 4sinh^2(x)) + // i.e. sinh(x) = sinh(x/3)(3 + 4sinh^2(x/3)) + // 3 multiplications and 1 addition + + // Argument reduction: sinh(5x) = sinh(x)(5 + sinh^2(x)(20 + 16sinh^2(x))) + // i.e. sinh(x) = sinh(x/5)(5 + sinh^2(x/5)(20 + 16sinh^2(x/5))) + // 4 multiplications and 2 additions + + // Estimate the optimum number of times to use the argument reduction. + k = 1.4 * Math.sqrt(len); + k = k > 16 ? 16 : k | 0; + + x = x.times(1 / tinyPow(5, k)); + x = taylorSeries(Ctor, 2, x, x, true); + + // Reverse argument reduction + var sinh2_x, + d5 = new Ctor(5), + d16 = new Ctor(16), + d20 = new Ctor(20); + for (; k--;) { + sinh2_x = x.times(x); + x = x.times(d5.plus(sinh2_x.times(d16.times(sinh2_x).plus(d20)))); + } + } + + Ctor.precision = pr; + Ctor.rounding = rm; + + return finalise(x, pr, rm, true); + }; + + + /* + * Return a new Decimal whose value is the hyperbolic tangent of the value in radians of this + * Decimal. + * + * Domain: [-Infinity, Infinity] + * Range: [-1, 1] + * + * tanh(x) = sinh(x) / cosh(x) + * + * tanh(0) = 0 + * tanh(-0) = -0 + * tanh(Infinity) = 1 + * tanh(-Infinity) = -1 + * tanh(NaN) = NaN + * + */ + P.hyperbolicTangent = P.tanh = function () { + var pr, rm, + x = this, + Ctor = x.constructor; + + if (!x.isFinite()) return new Ctor(x.s); + if (x.isZero()) return new Ctor(x); + + pr = Ctor.precision; + rm = Ctor.rounding; + Ctor.precision = pr + 7; + Ctor.rounding = 1; + + return divide(x.sinh(), x.cosh(), Ctor.precision = pr, Ctor.rounding = rm); + }; + + + /* + * Return a new Decimal whose value is the arccosine (inverse cosine) in radians of the value of + * this Decimal. + * + * Domain: [-1, 1] + * Range: [0, pi] + * + * acos(x) = pi/2 - asin(x) + * + * acos(0) = pi/2 + * acos(-0) = pi/2 + * acos(1) = 0 + * acos(-1) = pi + * acos(1/2) = pi/3 + * acos(-1/2) = 2*pi/3 + * acos(|x| > 1) = NaN + * acos(NaN) = NaN + * + */ + P.inverseCosine = P.acos = function () { + var halfPi, + x = this, + Ctor = x.constructor, + k = x.abs().cmp(1), + pr = Ctor.precision, + rm = Ctor.rounding; + + if (k !== -1) { + return k === 0 + // |x| is 1 + ? x.isNeg() ? getPi(Ctor, pr, rm) : new Ctor(0) + // |x| > 1 or x is NaN + : new Ctor(NaN); + } + + if (x.isZero()) return getPi(Ctor, pr + 4, rm).times(0.5); + + // TODO? Special case acos(0.5) = pi/3 and acos(-0.5) = 2*pi/3 + + Ctor.precision = pr + 6; + Ctor.rounding = 1; + + x = x.asin(); + halfPi = getPi(Ctor, pr + 4, rm).times(0.5); + + Ctor.precision = pr; + Ctor.rounding = rm; + + return halfPi.minus(x); + }; + + + /* + * Return a new Decimal whose value is the inverse of the hyperbolic cosine in radians of the + * value of this Decimal. + * + * Domain: [1, Infinity] + * Range: [0, Infinity] + * + * acosh(x) = ln(x + sqrt(x^2 - 1)) + * + * acosh(x < 1) = NaN + * acosh(NaN) = NaN + * acosh(Infinity) = Infinity + * acosh(-Infinity) = NaN + * acosh(0) = NaN + * acosh(-0) = NaN + * acosh(1) = 0 + * acosh(-1) = NaN + * + */ + P.inverseHyperbolicCosine = P.acosh = function () { + var pr, rm, + x = this, + Ctor = x.constructor; + + if (x.lte(1)) return new Ctor(x.eq(1) ? 0 : NaN); + if (!x.isFinite()) return new Ctor(x); + + pr = Ctor.precision; + rm = Ctor.rounding; + Ctor.precision = pr + Math.max(Math.abs(x.e), x.sd()) + 4; + Ctor.rounding = 1; + external = false; + + x = x.times(x).minus(1).sqrt().plus(x); + + external = true; + Ctor.precision = pr; + Ctor.rounding = rm; + + return x.ln(); + }; + + + /* + * Return a new Decimal whose value is the inverse of the hyperbolic sine in radians of the value + * of this Decimal. + * + * Domain: [-Infinity, Infinity] + * Range: [-Infinity, Infinity] + * + * asinh(x) = ln(x + sqrt(x^2 + 1)) + * + * asinh(NaN) = NaN + * asinh(Infinity) = Infinity + * asinh(-Infinity) = -Infinity + * asinh(0) = 0 + * asinh(-0) = -0 + * + */ + P.inverseHyperbolicSine = P.asinh = function () { + var pr, rm, + x = this, + Ctor = x.constructor; + + if (!x.isFinite() || x.isZero()) return new Ctor(x); + + pr = Ctor.precision; + rm = Ctor.rounding; + Ctor.precision = pr + 2 * Math.max(Math.abs(x.e), x.sd()) + 6; + Ctor.rounding = 1; + external = false; + + x = x.times(x).plus(1).sqrt().plus(x); + + external = true; + Ctor.precision = pr; + Ctor.rounding = rm; + + return x.ln(); + }; + + + /* + * Return a new Decimal whose value is the inverse of the hyperbolic tangent in radians of the + * value of this Decimal. + * + * Domain: [-1, 1] + * Range: [-Infinity, Infinity] + * + * atanh(x) = 0.5 * ln((1 + x) / (1 - x)) + * + * atanh(|x| > 1) = NaN + * atanh(NaN) = NaN + * atanh(Infinity) = NaN + * atanh(-Infinity) = NaN + * atanh(0) = 0 + * atanh(-0) = -0 + * atanh(1) = Infinity + * atanh(-1) = -Infinity + * + */ + P.inverseHyperbolicTangent = P.atanh = function () { + var pr, rm, wpr, xsd, + x = this, + Ctor = x.constructor; + + if (!x.isFinite()) return new Ctor(NaN); + if (x.e >= 0) return new Ctor(x.abs().eq(1) ? x.s / 0 : x.isZero() ? x : NaN); + + pr = Ctor.precision; + rm = Ctor.rounding; + xsd = x.sd(); + + if (Math.max(xsd, pr) < 2 * -x.e - 1) return finalise(new Ctor(x), pr, rm, true); + + Ctor.precision = wpr = xsd - x.e; + + x = divide(x.plus(1), new Ctor(1).minus(x), wpr + pr, 1); + + Ctor.precision = pr + 4; + Ctor.rounding = 1; + + x = x.ln(); + + Ctor.precision = pr; + Ctor.rounding = rm; + + return x.times(0.5); + }; + + + /* + * Return a new Decimal whose value is the arcsine (inverse sine) in radians of the value of this + * Decimal. + * + * Domain: [-Infinity, Infinity] + * Range: [-pi/2, pi/2] + * + * asin(x) = 2*atan(x/(1 + sqrt(1 - x^2))) + * + * asin(0) = 0 + * asin(-0) = -0 + * asin(1/2) = pi/6 + * asin(-1/2) = -pi/6 + * asin(1) = pi/2 + * asin(-1) = -pi/2 + * asin(|x| > 1) = NaN + * asin(NaN) = NaN + * + * TODO? Compare performance of Taylor series. + * + */ + P.inverseSine = P.asin = function () { + var halfPi, k, + pr, rm, + x = this, + Ctor = x.constructor; + + if (x.isZero()) return new Ctor(x); + + k = x.abs().cmp(1); + pr = Ctor.precision; + rm = Ctor.rounding; + + if (k !== -1) { + + // |x| is 1 + if (k === 0) { + halfPi = getPi(Ctor, pr + 4, rm).times(0.5); + halfPi.s = x.s; + return halfPi; + } + + // |x| > 1 or x is NaN + return new Ctor(NaN); + } + + // TODO? Special case asin(1/2) = pi/6 and asin(-1/2) = -pi/6 + + Ctor.precision = pr + 6; + Ctor.rounding = 1; + + x = x.div(new Ctor(1).minus(x.times(x)).sqrt().plus(1)).atan(); + + Ctor.precision = pr; + Ctor.rounding = rm; + + return x.times(2); + }; + + + /* + * Return a new Decimal whose value is the arctangent (inverse tangent) in radians of the value + * of this Decimal. + * + * Domain: [-Infinity, Infinity] + * Range: [-pi/2, pi/2] + * + * atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ... + * + * atan(0) = 0 + * atan(-0) = -0 + * atan(1) = pi/4 + * atan(-1) = -pi/4 + * atan(Infinity) = pi/2 + * atan(-Infinity) = -pi/2 + * atan(NaN) = NaN + * + */ + P.inverseTangent = P.atan = function () { + var i, j, k, n, px, t, r, wpr, x2, + x = this, + Ctor = x.constructor, + pr = Ctor.precision, + rm = Ctor.rounding; + + if (!x.isFinite()) { + if (!x.s) return new Ctor(NaN); + if (pr + 4 <= PI_PRECISION) { + r = getPi(Ctor, pr + 4, rm).times(0.5); + r.s = x.s; + return r; + } + } else if (x.isZero()) { + return new Ctor(x); + } else if (x.abs().eq(1) && pr + 4 <= PI_PRECISION) { + r = getPi(Ctor, pr + 4, rm).times(0.25); + r.s = x.s; + return r; + } + + Ctor.precision = wpr = pr + 10; + Ctor.rounding = 1; + + // TODO? if (x >= 1 && pr <= PI_PRECISION) atan(x) = halfPi * x.s - atan(1 / x); + + // Argument reduction + // Ensure |x| < 0.42 + // atan(x) = 2 * atan(x / (1 + sqrt(1 + x^2))) + + k = Math.min(28, wpr / LOG_BASE + 2 | 0); + + for (i = k; i; --i) x = x.div(x.times(x).plus(1).sqrt().plus(1)); + + external = false; + + j = Math.ceil(wpr / LOG_BASE); + n = 1; + x2 = x.times(x); + r = new Ctor(x); + px = x; + + // atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ... + for (; i !== -1;) { + px = px.times(x2); + t = r.minus(px.div(n += 2)); + + px = px.times(x2); + r = t.plus(px.div(n += 2)); + + if (r.d[j] !== void 0) for (i = j; r.d[i] === t.d[i] && i--;); + } + + if (k) r = r.times(2 << (k - 1)); + + external = true; + + return finalise(r, Ctor.precision = pr, Ctor.rounding = rm, true); + }; + + + /* + * Return true if the value of this Decimal is a finite number, otherwise return false. + * + */ + P.isFinite = function () { + return !!this.d; + }; + + + /* + * Return true if the value of this Decimal is an integer, otherwise return false. + * + */ + P.isInteger = P.isInt = function () { + return !!this.d && mathfloor(this.e / LOG_BASE) > this.d.length - 2; + }; + + + /* + * Return true if the value of this Decimal is NaN, otherwise return false. + * + */ + P.isNaN = function () { + return !this.s; + }; + + + /* + * Return true if the value of this Decimal is negative, otherwise return false. + * + */ + P.isNegative = P.isNeg = function () { + return this.s < 0; + }; + + + /* + * Return true if the value of this Decimal is positive, otherwise return false. + * + */ + P.isPositive = P.isPos = function () { + return this.s > 0; + }; + + + /* + * Return true if the value of this Decimal is 0 or -0, otherwise return false. + * + */ + P.isZero = function () { + return !!this.d && this.d[0] === 0; + }; + + + /* + * Return true if the value of this Decimal is less than `y`, otherwise return false. + * + */ + P.lessThan = P.lt = function (y) { + return this.cmp(y) < 0; + }; + + + /* + * Return true if the value of this Decimal is less than or equal to `y`, otherwise return false. + * + */ + P.lessThanOrEqualTo = P.lte = function (y) { + return this.cmp(y) < 1; + }; + + + /* + * Return the logarithm of the value of this Decimal to the specified base, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + * If no base is specified, return log[10](arg). + * + * log[base](arg) = ln(arg) / ln(base) + * + * The result will always be correctly rounded if the base of the log is 10, and 'almost always' + * otherwise: + * + * Depending on the rounding mode, the result may be incorrectly rounded if the first fifteen + * rounding digits are [49]99999999999999 or [50]00000000000000. In that case, the maximum error + * between the result and the correctly rounded result will be one ulp (unit in the last place). + * + * log[-b](a) = NaN + * log[0](a) = NaN + * log[1](a) = NaN + * log[NaN](a) = NaN + * log[Infinity](a) = NaN + * log[b](0) = -Infinity + * log[b](-0) = -Infinity + * log[b](-a) = NaN + * log[b](1) = 0 + * log[b](Infinity) = Infinity + * log[b](NaN) = NaN + * + * [base] {number|string|Decimal} The base of the logarithm. + * + */ + P.logarithm = P.log = function (base) { + var isBase10, d, denominator, k, inf, num, sd, r, + arg = this, + Ctor = arg.constructor, + pr = Ctor.precision, + rm = Ctor.rounding, + guard = 5; + + // Default base is 10. + if (base == null) { + base = new Ctor(10); + isBase10 = true; + } else { + base = new Ctor(base); + d = base.d; + + // Return NaN if base is negative, or non-finite, or is 0 or 1. + if (base.s < 0 || !d || !d[0] || base.eq(1)) return new Ctor(NaN); + + isBase10 = base.eq(10); + } + + d = arg.d; + + // Is arg negative, non-finite, 0 or 1? + if (arg.s < 0 || !d || !d[0] || arg.eq(1)) { + return new Ctor(d && !d[0] ? -1 / 0 : arg.s != 1 ? NaN : d ? 0 : 1 / 0); + } + + // The result will have a non-terminating decimal expansion if base is 10 and arg is not an + // integer power of 10. + if (isBase10) { + if (d.length > 1) { + inf = true; + } else { + for (k = d[0]; k % 10 === 0;) k /= 10; + inf = k !== 1; + } + } + + external = false; + sd = pr + guard; + num = naturalLogarithm(arg, sd); + denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd); + + // The result will have 5 rounding digits. + r = divide(num, denominator, sd, 1); + + // If at a rounding boundary, i.e. the result's rounding digits are [49]9999 or [50]0000, + // calculate 10 further digits. + // + // If the result is known to have an infinite decimal expansion, repeat this until it is clear + // that the result is above or below the boundary. Otherwise, if after calculating the 10 + // further digits, the last 14 are nines, round up and assume the result is exact. + // Also assume the result is exact if the last 14 are zero. + // + // Example of a result that will be incorrectly rounded: + // log[1048576](4503599627370502) = 2.60000000000000009610279511444746... + // The above result correctly rounded using ROUND_CEIL to 1 decimal place should be 2.7, but it + // will be given as 2.6 as there are 15 zeros immediately after the requested decimal place, so + // the exact result would be assumed to be 2.6, which rounded using ROUND_CEIL to 1 decimal + // place is still 2.6. + if (checkRoundingDigits(r.d, k = pr, rm)) { + + do { + sd += 10; + num = naturalLogarithm(arg, sd); + denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd); + r = divide(num, denominator, sd, 1); + + if (!inf) { + + // Check for 14 nines from the 2nd rounding digit, as the first may be 4. + if (+digitsToString(r.d).slice(k + 1, k + 15) + 1 == 1e14) { + r = finalise(r, pr + 1, 0); + } + + break; + } + } while (checkRoundingDigits(r.d, k += 10, rm)); + } + + external = true; + + return finalise(r, pr, rm); + }; + + + /* + * Return a new Decimal whose value is the maximum of the arguments and the value of this Decimal. + * + * arguments {number|string|Decimal} + * + P.max = function () { + Array.prototype.push.call(arguments, this); + return maxOrMin(this.constructor, arguments, 'lt'); + }; + */ + + + /* + * Return a new Decimal whose value is the minimum of the arguments and the value of this Decimal. + * + * arguments {number|string|Decimal} + * + P.min = function () { + Array.prototype.push.call(arguments, this); + return maxOrMin(this.constructor, arguments, 'gt'); + }; + */ + + + /* + * n - 0 = n + * n - N = N + * n - I = -I + * 0 - n = -n + * 0 - 0 = 0 + * 0 - N = N + * 0 - I = -I + * N - n = N + * N - 0 = N + * N - N = N + * N - I = N + * I - n = I + * I - 0 = I + * I - N = N + * I - I = N + * + * Return a new Decimal whose value is the value of this Decimal minus `y`, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + */ + P.minus = P.sub = function (y) { + var d, e, i, j, k, len, pr, rm, xd, xe, xLTy, yd, + x = this, + Ctor = x.constructor; + + y = new Ctor(y); + + // If either is not finite... + if (!x.d || !y.d) { + + // Return NaN if either is NaN. + if (!x.s || !y.s) y = new Ctor(NaN); + + // Return y negated if x is finite and y is ±Infinity. + else if (x.d) y.s = -y.s; + + // Return x if y is finite and x is ±Infinity. + // Return x if both are ±Infinity with different signs. + // Return NaN if both are ±Infinity with the same sign. + else y = new Ctor(y.d || x.s !== y.s ? x : NaN); + + return y; + } + + // If signs differ... + if (x.s != y.s) { + y.s = -y.s; + return x.plus(y); + } + + xd = x.d; + yd = y.d; + pr = Ctor.precision; + rm = Ctor.rounding; + + // If either is zero... + if (!xd[0] || !yd[0]) { + + // Return y negated if x is zero and y is non-zero. + if (yd[0]) y.s = -y.s; + + // Return x if y is zero and x is non-zero. + else if (xd[0]) y = new Ctor(x); + + // Return zero if both are zero. + // From IEEE 754 (2008) 6.3: 0 - 0 = -0 - -0 = -0 when rounding to -Infinity. + else return new Ctor(rm === 3 ? -0 : 0); + + return external ? finalise(y, pr, rm) : y; + } + + // x and y are finite, non-zero numbers with the same sign. + + // Calculate base 1e7 exponents. + e = mathfloor(y.e / LOG_BASE); + xe = mathfloor(x.e / LOG_BASE); + + xd = xd.slice(); + k = xe - e; + + // If base 1e7 exponents differ... + if (k) { + xLTy = k < 0; + + if (xLTy) { + d = xd; + k = -k; + len = yd.length; + } else { + d = yd; + e = xe; + len = xd.length; + } + + // Numbers with massively different exponents would result in a very high number of + // zeros needing to be prepended, but this can be avoided while still ensuring correct + // rounding by limiting the number of zeros to `Math.ceil(pr / LOG_BASE) + 2`. + i = Math.max(Math.ceil(pr / LOG_BASE), len) + 2; + + if (k > i) { + k = i; + d.length = 1; + } + + // Prepend zeros to equalise exponents. + d.reverse(); + for (i = k; i--;) d.push(0); + d.reverse(); + + // Base 1e7 exponents equal. + } else { + + // Check digits to determine which is the bigger number. + + i = xd.length; + len = yd.length; + xLTy = i < len; + if (xLTy) len = i; + + for (i = 0; i < len; i++) { + if (xd[i] != yd[i]) { + xLTy = xd[i] < yd[i]; + break; + } + } + + k = 0; + } + + if (xLTy) { + d = xd; + xd = yd; + yd = d; + y.s = -y.s; + } + + len = xd.length; + + // Append zeros to `xd` if shorter. + // Don't add zeros to `yd` if shorter as subtraction only needs to start at `yd` length. + for (i = yd.length - len; i > 0; --i) xd[len++] = 0; + + // Subtract yd from xd. + for (i = yd.length; i > k;) { + + if (xd[--i] < yd[i]) { + for (j = i; j && xd[--j] === 0;) xd[j] = BASE - 1; + --xd[j]; + xd[i] += BASE; + } + + xd[i] -= yd[i]; + } + + // Remove trailing zeros. + for (; xd[--len] === 0;) xd.pop(); + + // Remove leading zeros and adjust exponent accordingly. + for (; xd[0] === 0; xd.shift()) --e; + + // Zero? + if (!xd[0]) return new Ctor(rm === 3 ? -0 : 0); + + y.d = xd; + y.e = getBase10Exponent(xd, e); + + return external ? finalise(y, pr, rm) : y; + }; + + + /* + * n % 0 = N + * n % N = N + * n % I = n + * 0 % n = 0 + * -0 % n = -0 + * 0 % 0 = N + * 0 % N = N + * 0 % I = 0 + * N % n = N + * N % 0 = N + * N % N = N + * N % I = N + * I % n = N + * I % 0 = N + * I % N = N + * I % I = N + * + * Return a new Decimal whose value is the value of this Decimal modulo `y`, rounded to + * `precision` significant digits using rounding mode `rounding`. + * + * The result depends on the modulo mode. + * + */ + P.modulo = P.mod = function (y) { + var q, + x = this, + Ctor = x.constructor; + + y = new Ctor(y); + + // Return NaN if x is ±Infinity or NaN, or y is NaN or ±0. + if (!x.d || !y.s || y.d && !y.d[0]) return new Ctor(NaN); + + // Return x if y is ±Infinity or x is ±0. + if (!y.d || x.d && !x.d[0]) { + return finalise(new Ctor(x), Ctor.precision, Ctor.rounding); + } + + // Prevent rounding of intermediate calculations. + external = false; + + if (Ctor.modulo == 9) { + + // Euclidian division: q = sign(y) * floor(x / abs(y)) + // result = x - q * y where 0 <= result < abs(y) + q = divide(x, y.abs(), 0, 3, 1); + q.s *= y.s; + } else { + q = divide(x, y, 0, Ctor.modulo, 1); + } + + q = q.times(y); + + external = true; + + return x.minus(q); + }; + + + /* + * Return a new Decimal whose value is the natural exponential of the value of this Decimal, + * i.e. the base e raised to the power the value of this Decimal, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + */ + P.naturalExponential = P.exp = function () { + return naturalExponential(this); + }; + + + /* + * Return a new Decimal whose value is the natural logarithm of the value of this Decimal, + * rounded to `precision` significant digits using rounding mode `rounding`. + * + */ + P.naturalLogarithm = P.ln = function () { + return naturalLogarithm(this); + }; + + + /* + * Return a new Decimal whose value is the value of this Decimal negated, i.e. as if multiplied by + * -1. + * + */ + P.negated = P.neg = function () { + var x = new this.constructor(this); + x.s = -x.s; + return finalise(x); + }; + + + /* + * n + 0 = n + * n + N = N + * n + I = I + * 0 + n = n + * 0 + 0 = 0 + * 0 + N = N + * 0 + I = I + * N + n = N + * N + 0 = N + * N + N = N + * N + I = N + * I + n = I + * I + 0 = I + * I + N = N + * I + I = I + * + * Return a new Decimal whose value is the value of this Decimal plus `y`, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + */ + P.plus = P.add = function (y) { + var carry, d, e, i, k, len, pr, rm, xd, yd, + x = this, + Ctor = x.constructor; + + y = new Ctor(y); + + // If either is not finite... + if (!x.d || !y.d) { + + // Return NaN if either is NaN. + if (!x.s || !y.s) y = new Ctor(NaN); + + // Return x if y is finite and x is ±Infinity. + // Return x if both are ±Infinity with the same sign. + // Return NaN if both are ±Infinity with different signs. + // Return y if x is finite and y is ±Infinity. + else if (!x.d) y = new Ctor(y.d || x.s === y.s ? x : NaN); + + return y; + } + + // If signs differ... + if (x.s != y.s) { + y.s = -y.s; + return x.minus(y); + } + + xd = x.d; + yd = y.d; + pr = Ctor.precision; + rm = Ctor.rounding; + + // If either is zero... + if (!xd[0] || !yd[0]) { + + // Return x if y is zero. + // Return y if y is non-zero. + if (!yd[0]) y = new Ctor(x); + + return external ? finalise(y, pr, rm) : y; + } + + // x and y are finite, non-zero numbers with the same sign. + + // Calculate base 1e7 exponents. + k = mathfloor(x.e / LOG_BASE); + e = mathfloor(y.e / LOG_BASE); + + xd = xd.slice(); + i = k - e; + + // If base 1e7 exponents differ... + if (i) { + + if (i < 0) { + d = xd; + i = -i; + len = yd.length; + } else { + d = yd; + e = k; + len = xd.length; + } + + // Limit number of zeros prepended to max(ceil(pr / LOG_BASE), len) + 1. + k = Math.ceil(pr / LOG_BASE); + len = k > len ? k + 1 : len + 1; + + if (i > len) { + i = len; + d.length = 1; + } + + // Prepend zeros to equalise exponents. Note: Faster to use reverse then do unshifts. + d.reverse(); + for (; i--;) d.push(0); + d.reverse(); + } + + len = xd.length; + i = yd.length; + + // If yd is longer than xd, swap xd and yd so xd points to the longer array. + if (len - i < 0) { + i = len; + d = yd; + yd = xd; + xd = d; + } + + // Only start adding at yd.length - 1 as the further digits of xd can be left as they are. + for (carry = 0; i;) { + carry = (xd[--i] = xd[i] + yd[i] + carry) / BASE | 0; + xd[i] %= BASE; + } + + if (carry) { + xd.unshift(carry); + ++e; + } + + // Remove trailing zeros. + // No need to check for zero, as +x + +y != 0 && -x + -y != 0 + for (len = xd.length; xd[--len] == 0;) xd.pop(); + + y.d = xd; + y.e = getBase10Exponent(xd, e); + + return external ? finalise(y, pr, rm) : y; + }; + + + /* + * Return the number of significant digits of the value of this Decimal. + * + * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0. + * + */ + P.precision = P.sd = function (z) { + var k, + x = this; + + if (z !== void 0 && z !== !!z && z !== 1 && z !== 0) throw Error(invalidArgument + z); + + if (x.d) { + k = getPrecision(x.d); + if (z && x.e + 1 > k) k = x.e + 1; + } else { + k = NaN; + } + + return k; + }; + + + /* + * Return a new Decimal whose value is the value of this Decimal rounded to a whole number using + * rounding mode `rounding`. + * + */ + P.round = function () { + var x = this, + Ctor = x.constructor; + + return finalise(new Ctor(x), x.e + 1, Ctor.rounding); + }; + + + /* + * Return a new Decimal whose value is the sine of the value in radians of this Decimal. + * + * Domain: [-Infinity, Infinity] + * Range: [-1, 1] + * + * sin(x) = x - x^3/3! + x^5/5! - ... + * + * sin(0) = 0 + * sin(-0) = -0 + * sin(Infinity) = NaN + * sin(-Infinity) = NaN + * sin(NaN) = NaN + * + */ + P.sine = P.sin = function () { + var pr, rm, + x = this, + Ctor = x.constructor; + + if (!x.isFinite()) return new Ctor(NaN); + if (x.isZero()) return new Ctor(x); + + pr = Ctor.precision; + rm = Ctor.rounding; + Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE; + Ctor.rounding = 1; + + x = sine(Ctor, toLessThanHalfPi(Ctor, x)); + + Ctor.precision = pr; + Ctor.rounding = rm; + + return finalise(quadrant > 2 ? x.neg() : x, pr, rm, true); + }; + + + /* + * Return a new Decimal whose value is the square root of this Decimal, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + * sqrt(-n) = N + * sqrt(N) = N + * sqrt(-I) = N + * sqrt(I) = I + * sqrt(0) = 0 + * sqrt(-0) = -0 + * + */ + P.squareRoot = P.sqrt = function () { + var m, n, sd, r, rep, t, + x = this, + d = x.d, + e = x.e, + s = x.s, + Ctor = x.constructor; + + // Negative/NaN/Infinity/zero? + if (s !== 1 || !d || !d[0]) { + return new Ctor(!s || s < 0 && (!d || d[0]) ? NaN : d ? x : 1 / 0); + } + + external = false; + + // Initial estimate. + s = Math.sqrt(+x); + + // Math.sqrt underflow/overflow? + // Pass x to Math.sqrt as integer, then adjust the exponent of the result. + if (s == 0 || s == 1 / 0) { + n = digitsToString(d); + + if ((n.length + e) % 2 == 0) n += '0'; + s = Math.sqrt(n); + e = mathfloor((e + 1) / 2) - (e < 0 || e % 2); + + if (s == 1 / 0) { + n = '5e' + e; + } else { + n = s.toExponential(); + n = n.slice(0, n.indexOf('e') + 1) + e; + } + + r = new Ctor(n); + } else { + r = new Ctor(s.toString()); + } + + sd = (e = Ctor.precision) + 3; + + // Newton-Raphson iteration. + for (;;) { + t = r; + r = t.plus(divide(x, t, sd + 2, 1)).times(0.5); + + // TODO? Replace with for-loop and checkRoundingDigits. + if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) { + n = n.slice(sd - 3, sd + 1); + + // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or + // 4999, i.e. approaching a rounding boundary, continue the iteration. + if (n == '9999' || !rep && n == '4999') { + + // On the first iteration only, check to see if rounding up gives the exact result as the + // nines may infinitely repeat. + if (!rep) { + finalise(t, e + 1, 0); + + if (t.times(t).eq(x)) { + r = t; + break; + } + } + + sd += 4; + rep = 1; + } else { + + // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result. + // If not, then there are further digits and m will be truthy. + if (!+n || !+n.slice(1) && n.charAt(0) == '5') { + + // Truncate to the first rounding digit. + finalise(r, e + 1, 1); + m = !r.times(r).eq(x); + } + + break; + } + } + } + + external = true; + + return finalise(r, e, Ctor.rounding, m); + }; + + + /* + * Return a new Decimal whose value is the tangent of the value in radians of this Decimal. + * + * Domain: [-Infinity, Infinity] + * Range: [-Infinity, Infinity] + * + * tan(0) = 0 + * tan(-0) = -0 + * tan(Infinity) = NaN + * tan(-Infinity) = NaN + * tan(NaN) = NaN + * + */ + P.tangent = P.tan = function () { + var pr, rm, + x = this, + Ctor = x.constructor; + + if (!x.isFinite()) return new Ctor(NaN); + if (x.isZero()) return new Ctor(x); + + pr = Ctor.precision; + rm = Ctor.rounding; + Ctor.precision = pr + 10; + Ctor.rounding = 1; + + x = x.sin(); + x.s = 1; + x = divide(x, new Ctor(1).minus(x.times(x)).sqrt(), pr + 10, 0); + + Ctor.precision = pr; + Ctor.rounding = rm; + + return finalise(quadrant == 2 || quadrant == 4 ? x.neg() : x, pr, rm, true); + }; + + + /* + * n * 0 = 0 + * n * N = N + * n * I = I + * 0 * n = 0 + * 0 * 0 = 0 + * 0 * N = N + * 0 * I = N + * N * n = N + * N * 0 = N + * N * N = N + * N * I = N + * I * n = I + * I * 0 = N + * I * N = N + * I * I = I + * + * Return a new Decimal whose value is this Decimal times `y`, rounded to `precision` significant + * digits using rounding mode `rounding`. + * + */ + P.times = P.mul = function (y) { + var carry, e, i, k, r, rL, t, xdL, ydL, + x = this, + Ctor = x.constructor, + xd = x.d, + yd = (y = new Ctor(y)).d; + + y.s *= x.s; + + // If either is NaN, ±Infinity or ±0... + if (!xd || !xd[0] || !yd || !yd[0]) { + + return new Ctor(!y.s || xd && !xd[0] && !yd || yd && !yd[0] && !xd + + // Return NaN if either is NaN. + // Return NaN if x is ±0 and y is ±Infinity, or y is ±0 and x is ±Infinity. + ? NaN + + // Return ±Infinity if either is ±Infinity. + // Return ±0 if either is ±0. + : !xd || !yd ? y.s / 0 : y.s * 0); + } + + e = mathfloor(x.e / LOG_BASE) + mathfloor(y.e / LOG_BASE); + xdL = xd.length; + ydL = yd.length; + + // Ensure xd points to the longer array. + if (xdL < ydL) { + r = xd; + xd = yd; + yd = r; + rL = xdL; + xdL = ydL; + ydL = rL; + } + + // Initialise the result array with zeros. + r = []; + rL = xdL + ydL; + for (i = rL; i--;) r.push(0); + + // Multiply! + for (i = ydL; --i >= 0;) { + carry = 0; + for (k = xdL + i; k > i;) { + t = r[k] + yd[i] * xd[k - i - 1] + carry; + r[k--] = t % BASE | 0; + carry = t / BASE | 0; + } + + r[k] = (r[k] + carry) % BASE | 0; + } + + // Remove trailing zeros. + for (; !r[--rL];) r.pop(); + + if (carry) ++e; + else r.shift(); + + y.d = r; + y.e = getBase10Exponent(r, e); + + return external ? finalise(y, Ctor.precision, Ctor.rounding) : y; + }; + + + /* + * Return a string representing the value of this Decimal in base 2, round to `sd` significant + * digits using rounding mode `rm`. + * + * If the optional `sd` argument is present then return binary exponential notation. + * + * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + */ + P.toBinary = function (sd, rm) { + return toStringBinary(this, 2, sd, rm); + }; + + + /* + * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `dp` + * decimal places using rounding mode `rm` or `rounding` if `rm` is omitted. + * + * If `dp` is omitted, return a new Decimal whose value is the value of this Decimal. + * + * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + */ + P.toDecimalPlaces = P.toDP = function (dp, rm) { + var x = this, + Ctor = x.constructor; + + x = new Ctor(x); + if (dp === void 0) return x; + + checkInt32(dp, 0, MAX_DIGITS); + + if (rm === void 0) rm = Ctor.rounding; + else checkInt32(rm, 0, 8); + + return finalise(x, dp + x.e + 1, rm); + }; + + + /* + * Return a string representing the value of this Decimal in exponential notation rounded to + * `dp` fixed decimal places using rounding mode `rounding`. + * + * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + */ + P.toExponential = function (dp, rm) { + var str, + x = this, + Ctor = x.constructor; + + if (dp === void 0) { + str = finiteToString(x, true); + } else { + checkInt32(dp, 0, MAX_DIGITS); + + if (rm === void 0) rm = Ctor.rounding; + else checkInt32(rm, 0, 8); + + x = finalise(new Ctor(x), dp + 1, rm); + str = finiteToString(x, true, dp + 1); + } + + return x.isNeg() && !x.isZero() ? '-' + str : str; + }; + + + /* + * Return a string representing the value of this Decimal in normal (fixed-point) notation to + * `dp` fixed decimal places and rounded using rounding mode `rm` or `rounding` if `rm` is + * omitted. + * + * As with JavaScript numbers, (-0).toFixed(0) is '0', but e.g. (-0.00001).toFixed(0) is '-0'. + * + * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'. + * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'. + * (-0).toFixed(3) is '0.000'. + * (-0.5).toFixed(0) is '-0'. + * + */ + P.toFixed = function (dp, rm) { + var str, y, + x = this, + Ctor = x.constructor; + + if (dp === void 0) { + str = finiteToString(x); + } else { + checkInt32(dp, 0, MAX_DIGITS); + + if (rm === void 0) rm = Ctor.rounding; + else checkInt32(rm, 0, 8); + + y = finalise(new Ctor(x), dp + x.e + 1, rm); + str = finiteToString(y, false, dp + y.e + 1); + } + + // To determine whether to add the minus sign look at the value before it was rounded, + // i.e. look at `x` rather than `y`. + return x.isNeg() && !x.isZero() ? '-' + str : str; + }; + + + /* + * Return an array representing the value of this Decimal as a simple fraction with an integer + * numerator and an integer denominator. + * + * The denominator will be a positive non-zero value less than or equal to the specified maximum + * denominator. If a maximum denominator is not specified, the denominator will be the lowest + * value necessary to represent the number exactly. + * + * [maxD] {number|string|Decimal} Maximum denominator. Integer >= 1 and < Infinity. + * + */ + P.toFraction = function (maxD) { + var d, d0, d1, d2, e, k, n, n0, n1, pr, q, r, + x = this, + xd = x.d, + Ctor = x.constructor; + + if (!xd) return new Ctor(x); + + n1 = d0 = new Ctor(1); + d1 = n0 = new Ctor(0); + + d = new Ctor(d1); + e = d.e = getPrecision(xd) - x.e - 1; + k = e % LOG_BASE; + d.d[0] = mathpow(10, k < 0 ? LOG_BASE + k : k); + + if (maxD == null) { + + // d is 10**e, the minimum max-denominator needed. + maxD = e > 0 ? d : n1; + } else { + n = new Ctor(maxD); + if (!n.isInt() || n.lt(n1)) throw Error(invalidArgument + n); + maxD = n.gt(d) ? (e > 0 ? d : n1) : n; + } + + external = false; + n = new Ctor(digitsToString(xd)); + pr = Ctor.precision; + Ctor.precision = e = xd.length * LOG_BASE * 2; + + for (;;) { + q = divide(n, d, 0, 1, 1); + d2 = d0.plus(q.times(d1)); + if (d2.cmp(maxD) == 1) break; + d0 = d1; + d1 = d2; + d2 = n1; + n1 = n0.plus(q.times(d2)); + n0 = d2; + d2 = d; + d = n.minus(q.times(d2)); + n = d2; + } + + d2 = divide(maxD.minus(d0), d1, 0, 1, 1); + n0 = n0.plus(d2.times(n1)); + d0 = d0.plus(d2.times(d1)); + n0.s = n1.s = x.s; + + // Determine which fraction is closer to x, n0/d0 or n1/d1? + r = divide(n1, d1, e, 1).minus(x).abs().cmp(divide(n0, d0, e, 1).minus(x).abs()) < 1 + ? [n1, d1] : [n0, d0]; + + Ctor.precision = pr; + external = true; + + return r; + }; + + + /* + * Return a string representing the value of this Decimal in base 16, round to `sd` significant + * digits using rounding mode `rm`. + * + * If the optional `sd` argument is present then return binary exponential notation. + * + * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + */ + P.toHexadecimal = P.toHex = function (sd, rm) { + return toStringBinary(this, 16, sd, rm); + }; + + + /* + * Returns a new Decimal whose value is the nearest multiple of `y` in the direction of rounding + * mode `rm`, or `Decimal.rounding` if `rm` is omitted, to the value of this Decimal. + * + * The return value will always have the same sign as this Decimal, unless either this Decimal + * or `y` is NaN, in which case the return value will be also be NaN. + * + * The return value is not affected by the value of `precision`. + * + * y {number|string|Decimal} The magnitude to round to a multiple of. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * 'toNearest() rounding mode not an integer: {rm}' + * 'toNearest() rounding mode out of range: {rm}' + * + */ + P.toNearest = function (y, rm) { + var x = this, + Ctor = x.constructor; + + x = new Ctor(x); + + if (y == null) { + + // If x is not finite, return x. + if (!x.d) return x; + + y = new Ctor(1); + rm = Ctor.rounding; + } else { + y = new Ctor(y); + if (rm === void 0) { + rm = Ctor.rounding; + } else { + checkInt32(rm, 0, 8); + } + + // If x is not finite, return x if y is not NaN, else NaN. + if (!x.d) return y.s ? x : y; + + // If y is not finite, return Infinity with the sign of x if y is Infinity, else NaN. + if (!y.d) { + if (y.s) y.s = x.s; + return y; + } + } + + // If y is not zero, calculate the nearest multiple of y to x. + if (y.d[0]) { + external = false; + x = divide(x, y, 0, rm, 1).times(y); + external = true; + finalise(x); + + // If y is zero, return zero with the sign of x. + } else { + y.s = x.s; + x = y; + } + + return x; + }; + + + /* + * Return the value of this Decimal converted to a number primitive. + * Zero keeps its sign. + * + */ + P.toNumber = function () { + return +this; + }; + + + /* + * Return a string representing the value of this Decimal in base 8, round to `sd` significant + * digits using rounding mode `rm`. + * + * If the optional `sd` argument is present then return binary exponential notation. + * + * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + */ + P.toOctal = function (sd, rm) { + return toStringBinary(this, 8, sd, rm); + }; + + + /* + * Return a new Decimal whose value is the value of this Decimal raised to the power `y`, rounded + * to `precision` significant digits using rounding mode `rounding`. + * + * ECMAScript compliant. + * + * pow(x, NaN) = NaN + * pow(x, ±0) = 1 + + * pow(NaN, non-zero) = NaN + * pow(abs(x) > 1, +Infinity) = +Infinity + * pow(abs(x) > 1, -Infinity) = +0 + * pow(abs(x) == 1, ±Infinity) = NaN + * pow(abs(x) < 1, +Infinity) = +0 + * pow(abs(x) < 1, -Infinity) = +Infinity + * pow(+Infinity, y > 0) = +Infinity + * pow(+Infinity, y < 0) = +0 + * pow(-Infinity, odd integer > 0) = -Infinity + * pow(-Infinity, even integer > 0) = +Infinity + * pow(-Infinity, odd integer < 0) = -0 + * pow(-Infinity, even integer < 0) = +0 + * pow(+0, y > 0) = +0 + * pow(+0, y < 0) = +Infinity + * pow(-0, odd integer > 0) = -0 + * pow(-0, even integer > 0) = +0 + * pow(-0, odd integer < 0) = -Infinity + * pow(-0, even integer < 0) = +Infinity + * pow(finite x < 0, finite non-integer) = NaN + * + * For non-integer or very large exponents pow(x, y) is calculated using + * + * x^y = exp(y*ln(x)) + * + * Assuming the first 15 rounding digits are each equally likely to be any digit 0-9, the + * probability of an incorrectly rounded result + * P([49]9{14} | [50]0{14}) = 2 * 0.2 * 10^-14 = 4e-15 = 1/2.5e+14 + * i.e. 1 in 250,000,000,000,000 + * + * If a result is incorrectly rounded the maximum error will be 1 ulp (unit in last place). + * + * y {number|string|Decimal} The power to which to raise this Decimal. + * + */ + P.toPower = P.pow = function (y) { + var e, k, pr, r, rm, s, + x = this, + Ctor = x.constructor, + yn = +(y = new Ctor(y)); + + // Either ±Infinity, NaN or ±0? + if (!x.d || !y.d || !x.d[0] || !y.d[0]) return new Ctor(mathpow(+x, yn)); + + x = new Ctor(x); + + if (x.eq(1)) return x; + + pr = Ctor.precision; + rm = Ctor.rounding; + + if (y.eq(1)) return finalise(x, pr, rm); + + // y exponent + e = mathfloor(y.e / LOG_BASE); + + // If y is a small integer use the 'exponentiation by squaring' algorithm. + if (e >= y.d.length - 1 && (k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER) { + r = intPow(Ctor, x, k, pr); + return y.s < 0 ? new Ctor(1).div(r) : finalise(r, pr, rm); + } + + s = x.s; + + // if x is negative + if (s < 0) { + + // if y is not an integer + if (e < y.d.length - 1) return new Ctor(NaN); + + // Result is positive if x is negative and the last digit of integer y is even. + if ((y.d[e] & 1) == 0) s = 1; + + // if x.eq(-1) + if (x.e == 0 && x.d[0] == 1 && x.d.length == 1) { + x.s = s; + return x; + } + } + + // Estimate result exponent. + // x^y = 10^e, where e = y * log10(x) + // log10(x) = log10(x_significand) + x_exponent + // log10(x_significand) = ln(x_significand) / ln(10) + k = mathpow(+x, yn); + e = k == 0 || !isFinite(k) + ? mathfloor(yn * (Math.log('0.' + digitsToString(x.d)) / Math.LN10 + x.e + 1)) + : new Ctor(k + '').e; + + // Exponent estimate may be incorrect e.g. x: 0.999999999999999999, y: 2.29, e: 0, r.e: -1. + + // Overflow/underflow? + if (e > Ctor.maxE + 1 || e < Ctor.minE - 1) return new Ctor(e > 0 ? s / 0 : 0); + + external = false; + Ctor.rounding = x.s = 1; + + // Estimate the extra guard digits needed to ensure five correct rounding digits from + // naturalLogarithm(x). Example of failure without these extra digits (precision: 10): + // new Decimal(2.32456).pow('2087987436534566.46411') + // should be 1.162377823e+764914905173815, but is 1.162355823e+764914905173815 + k = Math.min(12, (e + '').length); + + // r = x^y = exp(y*ln(x)) + r = naturalExponential(y.times(naturalLogarithm(x, pr + k)), pr); + + // r may be Infinity, e.g. (0.9999999999999999).pow(-1e+40) + if (r.d) { + + // Truncate to the required precision plus five rounding digits. + r = finalise(r, pr + 5, 1); + + // If the rounding digits are [49]9999 or [50]0000 increase the precision by 10 and recalculate + // the result. + if (checkRoundingDigits(r.d, pr, rm)) { + e = pr + 10; + + // Truncate to the increased precision plus five rounding digits. + r = finalise(naturalExponential(y.times(naturalLogarithm(x, e + k)), e), e + 5, 1); + + // Check for 14 nines from the 2nd rounding digit (the first rounding digit may be 4 or 9). + if (+digitsToString(r.d).slice(pr + 1, pr + 15) + 1 == 1e14) { + r = finalise(r, pr + 1, 0); + } + } + } + + r.s = s; + external = true; + Ctor.rounding = rm; + + return finalise(r, pr, rm); + }; + + + /* + * Return a string representing the value of this Decimal rounded to `sd` significant digits + * using rounding mode `rounding`. + * + * Return exponential notation if `sd` is less than the number of digits necessary to represent + * the integer part of the value in normal notation. + * + * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + */ + P.toPrecision = function (sd, rm) { + var str, + x = this, + Ctor = x.constructor; + + if (sd === void 0) { + str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos); + } else { + checkInt32(sd, 1, MAX_DIGITS); + + if (rm === void 0) rm = Ctor.rounding; + else checkInt32(rm, 0, 8); + + x = finalise(new Ctor(x), sd, rm); + str = finiteToString(x, sd <= x.e || x.e <= Ctor.toExpNeg, sd); + } + + return x.isNeg() && !x.isZero() ? '-' + str : str; + }; + + + /* + * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `sd` + * significant digits using rounding mode `rm`, or to `precision` and `rounding` respectively if + * omitted. + * + * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * 'toSD() digits out of range: {sd}' + * 'toSD() digits not an integer: {sd}' + * 'toSD() rounding mode not an integer: {rm}' + * 'toSD() rounding mode out of range: {rm}' + * + */ + P.toSignificantDigits = P.toSD = function (sd, rm) { + var x = this, + Ctor = x.constructor; + + if (sd === void 0) { + sd = Ctor.precision; + rm = Ctor.rounding; + } else { + checkInt32(sd, 1, MAX_DIGITS); + + if (rm === void 0) rm = Ctor.rounding; + else checkInt32(rm, 0, 8); + } + + return finalise(new Ctor(x), sd, rm); + }; + + + /* + * Return a string representing the value of this Decimal. + * + * Return exponential notation if this Decimal has a positive exponent equal to or greater than + * `toExpPos`, or a negative exponent equal to or less than `toExpNeg`. + * + */ + P.toString = function () { + var x = this, + Ctor = x.constructor, + str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos); + + return x.isNeg() && !x.isZero() ? '-' + str : str; + }; + + + /* + * Return a new Decimal whose value is the value of this Decimal truncated to a whole number. + * + */ + P.truncated = P.trunc = function () { + return finalise(new this.constructor(this), this.e + 1, 1); + }; + + + /* + * Return a string representing the value of this Decimal. + * Unlike `toString`, negative zero will include the minus sign. + * + */ + P.valueOf = P.toJSON = function () { + var x = this, + Ctor = x.constructor, + str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos); + + return x.isNeg() ? '-' + str : str; + }; + + + /* + // Add aliases to match BigDecimal method names. + // P.add = P.plus; + P.subtract = P.minus; + P.multiply = P.times; + P.divide = P.div; + P.remainder = P.mod; + P.compareTo = P.cmp; + P.negate = P.neg; + */ + + + // Helper functions for Decimal.prototype (P) and/or Decimal methods, and their callers. + + + /* + * digitsToString P.cubeRoot, P.logarithm, P.squareRoot, P.toFraction, P.toPower, + * finiteToString, naturalExponential, naturalLogarithm + * checkInt32 P.toDecimalPlaces, P.toExponential, P.toFixed, P.toNearest, + * P.toPrecision, P.toSignificantDigits, toStringBinary, random + * checkRoundingDigits P.logarithm, P.toPower, naturalExponential, naturalLogarithm + * convertBase toStringBinary, parseOther + * cos P.cos + * divide P.atanh, P.cubeRoot, P.dividedBy, P.dividedToIntegerBy, + * P.logarithm, P.modulo, P.squareRoot, P.tan, P.tanh, P.toFraction, + * P.toNearest, toStringBinary, naturalExponential, naturalLogarithm, + * taylorSeries, atan2, parseOther + * finalise P.absoluteValue, P.atan, P.atanh, P.ceil, P.cos, P.cosh, + * P.cubeRoot, P.dividedToIntegerBy, P.floor, P.logarithm, P.minus, + * P.modulo, P.negated, P.plus, P.round, P.sin, P.sinh, P.squareRoot, + * P.tan, P.times, P.toDecimalPlaces, P.toExponential, P.toFixed, + * P.toNearest, P.toPower, P.toPrecision, P.toSignificantDigits, + * P.truncated, divide, getLn10, getPi, naturalExponential, + * naturalLogarithm, ceil, floor, round, trunc + * finiteToString P.toExponential, P.toFixed, P.toPrecision, P.toString, P.valueOf, + * toStringBinary + * getBase10Exponent P.minus, P.plus, P.times, parseOther + * getLn10 P.logarithm, naturalLogarithm + * getPi P.acos, P.asin, P.atan, toLessThanHalfPi, atan2 + * getPrecision P.precision, P.toFraction + * getZeroString digitsToString, finiteToString + * intPow P.toPower, parseOther + * isOdd toLessThanHalfPi + * maxOrMin max, min + * naturalExponential P.naturalExponential, P.toPower + * naturalLogarithm P.acosh, P.asinh, P.atanh, P.logarithm, P.naturalLogarithm, + * P.toPower, naturalExponential + * nonFiniteToString finiteToString, toStringBinary + * parseDecimal Decimal + * parseOther Decimal + * sin P.sin + * taylorSeries P.cosh, P.sinh, cos, sin + * toLessThanHalfPi P.cos, P.sin + * toStringBinary P.toBinary, P.toHexadecimal, P.toOctal + * truncate intPow + * + * Throws: P.logarithm, P.precision, P.toFraction, checkInt32, getLn10, getPi, + * naturalLogarithm, config, parseOther, random, Decimal + */ + + + function digitsToString(d) { + var i, k, ws, + indexOfLastWord = d.length - 1, + str = '', + w = d[0]; + + if (indexOfLastWord > 0) { + str += w; + for (i = 1; i < indexOfLastWord; i++) { + ws = d[i] + ''; + k = LOG_BASE - ws.length; + if (k) str += getZeroString(k); + str += ws; + } + + w = d[i]; + ws = w + ''; + k = LOG_BASE - ws.length; + if (k) str += getZeroString(k); + } else if (w === 0) { + return '0'; + } + + // Remove trailing zeros of last w. + for (; w % 10 === 0;) w /= 10; + + return str + w; + } + + + function checkInt32(i, min, max) { + if (i !== ~~i || i < min || i > max) { + throw Error(invalidArgument + i); + } + } + + + /* + * Check 5 rounding digits if `repeating` is null, 4 otherwise. + * `repeating == null` if caller is `log` or `pow`, + * `repeating != null` if caller is `naturalLogarithm` or `naturalExponential`. + */ + function checkRoundingDigits(d, i, rm, repeating) { + var di, k, r, rd; + + // Get the length of the first word of the array d. + for (k = d[0]; k >= 10; k /= 10) --i; + + // Is the rounding digit in the first word of d? + if (--i < 0) { + i += LOG_BASE; + di = 0; + } else { + di = Math.ceil((i + 1) / LOG_BASE); + i %= LOG_BASE; + } + + // i is the index (0 - 6) of the rounding digit. + // E.g. if within the word 3487563 the first rounding digit is 5, + // then i = 4, k = 1000, rd = 3487563 % 1000 = 563 + k = mathpow(10, LOG_BASE - i); + rd = d[di] % k | 0; + + if (repeating == null) { + if (i < 3) { + if (i == 0) rd = rd / 100 | 0; + else if (i == 1) rd = rd / 10 | 0; + r = rm < 4 && rd == 99999 || rm > 3 && rd == 49999 || rd == 50000 || rd == 0; + } else { + r = (rm < 4 && rd + 1 == k || rm > 3 && rd + 1 == k / 2) && + (d[di + 1] / k / 100 | 0) == mathpow(10, i - 2) - 1 || + (rd == k / 2 || rd == 0) && (d[di + 1] / k / 100 | 0) == 0; + } + } else { + if (i < 4) { + if (i == 0) rd = rd / 1000 | 0; + else if (i == 1) rd = rd / 100 | 0; + else if (i == 2) rd = rd / 10 | 0; + r = (repeating || rm < 4) && rd == 9999 || !repeating && rm > 3 && rd == 4999; + } else { + r = ((repeating || rm < 4) && rd + 1 == k || + (!repeating && rm > 3) && rd + 1 == k / 2) && + (d[di + 1] / k / 1000 | 0) == mathpow(10, i - 3) - 1; + } + } + + return r; + } + + + // Convert string of `baseIn` to an array of numbers of `baseOut`. + // Eg. convertBase('255', 10, 16) returns [15, 15]. + // Eg. convertBase('ff', 16, 10) returns [2, 5, 5]. + function convertBase(str, baseIn, baseOut) { + var j, + arr = [0], + arrL, + i = 0, + strL = str.length; + + for (; i < strL;) { + for (arrL = arr.length; arrL--;) arr[arrL] *= baseIn; + arr[0] += NUMERALS.indexOf(str.charAt(i++)); + for (j = 0; j < arr.length; j++) { + if (arr[j] > baseOut - 1) { + if (arr[j + 1] === void 0) arr[j + 1] = 0; + arr[j + 1] += arr[j] / baseOut | 0; + arr[j] %= baseOut; + } + } + } + + return arr.reverse(); + } + + + /* + * cos(x) = 1 - x^2/2! + x^4/4! - ... + * |x| < pi/2 + * + */ + function cosine(Ctor, x) { + var k, y, + len = x.d.length; + + // Argument reduction: cos(4x) = 8*(cos^4(x) - cos^2(x)) + 1 + // i.e. cos(x) = 8*(cos^4(x/4) - cos^2(x/4)) + 1 + + // Estimate the optimum number of times to use the argument reduction. + if (len < 32) { + k = Math.ceil(len / 3); + y = (1 / tinyPow(4, k)).toString(); + } else { + k = 16; + y = '2.3283064365386962890625e-10'; + } + + Ctor.precision += k; + + x = taylorSeries(Ctor, 1, x.times(y), new Ctor(1)); + + // Reverse argument reduction + for (var i = k; i--;) { + var cos2x = x.times(x); + x = cos2x.times(cos2x).minus(cos2x).times(8).plus(1); + } + + Ctor.precision -= k; + + return x; + } + + + /* + * Perform division in the specified base. + */ + var divide = (function () { + + // Assumes non-zero x and k, and hence non-zero result. + function multiplyInteger(x, k, base) { + var temp, + carry = 0, + i = x.length; + + for (x = x.slice(); i--;) { + temp = x[i] * k + carry; + x[i] = temp % base | 0; + carry = temp / base | 0; + } + + if (carry) x.unshift(carry); + + return x; + } + + function compare(a, b, aL, bL) { + var i, r; + + if (aL != bL) { + r = aL > bL ? 1 : -1; + } else { + for (i = r = 0; i < aL; i++) { + if (a[i] != b[i]) { + r = a[i] > b[i] ? 1 : -1; + break; + } + } + } + + return r; + } + + function subtract(a, b, aL, base) { + var i = 0; + + // Subtract b from a. + for (; aL--;) { + a[aL] -= i; + i = a[aL] < b[aL] ? 1 : 0; + a[aL] = i * base + a[aL] - b[aL]; + } + + // Remove leading zeros. + for (; !a[0] && a.length > 1;) a.shift(); + } + + return function (x, y, pr, rm, dp, base) { + var cmp, e, i, k, logBase, more, prod, prodL, q, qd, rem, remL, rem0, sd, t, xi, xL, yd0, + yL, yz, + Ctor = x.constructor, + sign = x.s == y.s ? 1 : -1, + xd = x.d, + yd = y.d; + + // Either NaN, Infinity or 0? + if (!xd || !xd[0] || !yd || !yd[0]) { + + return new Ctor(// Return NaN if either NaN, or both Infinity or 0. + !x.s || !y.s || (xd ? yd && xd[0] == yd[0] : !yd) ? NaN : + + // Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0. + xd && xd[0] == 0 || !yd ? sign * 0 : sign / 0); + } + + if (base) { + logBase = 1; + e = x.e - y.e; + } else { + base = BASE; + logBase = LOG_BASE; + e = mathfloor(x.e / logBase) - mathfloor(y.e / logBase); + } + + yL = yd.length; + xL = xd.length; + q = new Ctor(sign); + qd = q.d = []; + + // Result exponent may be one less than e. + // The digit array of a Decimal from toStringBinary may have trailing zeros. + for (i = 0; yd[i] == (xd[i] || 0); i++); + + if (yd[i] > (xd[i] || 0)) e--; + + if (pr == null) { + sd = pr = Ctor.precision; + rm = Ctor.rounding; + } else if (dp) { + sd = pr + (x.e - y.e) + 1; + } else { + sd = pr; + } + + if (sd < 0) { + qd.push(1); + more = true; + } else { + + // Convert precision in number of base 10 digits to base 1e7 digits. + sd = sd / logBase + 2 | 0; + i = 0; + + // divisor < 1e7 + if (yL == 1) { + k = 0; + yd = yd[0]; + sd++; + + // k is the carry. + for (; (i < xL || k) && sd--; i++) { + t = k * base + (xd[i] || 0); + qd[i] = t / yd | 0; + k = t % yd | 0; + } + + more = k || i < xL; + + // divisor >= 1e7 + } else { + + // Normalise xd and yd so highest order digit of yd is >= base/2 + k = base / (yd[0] + 1) | 0; + + if (k > 1) { + yd = multiplyInteger(yd, k, base); + xd = multiplyInteger(xd, k, base); + yL = yd.length; + xL = xd.length; + } + + xi = yL; + rem = xd.slice(0, yL); + remL = rem.length; + + // Add zeros to make remainder as long as divisor. + for (; remL < yL;) rem[remL++] = 0; + + yz = yd.slice(); + yz.unshift(0); + yd0 = yd[0]; + + if (yd[1] >= base / 2) ++yd0; + + do { + k = 0; + + // Compare divisor and remainder. + cmp = compare(yd, rem, yL, remL); + + // If divisor < remainder. + if (cmp < 0) { + + // Calculate trial digit, k. + rem0 = rem[0]; + if (yL != remL) rem0 = rem0 * base + (rem[1] || 0); + + // k will be how many times the divisor goes into the current remainder. + k = rem0 / yd0 | 0; + + // Algorithm: + // 1. product = divisor * trial digit (k) + // 2. if product > remainder: product -= divisor, k-- + // 3. remainder -= product + // 4. if product was < remainder at 2: + // 5. compare new remainder and divisor + // 6. If remainder > divisor: remainder -= divisor, k++ + + if (k > 1) { + if (k >= base) k = base - 1; + + // product = divisor * trial digit. + prod = multiplyInteger(yd, k, base); + prodL = prod.length; + remL = rem.length; + + // Compare product and remainder. + cmp = compare(prod, rem, prodL, remL); + + // product > remainder. + if (cmp == 1) { + k--; + + // Subtract divisor from product. + subtract(prod, yL < prodL ? yz : yd, prodL, base); + } + } else { + + // cmp is -1. + // If k is 0, there is no need to compare yd and rem again below, so change cmp to 1 + // to avoid it. If k is 1 there is a need to compare yd and rem again below. + if (k == 0) cmp = k = 1; + prod = yd.slice(); + } + + prodL = prod.length; + if (prodL < remL) prod.unshift(0); + + // Subtract product from remainder. + subtract(rem, prod, remL, base); + + // If product was < previous remainder. + if (cmp == -1) { + remL = rem.length; + + // Compare divisor and new remainder. + cmp = compare(yd, rem, yL, remL); + + // If divisor < new remainder, subtract divisor from remainder. + if (cmp < 1) { + k++; + + // Subtract divisor from remainder. + subtract(rem, yL < remL ? yz : yd, remL, base); + } + } + + remL = rem.length; + } else if (cmp === 0) { + k++; + rem = [0]; + } // if cmp === 1, k will be 0 + + // Add the next digit, k, to the result array. + qd[i++] = k; + + // Update the remainder. + if (cmp && rem[0]) { + rem[remL++] = xd[xi] || 0; + } else { + rem = [xd[xi]]; + remL = 1; + } + + } while ((xi++ < xL || rem[0] !== void 0) && sd--); + + more = rem[0] !== void 0; + } + + // Leading zero? + if (!qd[0]) qd.shift(); + } + + // logBase is 1 when divide is being used for base conversion. + if (logBase == 1) { + q.e = e; + inexact = more; + } else { + + // To calculate q.e, first get the number of digits of qd[0]. + for (i = 1, k = qd[0]; k >= 10; k /= 10) i++; + q.e = i + e * logBase - 1; + + finalise(q, dp ? pr + q.e + 1 : pr, rm, more); + } + + return q; + }; + })(); + + + /* + * Round `x` to `sd` significant digits using rounding mode `rm`. + * Check for over/under-flow. + */ + function finalise(x, sd, rm, isTruncated) { + var digits, i, j, k, rd, roundUp, w, xd, xdi, + Ctor = x.constructor; + + // Don't round if sd is null or undefined. + out: if (sd != null) { + xd = x.d; + + // Infinity/NaN. + if (!xd) return x; + + // rd: the rounding digit, i.e. the digit after the digit that may be rounded up. + // w: the word of xd containing rd, a base 1e7 number. + // xdi: the index of w within xd. + // digits: the number of digits of w. + // i: what would be the index of rd within w if all the numbers were 7 digits long (i.e. if + // they had leading zeros) + // j: if > 0, the actual index of rd within w (if < 0, rd is a leading zero). + + // Get the length of the first word of the digits array xd. + for (digits = 1, k = xd[0]; k >= 10; k /= 10) digits++; + i = sd - digits; + + // Is the rounding digit in the first word of xd? + if (i < 0) { + i += LOG_BASE; + j = sd; + w = xd[xdi = 0]; + + // Get the rounding digit at index j of w. + rd = w / mathpow(10, digits - j - 1) % 10 | 0; + } else { + xdi = Math.ceil((i + 1) / LOG_BASE); + k = xd.length; + if (xdi >= k) { + if (isTruncated) { + + // Needed by `naturalExponential`, `naturalLogarithm` and `squareRoot`. + for (; k++ <= xdi;) xd.push(0); + w = rd = 0; + digits = 1; + i %= LOG_BASE; + j = i - LOG_BASE + 1; + } else { + break out; + } + } else { + w = k = xd[xdi]; + + // Get the number of digits of w. + for (digits = 1; k >= 10; k /= 10) digits++; + + // Get the index of rd within w. + i %= LOG_BASE; + + // Get the index of rd within w, adjusted for leading zeros. + // The number of leading zeros of w is given by LOG_BASE - digits. + j = i - LOG_BASE + digits; + + // Get the rounding digit at index j of w. + rd = j < 0 ? 0 : w / mathpow(10, digits - j - 1) % 10 | 0; + } + } + + // Are there any non-zero digits after the rounding digit? + isTruncated = isTruncated || sd < 0 || + xd[xdi + 1] !== void 0 || (j < 0 ? w : w % mathpow(10, digits - j - 1)); + + // The expression `w % mathpow(10, digits - j - 1)` returns all the digits of w to the right + // of the digit at (left-to-right) index j, e.g. if w is 908714 and j is 2, the expression + // will give 714. + + roundUp = rm < 4 + ? (rd || isTruncated) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) + : rd > 5 || rd == 5 && (rm == 4 || isTruncated || rm == 6 && + + // Check whether the digit to the left of the rounding digit is odd. + ((i > 0 ? j > 0 ? w / mathpow(10, digits - j) : 0 : xd[xdi - 1]) % 10) & 1 || + rm == (x.s < 0 ? 8 : 7)); + + if (sd < 1 || !xd[0]) { + xd.length = 0; + if (roundUp) { + + // Convert sd to decimal places. + sd -= x.e + 1; + + // 1, 0.1, 0.01, 0.001, 0.0001 etc. + xd[0] = mathpow(10, (LOG_BASE - sd % LOG_BASE) % LOG_BASE); + x.e = -sd || 0; + } else { + + // Zero. + xd[0] = x.e = 0; + } + + return x; + } + + // Remove excess digits. + if (i == 0) { + xd.length = xdi; + k = 1; + xdi--; + } else { + xd.length = xdi + 1; + k = mathpow(10, LOG_BASE - i); + + // E.g. 56700 becomes 56000 if 7 is the rounding digit. + // j > 0 means i > number of leading zeros of w. + xd[xdi] = j > 0 ? (w / mathpow(10, digits - j) % mathpow(10, j) | 0) * k : 0; + } + + if (roundUp) { + for (;;) { + + // Is the digit to be rounded up in the first word of xd? + if (xdi == 0) { + + // i will be the length of xd[0] before k is added. + for (i = 1, j = xd[0]; j >= 10; j /= 10) i++; + j = xd[0] += k; + for (k = 1; j >= 10; j /= 10) k++; + + // if i != k the length has increased. + if (i != k) { + x.e++; + if (xd[0] == BASE) xd[0] = 1; + } + + break; + } else { + xd[xdi] += k; + if (xd[xdi] != BASE) break; + xd[xdi--] = 0; + k = 1; + } + } + } + + // Remove trailing zeros. + for (i = xd.length; xd[--i] === 0;) xd.pop(); + } + + if (external) { + + // Overflow? + if (x.e > Ctor.maxE) { + + // Infinity. + x.d = null; + x.e = NaN; + + // Underflow? + } else if (x.e < Ctor.minE) { + + // Zero. + x.e = 0; + x.d = [0]; + // Ctor.underflow = true; + } // else Ctor.underflow = false; + } + + return x; + } + + + function finiteToString(x, isExp, sd) { + if (!x.isFinite()) return nonFiniteToString(x); + var k, + e = x.e, + str = digitsToString(x.d), + len = str.length; + + if (isExp) { + if (sd && (k = sd - len) > 0) { + str = str.charAt(0) + '.' + str.slice(1) + getZeroString(k); + } else if (len > 1) { + str = str.charAt(0) + '.' + str.slice(1); + } + + str = str + (x.e < 0 ? 'e' : 'e+') + x.e; + } else if (e < 0) { + str = '0.' + getZeroString(-e - 1) + str; + if (sd && (k = sd - len) > 0) str += getZeroString(k); + } else if (e >= len) { + str += getZeroString(e + 1 - len); + if (sd && (k = sd - e - 1) > 0) str = str + '.' + getZeroString(k); + } else { + if ((k = e + 1) < len) str = str.slice(0, k) + '.' + str.slice(k); + if (sd && (k = sd - len) > 0) { + if (e + 1 === len) str += '.'; + str += getZeroString(k); + } + } + + return str; + } + + + // Calculate the base 10 exponent from the base 1e7 exponent. + function getBase10Exponent(digits, e) { + var w = digits[0]; + + // Add the number of digits of the first word of the digits array. + for ( e *= LOG_BASE; w >= 10; w /= 10) e++; + return e; + } + + + function getLn10(Ctor, sd, pr) { + if (sd > LN10_PRECISION) { + + // Reset global state in case the exception is caught. + external = true; + if (pr) Ctor.precision = pr; + throw Error(precisionLimitExceeded); + } + return finalise(new Ctor(LN10), sd, 1, true); + } + + + function getPi(Ctor, sd, rm) { + if (sd > PI_PRECISION) throw Error(precisionLimitExceeded); + return finalise(new Ctor(PI), sd, rm, true); + } + + + function getPrecision(digits) { + var w = digits.length - 1, + len = w * LOG_BASE + 1; + + w = digits[w]; + + // If non-zero... + if (w) { + + // Subtract the number of trailing zeros of the last word. + for (; w % 10 == 0; w /= 10) len--; + + // Add the number of digits of the first word. + for (w = digits[0]; w >= 10; w /= 10) len++; + } + + return len; + } + + + function getZeroString(k) { + var zs = ''; + for (; k--;) zs += '0'; + return zs; + } + + + /* + * Return a new Decimal whose value is the value of Decimal `x` to the power `n`, where `n` is an + * integer of type number. + * + * Implements 'exponentiation by squaring'. Called by `pow` and `parseOther`. + * + */ + function intPow(Ctor, x, n, pr) { + var isTruncated, + r = new Ctor(1), + + // Max n of 9007199254740991 takes 53 loop iterations. + // Maximum digits array length; leaves [28, 34] guard digits. + k = Math.ceil(pr / LOG_BASE + 4); + + external = false; + + for (;;) { + if (n % 2) { + r = r.times(x); + if (truncate(r.d, k)) isTruncated = true; + } + + n = mathfloor(n / 2); + if (n === 0) { + + // To ensure correct rounding when r.d is truncated, increment the last word if it is zero. + n = r.d.length - 1; + if (isTruncated && r.d[n] === 0) ++r.d[n]; + break; + } + + x = x.times(x); + truncate(x.d, k); + } + + external = true; + + return r; + } + + + function isOdd(n) { + return n.d[n.d.length - 1] & 1; + } + + + /* + * Handle `max` and `min`. `ltgt` is 'lt' or 'gt'. + */ + function maxOrMin(Ctor, args, ltgt) { + var y, + x = new Ctor(args[0]), + i = 0; + + for (; ++i < args.length;) { + y = new Ctor(args[i]); + if (!y.s) { + x = y; + break; + } else if (x[ltgt](y)) { + x = y; + } + } + + return x; + } + + + /* + * Return a new Decimal whose value is the natural exponential of `x` rounded to `sd` significant + * digits. + * + * Taylor/Maclaurin series. + * + * exp(x) = x^0/0! + x^1/1! + x^2/2! + x^3/3! + ... + * + * Argument reduction: + * Repeat x = x / 32, k += 5, until |x| < 0.1 + * exp(x) = exp(x / 2^k)^(2^k) + * + * Previously, the argument was initially reduced by + * exp(x) = exp(r) * 10^k where r = x - k * ln10, k = floor(x / ln10) + * to first put r in the range [0, ln10], before dividing by 32 until |x| < 0.1, but this was + * found to be slower than just dividing repeatedly by 32 as above. + * + * Max integer argument: exp('20723265836946413') = 6.3e+9000000000000000 + * Min integer argument: exp('-20723265836946411') = 1.2e-9000000000000000 + * (Math object integer min/max: Math.exp(709) = 8.2e+307, Math.exp(-745) = 5e-324) + * + * exp(Infinity) = Infinity + * exp(-Infinity) = 0 + * exp(NaN) = NaN + * exp(±0) = 1 + * + * exp(x) is non-terminating for any finite, non-zero x. + * + * The result will always be correctly rounded. + * + */ + function naturalExponential(x, sd) { + var denominator, guard, j, pow, sum, t, wpr, + rep = 0, + i = 0, + k = 0, + Ctor = x.constructor, + rm = Ctor.rounding, + pr = Ctor.precision; + + // 0/NaN/Infinity? + if (!x.d || !x.d[0] || x.e > 17) { + + return new Ctor(x.d + ? !x.d[0] ? 1 : x.s < 0 ? 0 : 1 / 0 + : x.s ? x.s < 0 ? 0 : x : 0 / 0); + } + + if (sd == null) { + external = false; + wpr = pr; + } else { + wpr = sd; + } + + t = new Ctor(0.03125); + + // while abs(x) >= 0.1 + while (x.e > -2) { + + // x = x / 2^5 + x = x.times(t); + k += 5; + } + + // Use 2 * log10(2^k) + 5 (empirically derived) to estimate the increase in precision + // necessary to ensure the first 4 rounding digits are correct. + guard = Math.log(mathpow(2, k)) / Math.LN10 * 2 + 5 | 0; + wpr += guard; + denominator = pow = sum = new Ctor(1); + Ctor.precision = wpr; + + for (;;) { + pow = finalise(pow.times(x), wpr, 1); + denominator = denominator.times(++i); + t = sum.plus(divide(pow, denominator, wpr, 1)); + + if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) { + j = k; + while (j--) sum = finalise(sum.times(sum), wpr, 1); + + // Check to see if the first 4 rounding digits are [49]999. + // If so, repeat the summation with a higher precision, otherwise + // e.g. with precision: 18, rounding: 1 + // exp(18.404272462595034083567793919843761) = 98372560.1229999999 (should be 98372560.123) + // `wpr - guard` is the index of first rounding digit. + if (sd == null) { + + if (rep < 3 && checkRoundingDigits(sum.d, wpr - guard, rm, rep)) { + Ctor.precision = wpr += 10; + denominator = pow = t = new Ctor(1); + i = 0; + rep++; + } else { + return finalise(sum, Ctor.precision = pr, rm, external = true); + } + } else { + Ctor.precision = pr; + return sum; + } + } + + sum = t; + } + } + + + /* + * Return a new Decimal whose value is the natural logarithm of `x` rounded to `sd` significant + * digits. + * + * ln(-n) = NaN + * ln(0) = -Infinity + * ln(-0) = -Infinity + * ln(1) = 0 + * ln(Infinity) = Infinity + * ln(-Infinity) = NaN + * ln(NaN) = NaN + * + * ln(n) (n != 1) is non-terminating. + * + */ + function naturalLogarithm(y, sd) { + var c, c0, denominator, e, numerator, rep, sum, t, wpr, x1, x2, + n = 1, + guard = 10, + x = y, + xd = x.d, + Ctor = x.constructor, + rm = Ctor.rounding, + pr = Ctor.precision; + + // Is x negative or Infinity, NaN, 0 or 1? + if (x.s < 0 || !xd || !xd[0] || !x.e && xd[0] == 1 && xd.length == 1) { + return new Ctor(xd && !xd[0] ? -1 / 0 : x.s != 1 ? NaN : xd ? 0 : x); + } + + if (sd == null) { + external = false; + wpr = pr; + } else { + wpr = sd; + } + + Ctor.precision = wpr += guard; + c = digitsToString(xd); + c0 = c.charAt(0); + + if (Math.abs(e = x.e) < 1.5e15) { + + // Argument reduction. + // The series converges faster the closer the argument is to 1, so using + // ln(a^b) = b * ln(a), ln(a) = ln(a^b) / b + // multiply the argument by itself until the leading digits of the significand are 7, 8, 9, + // 10, 11, 12 or 13, recording the number of multiplications so the sum of the series can + // later be divided by this number, then separate out the power of 10 using + // ln(a*10^b) = ln(a) + b*ln(10). + + // max n is 21 (gives 0.9, 1.0 or 1.1) (9e15 / 21 = 4.2e14). + //while (c0 < 9 && c0 != 1 || c0 == 1 && c.charAt(1) > 1) { + // max n is 6 (gives 0.7 - 1.3) + while (c0 < 7 && c0 != 1 || c0 == 1 && c.charAt(1) > 3) { + x = x.times(y); + c = digitsToString(x.d); + c0 = c.charAt(0); + n++; + } + + e = x.e; + + if (c0 > 1) { + x = new Ctor('0.' + c); + e++; + } else { + x = new Ctor(c0 + '.' + c.slice(1)); + } + } else { + + // The argument reduction method above may result in overflow if the argument y is a massive + // number with exponent >= 1500000000000000 (9e15 / 6 = 1.5e15), so instead recall this + // function using ln(x*10^e) = ln(x) + e*ln(10). + t = getLn10(Ctor, wpr + 2, pr).times(e + ''); + x = naturalLogarithm(new Ctor(c0 + '.' + c.slice(1)), wpr - guard).plus(t); + Ctor.precision = pr; + + return sd == null ? finalise(x, pr, rm, external = true) : x; + } + + // x1 is x reduced to a value near 1. + x1 = x; + + // Taylor series. + // ln(y) = ln((1 + x)/(1 - x)) = 2(x + x^3/3 + x^5/5 + x^7/7 + ...) + // where x = (y - 1)/(y + 1) (|x| < 1) + sum = numerator = x = divide(x.minus(1), x.plus(1), wpr, 1); + x2 = finalise(x.times(x), wpr, 1); + denominator = 3; + + for (;;) { + numerator = finalise(numerator.times(x2), wpr, 1); + t = sum.plus(divide(numerator, new Ctor(denominator), wpr, 1)); + + if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) { + sum = sum.times(2); + + // Reverse the argument reduction. Check that e is not 0 because, besides preventing an + // unnecessary calculation, -0 + 0 = +0 and to ensure correct rounding -0 needs to stay -0. + if (e !== 0) sum = sum.plus(getLn10(Ctor, wpr + 2, pr).times(e + '')); + sum = divide(sum, new Ctor(n), wpr, 1); + + // Is rm > 3 and the first 4 rounding digits 4999, or rm < 4 (or the summation has + // been repeated previously) and the first 4 rounding digits 9999? + // If so, restart the summation with a higher precision, otherwise + // e.g. with precision: 12, rounding: 1 + // ln(135520028.6126091714265381533) = 18.7246299999 when it should be 18.72463. + // `wpr - guard` is the index of first rounding digit. + if (sd == null) { + if (checkRoundingDigits(sum.d, wpr - guard, rm, rep)) { + Ctor.precision = wpr += guard; + t = numerator = x = divide(x1.minus(1), x1.plus(1), wpr, 1); + x2 = finalise(x.times(x), wpr, 1); + denominator = rep = 1; + } else { + return finalise(sum, Ctor.precision = pr, rm, external = true); + } + } else { + Ctor.precision = pr; + return sum; + } + } + + sum = t; + denominator += 2; + } + } + + + // ±Infinity, NaN. + function nonFiniteToString(x) { + // Unsigned. + return String(x.s * x.s / 0); + } + + + /* + * Parse the value of a new Decimal `x` from string `str`. + */ + function parseDecimal(x, str) { + var e, i, len; + + // Decimal point? + if ((e = str.indexOf('.')) > -1) str = str.replace('.', ''); + + // Exponential form? + if ((i = str.search(/e/i)) > 0) { + + // Determine exponent. + if (e < 0) e = i; + e += +str.slice(i + 1); + str = str.substring(0, i); + } else if (e < 0) { + + // Integer. + e = str.length; + } + + // Determine leading zeros. + for (i = 0; str.charCodeAt(i) === 48; i++); + + // Determine trailing zeros. + for (len = str.length; str.charCodeAt(len - 1) === 48; --len); + str = str.slice(i, len); + + if (str) { + len -= i; + x.e = e = e - i - 1; + x.d = []; + + // Transform base + + // e is the base 10 exponent. + // i is where to slice str to get the first word of the digits array. + i = (e + 1) % LOG_BASE; + if (e < 0) i += LOG_BASE; + + if (i < len) { + if (i) x.d.push(+str.slice(0, i)); + for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE)); + str = str.slice(i); + i = LOG_BASE - str.length; + } else { + i -= len; + } + + for (; i--;) str += '0'; + x.d.push(+str); + + if (external) { + + // Overflow? + if (x.e > x.constructor.maxE) { + + // Infinity. + x.d = null; + x.e = NaN; + + // Underflow? + } else if (x.e < x.constructor.minE) { + + // Zero. + x.e = 0; + x.d = [0]; + // x.constructor.underflow = true; + } // else x.constructor.underflow = false; + } + } else { + + // Zero. + x.e = 0; + x.d = [0]; + } + + return x; + } + + + /* + * Parse the value of a new Decimal `x` from a string `str`, which is not a decimal value. + */ + function parseOther(x, str) { + var base, Ctor, divisor, i, isFloat, len, p, xd, xe; + + if (str === 'Infinity' || str === 'NaN') { + if (!+str) x.s = NaN; + x.e = NaN; + x.d = null; + return x; + } + + if (isHex.test(str)) { + base = 16; + str = str.toLowerCase(); + } else if (isBinary.test(str)) { + base = 2; + } else if (isOctal.test(str)) { + base = 8; + } else { + throw Error(invalidArgument + str); + } + + // Is there a binary exponent part? + i = str.search(/p/i); + + if (i > 0) { + p = +str.slice(i + 1); + str = str.substring(2, i); + } else { + str = str.slice(2); + } + + // Convert `str` as an integer then divide the result by `base` raised to a power such that the + // fraction part will be restored. + i = str.indexOf('.'); + isFloat = i >= 0; + Ctor = x.constructor; + + if (isFloat) { + str = str.replace('.', ''); + len = str.length; + i = len - i; + + // log[10](16) = 1.2041... , log[10](88) = 1.9444.... + divisor = intPow(Ctor, new Ctor(base), i, i * 2); + } + + xd = convertBase(str, base, BASE); + xe = xd.length - 1; + + // Remove trailing zeros. + for (i = xe; xd[i] === 0; --i) xd.pop(); + if (i < 0) return new Ctor(x.s * 0); + x.e = getBase10Exponent(xd, xe); + x.d = xd; + external = false; + + // At what precision to perform the division to ensure exact conversion? + // maxDecimalIntegerPartDigitCount = ceil(log[10](b) * otherBaseIntegerPartDigitCount) + // log[10](2) = 0.30103, log[10](8) = 0.90309, log[10](16) = 1.20412 + // E.g. ceil(1.2 * 3) = 4, so up to 4 decimal digits are needed to represent 3 hex int digits. + // maxDecimalFractionPartDigitCount = {Hex:4|Oct:3|Bin:1} * otherBaseFractionPartDigitCount + // Therefore using 4 * the number of digits of str will always be enough. + if (isFloat) x = divide(x, divisor, len * 4); + + // Multiply by the binary exponent part if present. + if (p) x = x.times(Math.abs(p) < 54 ? mathpow(2, p) : Decimal.pow(2, p)); + external = true; + + return x; + } + + + /* + * sin(x) = x - x^3/3! + x^5/5! - ... + * |x| < pi/2 + * + */ + function sine(Ctor, x) { + var k, + len = x.d.length; + + if (len < 3) return taylorSeries(Ctor, 2, x, x); + + // Argument reduction: sin(5x) = 16*sin^5(x) - 20*sin^3(x) + 5*sin(x) + // i.e. sin(x) = 16*sin^5(x/5) - 20*sin^3(x/5) + 5*sin(x/5) + // and sin(x) = sin(x/5)(5 + sin^2(x/5)(16sin^2(x/5) - 20)) + + // Estimate the optimum number of times to use the argument reduction. + k = 1.4 * Math.sqrt(len); + k = k > 16 ? 16 : k | 0; + + x = x.times(1 / tinyPow(5, k)); + x = taylorSeries(Ctor, 2, x, x); + + // Reverse argument reduction + var sin2_x, + d5 = new Ctor(5), + d16 = new Ctor(16), + d20 = new Ctor(20); + for (; k--;) { + sin2_x = x.times(x); + x = x.times(d5.plus(sin2_x.times(d16.times(sin2_x).minus(d20)))); + } + + return x; + } + + + // Calculate Taylor series for `cos`, `cosh`, `sin` and `sinh`. + function taylorSeries(Ctor, n, x, y, isHyperbolic) { + var j, t, u, x2, + i = 1, + pr = Ctor.precision, + k = Math.ceil(pr / LOG_BASE); + + external = false; + x2 = x.times(x); + u = new Ctor(y); + + for (;;) { + t = divide(u.times(x2), new Ctor(n++ * n++), pr, 1); + u = isHyperbolic ? y.plus(t) : y.minus(t); + y = divide(t.times(x2), new Ctor(n++ * n++), pr, 1); + t = u.plus(y); + + if (t.d[k] !== void 0) { + for (j = k; t.d[j] === u.d[j] && j--;); + if (j == -1) break; + } + + j = u; + u = y; + y = t; + t = j; + i++; + } + + external = true; + t.d.length = k + 1; + + return t; + } + + + // Exponent e must be positive and non-zero. + function tinyPow(b, e) { + var n = b; + while (--e) n *= b; + return n; + } + + + // Return the absolute value of `x` reduced to less than or equal to half pi. + function toLessThanHalfPi(Ctor, x) { + var t, + isNeg = x.s < 0, + pi = getPi(Ctor, Ctor.precision, 1), + halfPi = pi.times(0.5); + + x = x.abs(); + + if (x.lte(halfPi)) { + quadrant = isNeg ? 4 : 1; + return x; + } + + t = x.divToInt(pi); + + if (t.isZero()) { + quadrant = isNeg ? 3 : 2; + } else { + x = x.minus(t.times(pi)); + + // 0 <= x < pi + if (x.lte(halfPi)) { + quadrant = isOdd(t) ? (isNeg ? 2 : 3) : (isNeg ? 4 : 1); + return x; + } + + quadrant = isOdd(t) ? (isNeg ? 1 : 4) : (isNeg ? 3 : 2); + } + + return x.minus(pi).abs(); + } + + + /* + * Return the value of Decimal `x` as a string in base `baseOut`. + * + * If the optional `sd` argument is present include a binary exponent suffix. + */ + function toStringBinary(x, baseOut, sd, rm) { + var base, e, i, k, len, roundUp, str, xd, y, + Ctor = x.constructor, + isExp = sd !== void 0; + + if (isExp) { + checkInt32(sd, 1, MAX_DIGITS); + if (rm === void 0) rm = Ctor.rounding; + else checkInt32(rm, 0, 8); + } else { + sd = Ctor.precision; + rm = Ctor.rounding; + } + + if (!x.isFinite()) { + str = nonFiniteToString(x); + } else { + str = finiteToString(x); + i = str.indexOf('.'); + + // Use exponential notation according to `toExpPos` and `toExpNeg`? No, but if required: + // maxBinaryExponent = floor((decimalExponent + 1) * log[2](10)) + // minBinaryExponent = floor(decimalExponent * log[2](10)) + // log[2](10) = 3.321928094887362347870319429489390175864 + + if (isExp) { + base = 2; + if (baseOut == 16) { + sd = sd * 4 - 3; + } else if (baseOut == 8) { + sd = sd * 3 - 2; + } + } else { + base = baseOut; + } + + // Convert the number as an integer then divide the result by its base raised to a power such + // that the fraction part will be restored. + + // Non-integer. + if (i >= 0) { + str = str.replace('.', ''); + y = new Ctor(1); + y.e = str.length - i; + y.d = convertBase(finiteToString(y), 10, base); + y.e = y.d.length; + } + + xd = convertBase(str, 10, base); + e = len = xd.length; + + // Remove trailing zeros. + for (; xd[--len] == 0;) xd.pop(); + + if (!xd[0]) { + str = isExp ? '0p+0' : '0'; + } else { + if (i < 0) { + e--; + } else { + x = new Ctor(x); + x.d = xd; + x.e = e; + x = divide(x, y, sd, rm, 0, base); + xd = x.d; + e = x.e; + roundUp = inexact; + } + + // The rounding digit, i.e. the digit after the digit that may be rounded up. + i = xd[sd]; + k = base / 2; + roundUp = roundUp || xd[sd + 1] !== void 0; + + roundUp = rm < 4 + ? (i !== void 0 || roundUp) && (rm === 0 || rm === (x.s < 0 ? 3 : 2)) + : i > k || i === k && (rm === 4 || roundUp || rm === 6 && xd[sd - 1] & 1 || + rm === (x.s < 0 ? 8 : 7)); + + xd.length = sd; + + if (roundUp) { + + // Rounding up may mean the previous digit has to be rounded up and so on. + for (; ++xd[--sd] > base - 1;) { + xd[sd] = 0; + if (!sd) { + ++e; + xd.unshift(1); + } + } + } + + // Determine trailing zeros. + for (len = xd.length; !xd[len - 1]; --len); + + // E.g. [4, 11, 15] becomes 4bf. + for (i = 0, str = ''; i < len; i++) str += NUMERALS.charAt(xd[i]); + + // Add binary exponent suffix? + if (isExp) { + if (len > 1) { + if (baseOut == 16 || baseOut == 8) { + i = baseOut == 16 ? 4 : 3; + for (--len; len % i; len++) str += '0'; + xd = convertBase(str, base, baseOut); + for (len = xd.length; !xd[len - 1]; --len); + + // xd[0] will always be be 1 + for (i = 1, str = '1.'; i < len; i++) str += NUMERALS.charAt(xd[i]); + } else { + str = str.charAt(0) + '.' + str.slice(1); + } + } + + str = str + (e < 0 ? 'p' : 'p+') + e; + } else if (e < 0) { + for (; ++e;) str = '0' + str; + str = '0.' + str; + } else { + if (++e > len) for (e -= len; e-- ;) str += '0'; + else if (e < len) str = str.slice(0, e) + '.' + str.slice(e); + } + } + + str = (baseOut == 16 ? '0x' : baseOut == 2 ? '0b' : baseOut == 8 ? '0o' : '') + str; + } + + return x.s < 0 ? '-' + str : str; + } + + + // Does not strip trailing zeros. + function truncate(arr, len) { + if (arr.length > len) { + arr.length = len; + return true; + } + } + + + // Decimal methods + + + /* + * abs + * acos + * acosh + * add + * asin + * asinh + * atan + * atanh + * atan2 + * cbrt + * ceil + * clone + * config + * cos + * cosh + * div + * exp + * floor + * hypot + * ln + * log + * log2 + * log10 + * max + * min + * mod + * mul + * pow + * random + * round + * set + * sign + * sin + * sinh + * sqrt + * sub + * tan + * tanh + * trunc + */ + + + /* + * Return a new Decimal whose value is the absolute value of `x`. + * + * x {number|string|Decimal} + * + */ + function abs(x) { + return new this(x).abs(); + } + + + /* + * Return a new Decimal whose value is the arccosine in radians of `x`. + * + * x {number|string|Decimal} + * + */ + function acos(x) { + return new this(x).acos(); + } + + + /* + * Return a new Decimal whose value is the inverse of the hyperbolic cosine of `x`, rounded to + * `precision` significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} A value in radians. + * + */ + function acosh(x) { + return new this(x).acosh(); + } + + + /* + * Return a new Decimal whose value is the sum of `x` and `y`, rounded to `precision` significant + * digits using rounding mode `rounding`. + * + * x {number|string|Decimal} + * y {number|string|Decimal} + * + */ + function add(x, y) { + return new this(x).plus(y); + } + + + /* + * Return a new Decimal whose value is the arcsine in radians of `x`, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} + * + */ + function asin(x) { + return new this(x).asin(); + } + + + /* + * Return a new Decimal whose value is the inverse of the hyperbolic sine of `x`, rounded to + * `precision` significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} A value in radians. + * + */ + function asinh(x) { + return new this(x).asinh(); + } + + + /* + * Return a new Decimal whose value is the arctangent in radians of `x`, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} + * + */ + function atan(x) { + return new this(x).atan(); + } + + + /* + * Return a new Decimal whose value is the inverse of the hyperbolic tangent of `x`, rounded to + * `precision` significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} A value in radians. + * + */ + function atanh(x) { + return new this(x).atanh(); + } + + + /* + * Return a new Decimal whose value is the arctangent in radians of `y/x` in the range -pi to pi + * (inclusive), rounded to `precision` significant digits using rounding mode `rounding`. + * + * Domain: [-Infinity, Infinity] + * Range: [-pi, pi] + * + * y {number|string|Decimal} The y-coordinate. + * x {number|string|Decimal} The x-coordinate. + * + * atan2(±0, -0) = ±pi + * atan2(±0, +0) = ±0 + * atan2(±0, -x) = ±pi for x > 0 + * atan2(±0, x) = ±0 for x > 0 + * atan2(-y, ±0) = -pi/2 for y > 0 + * atan2(y, ±0) = pi/2 for y > 0 + * atan2(±y, -Infinity) = ±pi for finite y > 0 + * atan2(±y, +Infinity) = ±0 for finite y > 0 + * atan2(±Infinity, x) = ±pi/2 for finite x + * atan2(±Infinity, -Infinity) = ±3*pi/4 + * atan2(±Infinity, +Infinity) = ±pi/4 + * atan2(NaN, x) = NaN + * atan2(y, NaN) = NaN + * + */ + function atan2(y, x) { + y = new this(y); + x = new this(x); + var r, + pr = this.precision, + rm = this.rounding, + wpr = pr + 4; + + // Either NaN + if (!y.s || !x.s) { + r = new this(NaN); + + // Both ±Infinity + } else if (!y.d && !x.d) { + r = getPi(this, wpr, 1).times(x.s > 0 ? 0.25 : 0.75); + r.s = y.s; + + // x is ±Infinity or y is ±0 + } else if (!x.d || y.isZero()) { + r = x.s < 0 ? getPi(this, pr, rm) : new this(0); + r.s = y.s; + + // y is ±Infinity or x is ±0 + } else if (!y.d || x.isZero()) { + r = getPi(this, wpr, 1).times(0.5); + r.s = y.s; + + // Both non-zero and finite + } else if (x.s < 0) { + this.precision = wpr; + this.rounding = 1; + r = this.atan(divide(y, x, wpr, 1)); + x = getPi(this, wpr, 1); + this.precision = pr; + this.rounding = rm; + r = y.s < 0 ? r.minus(x) : r.plus(x); + } else { + r = this.atan(divide(y, x, wpr, 1)); + } + + return r; + } + + + /* + * Return a new Decimal whose value is the cube root of `x`, rounded to `precision` significant + * digits using rounding mode `rounding`. + * + * x {number|string|Decimal} + * + */ + function cbrt(x) { + return new this(x).cbrt(); + } + + + /* + * Return a new Decimal whose value is `x` rounded to an integer using `ROUND_CEIL`. + * + * x {number|string|Decimal} + * + */ + function ceil(x) { + return finalise(x = new this(x), x.e + 1, 2); + } + + + /* + * Configure global settings for a Decimal constructor. + * + * `obj` is an object with one or more of the following properties, + * + * precision {number} + * rounding {number} + * toExpNeg {number} + * toExpPos {number} + * maxE {number} + * minE {number} + * modulo {number} + * crypto {boolean|number} + * defaults {true} + * + * E.g. Decimal.config({ precision: 20, rounding: 4 }) + * + */ + function config(obj) { + if (!obj || typeof obj !== 'object') throw Error(decimalError + 'Object expected'); + var i, p, v, + useDefaults = obj.defaults === true, + ps = [ + 'precision', 1, MAX_DIGITS, + 'rounding', 0, 8, + 'toExpNeg', -EXP_LIMIT, 0, + 'toExpPos', 0, EXP_LIMIT, + 'maxE', 0, EXP_LIMIT, + 'minE', -EXP_LIMIT, 0, + 'modulo', 0, 9 + ]; + + for (i = 0; i < ps.length; i += 3) { + if (p = ps[i], useDefaults) this[p] = DEFAULTS[p]; + if ((v = obj[p]) !== void 0) { + if (mathfloor(v) === v && v >= ps[i + 1] && v <= ps[i + 2]) this[p] = v; + else throw Error(invalidArgument + p + ': ' + v); + } + } + + if (p = 'crypto', useDefaults) this[p] = DEFAULTS[p]; + if ((v = obj[p]) !== void 0) { + if (v === true || v === false || v === 0 || v === 1) { + if (v) { + if (typeof crypto != 'undefined' && crypto && + (crypto.getRandomValues || crypto.randomBytes)) { + this[p] = true; + } else { + throw Error(cryptoUnavailable); + } + } else { + this[p] = false; + } + } else { + throw Error(invalidArgument + p + ': ' + v); + } + } + + return this; + } + + + /* + * Return a new Decimal whose value is the cosine of `x`, rounded to `precision` significant + * digits using rounding mode `rounding`. + * + * x {number|string|Decimal} A value in radians. + * + */ + function cos(x) { + return new this(x).cos(); + } + + + /* + * Return a new Decimal whose value is the hyperbolic cosine of `x`, rounded to precision + * significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} A value in radians. + * + */ + function cosh(x) { + return new this(x).cosh(); + } + + + /* + * Create and return a Decimal constructor with the same configuration properties as this Decimal + * constructor. + * + */ + function clone(obj) { + var i, p, ps; + + /* + * The Decimal constructor and exported function. + * Return a new Decimal instance. + * + * v {number|string|Decimal} A numeric value. + * + */ + function Decimal(v) { + var e, i, t, + x = this; + + // Decimal called without new. + if (!(x instanceof Decimal)) return new Decimal(v); + + // Retain a reference to this Decimal constructor, and shadow Decimal.prototype.constructor + // which points to Object. + x.constructor = Decimal; + + // Duplicate. + if (v instanceof Decimal) { + x.s = v.s; + + if (external) { + if (!v.d || v.e > Decimal.maxE) { + + // Infinity. + x.e = NaN; + x.d = null; + } else if (v.e < Decimal.minE) { + + // Zero. + x.e = 0; + x.d = [0]; + } else { + x.e = v.e; + x.d = v.d.slice(); + } + } else { + x.e = v.e; + x.d = v.d ? v.d.slice() : v.d; + } + + return; + } + + t = typeof v; + + if (t === 'number') { + if (v === 0) { + x.s = 1 / v < 0 ? -1 : 1; + x.e = 0; + x.d = [0]; + return; + } + + if (v < 0) { + v = -v; + x.s = -1; + } else { + x.s = 1; + } + + // Fast path for small integers. + if (v === ~~v && v < 1e7) { + for (e = 0, i = v; i >= 10; i /= 10) e++; + + if (external) { + if (e > Decimal.maxE) { + x.e = NaN; + x.d = null; + } else if (e < Decimal.minE) { + x.e = 0; + x.d = [0]; + } else { + x.e = e; + x.d = [v]; + } + } else { + x.e = e; + x.d = [v]; + } + + return; + + // Infinity, NaN. + } else if (v * 0 !== 0) { + if (!v) x.s = NaN; + x.e = NaN; + x.d = null; + return; + } + + return parseDecimal(x, v.toString()); + + } else if (t !== 'string') { + throw Error(invalidArgument + v); + } + + // Minus sign? + if ((i = v.charCodeAt(0)) === 45) { + v = v.slice(1); + x.s = -1; + } else { + // Plus sign? + if (i === 43) v = v.slice(1); + x.s = 1; + } + + return isDecimal.test(v) ? parseDecimal(x, v) : parseOther(x, v); + } + + Decimal.prototype = P; + + Decimal.ROUND_UP = 0; + Decimal.ROUND_DOWN = 1; + Decimal.ROUND_CEIL = 2; + Decimal.ROUND_FLOOR = 3; + Decimal.ROUND_HALF_UP = 4; + Decimal.ROUND_HALF_DOWN = 5; + Decimal.ROUND_HALF_EVEN = 6; + Decimal.ROUND_HALF_CEIL = 7; + Decimal.ROUND_HALF_FLOOR = 8; + Decimal.EUCLID = 9; + + Decimal.config = Decimal.set = config; + Decimal.clone = clone; + Decimal.isDecimal = isDecimalInstance; + + Decimal.abs = abs; + Decimal.acos = acos; + Decimal.acosh = acosh; // ES6 + Decimal.add = add; + Decimal.asin = asin; + Decimal.asinh = asinh; // ES6 + Decimal.atan = atan; + Decimal.atanh = atanh; // ES6 + Decimal.atan2 = atan2; + Decimal.cbrt = cbrt; // ES6 + Decimal.ceil = ceil; + Decimal.cos = cos; + Decimal.cosh = cosh; // ES6 + Decimal.div = div; + Decimal.exp = exp; + Decimal.floor = floor; + Decimal.hypot = hypot; // ES6 + Decimal.ln = ln; + Decimal.log = log; + Decimal.log10 = log10; // ES6 + Decimal.log2 = log2; // ES6 + Decimal.max = max; + Decimal.min = min; + Decimal.mod = mod; + Decimal.mul = mul; + Decimal.pow = pow; + Decimal.random = random; + Decimal.round = round; + Decimal.sign = sign; // ES6 + Decimal.sin = sin; + Decimal.sinh = sinh; // ES6 + Decimal.sqrt = sqrt; + Decimal.sub = sub; + Decimal.tan = tan; + Decimal.tanh = tanh; // ES6 + Decimal.trunc = trunc; // ES6 + + if (obj === void 0) obj = {}; + if (obj) { + if (obj.defaults !== true) { + ps = ['precision', 'rounding', 'toExpNeg', 'toExpPos', 'maxE', 'minE', 'modulo', 'crypto']; + for (i = 0; i < ps.length;) if (!obj.hasOwnProperty(p = ps[i++])) obj[p] = this[p]; + } + } + + Decimal.config(obj); + + return Decimal; + } + + + /* + * Return a new Decimal whose value is `x` divided by `y`, rounded to `precision` significant + * digits using rounding mode `rounding`. + * + * x {number|string|Decimal} + * y {number|string|Decimal} + * + */ + function div(x, y) { + return new this(x).div(y); + } + + + /* + * Return a new Decimal whose value is the natural exponential of `x`, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} The power to which to raise the base of the natural log. + * + */ + function exp(x) { + return new this(x).exp(); + } + + + /* + * Return a new Decimal whose value is `x` round to an integer using `ROUND_FLOOR`. + * + * x {number|string|Decimal} + * + */ + function floor(x) { + return finalise(x = new this(x), x.e + 1, 3); + } + + + /* + * Return a new Decimal whose value is the square root of the sum of the squares of the arguments, + * rounded to `precision` significant digits using rounding mode `rounding`. + * + * hypot(a, b, ...) = sqrt(a^2 + b^2 + ...) + * + * arguments {number|string|Decimal} + * + */ + function hypot() { + var i, n, + t = new this(0); + + external = false; + + for (i = 0; i < arguments.length;) { + n = new this(arguments[i++]); + if (!n.d) { + if (n.s) { + external = true; + return new this(1 / 0); + } + t = n; + } else if (t.d) { + t = t.plus(n.times(n)); + } + } + + external = true; + + return t.sqrt(); + } + + + /* + * Return true if object is a Decimal instance (where Decimal is any Decimal constructor), + * otherwise return false. + * + */ + function isDecimalInstance(obj) { + return obj instanceof Decimal || obj && obj.name === '[object Decimal]' || false; + } + + + /* + * Return a new Decimal whose value is the natural logarithm of `x`, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} + * + */ + function ln(x) { + return new this(x).ln(); + } + + + /* + * Return a new Decimal whose value is the log of `x` to the base `y`, or to base 10 if no base + * is specified, rounded to `precision` significant digits using rounding mode `rounding`. + * + * log[y](x) + * + * x {number|string|Decimal} The argument of the logarithm. + * y {number|string|Decimal} The base of the logarithm. + * + */ + function log(x, y) { + return new this(x).log(y); + } + + + /* + * Return a new Decimal whose value is the base 2 logarithm of `x`, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} + * + */ + function log2(x) { + return new this(x).log(2); + } + + + /* + * Return a new Decimal whose value is the base 10 logarithm of `x`, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} + * + */ + function log10(x) { + return new this(x).log(10); + } + + + /* + * Return a new Decimal whose value is the maximum of the arguments. + * + * arguments {number|string|Decimal} + * + */ + function max() { + return maxOrMin(this, arguments, 'lt'); + } + + + /* + * Return a new Decimal whose value is the minimum of the arguments. + * + * arguments {number|string|Decimal} + * + */ + function min() { + return maxOrMin(this, arguments, 'gt'); + } + + + /* + * Return a new Decimal whose value is `x` modulo `y`, rounded to `precision` significant digits + * using rounding mode `rounding`. + * + * x {number|string|Decimal} + * y {number|string|Decimal} + * + */ + function mod(x, y) { + return new this(x).mod(y); + } + + + /* + * Return a new Decimal whose value is `x` multiplied by `y`, rounded to `precision` significant + * digits using rounding mode `rounding`. + * + * x {number|string|Decimal} + * y {number|string|Decimal} + * + */ + function mul(x, y) { + return new this(x).mul(y); + } + + + /* + * Return a new Decimal whose value is `x` raised to the power `y`, rounded to precision + * significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} The base. + * y {number|string|Decimal} The exponent. + * + */ + function pow(x, y) { + return new this(x).pow(y); + } + + + /* + * Returns a new Decimal with a random value equal to or greater than 0 and less than 1, and with + * `sd`, or `Decimal.precision` if `sd` is omitted, significant digits (or less if trailing zeros + * are produced). + * + * [sd] {number} Significant digits. Integer, 0 to MAX_DIGITS inclusive. + * + */ + function random(sd) { + var d, e, k, n, + i = 0, + r = new this(1), + rd = []; + + if (sd === void 0) sd = this.precision; + else checkInt32(sd, 1, MAX_DIGITS); + + k = Math.ceil(sd / LOG_BASE); + + if (!this.crypto) { + for (; i < k;) rd[i++] = Math.random() * 1e7 | 0; + + // Browsers supporting crypto.getRandomValues. + } else if (crypto.getRandomValues) { + d = crypto.getRandomValues(new Uint32Array(k)); + + for (; i < k;) { + n = d[i]; + + // 0 <= n < 4294967296 + // Probability n >= 4.29e9, is 4967296 / 4294967296 = 0.00116 (1 in 865). + if (n >= 4.29e9) { + d[i] = crypto.getRandomValues(new Uint32Array(1))[0]; + } else { + + // 0 <= n <= 4289999999 + // 0 <= (n % 1e7) <= 9999999 + rd[i++] = n % 1e7; + } + } + + // Node.js supporting crypto.randomBytes. + } else if (crypto.randomBytes) { + + // buffer + d = crypto.randomBytes(k *= 4); + + for (; i < k;) { + + // 0 <= n < 2147483648 + n = d[i] + (d[i + 1] << 8) + (d[i + 2] << 16) + ((d[i + 3] & 0x7f) << 24); + + // Probability n >= 2.14e9, is 7483648 / 2147483648 = 0.0035 (1 in 286). + if (n >= 2.14e9) { + crypto.randomBytes(4).copy(d, i); + } else { + + // 0 <= n <= 2139999999 + // 0 <= (n % 1e7) <= 9999999 + rd.push(n % 1e7); + i += 4; + } + } + + i = k / 4; + } else { + throw Error(cryptoUnavailable); + } + + k = rd[--i]; + sd %= LOG_BASE; + + // Convert trailing digits to zeros according to sd. + if (k && sd) { + n = mathpow(10, LOG_BASE - sd); + rd[i] = (k / n | 0) * n; + } + + // Remove trailing words which are zero. + for (; rd[i] === 0; i--) rd.pop(); + + // Zero? + if (i < 0) { + e = 0; + rd = [0]; + } else { + e = -1; + + // Remove leading words which are zero and adjust exponent accordingly. + for (; rd[0] === 0; e -= LOG_BASE) rd.shift(); + + // Count the digits of the first word of rd to determine leading zeros. + for (k = 1, n = rd[0]; n >= 10; n /= 10) k++; + + // Adjust the exponent for leading zeros of the first word of rd. + if (k < LOG_BASE) e -= LOG_BASE - k; + } + + r.e = e; + r.d = rd; + + return r; + } + + + /* + * Return a new Decimal whose value is `x` rounded to an integer using rounding mode `rounding`. + * + * To emulate `Math.round`, set rounding to 7 (ROUND_HALF_CEIL). + * + * x {number|string|Decimal} + * + */ + function round(x) { + return finalise(x = new this(x), x.e + 1, this.rounding); + } + + + /* + * Return + * 1 if x > 0, + * -1 if x < 0, + * 0 if x is 0, + * -0 if x is -0, + * NaN otherwise + * + * x {number|string|Decimal} + * + */ + function sign(x) { + x = new this(x); + return x.d ? (x.d[0] ? x.s : 0 * x.s) : x.s || NaN; + } + + + /* + * Return a new Decimal whose value is the sine of `x`, rounded to `precision` significant digits + * using rounding mode `rounding`. + * + * x {number|string|Decimal} A value in radians. + * + */ + function sin(x) { + return new this(x).sin(); + } + + + /* + * Return a new Decimal whose value is the hyperbolic sine of `x`, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} A value in radians. + * + */ + function sinh(x) { + return new this(x).sinh(); + } + + + /* + * Return a new Decimal whose value is the square root of `x`, rounded to `precision` significant + * digits using rounding mode `rounding`. + * + * x {number|string|Decimal} + * + */ + function sqrt(x) { + return new this(x).sqrt(); + } + + + /* + * Return a new Decimal whose value is `x` minus `y`, rounded to `precision` significant digits + * using rounding mode `rounding`. + * + * x {number|string|Decimal} + * y {number|string|Decimal} + * + */ + function sub(x, y) { + return new this(x).sub(y); + } + + + /* + * Return a new Decimal whose value is the tangent of `x`, rounded to `precision` significant + * digits using rounding mode `rounding`. + * + * x {number|string|Decimal} A value in radians. + * + */ + function tan(x) { + return new this(x).tan(); + } + + + /* + * Return a new Decimal whose value is the hyperbolic tangent of `x`, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} A value in radians. + * + */ + function tanh(x) { + return new this(x).tanh(); + } + + + /* + * Return a new Decimal whose value is `x` truncated to an integer. + * + * x {number|string|Decimal} + * + */ + function trunc(x) { + return finalise(x = new this(x), x.e + 1, 1); + } + + + // Create and configure initial Decimal constructor. + Decimal = clone(DEFAULTS); + + Decimal['default'] = Decimal.Decimal = Decimal; + + // Create the internal constants from their string values. + LN10 = new Decimal(LN10); + PI = new Decimal(PI); + + + // Export. + + + // AMD. + if (typeof define == 'function' && define.amd) { + define(function () { + return Decimal; + }); + + // Node and other environments that support module.exports. + } else if (typeof module != 'undefined' && module.exports) { + if (typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol') { + P[Symbol.for('nodejs.util.inspect.custom')] = P.toString; + P[Symbol.toStringTag] = 'Decimal'; + } + + module.exports = Decimal; + + // Browser. + } else { + if (!globalScope) { + globalScope = typeof self != 'undefined' && self && self.self == self ? self : window; + } + + noConflict = globalScope.Decimal; + Decimal.noConflict = function () { + globalScope.Decimal = noConflict; + return Decimal; + }; + + globalScope.Decimal = Decimal; + } +})(this); diff --git a/node_modules/decimal.js/decimal.min.js b/node_modules/decimal.js/decimal.min.js new file mode 100644 index 0000000..7493243 --- /dev/null +++ b/node_modules/decimal.js/decimal.min.js @@ -0,0 +1,2 @@ +/* decimal.js v10.2.1 https://github.com/MikeMcl/decimal.js/LICENCE */!function(n){"use strict";var h,S,e,o,u=9e15,g=1e9,m="0123456789abcdef",t="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",r="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",c={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-u,maxE:u,crypto:!1},N=!0,f="[DecimalError] ",w=f+"Invalid argument: ",s=f+"Precision limit exceeded",a=f+"crypto unavailable",Z=Math.floor,v=Math.pow,l=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,d=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,p=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,b=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,P=1e7,R=7,E=t.length-1,x=r.length-1,y={name:"[object Decimal]"};function M(n){var e,i,t,r=n.length-1,s="",o=n[0];if(0i-1&&(void 0===s[t+1]&&(s[t+1]=0),s[t+1]+=s[t]/i|0,s[t]%=i)}return s.reverse()}y.absoluteValue=y.abs=function(){var n=new this.constructor(this);return n.s<0&&(n.s=1),_(n)},y.ceil=function(){return _(new this.constructor(this),this.e+1,2)},y.comparedTo=y.cmp=function(n){var e,i,t,r,s=this,o=s.d,u=(n=new s.constructor(n)).d,c=s.s,f=n.s;if(!o||!u)return c&&f?c!==f?c:o===u?0:!o^c<0?1:-1:NaN;if(!o[0]||!u[0])return o[0]?c:u[0]?-f:0;if(c!==f)return c;if(s.e!==n.e)return s.e>n.e^c<0?1:-1;for(e=0,i=(t=o.length)<(r=u.length)?t:r;eu[e]^c<0?1:-1;return t===r?0:rthis.d.length-2},y.isNaN=function(){return!this.s},y.isNegative=y.isNeg=function(){return this.s<0},y.isPositive=y.isPos=function(){return 0e&&(e=this.e+1)):e=NaN,e},y.round=function(){var n=this.constructor;return _(new n(this),this.e+1,n.rounding)},y.sine=y.sin=function(){var n,e,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(n=t.precision,e=t.rounding,t.precision=n+Math.max(i.e,i.sd())+R,t.rounding=1,i=function(n,e){var i,t=e.d.length;if(t<3)return G(n,2,e,e);i=16<(i=1.4*Math.sqrt(t))?16:0|i,e=e.times(1/K(5,i)),e=G(n,2,e,e);for(var r,s=new n(5),o=new n(16),u=new n(20);i--;)r=e.times(e),e=e.times(s.plus(r.times(o.times(r).minus(u))));return e}(t,Q(t,i)),t.precision=n,t.rounding=e,_(2=n.d.length-1&&(i=f<0?-f:f)<=9007199254740991)return r=V(c,u,i,t),n.s<0?new c(1).div(r):_(r,t,s);if((o=u.s)<0){if(ec.maxE+1||e=t.toExpPos):(q(n,1,g),void 0===e?e=t.rounding:q(e,0,8),A(i=_(new t(i),n,e),n<=i.e||i.e<=t.toExpNeg,n));return i.isNeg()&&!i.isZero()?"-"+r:r},y.toSignificantDigits=y.toSD=function(n,e){var i=this.constructor;return void 0===n?(n=i.precision,e=i.rounding):(q(n,1,g),void 0===e?e=i.rounding:q(e,0,8)),_(new i(this),n,e)},y.toString=function(){var n=this,e=n.constructor,i=A(n,n.e<=e.toExpNeg||n.e>=e.toExpPos);return n.isNeg()&&!n.isZero()?"-"+i:i},y.truncated=y.trunc=function(){return _(new this.constructor(this),this.e+1,1)},y.valueOf=y.toJSON=function(){var n=this,e=n.constructor,i=A(n,n.e<=e.toExpNeg||n.e>=e.toExpPos);return n.isNeg()?"-"+i:i};var F=function(n,e,i,t,r,s){var o,u,c,f,a,h,l,d,p,g,m,w,v,N,b,E,x,y,M,q,O=n.constructor,D=n.s==e.s?1:-1,F=n.d,A=e.d;if(!(F&&F[0]&&A&&A[0]))return new O(n.s&&e.s&&(F?!A||F[0]!=A[0]:A)?F&&0==F[0]||!A?0*D:D/0:NaN);for(u=s?(a=1,n.e-e.e):(s=P,a=R,Z(n.e/a)-Z(e.e/a)),M=A.length,x=F.length,g=(p=new O(D)).d=[],c=0;A[c]==(F[c]||0);c++);if(A[c]>(F[c]||0)&&u--,null==i?(N=i=O.precision,t=O.rounding):N=r?i+(n.e-e.e)+1:i,N<0)g.push(1),h=!0;else{if(N=N/a+2|0,c=0,1==M){for(A=A[f=0],N++;(c=s/2&&++y;f=0,(o=T(A,m,M,w))<0?(v=m[0],M!=w&&(v=v*s+(m[1]||0)),1<(f=v/y|0)?(s<=f&&(f=s-1),1==(o=T(l=L(A,f,s),m,d=l.length,w=m.length))&&(f--,U(l,Me[r]?1:-1;break}return s}function U(n,e,i,t){for(var r=0;i--;)n[i]-=r,r=n[i]d.maxE?(n.d=null,n.e=NaN):n.en.constructor.maxE?(n.d=null,n.e=NaN):n.er-1;)h[i]=0,i||(++s,h.unshift(1));for(c=h.length;!h[c-1];--c);for(o=0,a="";oc)for(s-=c;s--;)a+="0";else se&&(n.length=e,1)}function nn(n){return new this(n).abs()}function en(n){return new this(n).acos()}function tn(n){return new this(n).acosh()}function rn(n,e){return new this(n).plus(e)}function sn(n){return new this(n).asin()}function on(n){return new this(n).asinh()}function un(n){return new this(n).atan()}function cn(n){return new this(n).atanh()}function fn(n,e){n=new this(n),e=new this(e);var i,t=this.precision,r=this.rounding,s=t+4;return n.s&&e.s?n.d||e.d?!e.d||n.isZero()?(i=e.s<0?I(this,t,r):new this(0)).s=n.s:!n.d||e.isZero()?(i=I(this,s,1).times(.5)).s=n.s:i=e.s<0?(this.precision=s,this.rounding=1,i=this.atan(F(n,e,s,1)),e=I(this,s,1),this.precision=t,this.rounding=r,n.s<0?i.minus(e):i.plus(e)):this.atan(F(n,e,s,1)):(i=I(this,s,1).times(0s.maxE?(r.e=NaN,r.d=null):n.e + * MIT Licence + */ + + +// ----------------------------------- EDITABLE DEFAULTS ------------------------------------ // + + + // The maximum exponent magnitude. + // The limit on the value of `toExpNeg`, `toExpPos`, `minE` and `maxE`. +var EXP_LIMIT = 9e15, // 0 to 9e15 + + // The limit on the value of `precision`, and on the value of the first argument to + // `toDecimalPlaces`, `toExponential`, `toFixed`, `toPrecision` and `toSignificantDigits`. + MAX_DIGITS = 1e9, // 0 to 1e9 + + // Base conversion alphabet. + NUMERALS = '0123456789abcdef', + + // The natural logarithm of 10 (1025 digits). + LN10 = '2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058', + + // Pi (1025 digits). + PI = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789', + + + // The initial configuration properties of the Decimal constructor. + DEFAULTS = { + + // These values must be integers within the stated ranges (inclusive). + // Most of these values can be changed at run-time using the `Decimal.config` method. + + // The maximum number of significant digits of the result of a calculation or base conversion. + // E.g. `Decimal.config({ precision: 20 });` + precision: 20, // 1 to MAX_DIGITS + + // The rounding mode used when rounding to `precision`. + // + // ROUND_UP 0 Away from zero. + // ROUND_DOWN 1 Towards zero. + // ROUND_CEIL 2 Towards +Infinity. + // ROUND_FLOOR 3 Towards -Infinity. + // ROUND_HALF_UP 4 Towards nearest neighbour. If equidistant, up. + // ROUND_HALF_DOWN 5 Towards nearest neighbour. If equidistant, down. + // ROUND_HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour. + // ROUND_HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity. + // ROUND_HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity. + // + // E.g. + // `Decimal.rounding = 4;` + // `Decimal.rounding = Decimal.ROUND_HALF_UP;` + rounding: 4, // 0 to 8 + + // The modulo mode used when calculating the modulus: a mod n. + // The quotient (q = a / n) is calculated according to the corresponding rounding mode. + // The remainder (r) is calculated as: r = a - n * q. + // + // UP 0 The remainder is positive if the dividend is negative, else is negative. + // DOWN 1 The remainder has the same sign as the dividend (JavaScript %). + // FLOOR 3 The remainder has the same sign as the divisor (Python %). + // HALF_EVEN 6 The IEEE 754 remainder function. + // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). Always positive. + // + // Truncated division (1), floored division (3), the IEEE 754 remainder (6), and Euclidian + // division (9) are commonly used for the modulus operation. The other rounding modes can also + // be used, but they may not give useful results. + modulo: 1, // 0 to 9 + + // The exponent value at and beneath which `toString` returns exponential notation. + // JavaScript numbers: -7 + toExpNeg: -7, // 0 to -EXP_LIMIT + + // The exponent value at and above which `toString` returns exponential notation. + // JavaScript numbers: 21 + toExpPos: 21, // 0 to EXP_LIMIT + + // The minimum exponent value, beneath which underflow to zero occurs. + // JavaScript numbers: -324 (5e-324) + minE: -EXP_LIMIT, // -1 to -EXP_LIMIT + + // The maximum exponent value, above which overflow to Infinity occurs. + // JavaScript numbers: 308 (1.7976931348623157e+308) + maxE: EXP_LIMIT, // 1 to EXP_LIMIT + + // Whether to use cryptographically-secure random number generation, if available. + crypto: false // true/false + }, + + +// ----------------------------------- END OF EDITABLE DEFAULTS ------------------------------- // + + + inexact, quadrant, + external = true, + + decimalError = '[DecimalError] ', + invalidArgument = decimalError + 'Invalid argument: ', + precisionLimitExceeded = decimalError + 'Precision limit exceeded', + cryptoUnavailable = decimalError + 'crypto unavailable', + + mathfloor = Math.floor, + mathpow = Math.pow, + + isBinary = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, + isHex = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, + isOctal = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, + isDecimal = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, + + BASE = 1e7, + LOG_BASE = 7, + MAX_SAFE_INTEGER = 9007199254740991, + + LN10_PRECISION = LN10.length - 1, + PI_PRECISION = PI.length - 1, + + // Decimal.prototype object + P = { name: '[object Decimal]' }; + + +// Decimal prototype methods + + +/* + * absoluteValue abs + * ceil + * comparedTo cmp + * cosine cos + * cubeRoot cbrt + * decimalPlaces dp + * dividedBy div + * dividedToIntegerBy divToInt + * equals eq + * floor + * greaterThan gt + * greaterThanOrEqualTo gte + * hyperbolicCosine cosh + * hyperbolicSine sinh + * hyperbolicTangent tanh + * inverseCosine acos + * inverseHyperbolicCosine acosh + * inverseHyperbolicSine asinh + * inverseHyperbolicTangent atanh + * inverseSine asin + * inverseTangent atan + * isFinite + * isInteger isInt + * isNaN + * isNegative isNeg + * isPositive isPos + * isZero + * lessThan lt + * lessThanOrEqualTo lte + * logarithm log + * [maximum] [max] + * [minimum] [min] + * minus sub + * modulo mod + * naturalExponential exp + * naturalLogarithm ln + * negated neg + * plus add + * precision sd + * round + * sine sin + * squareRoot sqrt + * tangent tan + * times mul + * toBinary + * toDecimalPlaces toDP + * toExponential + * toFixed + * toFraction + * toHexadecimal toHex + * toNearest + * toNumber + * toOctal + * toPower pow + * toPrecision + * toSignificantDigits toSD + * toString + * truncated trunc + * valueOf toJSON + */ + + +/* + * Return a new Decimal whose value is the absolute value of this Decimal. + * + */ +P.absoluteValue = P.abs = function () { + var x = new this.constructor(this); + if (x.s < 0) x.s = 1; + return finalise(x); +}; + + +/* + * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the + * direction of positive Infinity. + * + */ +P.ceil = function () { + return finalise(new this.constructor(this), this.e + 1, 2); +}; + + +/* + * Return + * 1 if the value of this Decimal is greater than the value of `y`, + * -1 if the value of this Decimal is less than the value of `y`, + * 0 if they have the same value, + * NaN if the value of either Decimal is NaN. + * + */ +P.comparedTo = P.cmp = function (y) { + var i, j, xdL, ydL, + x = this, + xd = x.d, + yd = (y = new x.constructor(y)).d, + xs = x.s, + ys = y.s; + + // Either NaN or ±Infinity? + if (!xd || !yd) { + return !xs || !ys ? NaN : xs !== ys ? xs : xd === yd ? 0 : !xd ^ xs < 0 ? 1 : -1; + } + + // Either zero? + if (!xd[0] || !yd[0]) return xd[0] ? xs : yd[0] ? -ys : 0; + + // Signs differ? + if (xs !== ys) return xs; + + // Compare exponents. + if (x.e !== y.e) return x.e > y.e ^ xs < 0 ? 1 : -1; + + xdL = xd.length; + ydL = yd.length; + + // Compare digit by digit. + for (i = 0, j = xdL < ydL ? xdL : ydL; i < j; ++i) { + if (xd[i] !== yd[i]) return xd[i] > yd[i] ^ xs < 0 ? 1 : -1; + } + + // Compare lengths. + return xdL === ydL ? 0 : xdL > ydL ^ xs < 0 ? 1 : -1; +}; + + +/* + * Return a new Decimal whose value is the cosine of the value in radians of this Decimal. + * + * Domain: [-Infinity, Infinity] + * Range: [-1, 1] + * + * cos(0) = 1 + * cos(-0) = 1 + * cos(Infinity) = NaN + * cos(-Infinity) = NaN + * cos(NaN) = NaN + * + */ +P.cosine = P.cos = function () { + var pr, rm, + x = this, + Ctor = x.constructor; + + if (!x.d) return new Ctor(NaN); + + // cos(0) = cos(-0) = 1 + if (!x.d[0]) return new Ctor(1); + + pr = Ctor.precision; + rm = Ctor.rounding; + Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE; + Ctor.rounding = 1; + + x = cosine(Ctor, toLessThanHalfPi(Ctor, x)); + + Ctor.precision = pr; + Ctor.rounding = rm; + + return finalise(quadrant == 2 || quadrant == 3 ? x.neg() : x, pr, rm, true); +}; + + +/* + * + * Return a new Decimal whose value is the cube root of the value of this Decimal, rounded to + * `precision` significant digits using rounding mode `rounding`. + * + * cbrt(0) = 0 + * cbrt(-0) = -0 + * cbrt(1) = 1 + * cbrt(-1) = -1 + * cbrt(N) = N + * cbrt(-I) = -I + * cbrt(I) = I + * + * Math.cbrt(x) = (x < 0 ? -Math.pow(-x, 1/3) : Math.pow(x, 1/3)) + * + */ +P.cubeRoot = P.cbrt = function () { + var e, m, n, r, rep, s, sd, t, t3, t3plusx, + x = this, + Ctor = x.constructor; + + if (!x.isFinite() || x.isZero()) return new Ctor(x); + external = false; + + // Initial estimate. + s = x.s * mathpow(x.s * x, 1 / 3); + + // Math.cbrt underflow/overflow? + // Pass x to Math.pow as integer, then adjust the exponent of the result. + if (!s || Math.abs(s) == 1 / 0) { + n = digitsToString(x.d); + e = x.e; + + // Adjust n exponent so it is a multiple of 3 away from x exponent. + if (s = (e - n.length + 1) % 3) n += (s == 1 || s == -2 ? '0' : '00'); + s = mathpow(n, 1 / 3); + + // Rarely, e may be one less than the result exponent value. + e = mathfloor((e + 1) / 3) - (e % 3 == (e < 0 ? -1 : 2)); + + if (s == 1 / 0) { + n = '5e' + e; + } else { + n = s.toExponential(); + n = n.slice(0, n.indexOf('e') + 1) + e; + } + + r = new Ctor(n); + r.s = x.s; + } else { + r = new Ctor(s.toString()); + } + + sd = (e = Ctor.precision) + 3; + + // Halley's method. + // TODO? Compare Newton's method. + for (;;) { + t = r; + t3 = t.times(t).times(t); + t3plusx = t3.plus(x); + r = divide(t3plusx.plus(x).times(t), t3plusx.plus(t3), sd + 2, 1); + + // TODO? Replace with for-loop and checkRoundingDigits. + if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) { + n = n.slice(sd - 3, sd + 1); + + // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or 4999 + // , i.e. approaching a rounding boundary, continue the iteration. + if (n == '9999' || !rep && n == '4999') { + + // On the first iteration only, check to see if rounding up gives the exact result as the + // nines may infinitely repeat. + if (!rep) { + finalise(t, e + 1, 0); + + if (t.times(t).times(t).eq(x)) { + r = t; + break; + } + } + + sd += 4; + rep = 1; + } else { + + // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result. + // If not, then there are further digits and m will be truthy. + if (!+n || !+n.slice(1) && n.charAt(0) == '5') { + + // Truncate to the first rounding digit. + finalise(r, e + 1, 1); + m = !r.times(r).times(r).eq(x); + } + + break; + } + } + } + + external = true; + + return finalise(r, e, Ctor.rounding, m); +}; + + +/* + * Return the number of decimal places of the value of this Decimal. + * + */ +P.decimalPlaces = P.dp = function () { + var w, + d = this.d, + n = NaN; + + if (d) { + w = d.length - 1; + n = (w - mathfloor(this.e / LOG_BASE)) * LOG_BASE; + + // Subtract the number of trailing zeros of the last word. + w = d[w]; + if (w) for (; w % 10 == 0; w /= 10) n--; + if (n < 0) n = 0; + } + + return n; +}; + + +/* + * n / 0 = I + * n / N = N + * n / I = 0 + * 0 / n = 0 + * 0 / 0 = N + * 0 / N = N + * 0 / I = 0 + * N / n = N + * N / 0 = N + * N / N = N + * N / I = N + * I / n = I + * I / 0 = I + * I / N = N + * I / I = N + * + * Return a new Decimal whose value is the value of this Decimal divided by `y`, rounded to + * `precision` significant digits using rounding mode `rounding`. + * + */ +P.dividedBy = P.div = function (y) { + return divide(this, new this.constructor(y)); +}; + + +/* + * Return a new Decimal whose value is the integer part of dividing the value of this Decimal + * by the value of `y`, rounded to `precision` significant digits using rounding mode `rounding`. + * + */ +P.dividedToIntegerBy = P.divToInt = function (y) { + var x = this, + Ctor = x.constructor; + return finalise(divide(x, new Ctor(y), 0, 1, 1), Ctor.precision, Ctor.rounding); +}; + + +/* + * Return true if the value of this Decimal is equal to the value of `y`, otherwise return false. + * + */ +P.equals = P.eq = function (y) { + return this.cmp(y) === 0; +}; + + +/* + * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the + * direction of negative Infinity. + * + */ +P.floor = function () { + return finalise(new this.constructor(this), this.e + 1, 3); +}; + + +/* + * Return true if the value of this Decimal is greater than the value of `y`, otherwise return + * false. + * + */ +P.greaterThan = P.gt = function (y) { + return this.cmp(y) > 0; +}; + + +/* + * Return true if the value of this Decimal is greater than or equal to the value of `y`, + * otherwise return false. + * + */ +P.greaterThanOrEqualTo = P.gte = function (y) { + var k = this.cmp(y); + return k == 1 || k === 0; +}; + + +/* + * Return a new Decimal whose value is the hyperbolic cosine of the value in radians of this + * Decimal. + * + * Domain: [-Infinity, Infinity] + * Range: [1, Infinity] + * + * cosh(x) = 1 + x^2/2! + x^4/4! + x^6/6! + ... + * + * cosh(0) = 1 + * cosh(-0) = 1 + * cosh(Infinity) = Infinity + * cosh(-Infinity) = Infinity + * cosh(NaN) = NaN + * + * x time taken (ms) result + * 1000 9 9.8503555700852349694e+433 + * 10000 25 4.4034091128314607936e+4342 + * 100000 171 1.4033316802130615897e+43429 + * 1000000 3817 1.5166076984010437725e+434294 + * 10000000 abandoned after 2 minute wait + * + * TODO? Compare performance of cosh(x) = 0.5 * (exp(x) + exp(-x)) + * + */ +P.hyperbolicCosine = P.cosh = function () { + var k, n, pr, rm, len, + x = this, + Ctor = x.constructor, + one = new Ctor(1); + + if (!x.isFinite()) return new Ctor(x.s ? 1 / 0 : NaN); + if (x.isZero()) return one; + + pr = Ctor.precision; + rm = Ctor.rounding; + Ctor.precision = pr + Math.max(x.e, x.sd()) + 4; + Ctor.rounding = 1; + len = x.d.length; + + // Argument reduction: cos(4x) = 1 - 8cos^2(x) + 8cos^4(x) + 1 + // i.e. cos(x) = 1 - cos^2(x/4)(8 - 8cos^2(x/4)) + + // Estimate the optimum number of times to use the argument reduction. + // TODO? Estimation reused from cosine() and may not be optimal here. + if (len < 32) { + k = Math.ceil(len / 3); + n = (1 / tinyPow(4, k)).toString(); + } else { + k = 16; + n = '2.3283064365386962890625e-10'; + } + + x = taylorSeries(Ctor, 1, x.times(n), new Ctor(1), true); + + // Reverse argument reduction + var cosh2_x, + i = k, + d8 = new Ctor(8); + for (; i--;) { + cosh2_x = x.times(x); + x = one.minus(cosh2_x.times(d8.minus(cosh2_x.times(d8)))); + } + + return finalise(x, Ctor.precision = pr, Ctor.rounding = rm, true); +}; + + +/* + * Return a new Decimal whose value is the hyperbolic sine of the value in radians of this + * Decimal. + * + * Domain: [-Infinity, Infinity] + * Range: [-Infinity, Infinity] + * + * sinh(x) = x + x^3/3! + x^5/5! + x^7/7! + ... + * + * sinh(0) = 0 + * sinh(-0) = -0 + * sinh(Infinity) = Infinity + * sinh(-Infinity) = -Infinity + * sinh(NaN) = NaN + * + * x time taken (ms) + * 10 2 ms + * 100 5 ms + * 1000 14 ms + * 10000 82 ms + * 100000 886 ms 1.4033316802130615897e+43429 + * 200000 2613 ms + * 300000 5407 ms + * 400000 8824 ms + * 500000 13026 ms 8.7080643612718084129e+217146 + * 1000000 48543 ms + * + * TODO? Compare performance of sinh(x) = 0.5 * (exp(x) - exp(-x)) + * + */ +P.hyperbolicSine = P.sinh = function () { + var k, pr, rm, len, + x = this, + Ctor = x.constructor; + + if (!x.isFinite() || x.isZero()) return new Ctor(x); + + pr = Ctor.precision; + rm = Ctor.rounding; + Ctor.precision = pr + Math.max(x.e, x.sd()) + 4; + Ctor.rounding = 1; + len = x.d.length; + + if (len < 3) { + x = taylorSeries(Ctor, 2, x, x, true); + } else { + + // Alternative argument reduction: sinh(3x) = sinh(x)(3 + 4sinh^2(x)) + // i.e. sinh(x) = sinh(x/3)(3 + 4sinh^2(x/3)) + // 3 multiplications and 1 addition + + // Argument reduction: sinh(5x) = sinh(x)(5 + sinh^2(x)(20 + 16sinh^2(x))) + // i.e. sinh(x) = sinh(x/5)(5 + sinh^2(x/5)(20 + 16sinh^2(x/5))) + // 4 multiplications and 2 additions + + // Estimate the optimum number of times to use the argument reduction. + k = 1.4 * Math.sqrt(len); + k = k > 16 ? 16 : k | 0; + + x = x.times(1 / tinyPow(5, k)); + x = taylorSeries(Ctor, 2, x, x, true); + + // Reverse argument reduction + var sinh2_x, + d5 = new Ctor(5), + d16 = new Ctor(16), + d20 = new Ctor(20); + for (; k--;) { + sinh2_x = x.times(x); + x = x.times(d5.plus(sinh2_x.times(d16.times(sinh2_x).plus(d20)))); + } + } + + Ctor.precision = pr; + Ctor.rounding = rm; + + return finalise(x, pr, rm, true); +}; + + +/* + * Return a new Decimal whose value is the hyperbolic tangent of the value in radians of this + * Decimal. + * + * Domain: [-Infinity, Infinity] + * Range: [-1, 1] + * + * tanh(x) = sinh(x) / cosh(x) + * + * tanh(0) = 0 + * tanh(-0) = -0 + * tanh(Infinity) = 1 + * tanh(-Infinity) = -1 + * tanh(NaN) = NaN + * + */ +P.hyperbolicTangent = P.tanh = function () { + var pr, rm, + x = this, + Ctor = x.constructor; + + if (!x.isFinite()) return new Ctor(x.s); + if (x.isZero()) return new Ctor(x); + + pr = Ctor.precision; + rm = Ctor.rounding; + Ctor.precision = pr + 7; + Ctor.rounding = 1; + + return divide(x.sinh(), x.cosh(), Ctor.precision = pr, Ctor.rounding = rm); +}; + + +/* + * Return a new Decimal whose value is the arccosine (inverse cosine) in radians of the value of + * this Decimal. + * + * Domain: [-1, 1] + * Range: [0, pi] + * + * acos(x) = pi/2 - asin(x) + * + * acos(0) = pi/2 + * acos(-0) = pi/2 + * acos(1) = 0 + * acos(-1) = pi + * acos(1/2) = pi/3 + * acos(-1/2) = 2*pi/3 + * acos(|x| > 1) = NaN + * acos(NaN) = NaN + * + */ +P.inverseCosine = P.acos = function () { + var halfPi, + x = this, + Ctor = x.constructor, + k = x.abs().cmp(1), + pr = Ctor.precision, + rm = Ctor.rounding; + + if (k !== -1) { + return k === 0 + // |x| is 1 + ? x.isNeg() ? getPi(Ctor, pr, rm) : new Ctor(0) + // |x| > 1 or x is NaN + : new Ctor(NaN); + } + + if (x.isZero()) return getPi(Ctor, pr + 4, rm).times(0.5); + + // TODO? Special case acos(0.5) = pi/3 and acos(-0.5) = 2*pi/3 + + Ctor.precision = pr + 6; + Ctor.rounding = 1; + + x = x.asin(); + halfPi = getPi(Ctor, pr + 4, rm).times(0.5); + + Ctor.precision = pr; + Ctor.rounding = rm; + + return halfPi.minus(x); +}; + + +/* + * Return a new Decimal whose value is the inverse of the hyperbolic cosine in radians of the + * value of this Decimal. + * + * Domain: [1, Infinity] + * Range: [0, Infinity] + * + * acosh(x) = ln(x + sqrt(x^2 - 1)) + * + * acosh(x < 1) = NaN + * acosh(NaN) = NaN + * acosh(Infinity) = Infinity + * acosh(-Infinity) = NaN + * acosh(0) = NaN + * acosh(-0) = NaN + * acosh(1) = 0 + * acosh(-1) = NaN + * + */ +P.inverseHyperbolicCosine = P.acosh = function () { + var pr, rm, + x = this, + Ctor = x.constructor; + + if (x.lte(1)) return new Ctor(x.eq(1) ? 0 : NaN); + if (!x.isFinite()) return new Ctor(x); + + pr = Ctor.precision; + rm = Ctor.rounding; + Ctor.precision = pr + Math.max(Math.abs(x.e), x.sd()) + 4; + Ctor.rounding = 1; + external = false; + + x = x.times(x).minus(1).sqrt().plus(x); + + external = true; + Ctor.precision = pr; + Ctor.rounding = rm; + + return x.ln(); +}; + + +/* + * Return a new Decimal whose value is the inverse of the hyperbolic sine in radians of the value + * of this Decimal. + * + * Domain: [-Infinity, Infinity] + * Range: [-Infinity, Infinity] + * + * asinh(x) = ln(x + sqrt(x^2 + 1)) + * + * asinh(NaN) = NaN + * asinh(Infinity) = Infinity + * asinh(-Infinity) = -Infinity + * asinh(0) = 0 + * asinh(-0) = -0 + * + */ +P.inverseHyperbolicSine = P.asinh = function () { + var pr, rm, + x = this, + Ctor = x.constructor; + + if (!x.isFinite() || x.isZero()) return new Ctor(x); + + pr = Ctor.precision; + rm = Ctor.rounding; + Ctor.precision = pr + 2 * Math.max(Math.abs(x.e), x.sd()) + 6; + Ctor.rounding = 1; + external = false; + + x = x.times(x).plus(1).sqrt().plus(x); + + external = true; + Ctor.precision = pr; + Ctor.rounding = rm; + + return x.ln(); +}; + + +/* + * Return a new Decimal whose value is the inverse of the hyperbolic tangent in radians of the + * value of this Decimal. + * + * Domain: [-1, 1] + * Range: [-Infinity, Infinity] + * + * atanh(x) = 0.5 * ln((1 + x) / (1 - x)) + * + * atanh(|x| > 1) = NaN + * atanh(NaN) = NaN + * atanh(Infinity) = NaN + * atanh(-Infinity) = NaN + * atanh(0) = 0 + * atanh(-0) = -0 + * atanh(1) = Infinity + * atanh(-1) = -Infinity + * + */ +P.inverseHyperbolicTangent = P.atanh = function () { + var pr, rm, wpr, xsd, + x = this, + Ctor = x.constructor; + + if (!x.isFinite()) return new Ctor(NaN); + if (x.e >= 0) return new Ctor(x.abs().eq(1) ? x.s / 0 : x.isZero() ? x : NaN); + + pr = Ctor.precision; + rm = Ctor.rounding; + xsd = x.sd(); + + if (Math.max(xsd, pr) < 2 * -x.e - 1) return finalise(new Ctor(x), pr, rm, true); + + Ctor.precision = wpr = xsd - x.e; + + x = divide(x.plus(1), new Ctor(1).minus(x), wpr + pr, 1); + + Ctor.precision = pr + 4; + Ctor.rounding = 1; + + x = x.ln(); + + Ctor.precision = pr; + Ctor.rounding = rm; + + return x.times(0.5); +}; + + +/* + * Return a new Decimal whose value is the arcsine (inverse sine) in radians of the value of this + * Decimal. + * + * Domain: [-Infinity, Infinity] + * Range: [-pi/2, pi/2] + * + * asin(x) = 2*atan(x/(1 + sqrt(1 - x^2))) + * + * asin(0) = 0 + * asin(-0) = -0 + * asin(1/2) = pi/6 + * asin(-1/2) = -pi/6 + * asin(1) = pi/2 + * asin(-1) = -pi/2 + * asin(|x| > 1) = NaN + * asin(NaN) = NaN + * + * TODO? Compare performance of Taylor series. + * + */ +P.inverseSine = P.asin = function () { + var halfPi, k, + pr, rm, + x = this, + Ctor = x.constructor; + + if (x.isZero()) return new Ctor(x); + + k = x.abs().cmp(1); + pr = Ctor.precision; + rm = Ctor.rounding; + + if (k !== -1) { + + // |x| is 1 + if (k === 0) { + halfPi = getPi(Ctor, pr + 4, rm).times(0.5); + halfPi.s = x.s; + return halfPi; + } + + // |x| > 1 or x is NaN + return new Ctor(NaN); + } + + // TODO? Special case asin(1/2) = pi/6 and asin(-1/2) = -pi/6 + + Ctor.precision = pr + 6; + Ctor.rounding = 1; + + x = x.div(new Ctor(1).minus(x.times(x)).sqrt().plus(1)).atan(); + + Ctor.precision = pr; + Ctor.rounding = rm; + + return x.times(2); +}; + + +/* + * Return a new Decimal whose value is the arctangent (inverse tangent) in radians of the value + * of this Decimal. + * + * Domain: [-Infinity, Infinity] + * Range: [-pi/2, pi/2] + * + * atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ... + * + * atan(0) = 0 + * atan(-0) = -0 + * atan(1) = pi/4 + * atan(-1) = -pi/4 + * atan(Infinity) = pi/2 + * atan(-Infinity) = -pi/2 + * atan(NaN) = NaN + * + */ +P.inverseTangent = P.atan = function () { + var i, j, k, n, px, t, r, wpr, x2, + x = this, + Ctor = x.constructor, + pr = Ctor.precision, + rm = Ctor.rounding; + + if (!x.isFinite()) { + if (!x.s) return new Ctor(NaN); + if (pr + 4 <= PI_PRECISION) { + r = getPi(Ctor, pr + 4, rm).times(0.5); + r.s = x.s; + return r; + } + } else if (x.isZero()) { + return new Ctor(x); + } else if (x.abs().eq(1) && pr + 4 <= PI_PRECISION) { + r = getPi(Ctor, pr + 4, rm).times(0.25); + r.s = x.s; + return r; + } + + Ctor.precision = wpr = pr + 10; + Ctor.rounding = 1; + + // TODO? if (x >= 1 && pr <= PI_PRECISION) atan(x) = halfPi * x.s - atan(1 / x); + + // Argument reduction + // Ensure |x| < 0.42 + // atan(x) = 2 * atan(x / (1 + sqrt(1 + x^2))) + + k = Math.min(28, wpr / LOG_BASE + 2 | 0); + + for (i = k; i; --i) x = x.div(x.times(x).plus(1).sqrt().plus(1)); + + external = false; + + j = Math.ceil(wpr / LOG_BASE); + n = 1; + x2 = x.times(x); + r = new Ctor(x); + px = x; + + // atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ... + for (; i !== -1;) { + px = px.times(x2); + t = r.minus(px.div(n += 2)); + + px = px.times(x2); + r = t.plus(px.div(n += 2)); + + if (r.d[j] !== void 0) for (i = j; r.d[i] === t.d[i] && i--;); + } + + if (k) r = r.times(2 << (k - 1)); + + external = true; + + return finalise(r, Ctor.precision = pr, Ctor.rounding = rm, true); +}; + + +/* + * Return true if the value of this Decimal is a finite number, otherwise return false. + * + */ +P.isFinite = function () { + return !!this.d; +}; + + +/* + * Return true if the value of this Decimal is an integer, otherwise return false. + * + */ +P.isInteger = P.isInt = function () { + return !!this.d && mathfloor(this.e / LOG_BASE) > this.d.length - 2; +}; + + +/* + * Return true if the value of this Decimal is NaN, otherwise return false. + * + */ +P.isNaN = function () { + return !this.s; +}; + + +/* + * Return true if the value of this Decimal is negative, otherwise return false. + * + */ +P.isNegative = P.isNeg = function () { + return this.s < 0; +}; + + +/* + * Return true if the value of this Decimal is positive, otherwise return false. + * + */ +P.isPositive = P.isPos = function () { + return this.s > 0; +}; + + +/* + * Return true if the value of this Decimal is 0 or -0, otherwise return false. + * + */ +P.isZero = function () { + return !!this.d && this.d[0] === 0; +}; + + +/* + * Return true if the value of this Decimal is less than `y`, otherwise return false. + * + */ +P.lessThan = P.lt = function (y) { + return this.cmp(y) < 0; +}; + + +/* + * Return true if the value of this Decimal is less than or equal to `y`, otherwise return false. + * + */ +P.lessThanOrEqualTo = P.lte = function (y) { + return this.cmp(y) < 1; +}; + + +/* + * Return the logarithm of the value of this Decimal to the specified base, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + * If no base is specified, return log[10](arg). + * + * log[base](arg) = ln(arg) / ln(base) + * + * The result will always be correctly rounded if the base of the log is 10, and 'almost always' + * otherwise: + * + * Depending on the rounding mode, the result may be incorrectly rounded if the first fifteen + * rounding digits are [49]99999999999999 or [50]00000000000000. In that case, the maximum error + * between the result and the correctly rounded result will be one ulp (unit in the last place). + * + * log[-b](a) = NaN + * log[0](a) = NaN + * log[1](a) = NaN + * log[NaN](a) = NaN + * log[Infinity](a) = NaN + * log[b](0) = -Infinity + * log[b](-0) = -Infinity + * log[b](-a) = NaN + * log[b](1) = 0 + * log[b](Infinity) = Infinity + * log[b](NaN) = NaN + * + * [base] {number|string|Decimal} The base of the logarithm. + * + */ +P.logarithm = P.log = function (base) { + var isBase10, d, denominator, k, inf, num, sd, r, + arg = this, + Ctor = arg.constructor, + pr = Ctor.precision, + rm = Ctor.rounding, + guard = 5; + + // Default base is 10. + if (base == null) { + base = new Ctor(10); + isBase10 = true; + } else { + base = new Ctor(base); + d = base.d; + + // Return NaN if base is negative, or non-finite, or is 0 or 1. + if (base.s < 0 || !d || !d[0] || base.eq(1)) return new Ctor(NaN); + + isBase10 = base.eq(10); + } + + d = arg.d; + + // Is arg negative, non-finite, 0 or 1? + if (arg.s < 0 || !d || !d[0] || arg.eq(1)) { + return new Ctor(d && !d[0] ? -1 / 0 : arg.s != 1 ? NaN : d ? 0 : 1 / 0); + } + + // The result will have a non-terminating decimal expansion if base is 10 and arg is not an + // integer power of 10. + if (isBase10) { + if (d.length > 1) { + inf = true; + } else { + for (k = d[0]; k % 10 === 0;) k /= 10; + inf = k !== 1; + } + } + + external = false; + sd = pr + guard; + num = naturalLogarithm(arg, sd); + denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd); + + // The result will have 5 rounding digits. + r = divide(num, denominator, sd, 1); + + // If at a rounding boundary, i.e. the result's rounding digits are [49]9999 or [50]0000, + // calculate 10 further digits. + // + // If the result is known to have an infinite decimal expansion, repeat this until it is clear + // that the result is above or below the boundary. Otherwise, if after calculating the 10 + // further digits, the last 14 are nines, round up and assume the result is exact. + // Also assume the result is exact if the last 14 are zero. + // + // Example of a result that will be incorrectly rounded: + // log[1048576](4503599627370502) = 2.60000000000000009610279511444746... + // The above result correctly rounded using ROUND_CEIL to 1 decimal place should be 2.7, but it + // will be given as 2.6 as there are 15 zeros immediately after the requested decimal place, so + // the exact result would be assumed to be 2.6, which rounded using ROUND_CEIL to 1 decimal + // place is still 2.6. + if (checkRoundingDigits(r.d, k = pr, rm)) { + + do { + sd += 10; + num = naturalLogarithm(arg, sd); + denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd); + r = divide(num, denominator, sd, 1); + + if (!inf) { + + // Check for 14 nines from the 2nd rounding digit, as the first may be 4. + if (+digitsToString(r.d).slice(k + 1, k + 15) + 1 == 1e14) { + r = finalise(r, pr + 1, 0); + } + + break; + } + } while (checkRoundingDigits(r.d, k += 10, rm)); + } + + external = true; + + return finalise(r, pr, rm); +}; + + +/* + * Return a new Decimal whose value is the maximum of the arguments and the value of this Decimal. + * + * arguments {number|string|Decimal} + * +P.max = function () { + Array.prototype.push.call(arguments, this); + return maxOrMin(this.constructor, arguments, 'lt'); +}; + */ + + +/* + * Return a new Decimal whose value is the minimum of the arguments and the value of this Decimal. + * + * arguments {number|string|Decimal} + * +P.min = function () { + Array.prototype.push.call(arguments, this); + return maxOrMin(this.constructor, arguments, 'gt'); +}; + */ + + +/* + * n - 0 = n + * n - N = N + * n - I = -I + * 0 - n = -n + * 0 - 0 = 0 + * 0 - N = N + * 0 - I = -I + * N - n = N + * N - 0 = N + * N - N = N + * N - I = N + * I - n = I + * I - 0 = I + * I - N = N + * I - I = N + * + * Return a new Decimal whose value is the value of this Decimal minus `y`, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + */ +P.minus = P.sub = function (y) { + var d, e, i, j, k, len, pr, rm, xd, xe, xLTy, yd, + x = this, + Ctor = x.constructor; + + y = new Ctor(y); + + // If either is not finite... + if (!x.d || !y.d) { + + // Return NaN if either is NaN. + if (!x.s || !y.s) y = new Ctor(NaN); + + // Return y negated if x is finite and y is ±Infinity. + else if (x.d) y.s = -y.s; + + // Return x if y is finite and x is ±Infinity. + // Return x if both are ±Infinity with different signs. + // Return NaN if both are ±Infinity with the same sign. + else y = new Ctor(y.d || x.s !== y.s ? x : NaN); + + return y; + } + + // If signs differ... + if (x.s != y.s) { + y.s = -y.s; + return x.plus(y); + } + + xd = x.d; + yd = y.d; + pr = Ctor.precision; + rm = Ctor.rounding; + + // If either is zero... + if (!xd[0] || !yd[0]) { + + // Return y negated if x is zero and y is non-zero. + if (yd[0]) y.s = -y.s; + + // Return x if y is zero and x is non-zero. + else if (xd[0]) y = new Ctor(x); + + // Return zero if both are zero. + // From IEEE 754 (2008) 6.3: 0 - 0 = -0 - -0 = -0 when rounding to -Infinity. + else return new Ctor(rm === 3 ? -0 : 0); + + return external ? finalise(y, pr, rm) : y; + } + + // x and y are finite, non-zero numbers with the same sign. + + // Calculate base 1e7 exponents. + e = mathfloor(y.e / LOG_BASE); + xe = mathfloor(x.e / LOG_BASE); + + xd = xd.slice(); + k = xe - e; + + // If base 1e7 exponents differ... + if (k) { + xLTy = k < 0; + + if (xLTy) { + d = xd; + k = -k; + len = yd.length; + } else { + d = yd; + e = xe; + len = xd.length; + } + + // Numbers with massively different exponents would result in a very high number of + // zeros needing to be prepended, but this can be avoided while still ensuring correct + // rounding by limiting the number of zeros to `Math.ceil(pr / LOG_BASE) + 2`. + i = Math.max(Math.ceil(pr / LOG_BASE), len) + 2; + + if (k > i) { + k = i; + d.length = 1; + } + + // Prepend zeros to equalise exponents. + d.reverse(); + for (i = k; i--;) d.push(0); + d.reverse(); + + // Base 1e7 exponents equal. + } else { + + // Check digits to determine which is the bigger number. + + i = xd.length; + len = yd.length; + xLTy = i < len; + if (xLTy) len = i; + + for (i = 0; i < len; i++) { + if (xd[i] != yd[i]) { + xLTy = xd[i] < yd[i]; + break; + } + } + + k = 0; + } + + if (xLTy) { + d = xd; + xd = yd; + yd = d; + y.s = -y.s; + } + + len = xd.length; + + // Append zeros to `xd` if shorter. + // Don't add zeros to `yd` if shorter as subtraction only needs to start at `yd` length. + for (i = yd.length - len; i > 0; --i) xd[len++] = 0; + + // Subtract yd from xd. + for (i = yd.length; i > k;) { + + if (xd[--i] < yd[i]) { + for (j = i; j && xd[--j] === 0;) xd[j] = BASE - 1; + --xd[j]; + xd[i] += BASE; + } + + xd[i] -= yd[i]; + } + + // Remove trailing zeros. + for (; xd[--len] === 0;) xd.pop(); + + // Remove leading zeros and adjust exponent accordingly. + for (; xd[0] === 0; xd.shift()) --e; + + // Zero? + if (!xd[0]) return new Ctor(rm === 3 ? -0 : 0); + + y.d = xd; + y.e = getBase10Exponent(xd, e); + + return external ? finalise(y, pr, rm) : y; +}; + + +/* + * n % 0 = N + * n % N = N + * n % I = n + * 0 % n = 0 + * -0 % n = -0 + * 0 % 0 = N + * 0 % N = N + * 0 % I = 0 + * N % n = N + * N % 0 = N + * N % N = N + * N % I = N + * I % n = N + * I % 0 = N + * I % N = N + * I % I = N + * + * Return a new Decimal whose value is the value of this Decimal modulo `y`, rounded to + * `precision` significant digits using rounding mode `rounding`. + * + * The result depends on the modulo mode. + * + */ +P.modulo = P.mod = function (y) { + var q, + x = this, + Ctor = x.constructor; + + y = new Ctor(y); + + // Return NaN if x is ±Infinity or NaN, or y is NaN or ±0. + if (!x.d || !y.s || y.d && !y.d[0]) return new Ctor(NaN); + + // Return x if y is ±Infinity or x is ±0. + if (!y.d || x.d && !x.d[0]) { + return finalise(new Ctor(x), Ctor.precision, Ctor.rounding); + } + + // Prevent rounding of intermediate calculations. + external = false; + + if (Ctor.modulo == 9) { + + // Euclidian division: q = sign(y) * floor(x / abs(y)) + // result = x - q * y where 0 <= result < abs(y) + q = divide(x, y.abs(), 0, 3, 1); + q.s *= y.s; + } else { + q = divide(x, y, 0, Ctor.modulo, 1); + } + + q = q.times(y); + + external = true; + + return x.minus(q); +}; + + +/* + * Return a new Decimal whose value is the natural exponential of the value of this Decimal, + * i.e. the base e raised to the power the value of this Decimal, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + */ +P.naturalExponential = P.exp = function () { + return naturalExponential(this); +}; + + +/* + * Return a new Decimal whose value is the natural logarithm of the value of this Decimal, + * rounded to `precision` significant digits using rounding mode `rounding`. + * + */ +P.naturalLogarithm = P.ln = function () { + return naturalLogarithm(this); +}; + + +/* + * Return a new Decimal whose value is the value of this Decimal negated, i.e. as if multiplied by + * -1. + * + */ +P.negated = P.neg = function () { + var x = new this.constructor(this); + x.s = -x.s; + return finalise(x); +}; + + +/* + * n + 0 = n + * n + N = N + * n + I = I + * 0 + n = n + * 0 + 0 = 0 + * 0 + N = N + * 0 + I = I + * N + n = N + * N + 0 = N + * N + N = N + * N + I = N + * I + n = I + * I + 0 = I + * I + N = N + * I + I = I + * + * Return a new Decimal whose value is the value of this Decimal plus `y`, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + */ +P.plus = P.add = function (y) { + var carry, d, e, i, k, len, pr, rm, xd, yd, + x = this, + Ctor = x.constructor; + + y = new Ctor(y); + + // If either is not finite... + if (!x.d || !y.d) { + + // Return NaN if either is NaN. + if (!x.s || !y.s) y = new Ctor(NaN); + + // Return x if y is finite and x is ±Infinity. + // Return x if both are ±Infinity with the same sign. + // Return NaN if both are ±Infinity with different signs. + // Return y if x is finite and y is ±Infinity. + else if (!x.d) y = new Ctor(y.d || x.s === y.s ? x : NaN); + + return y; + } + + // If signs differ... + if (x.s != y.s) { + y.s = -y.s; + return x.minus(y); + } + + xd = x.d; + yd = y.d; + pr = Ctor.precision; + rm = Ctor.rounding; + + // If either is zero... + if (!xd[0] || !yd[0]) { + + // Return x if y is zero. + // Return y if y is non-zero. + if (!yd[0]) y = new Ctor(x); + + return external ? finalise(y, pr, rm) : y; + } + + // x and y are finite, non-zero numbers with the same sign. + + // Calculate base 1e7 exponents. + k = mathfloor(x.e / LOG_BASE); + e = mathfloor(y.e / LOG_BASE); + + xd = xd.slice(); + i = k - e; + + // If base 1e7 exponents differ... + if (i) { + + if (i < 0) { + d = xd; + i = -i; + len = yd.length; + } else { + d = yd; + e = k; + len = xd.length; + } + + // Limit number of zeros prepended to max(ceil(pr / LOG_BASE), len) + 1. + k = Math.ceil(pr / LOG_BASE); + len = k > len ? k + 1 : len + 1; + + if (i > len) { + i = len; + d.length = 1; + } + + // Prepend zeros to equalise exponents. Note: Faster to use reverse then do unshifts. + d.reverse(); + for (; i--;) d.push(0); + d.reverse(); + } + + len = xd.length; + i = yd.length; + + // If yd is longer than xd, swap xd and yd so xd points to the longer array. + if (len - i < 0) { + i = len; + d = yd; + yd = xd; + xd = d; + } + + // Only start adding at yd.length - 1 as the further digits of xd can be left as they are. + for (carry = 0; i;) { + carry = (xd[--i] = xd[i] + yd[i] + carry) / BASE | 0; + xd[i] %= BASE; + } + + if (carry) { + xd.unshift(carry); + ++e; + } + + // Remove trailing zeros. + // No need to check for zero, as +x + +y != 0 && -x + -y != 0 + for (len = xd.length; xd[--len] == 0;) xd.pop(); + + y.d = xd; + y.e = getBase10Exponent(xd, e); + + return external ? finalise(y, pr, rm) : y; +}; + + +/* + * Return the number of significant digits of the value of this Decimal. + * + * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0. + * + */ +P.precision = P.sd = function (z) { + var k, + x = this; + + if (z !== void 0 && z !== !!z && z !== 1 && z !== 0) throw Error(invalidArgument + z); + + if (x.d) { + k = getPrecision(x.d); + if (z && x.e + 1 > k) k = x.e + 1; + } else { + k = NaN; + } + + return k; +}; + + +/* + * Return a new Decimal whose value is the value of this Decimal rounded to a whole number using + * rounding mode `rounding`. + * + */ +P.round = function () { + var x = this, + Ctor = x.constructor; + + return finalise(new Ctor(x), x.e + 1, Ctor.rounding); +}; + + +/* + * Return a new Decimal whose value is the sine of the value in radians of this Decimal. + * + * Domain: [-Infinity, Infinity] + * Range: [-1, 1] + * + * sin(x) = x - x^3/3! + x^5/5! - ... + * + * sin(0) = 0 + * sin(-0) = -0 + * sin(Infinity) = NaN + * sin(-Infinity) = NaN + * sin(NaN) = NaN + * + */ +P.sine = P.sin = function () { + var pr, rm, + x = this, + Ctor = x.constructor; + + if (!x.isFinite()) return new Ctor(NaN); + if (x.isZero()) return new Ctor(x); + + pr = Ctor.precision; + rm = Ctor.rounding; + Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE; + Ctor.rounding = 1; + + x = sine(Ctor, toLessThanHalfPi(Ctor, x)); + + Ctor.precision = pr; + Ctor.rounding = rm; + + return finalise(quadrant > 2 ? x.neg() : x, pr, rm, true); +}; + + +/* + * Return a new Decimal whose value is the square root of this Decimal, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + * sqrt(-n) = N + * sqrt(N) = N + * sqrt(-I) = N + * sqrt(I) = I + * sqrt(0) = 0 + * sqrt(-0) = -0 + * + */ +P.squareRoot = P.sqrt = function () { + var m, n, sd, r, rep, t, + x = this, + d = x.d, + e = x.e, + s = x.s, + Ctor = x.constructor; + + // Negative/NaN/Infinity/zero? + if (s !== 1 || !d || !d[0]) { + return new Ctor(!s || s < 0 && (!d || d[0]) ? NaN : d ? x : 1 / 0); + } + + external = false; + + // Initial estimate. + s = Math.sqrt(+x); + + // Math.sqrt underflow/overflow? + // Pass x to Math.sqrt as integer, then adjust the exponent of the result. + if (s == 0 || s == 1 / 0) { + n = digitsToString(d); + + if ((n.length + e) % 2 == 0) n += '0'; + s = Math.sqrt(n); + e = mathfloor((e + 1) / 2) - (e < 0 || e % 2); + + if (s == 1 / 0) { + n = '5e' + e; + } else { + n = s.toExponential(); + n = n.slice(0, n.indexOf('e') + 1) + e; + } + + r = new Ctor(n); + } else { + r = new Ctor(s.toString()); + } + + sd = (e = Ctor.precision) + 3; + + // Newton-Raphson iteration. + for (;;) { + t = r; + r = t.plus(divide(x, t, sd + 2, 1)).times(0.5); + + // TODO? Replace with for-loop and checkRoundingDigits. + if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) { + n = n.slice(sd - 3, sd + 1); + + // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or + // 4999, i.e. approaching a rounding boundary, continue the iteration. + if (n == '9999' || !rep && n == '4999') { + + // On the first iteration only, check to see if rounding up gives the exact result as the + // nines may infinitely repeat. + if (!rep) { + finalise(t, e + 1, 0); + + if (t.times(t).eq(x)) { + r = t; + break; + } + } + + sd += 4; + rep = 1; + } else { + + // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result. + // If not, then there are further digits and m will be truthy. + if (!+n || !+n.slice(1) && n.charAt(0) == '5') { + + // Truncate to the first rounding digit. + finalise(r, e + 1, 1); + m = !r.times(r).eq(x); + } + + break; + } + } + } + + external = true; + + return finalise(r, e, Ctor.rounding, m); +}; + + +/* + * Return a new Decimal whose value is the tangent of the value in radians of this Decimal. + * + * Domain: [-Infinity, Infinity] + * Range: [-Infinity, Infinity] + * + * tan(0) = 0 + * tan(-0) = -0 + * tan(Infinity) = NaN + * tan(-Infinity) = NaN + * tan(NaN) = NaN + * + */ +P.tangent = P.tan = function () { + var pr, rm, + x = this, + Ctor = x.constructor; + + if (!x.isFinite()) return new Ctor(NaN); + if (x.isZero()) return new Ctor(x); + + pr = Ctor.precision; + rm = Ctor.rounding; + Ctor.precision = pr + 10; + Ctor.rounding = 1; + + x = x.sin(); + x.s = 1; + x = divide(x, new Ctor(1).minus(x.times(x)).sqrt(), pr + 10, 0); + + Ctor.precision = pr; + Ctor.rounding = rm; + + return finalise(quadrant == 2 || quadrant == 4 ? x.neg() : x, pr, rm, true); +}; + + +/* + * n * 0 = 0 + * n * N = N + * n * I = I + * 0 * n = 0 + * 0 * 0 = 0 + * 0 * N = N + * 0 * I = N + * N * n = N + * N * 0 = N + * N * N = N + * N * I = N + * I * n = I + * I * 0 = N + * I * N = N + * I * I = I + * + * Return a new Decimal whose value is this Decimal times `y`, rounded to `precision` significant + * digits using rounding mode `rounding`. + * + */ +P.times = P.mul = function (y) { + var carry, e, i, k, r, rL, t, xdL, ydL, + x = this, + Ctor = x.constructor, + xd = x.d, + yd = (y = new Ctor(y)).d; + + y.s *= x.s; + + // If either is NaN, ±Infinity or ±0... + if (!xd || !xd[0] || !yd || !yd[0]) { + + return new Ctor(!y.s || xd && !xd[0] && !yd || yd && !yd[0] && !xd + + // Return NaN if either is NaN. + // Return NaN if x is ±0 and y is ±Infinity, or y is ±0 and x is ±Infinity. + ? NaN + + // Return ±Infinity if either is ±Infinity. + // Return ±0 if either is ±0. + : !xd || !yd ? y.s / 0 : y.s * 0); + } + + e = mathfloor(x.e / LOG_BASE) + mathfloor(y.e / LOG_BASE); + xdL = xd.length; + ydL = yd.length; + + // Ensure xd points to the longer array. + if (xdL < ydL) { + r = xd; + xd = yd; + yd = r; + rL = xdL; + xdL = ydL; + ydL = rL; + } + + // Initialise the result array with zeros. + r = []; + rL = xdL + ydL; + for (i = rL; i--;) r.push(0); + + // Multiply! + for (i = ydL; --i >= 0;) { + carry = 0; + for (k = xdL + i; k > i;) { + t = r[k] + yd[i] * xd[k - i - 1] + carry; + r[k--] = t % BASE | 0; + carry = t / BASE | 0; + } + + r[k] = (r[k] + carry) % BASE | 0; + } + + // Remove trailing zeros. + for (; !r[--rL];) r.pop(); + + if (carry) ++e; + else r.shift(); + + y.d = r; + y.e = getBase10Exponent(r, e); + + return external ? finalise(y, Ctor.precision, Ctor.rounding) : y; +}; + + +/* + * Return a string representing the value of this Decimal in base 2, round to `sd` significant + * digits using rounding mode `rm`. + * + * If the optional `sd` argument is present then return binary exponential notation. + * + * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + */ +P.toBinary = function (sd, rm) { + return toStringBinary(this, 2, sd, rm); +}; + + +/* + * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `dp` + * decimal places using rounding mode `rm` or `rounding` if `rm` is omitted. + * + * If `dp` is omitted, return a new Decimal whose value is the value of this Decimal. + * + * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + */ +P.toDecimalPlaces = P.toDP = function (dp, rm) { + var x = this, + Ctor = x.constructor; + + x = new Ctor(x); + if (dp === void 0) return x; + + checkInt32(dp, 0, MAX_DIGITS); + + if (rm === void 0) rm = Ctor.rounding; + else checkInt32(rm, 0, 8); + + return finalise(x, dp + x.e + 1, rm); +}; + + +/* + * Return a string representing the value of this Decimal in exponential notation rounded to + * `dp` fixed decimal places using rounding mode `rounding`. + * + * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + */ +P.toExponential = function (dp, rm) { + var str, + x = this, + Ctor = x.constructor; + + if (dp === void 0) { + str = finiteToString(x, true); + } else { + checkInt32(dp, 0, MAX_DIGITS); + + if (rm === void 0) rm = Ctor.rounding; + else checkInt32(rm, 0, 8); + + x = finalise(new Ctor(x), dp + 1, rm); + str = finiteToString(x, true, dp + 1); + } + + return x.isNeg() && !x.isZero() ? '-' + str : str; +}; + + +/* + * Return a string representing the value of this Decimal in normal (fixed-point) notation to + * `dp` fixed decimal places and rounded using rounding mode `rm` or `rounding` if `rm` is + * omitted. + * + * As with JavaScript numbers, (-0).toFixed(0) is '0', but e.g. (-0.00001).toFixed(0) is '-0'. + * + * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'. + * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'. + * (-0).toFixed(3) is '0.000'. + * (-0.5).toFixed(0) is '-0'. + * + */ +P.toFixed = function (dp, rm) { + var str, y, + x = this, + Ctor = x.constructor; + + if (dp === void 0) { + str = finiteToString(x); + } else { + checkInt32(dp, 0, MAX_DIGITS); + + if (rm === void 0) rm = Ctor.rounding; + else checkInt32(rm, 0, 8); + + y = finalise(new Ctor(x), dp + x.e + 1, rm); + str = finiteToString(y, false, dp + y.e + 1); + } + + // To determine whether to add the minus sign look at the value before it was rounded, + // i.e. look at `x` rather than `y`. + return x.isNeg() && !x.isZero() ? '-' + str : str; +}; + + +/* + * Return an array representing the value of this Decimal as a simple fraction with an integer + * numerator and an integer denominator. + * + * The denominator will be a positive non-zero value less than or equal to the specified maximum + * denominator. If a maximum denominator is not specified, the denominator will be the lowest + * value necessary to represent the number exactly. + * + * [maxD] {number|string|Decimal} Maximum denominator. Integer >= 1 and < Infinity. + * + */ +P.toFraction = function (maxD) { + var d, d0, d1, d2, e, k, n, n0, n1, pr, q, r, + x = this, + xd = x.d, + Ctor = x.constructor; + + if (!xd) return new Ctor(x); + + n1 = d0 = new Ctor(1); + d1 = n0 = new Ctor(0); + + d = new Ctor(d1); + e = d.e = getPrecision(xd) - x.e - 1; + k = e % LOG_BASE; + d.d[0] = mathpow(10, k < 0 ? LOG_BASE + k : k); + + if (maxD == null) { + + // d is 10**e, the minimum max-denominator needed. + maxD = e > 0 ? d : n1; + } else { + n = new Ctor(maxD); + if (!n.isInt() || n.lt(n1)) throw Error(invalidArgument + n); + maxD = n.gt(d) ? (e > 0 ? d : n1) : n; + } + + external = false; + n = new Ctor(digitsToString(xd)); + pr = Ctor.precision; + Ctor.precision = e = xd.length * LOG_BASE * 2; + + for (;;) { + q = divide(n, d, 0, 1, 1); + d2 = d0.plus(q.times(d1)); + if (d2.cmp(maxD) == 1) break; + d0 = d1; + d1 = d2; + d2 = n1; + n1 = n0.plus(q.times(d2)); + n0 = d2; + d2 = d; + d = n.minus(q.times(d2)); + n = d2; + } + + d2 = divide(maxD.minus(d0), d1, 0, 1, 1); + n0 = n0.plus(d2.times(n1)); + d0 = d0.plus(d2.times(d1)); + n0.s = n1.s = x.s; + + // Determine which fraction is closer to x, n0/d0 or n1/d1? + r = divide(n1, d1, e, 1).minus(x).abs().cmp(divide(n0, d0, e, 1).minus(x).abs()) < 1 + ? [n1, d1] : [n0, d0]; + + Ctor.precision = pr; + external = true; + + return r; +}; + + +/* + * Return a string representing the value of this Decimal in base 16, round to `sd` significant + * digits using rounding mode `rm`. + * + * If the optional `sd` argument is present then return binary exponential notation. + * + * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + */ +P.toHexadecimal = P.toHex = function (sd, rm) { + return toStringBinary(this, 16, sd, rm); +}; + + +/* + * Returns a new Decimal whose value is the nearest multiple of `y` in the direction of rounding + * mode `rm`, or `Decimal.rounding` if `rm` is omitted, to the value of this Decimal. + * + * The return value will always have the same sign as this Decimal, unless either this Decimal + * or `y` is NaN, in which case the return value will be also be NaN. + * + * The return value is not affected by the value of `precision`. + * + * y {number|string|Decimal} The magnitude to round to a multiple of. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * 'toNearest() rounding mode not an integer: {rm}' + * 'toNearest() rounding mode out of range: {rm}' + * + */ +P.toNearest = function (y, rm) { + var x = this, + Ctor = x.constructor; + + x = new Ctor(x); + + if (y == null) { + + // If x is not finite, return x. + if (!x.d) return x; + + y = new Ctor(1); + rm = Ctor.rounding; + } else { + y = new Ctor(y); + if (rm === void 0) { + rm = Ctor.rounding; + } else { + checkInt32(rm, 0, 8); + } + + // If x is not finite, return x if y is not NaN, else NaN. + if (!x.d) return y.s ? x : y; + + // If y is not finite, return Infinity with the sign of x if y is Infinity, else NaN. + if (!y.d) { + if (y.s) y.s = x.s; + return y; + } + } + + // If y is not zero, calculate the nearest multiple of y to x. + if (y.d[0]) { + external = false; + x = divide(x, y, 0, rm, 1).times(y); + external = true; + finalise(x); + + // If y is zero, return zero with the sign of x. + } else { + y.s = x.s; + x = y; + } + + return x; +}; + + +/* + * Return the value of this Decimal converted to a number primitive. + * Zero keeps its sign. + * + */ +P.toNumber = function () { + return +this; +}; + + +/* + * Return a string representing the value of this Decimal in base 8, round to `sd` significant + * digits using rounding mode `rm`. + * + * If the optional `sd` argument is present then return binary exponential notation. + * + * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + */ +P.toOctal = function (sd, rm) { + return toStringBinary(this, 8, sd, rm); +}; + + +/* + * Return a new Decimal whose value is the value of this Decimal raised to the power `y`, rounded + * to `precision` significant digits using rounding mode `rounding`. + * + * ECMAScript compliant. + * + * pow(x, NaN) = NaN + * pow(x, ±0) = 1 + + * pow(NaN, non-zero) = NaN + * pow(abs(x) > 1, +Infinity) = +Infinity + * pow(abs(x) > 1, -Infinity) = +0 + * pow(abs(x) == 1, ±Infinity) = NaN + * pow(abs(x) < 1, +Infinity) = +0 + * pow(abs(x) < 1, -Infinity) = +Infinity + * pow(+Infinity, y > 0) = +Infinity + * pow(+Infinity, y < 0) = +0 + * pow(-Infinity, odd integer > 0) = -Infinity + * pow(-Infinity, even integer > 0) = +Infinity + * pow(-Infinity, odd integer < 0) = -0 + * pow(-Infinity, even integer < 0) = +0 + * pow(+0, y > 0) = +0 + * pow(+0, y < 0) = +Infinity + * pow(-0, odd integer > 0) = -0 + * pow(-0, even integer > 0) = +0 + * pow(-0, odd integer < 0) = -Infinity + * pow(-0, even integer < 0) = +Infinity + * pow(finite x < 0, finite non-integer) = NaN + * + * For non-integer or very large exponents pow(x, y) is calculated using + * + * x^y = exp(y*ln(x)) + * + * Assuming the first 15 rounding digits are each equally likely to be any digit 0-9, the + * probability of an incorrectly rounded result + * P([49]9{14} | [50]0{14}) = 2 * 0.2 * 10^-14 = 4e-15 = 1/2.5e+14 + * i.e. 1 in 250,000,000,000,000 + * + * If a result is incorrectly rounded the maximum error will be 1 ulp (unit in last place). + * + * y {number|string|Decimal} The power to which to raise this Decimal. + * + */ +P.toPower = P.pow = function (y) { + var e, k, pr, r, rm, s, + x = this, + Ctor = x.constructor, + yn = +(y = new Ctor(y)); + + // Either ±Infinity, NaN or ±0? + if (!x.d || !y.d || !x.d[0] || !y.d[0]) return new Ctor(mathpow(+x, yn)); + + x = new Ctor(x); + + if (x.eq(1)) return x; + + pr = Ctor.precision; + rm = Ctor.rounding; + + if (y.eq(1)) return finalise(x, pr, rm); + + // y exponent + e = mathfloor(y.e / LOG_BASE); + + // If y is a small integer use the 'exponentiation by squaring' algorithm. + if (e >= y.d.length - 1 && (k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER) { + r = intPow(Ctor, x, k, pr); + return y.s < 0 ? new Ctor(1).div(r) : finalise(r, pr, rm); + } + + s = x.s; + + // if x is negative + if (s < 0) { + + // if y is not an integer + if (e < y.d.length - 1) return new Ctor(NaN); + + // Result is positive if x is negative and the last digit of integer y is even. + if ((y.d[e] & 1) == 0) s = 1; + + // if x.eq(-1) + if (x.e == 0 && x.d[0] == 1 && x.d.length == 1) { + x.s = s; + return x; + } + } + + // Estimate result exponent. + // x^y = 10^e, where e = y * log10(x) + // log10(x) = log10(x_significand) + x_exponent + // log10(x_significand) = ln(x_significand) / ln(10) + k = mathpow(+x, yn); + e = k == 0 || !isFinite(k) + ? mathfloor(yn * (Math.log('0.' + digitsToString(x.d)) / Math.LN10 + x.e + 1)) + : new Ctor(k + '').e; + + // Exponent estimate may be incorrect e.g. x: 0.999999999999999999, y: 2.29, e: 0, r.e: -1. + + // Overflow/underflow? + if (e > Ctor.maxE + 1 || e < Ctor.minE - 1) return new Ctor(e > 0 ? s / 0 : 0); + + external = false; + Ctor.rounding = x.s = 1; + + // Estimate the extra guard digits needed to ensure five correct rounding digits from + // naturalLogarithm(x). Example of failure without these extra digits (precision: 10): + // new Decimal(2.32456).pow('2087987436534566.46411') + // should be 1.162377823e+764914905173815, but is 1.162355823e+764914905173815 + k = Math.min(12, (e + '').length); + + // r = x^y = exp(y*ln(x)) + r = naturalExponential(y.times(naturalLogarithm(x, pr + k)), pr); + + // r may be Infinity, e.g. (0.9999999999999999).pow(-1e+40) + if (r.d) { + + // Truncate to the required precision plus five rounding digits. + r = finalise(r, pr + 5, 1); + + // If the rounding digits are [49]9999 or [50]0000 increase the precision by 10 and recalculate + // the result. + if (checkRoundingDigits(r.d, pr, rm)) { + e = pr + 10; + + // Truncate to the increased precision plus five rounding digits. + r = finalise(naturalExponential(y.times(naturalLogarithm(x, e + k)), e), e + 5, 1); + + // Check for 14 nines from the 2nd rounding digit (the first rounding digit may be 4 or 9). + if (+digitsToString(r.d).slice(pr + 1, pr + 15) + 1 == 1e14) { + r = finalise(r, pr + 1, 0); + } + } + } + + r.s = s; + external = true; + Ctor.rounding = rm; + + return finalise(r, pr, rm); +}; + + +/* + * Return a string representing the value of this Decimal rounded to `sd` significant digits + * using rounding mode `rounding`. + * + * Return exponential notation if `sd` is less than the number of digits necessary to represent + * the integer part of the value in normal notation. + * + * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + */ +P.toPrecision = function (sd, rm) { + var str, + x = this, + Ctor = x.constructor; + + if (sd === void 0) { + str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos); + } else { + checkInt32(sd, 1, MAX_DIGITS); + + if (rm === void 0) rm = Ctor.rounding; + else checkInt32(rm, 0, 8); + + x = finalise(new Ctor(x), sd, rm); + str = finiteToString(x, sd <= x.e || x.e <= Ctor.toExpNeg, sd); + } + + return x.isNeg() && !x.isZero() ? '-' + str : str; +}; + + +/* + * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `sd` + * significant digits using rounding mode `rm`, or to `precision` and `rounding` respectively if + * omitted. + * + * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * 'toSD() digits out of range: {sd}' + * 'toSD() digits not an integer: {sd}' + * 'toSD() rounding mode not an integer: {rm}' + * 'toSD() rounding mode out of range: {rm}' + * + */ +P.toSignificantDigits = P.toSD = function (sd, rm) { + var x = this, + Ctor = x.constructor; + + if (sd === void 0) { + sd = Ctor.precision; + rm = Ctor.rounding; + } else { + checkInt32(sd, 1, MAX_DIGITS); + + if (rm === void 0) rm = Ctor.rounding; + else checkInt32(rm, 0, 8); + } + + return finalise(new Ctor(x), sd, rm); +}; + + +/* + * Return a string representing the value of this Decimal. + * + * Return exponential notation if this Decimal has a positive exponent equal to or greater than + * `toExpPos`, or a negative exponent equal to or less than `toExpNeg`. + * + */ +P.toString = function () { + var x = this, + Ctor = x.constructor, + str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos); + + return x.isNeg() && !x.isZero() ? '-' + str : str; +}; + + +/* + * Return a new Decimal whose value is the value of this Decimal truncated to a whole number. + * + */ +P.truncated = P.trunc = function () { + return finalise(new this.constructor(this), this.e + 1, 1); +}; + + +/* + * Return a string representing the value of this Decimal. + * Unlike `toString`, negative zero will include the minus sign. + * + */ +P.valueOf = P.toJSON = function () { + var x = this, + Ctor = x.constructor, + str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos); + + return x.isNeg() ? '-' + str : str; +}; + + +/* +// Add aliases to match BigDecimal method names. +// P.add = P.plus; +P.subtract = P.minus; +P.multiply = P.times; +P.divide = P.div; +P.remainder = P.mod; +P.compareTo = P.cmp; +P.negate = P.neg; + */ + + +// Helper functions for Decimal.prototype (P) and/or Decimal methods, and their callers. + + +/* + * digitsToString P.cubeRoot, P.logarithm, P.squareRoot, P.toFraction, P.toPower, + * finiteToString, naturalExponential, naturalLogarithm + * checkInt32 P.toDecimalPlaces, P.toExponential, P.toFixed, P.toNearest, + * P.toPrecision, P.toSignificantDigits, toStringBinary, random + * checkRoundingDigits P.logarithm, P.toPower, naturalExponential, naturalLogarithm + * convertBase toStringBinary, parseOther + * cos P.cos + * divide P.atanh, P.cubeRoot, P.dividedBy, P.dividedToIntegerBy, + * P.logarithm, P.modulo, P.squareRoot, P.tan, P.tanh, P.toFraction, + * P.toNearest, toStringBinary, naturalExponential, naturalLogarithm, + * taylorSeries, atan2, parseOther + * finalise P.absoluteValue, P.atan, P.atanh, P.ceil, P.cos, P.cosh, + * P.cubeRoot, P.dividedToIntegerBy, P.floor, P.logarithm, P.minus, + * P.modulo, P.negated, P.plus, P.round, P.sin, P.sinh, P.squareRoot, + * P.tan, P.times, P.toDecimalPlaces, P.toExponential, P.toFixed, + * P.toNearest, P.toPower, P.toPrecision, P.toSignificantDigits, + * P.truncated, divide, getLn10, getPi, naturalExponential, + * naturalLogarithm, ceil, floor, round, trunc + * finiteToString P.toExponential, P.toFixed, P.toPrecision, P.toString, P.valueOf, + * toStringBinary + * getBase10Exponent P.minus, P.plus, P.times, parseOther + * getLn10 P.logarithm, naturalLogarithm + * getPi P.acos, P.asin, P.atan, toLessThanHalfPi, atan2 + * getPrecision P.precision, P.toFraction + * getZeroString digitsToString, finiteToString + * intPow P.toPower, parseOther + * isOdd toLessThanHalfPi + * maxOrMin max, min + * naturalExponential P.naturalExponential, P.toPower + * naturalLogarithm P.acosh, P.asinh, P.atanh, P.logarithm, P.naturalLogarithm, + * P.toPower, naturalExponential + * nonFiniteToString finiteToString, toStringBinary + * parseDecimal Decimal + * parseOther Decimal + * sin P.sin + * taylorSeries P.cosh, P.sinh, cos, sin + * toLessThanHalfPi P.cos, P.sin + * toStringBinary P.toBinary, P.toHexadecimal, P.toOctal + * truncate intPow + * + * Throws: P.logarithm, P.precision, P.toFraction, checkInt32, getLn10, getPi, + * naturalLogarithm, config, parseOther, random, Decimal + */ + + +function digitsToString(d) { + var i, k, ws, + indexOfLastWord = d.length - 1, + str = '', + w = d[0]; + + if (indexOfLastWord > 0) { + str += w; + for (i = 1; i < indexOfLastWord; i++) { + ws = d[i] + ''; + k = LOG_BASE - ws.length; + if (k) str += getZeroString(k); + str += ws; + } + + w = d[i]; + ws = w + ''; + k = LOG_BASE - ws.length; + if (k) str += getZeroString(k); + } else if (w === 0) { + return '0'; + } + + // Remove trailing zeros of last w. + for (; w % 10 === 0;) w /= 10; + + return str + w; +} + + +function checkInt32(i, min, max) { + if (i !== ~~i || i < min || i > max) { + throw Error(invalidArgument + i); + } +} + + +/* + * Check 5 rounding digits if `repeating` is null, 4 otherwise. + * `repeating == null` if caller is `log` or `pow`, + * `repeating != null` if caller is `naturalLogarithm` or `naturalExponential`. + */ +function checkRoundingDigits(d, i, rm, repeating) { + var di, k, r, rd; + + // Get the length of the first word of the array d. + for (k = d[0]; k >= 10; k /= 10) --i; + + // Is the rounding digit in the first word of d? + if (--i < 0) { + i += LOG_BASE; + di = 0; + } else { + di = Math.ceil((i + 1) / LOG_BASE); + i %= LOG_BASE; + } + + // i is the index (0 - 6) of the rounding digit. + // E.g. if within the word 3487563 the first rounding digit is 5, + // then i = 4, k = 1000, rd = 3487563 % 1000 = 563 + k = mathpow(10, LOG_BASE - i); + rd = d[di] % k | 0; + + if (repeating == null) { + if (i < 3) { + if (i == 0) rd = rd / 100 | 0; + else if (i == 1) rd = rd / 10 | 0; + r = rm < 4 && rd == 99999 || rm > 3 && rd == 49999 || rd == 50000 || rd == 0; + } else { + r = (rm < 4 && rd + 1 == k || rm > 3 && rd + 1 == k / 2) && + (d[di + 1] / k / 100 | 0) == mathpow(10, i - 2) - 1 || + (rd == k / 2 || rd == 0) && (d[di + 1] / k / 100 | 0) == 0; + } + } else { + if (i < 4) { + if (i == 0) rd = rd / 1000 | 0; + else if (i == 1) rd = rd / 100 | 0; + else if (i == 2) rd = rd / 10 | 0; + r = (repeating || rm < 4) && rd == 9999 || !repeating && rm > 3 && rd == 4999; + } else { + r = ((repeating || rm < 4) && rd + 1 == k || + (!repeating && rm > 3) && rd + 1 == k / 2) && + (d[di + 1] / k / 1000 | 0) == mathpow(10, i - 3) - 1; + } + } + + return r; +} + + +// Convert string of `baseIn` to an array of numbers of `baseOut`. +// Eg. convertBase('255', 10, 16) returns [15, 15]. +// Eg. convertBase('ff', 16, 10) returns [2, 5, 5]. +function convertBase(str, baseIn, baseOut) { + var j, + arr = [0], + arrL, + i = 0, + strL = str.length; + + for (; i < strL;) { + for (arrL = arr.length; arrL--;) arr[arrL] *= baseIn; + arr[0] += NUMERALS.indexOf(str.charAt(i++)); + for (j = 0; j < arr.length; j++) { + if (arr[j] > baseOut - 1) { + if (arr[j + 1] === void 0) arr[j + 1] = 0; + arr[j + 1] += arr[j] / baseOut | 0; + arr[j] %= baseOut; + } + } + } + + return arr.reverse(); +} + + +/* + * cos(x) = 1 - x^2/2! + x^4/4! - ... + * |x| < pi/2 + * + */ +function cosine(Ctor, x) { + var k, y, + len = x.d.length; + + // Argument reduction: cos(4x) = 8*(cos^4(x) - cos^2(x)) + 1 + // i.e. cos(x) = 8*(cos^4(x/4) - cos^2(x/4)) + 1 + + // Estimate the optimum number of times to use the argument reduction. + if (len < 32) { + k = Math.ceil(len / 3); + y = (1 / tinyPow(4, k)).toString(); + } else { + k = 16; + y = '2.3283064365386962890625e-10'; + } + + Ctor.precision += k; + + x = taylorSeries(Ctor, 1, x.times(y), new Ctor(1)); + + // Reverse argument reduction + for (var i = k; i--;) { + var cos2x = x.times(x); + x = cos2x.times(cos2x).minus(cos2x).times(8).plus(1); + } + + Ctor.precision -= k; + + return x; +} + + +/* + * Perform division in the specified base. + */ +var divide = (function () { + + // Assumes non-zero x and k, and hence non-zero result. + function multiplyInteger(x, k, base) { + var temp, + carry = 0, + i = x.length; + + for (x = x.slice(); i--;) { + temp = x[i] * k + carry; + x[i] = temp % base | 0; + carry = temp / base | 0; + } + + if (carry) x.unshift(carry); + + return x; + } + + function compare(a, b, aL, bL) { + var i, r; + + if (aL != bL) { + r = aL > bL ? 1 : -1; + } else { + for (i = r = 0; i < aL; i++) { + if (a[i] != b[i]) { + r = a[i] > b[i] ? 1 : -1; + break; + } + } + } + + return r; + } + + function subtract(a, b, aL, base) { + var i = 0; + + // Subtract b from a. + for (; aL--;) { + a[aL] -= i; + i = a[aL] < b[aL] ? 1 : 0; + a[aL] = i * base + a[aL] - b[aL]; + } + + // Remove leading zeros. + for (; !a[0] && a.length > 1;) a.shift(); + } + + return function (x, y, pr, rm, dp, base) { + var cmp, e, i, k, logBase, more, prod, prodL, q, qd, rem, remL, rem0, sd, t, xi, xL, yd0, + yL, yz, + Ctor = x.constructor, + sign = x.s == y.s ? 1 : -1, + xd = x.d, + yd = y.d; + + // Either NaN, Infinity or 0? + if (!xd || !xd[0] || !yd || !yd[0]) { + + return new Ctor(// Return NaN if either NaN, or both Infinity or 0. + !x.s || !y.s || (xd ? yd && xd[0] == yd[0] : !yd) ? NaN : + + // Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0. + xd && xd[0] == 0 || !yd ? sign * 0 : sign / 0); + } + + if (base) { + logBase = 1; + e = x.e - y.e; + } else { + base = BASE; + logBase = LOG_BASE; + e = mathfloor(x.e / logBase) - mathfloor(y.e / logBase); + } + + yL = yd.length; + xL = xd.length; + q = new Ctor(sign); + qd = q.d = []; + + // Result exponent may be one less than e. + // The digit array of a Decimal from toStringBinary may have trailing zeros. + for (i = 0; yd[i] == (xd[i] || 0); i++); + + if (yd[i] > (xd[i] || 0)) e--; + + if (pr == null) { + sd = pr = Ctor.precision; + rm = Ctor.rounding; + } else if (dp) { + sd = pr + (x.e - y.e) + 1; + } else { + sd = pr; + } + + if (sd < 0) { + qd.push(1); + more = true; + } else { + + // Convert precision in number of base 10 digits to base 1e7 digits. + sd = sd / logBase + 2 | 0; + i = 0; + + // divisor < 1e7 + if (yL == 1) { + k = 0; + yd = yd[0]; + sd++; + + // k is the carry. + for (; (i < xL || k) && sd--; i++) { + t = k * base + (xd[i] || 0); + qd[i] = t / yd | 0; + k = t % yd | 0; + } + + more = k || i < xL; + + // divisor >= 1e7 + } else { + + // Normalise xd and yd so highest order digit of yd is >= base/2 + k = base / (yd[0] + 1) | 0; + + if (k > 1) { + yd = multiplyInteger(yd, k, base); + xd = multiplyInteger(xd, k, base); + yL = yd.length; + xL = xd.length; + } + + xi = yL; + rem = xd.slice(0, yL); + remL = rem.length; + + // Add zeros to make remainder as long as divisor. + for (; remL < yL;) rem[remL++] = 0; + + yz = yd.slice(); + yz.unshift(0); + yd0 = yd[0]; + + if (yd[1] >= base / 2) ++yd0; + + do { + k = 0; + + // Compare divisor and remainder. + cmp = compare(yd, rem, yL, remL); + + // If divisor < remainder. + if (cmp < 0) { + + // Calculate trial digit, k. + rem0 = rem[0]; + if (yL != remL) rem0 = rem0 * base + (rem[1] || 0); + + // k will be how many times the divisor goes into the current remainder. + k = rem0 / yd0 | 0; + + // Algorithm: + // 1. product = divisor * trial digit (k) + // 2. if product > remainder: product -= divisor, k-- + // 3. remainder -= product + // 4. if product was < remainder at 2: + // 5. compare new remainder and divisor + // 6. If remainder > divisor: remainder -= divisor, k++ + + if (k > 1) { + if (k >= base) k = base - 1; + + // product = divisor * trial digit. + prod = multiplyInteger(yd, k, base); + prodL = prod.length; + remL = rem.length; + + // Compare product and remainder. + cmp = compare(prod, rem, prodL, remL); + + // product > remainder. + if (cmp == 1) { + k--; + + // Subtract divisor from product. + subtract(prod, yL < prodL ? yz : yd, prodL, base); + } + } else { + + // cmp is -1. + // If k is 0, there is no need to compare yd and rem again below, so change cmp to 1 + // to avoid it. If k is 1 there is a need to compare yd and rem again below. + if (k == 0) cmp = k = 1; + prod = yd.slice(); + } + + prodL = prod.length; + if (prodL < remL) prod.unshift(0); + + // Subtract product from remainder. + subtract(rem, prod, remL, base); + + // If product was < previous remainder. + if (cmp == -1) { + remL = rem.length; + + // Compare divisor and new remainder. + cmp = compare(yd, rem, yL, remL); + + // If divisor < new remainder, subtract divisor from remainder. + if (cmp < 1) { + k++; + + // Subtract divisor from remainder. + subtract(rem, yL < remL ? yz : yd, remL, base); + } + } + + remL = rem.length; + } else if (cmp === 0) { + k++; + rem = [0]; + } // if cmp === 1, k will be 0 + + // Add the next digit, k, to the result array. + qd[i++] = k; + + // Update the remainder. + if (cmp && rem[0]) { + rem[remL++] = xd[xi] || 0; + } else { + rem = [xd[xi]]; + remL = 1; + } + + } while ((xi++ < xL || rem[0] !== void 0) && sd--); + + more = rem[0] !== void 0; + } + + // Leading zero? + if (!qd[0]) qd.shift(); + } + + // logBase is 1 when divide is being used for base conversion. + if (logBase == 1) { + q.e = e; + inexact = more; + } else { + + // To calculate q.e, first get the number of digits of qd[0]. + for (i = 1, k = qd[0]; k >= 10; k /= 10) i++; + q.e = i + e * logBase - 1; + + finalise(q, dp ? pr + q.e + 1 : pr, rm, more); + } + + return q; + }; +})(); + + +/* + * Round `x` to `sd` significant digits using rounding mode `rm`. + * Check for over/under-flow. + */ + function finalise(x, sd, rm, isTruncated) { + var digits, i, j, k, rd, roundUp, w, xd, xdi, + Ctor = x.constructor; + + // Don't round if sd is null or undefined. + out: if (sd != null) { + xd = x.d; + + // Infinity/NaN. + if (!xd) return x; + + // rd: the rounding digit, i.e. the digit after the digit that may be rounded up. + // w: the word of xd containing rd, a base 1e7 number. + // xdi: the index of w within xd. + // digits: the number of digits of w. + // i: what would be the index of rd within w if all the numbers were 7 digits long (i.e. if + // they had leading zeros) + // j: if > 0, the actual index of rd within w (if < 0, rd is a leading zero). + + // Get the length of the first word of the digits array xd. + for (digits = 1, k = xd[0]; k >= 10; k /= 10) digits++; + i = sd - digits; + + // Is the rounding digit in the first word of xd? + if (i < 0) { + i += LOG_BASE; + j = sd; + w = xd[xdi = 0]; + + // Get the rounding digit at index j of w. + rd = w / mathpow(10, digits - j - 1) % 10 | 0; + } else { + xdi = Math.ceil((i + 1) / LOG_BASE); + k = xd.length; + if (xdi >= k) { + if (isTruncated) { + + // Needed by `naturalExponential`, `naturalLogarithm` and `squareRoot`. + for (; k++ <= xdi;) xd.push(0); + w = rd = 0; + digits = 1; + i %= LOG_BASE; + j = i - LOG_BASE + 1; + } else { + break out; + } + } else { + w = k = xd[xdi]; + + // Get the number of digits of w. + for (digits = 1; k >= 10; k /= 10) digits++; + + // Get the index of rd within w. + i %= LOG_BASE; + + // Get the index of rd within w, adjusted for leading zeros. + // The number of leading zeros of w is given by LOG_BASE - digits. + j = i - LOG_BASE + digits; + + // Get the rounding digit at index j of w. + rd = j < 0 ? 0 : w / mathpow(10, digits - j - 1) % 10 | 0; + } + } + + // Are there any non-zero digits after the rounding digit? + isTruncated = isTruncated || sd < 0 || + xd[xdi + 1] !== void 0 || (j < 0 ? w : w % mathpow(10, digits - j - 1)); + + // The expression `w % mathpow(10, digits - j - 1)` returns all the digits of w to the right + // of the digit at (left-to-right) index j, e.g. if w is 908714 and j is 2, the expression + // will give 714. + + roundUp = rm < 4 + ? (rd || isTruncated) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) + : rd > 5 || rd == 5 && (rm == 4 || isTruncated || rm == 6 && + + // Check whether the digit to the left of the rounding digit is odd. + ((i > 0 ? j > 0 ? w / mathpow(10, digits - j) : 0 : xd[xdi - 1]) % 10) & 1 || + rm == (x.s < 0 ? 8 : 7)); + + if (sd < 1 || !xd[0]) { + xd.length = 0; + if (roundUp) { + + // Convert sd to decimal places. + sd -= x.e + 1; + + // 1, 0.1, 0.01, 0.001, 0.0001 etc. + xd[0] = mathpow(10, (LOG_BASE - sd % LOG_BASE) % LOG_BASE); + x.e = -sd || 0; + } else { + + // Zero. + xd[0] = x.e = 0; + } + + return x; + } + + // Remove excess digits. + if (i == 0) { + xd.length = xdi; + k = 1; + xdi--; + } else { + xd.length = xdi + 1; + k = mathpow(10, LOG_BASE - i); + + // E.g. 56700 becomes 56000 if 7 is the rounding digit. + // j > 0 means i > number of leading zeros of w. + xd[xdi] = j > 0 ? (w / mathpow(10, digits - j) % mathpow(10, j) | 0) * k : 0; + } + + if (roundUp) { + for (;;) { + + // Is the digit to be rounded up in the first word of xd? + if (xdi == 0) { + + // i will be the length of xd[0] before k is added. + for (i = 1, j = xd[0]; j >= 10; j /= 10) i++; + j = xd[0] += k; + for (k = 1; j >= 10; j /= 10) k++; + + // if i != k the length has increased. + if (i != k) { + x.e++; + if (xd[0] == BASE) xd[0] = 1; + } + + break; + } else { + xd[xdi] += k; + if (xd[xdi] != BASE) break; + xd[xdi--] = 0; + k = 1; + } + } + } + + // Remove trailing zeros. + for (i = xd.length; xd[--i] === 0;) xd.pop(); + } + + if (external) { + + // Overflow? + if (x.e > Ctor.maxE) { + + // Infinity. + x.d = null; + x.e = NaN; + + // Underflow? + } else if (x.e < Ctor.minE) { + + // Zero. + x.e = 0; + x.d = [0]; + // Ctor.underflow = true; + } // else Ctor.underflow = false; + } + + return x; +} + + +function finiteToString(x, isExp, sd) { + if (!x.isFinite()) return nonFiniteToString(x); + var k, + e = x.e, + str = digitsToString(x.d), + len = str.length; + + if (isExp) { + if (sd && (k = sd - len) > 0) { + str = str.charAt(0) + '.' + str.slice(1) + getZeroString(k); + } else if (len > 1) { + str = str.charAt(0) + '.' + str.slice(1); + } + + str = str + (x.e < 0 ? 'e' : 'e+') + x.e; + } else if (e < 0) { + str = '0.' + getZeroString(-e - 1) + str; + if (sd && (k = sd - len) > 0) str += getZeroString(k); + } else if (e >= len) { + str += getZeroString(e + 1 - len); + if (sd && (k = sd - e - 1) > 0) str = str + '.' + getZeroString(k); + } else { + if ((k = e + 1) < len) str = str.slice(0, k) + '.' + str.slice(k); + if (sd && (k = sd - len) > 0) { + if (e + 1 === len) str += '.'; + str += getZeroString(k); + } + } + + return str; +} + + +// Calculate the base 10 exponent from the base 1e7 exponent. +function getBase10Exponent(digits, e) { + var w = digits[0]; + + // Add the number of digits of the first word of the digits array. + for ( e *= LOG_BASE; w >= 10; w /= 10) e++; + return e; +} + + +function getLn10(Ctor, sd, pr) { + if (sd > LN10_PRECISION) { + + // Reset global state in case the exception is caught. + external = true; + if (pr) Ctor.precision = pr; + throw Error(precisionLimitExceeded); + } + return finalise(new Ctor(LN10), sd, 1, true); +} + + +function getPi(Ctor, sd, rm) { + if (sd > PI_PRECISION) throw Error(precisionLimitExceeded); + return finalise(new Ctor(PI), sd, rm, true); +} + + +function getPrecision(digits) { + var w = digits.length - 1, + len = w * LOG_BASE + 1; + + w = digits[w]; + + // If non-zero... + if (w) { + + // Subtract the number of trailing zeros of the last word. + for (; w % 10 == 0; w /= 10) len--; + + // Add the number of digits of the first word. + for (w = digits[0]; w >= 10; w /= 10) len++; + } + + return len; +} + + +function getZeroString(k) { + var zs = ''; + for (; k--;) zs += '0'; + return zs; +} + + +/* + * Return a new Decimal whose value is the value of Decimal `x` to the power `n`, where `n` is an + * integer of type number. + * + * Implements 'exponentiation by squaring'. Called by `pow` and `parseOther`. + * + */ +function intPow(Ctor, x, n, pr) { + var isTruncated, + r = new Ctor(1), + + // Max n of 9007199254740991 takes 53 loop iterations. + // Maximum digits array length; leaves [28, 34] guard digits. + k = Math.ceil(pr / LOG_BASE + 4); + + external = false; + + for (;;) { + if (n % 2) { + r = r.times(x); + if (truncate(r.d, k)) isTruncated = true; + } + + n = mathfloor(n / 2); + if (n === 0) { + + // To ensure correct rounding when r.d is truncated, increment the last word if it is zero. + n = r.d.length - 1; + if (isTruncated && r.d[n] === 0) ++r.d[n]; + break; + } + + x = x.times(x); + truncate(x.d, k); + } + + external = true; + + return r; +} + + +function isOdd(n) { + return n.d[n.d.length - 1] & 1; +} + + +/* + * Handle `max` and `min`. `ltgt` is 'lt' or 'gt'. + */ +function maxOrMin(Ctor, args, ltgt) { + var y, + x = new Ctor(args[0]), + i = 0; + + for (; ++i < args.length;) { + y = new Ctor(args[i]); + if (!y.s) { + x = y; + break; + } else if (x[ltgt](y)) { + x = y; + } + } + + return x; +} + + +/* + * Return a new Decimal whose value is the natural exponential of `x` rounded to `sd` significant + * digits. + * + * Taylor/Maclaurin series. + * + * exp(x) = x^0/0! + x^1/1! + x^2/2! + x^3/3! + ... + * + * Argument reduction: + * Repeat x = x / 32, k += 5, until |x| < 0.1 + * exp(x) = exp(x / 2^k)^(2^k) + * + * Previously, the argument was initially reduced by + * exp(x) = exp(r) * 10^k where r = x - k * ln10, k = floor(x / ln10) + * to first put r in the range [0, ln10], before dividing by 32 until |x| < 0.1, but this was + * found to be slower than just dividing repeatedly by 32 as above. + * + * Max integer argument: exp('20723265836946413') = 6.3e+9000000000000000 + * Min integer argument: exp('-20723265836946411') = 1.2e-9000000000000000 + * (Math object integer min/max: Math.exp(709) = 8.2e+307, Math.exp(-745) = 5e-324) + * + * exp(Infinity) = Infinity + * exp(-Infinity) = 0 + * exp(NaN) = NaN + * exp(±0) = 1 + * + * exp(x) is non-terminating for any finite, non-zero x. + * + * The result will always be correctly rounded. + * + */ +function naturalExponential(x, sd) { + var denominator, guard, j, pow, sum, t, wpr, + rep = 0, + i = 0, + k = 0, + Ctor = x.constructor, + rm = Ctor.rounding, + pr = Ctor.precision; + + // 0/NaN/Infinity? + if (!x.d || !x.d[0] || x.e > 17) { + + return new Ctor(x.d + ? !x.d[0] ? 1 : x.s < 0 ? 0 : 1 / 0 + : x.s ? x.s < 0 ? 0 : x : 0 / 0); + } + + if (sd == null) { + external = false; + wpr = pr; + } else { + wpr = sd; + } + + t = new Ctor(0.03125); + + // while abs(x) >= 0.1 + while (x.e > -2) { + + // x = x / 2^5 + x = x.times(t); + k += 5; + } + + // Use 2 * log10(2^k) + 5 (empirically derived) to estimate the increase in precision + // necessary to ensure the first 4 rounding digits are correct. + guard = Math.log(mathpow(2, k)) / Math.LN10 * 2 + 5 | 0; + wpr += guard; + denominator = pow = sum = new Ctor(1); + Ctor.precision = wpr; + + for (;;) { + pow = finalise(pow.times(x), wpr, 1); + denominator = denominator.times(++i); + t = sum.plus(divide(pow, denominator, wpr, 1)); + + if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) { + j = k; + while (j--) sum = finalise(sum.times(sum), wpr, 1); + + // Check to see if the first 4 rounding digits are [49]999. + // If so, repeat the summation with a higher precision, otherwise + // e.g. with precision: 18, rounding: 1 + // exp(18.404272462595034083567793919843761) = 98372560.1229999999 (should be 98372560.123) + // `wpr - guard` is the index of first rounding digit. + if (sd == null) { + + if (rep < 3 && checkRoundingDigits(sum.d, wpr - guard, rm, rep)) { + Ctor.precision = wpr += 10; + denominator = pow = t = new Ctor(1); + i = 0; + rep++; + } else { + return finalise(sum, Ctor.precision = pr, rm, external = true); + } + } else { + Ctor.precision = pr; + return sum; + } + } + + sum = t; + } +} + + +/* + * Return a new Decimal whose value is the natural logarithm of `x` rounded to `sd` significant + * digits. + * + * ln(-n) = NaN + * ln(0) = -Infinity + * ln(-0) = -Infinity + * ln(1) = 0 + * ln(Infinity) = Infinity + * ln(-Infinity) = NaN + * ln(NaN) = NaN + * + * ln(n) (n != 1) is non-terminating. + * + */ +function naturalLogarithm(y, sd) { + var c, c0, denominator, e, numerator, rep, sum, t, wpr, x1, x2, + n = 1, + guard = 10, + x = y, + xd = x.d, + Ctor = x.constructor, + rm = Ctor.rounding, + pr = Ctor.precision; + + // Is x negative or Infinity, NaN, 0 or 1? + if (x.s < 0 || !xd || !xd[0] || !x.e && xd[0] == 1 && xd.length == 1) { + return new Ctor(xd && !xd[0] ? -1 / 0 : x.s != 1 ? NaN : xd ? 0 : x); + } + + if (sd == null) { + external = false; + wpr = pr; + } else { + wpr = sd; + } + + Ctor.precision = wpr += guard; + c = digitsToString(xd); + c0 = c.charAt(0); + + if (Math.abs(e = x.e) < 1.5e15) { + + // Argument reduction. + // The series converges faster the closer the argument is to 1, so using + // ln(a^b) = b * ln(a), ln(a) = ln(a^b) / b + // multiply the argument by itself until the leading digits of the significand are 7, 8, 9, + // 10, 11, 12 or 13, recording the number of multiplications so the sum of the series can + // later be divided by this number, then separate out the power of 10 using + // ln(a*10^b) = ln(a) + b*ln(10). + + // max n is 21 (gives 0.9, 1.0 or 1.1) (9e15 / 21 = 4.2e14). + //while (c0 < 9 && c0 != 1 || c0 == 1 && c.charAt(1) > 1) { + // max n is 6 (gives 0.7 - 1.3) + while (c0 < 7 && c0 != 1 || c0 == 1 && c.charAt(1) > 3) { + x = x.times(y); + c = digitsToString(x.d); + c0 = c.charAt(0); + n++; + } + + e = x.e; + + if (c0 > 1) { + x = new Ctor('0.' + c); + e++; + } else { + x = new Ctor(c0 + '.' + c.slice(1)); + } + } else { + + // The argument reduction method above may result in overflow if the argument y is a massive + // number with exponent >= 1500000000000000 (9e15 / 6 = 1.5e15), so instead recall this + // function using ln(x*10^e) = ln(x) + e*ln(10). + t = getLn10(Ctor, wpr + 2, pr).times(e + ''); + x = naturalLogarithm(new Ctor(c0 + '.' + c.slice(1)), wpr - guard).plus(t); + Ctor.precision = pr; + + return sd == null ? finalise(x, pr, rm, external = true) : x; + } + + // x1 is x reduced to a value near 1. + x1 = x; + + // Taylor series. + // ln(y) = ln((1 + x)/(1 - x)) = 2(x + x^3/3 + x^5/5 + x^7/7 + ...) + // where x = (y - 1)/(y + 1) (|x| < 1) + sum = numerator = x = divide(x.minus(1), x.plus(1), wpr, 1); + x2 = finalise(x.times(x), wpr, 1); + denominator = 3; + + for (;;) { + numerator = finalise(numerator.times(x2), wpr, 1); + t = sum.plus(divide(numerator, new Ctor(denominator), wpr, 1)); + + if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) { + sum = sum.times(2); + + // Reverse the argument reduction. Check that e is not 0 because, besides preventing an + // unnecessary calculation, -0 + 0 = +0 and to ensure correct rounding -0 needs to stay -0. + if (e !== 0) sum = sum.plus(getLn10(Ctor, wpr + 2, pr).times(e + '')); + sum = divide(sum, new Ctor(n), wpr, 1); + + // Is rm > 3 and the first 4 rounding digits 4999, or rm < 4 (or the summation has + // been repeated previously) and the first 4 rounding digits 9999? + // If so, restart the summation with a higher precision, otherwise + // e.g. with precision: 12, rounding: 1 + // ln(135520028.6126091714265381533) = 18.7246299999 when it should be 18.72463. + // `wpr - guard` is the index of first rounding digit. + if (sd == null) { + if (checkRoundingDigits(sum.d, wpr - guard, rm, rep)) { + Ctor.precision = wpr += guard; + t = numerator = x = divide(x1.minus(1), x1.plus(1), wpr, 1); + x2 = finalise(x.times(x), wpr, 1); + denominator = rep = 1; + } else { + return finalise(sum, Ctor.precision = pr, rm, external = true); + } + } else { + Ctor.precision = pr; + return sum; + } + } + + sum = t; + denominator += 2; + } +} + + +// ±Infinity, NaN. +function nonFiniteToString(x) { + // Unsigned. + return String(x.s * x.s / 0); +} + + +/* + * Parse the value of a new Decimal `x` from string `str`. + */ +function parseDecimal(x, str) { + var e, i, len; + + // Decimal point? + if ((e = str.indexOf('.')) > -1) str = str.replace('.', ''); + + // Exponential form? + if ((i = str.search(/e/i)) > 0) { + + // Determine exponent. + if (e < 0) e = i; + e += +str.slice(i + 1); + str = str.substring(0, i); + } else if (e < 0) { + + // Integer. + e = str.length; + } + + // Determine leading zeros. + for (i = 0; str.charCodeAt(i) === 48; i++); + + // Determine trailing zeros. + for (len = str.length; str.charCodeAt(len - 1) === 48; --len); + str = str.slice(i, len); + + if (str) { + len -= i; + x.e = e = e - i - 1; + x.d = []; + + // Transform base + + // e is the base 10 exponent. + // i is where to slice str to get the first word of the digits array. + i = (e + 1) % LOG_BASE; + if (e < 0) i += LOG_BASE; + + if (i < len) { + if (i) x.d.push(+str.slice(0, i)); + for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE)); + str = str.slice(i); + i = LOG_BASE - str.length; + } else { + i -= len; + } + + for (; i--;) str += '0'; + x.d.push(+str); + + if (external) { + + // Overflow? + if (x.e > x.constructor.maxE) { + + // Infinity. + x.d = null; + x.e = NaN; + + // Underflow? + } else if (x.e < x.constructor.minE) { + + // Zero. + x.e = 0; + x.d = [0]; + // x.constructor.underflow = true; + } // else x.constructor.underflow = false; + } + } else { + + // Zero. + x.e = 0; + x.d = [0]; + } + + return x; +} + + +/* + * Parse the value of a new Decimal `x` from a string `str`, which is not a decimal value. + */ +function parseOther(x, str) { + var base, Ctor, divisor, i, isFloat, len, p, xd, xe; + + if (str === 'Infinity' || str === 'NaN') { + if (!+str) x.s = NaN; + x.e = NaN; + x.d = null; + return x; + } + + if (isHex.test(str)) { + base = 16; + str = str.toLowerCase(); + } else if (isBinary.test(str)) { + base = 2; + } else if (isOctal.test(str)) { + base = 8; + } else { + throw Error(invalidArgument + str); + } + + // Is there a binary exponent part? + i = str.search(/p/i); + + if (i > 0) { + p = +str.slice(i + 1); + str = str.substring(2, i); + } else { + str = str.slice(2); + } + + // Convert `str` as an integer then divide the result by `base` raised to a power such that the + // fraction part will be restored. + i = str.indexOf('.'); + isFloat = i >= 0; + Ctor = x.constructor; + + if (isFloat) { + str = str.replace('.', ''); + len = str.length; + i = len - i; + + // log[10](16) = 1.2041... , log[10](88) = 1.9444.... + divisor = intPow(Ctor, new Ctor(base), i, i * 2); + } + + xd = convertBase(str, base, BASE); + xe = xd.length - 1; + + // Remove trailing zeros. + for (i = xe; xd[i] === 0; --i) xd.pop(); + if (i < 0) return new Ctor(x.s * 0); + x.e = getBase10Exponent(xd, xe); + x.d = xd; + external = false; + + // At what precision to perform the division to ensure exact conversion? + // maxDecimalIntegerPartDigitCount = ceil(log[10](b) * otherBaseIntegerPartDigitCount) + // log[10](2) = 0.30103, log[10](8) = 0.90309, log[10](16) = 1.20412 + // E.g. ceil(1.2 * 3) = 4, so up to 4 decimal digits are needed to represent 3 hex int digits. + // maxDecimalFractionPartDigitCount = {Hex:4|Oct:3|Bin:1} * otherBaseFractionPartDigitCount + // Therefore using 4 * the number of digits of str will always be enough. + if (isFloat) x = divide(x, divisor, len * 4); + + // Multiply by the binary exponent part if present. + if (p) x = x.times(Math.abs(p) < 54 ? mathpow(2, p) : Decimal.pow(2, p)); + external = true; + + return x; +} + + +/* + * sin(x) = x - x^3/3! + x^5/5! - ... + * |x| < pi/2 + * + */ +function sine(Ctor, x) { + var k, + len = x.d.length; + + if (len < 3) return taylorSeries(Ctor, 2, x, x); + + // Argument reduction: sin(5x) = 16*sin^5(x) - 20*sin^3(x) + 5*sin(x) + // i.e. sin(x) = 16*sin^5(x/5) - 20*sin^3(x/5) + 5*sin(x/5) + // and sin(x) = sin(x/5)(5 + sin^2(x/5)(16sin^2(x/5) - 20)) + + // Estimate the optimum number of times to use the argument reduction. + k = 1.4 * Math.sqrt(len); + k = k > 16 ? 16 : k | 0; + + x = x.times(1 / tinyPow(5, k)); + x = taylorSeries(Ctor, 2, x, x); + + // Reverse argument reduction + var sin2_x, + d5 = new Ctor(5), + d16 = new Ctor(16), + d20 = new Ctor(20); + for (; k--;) { + sin2_x = x.times(x); + x = x.times(d5.plus(sin2_x.times(d16.times(sin2_x).minus(d20)))); + } + + return x; +} + + +// Calculate Taylor series for `cos`, `cosh`, `sin` and `sinh`. +function taylorSeries(Ctor, n, x, y, isHyperbolic) { + var j, t, u, x2, + i = 1, + pr = Ctor.precision, + k = Math.ceil(pr / LOG_BASE); + + external = false; + x2 = x.times(x); + u = new Ctor(y); + + for (;;) { + t = divide(u.times(x2), new Ctor(n++ * n++), pr, 1); + u = isHyperbolic ? y.plus(t) : y.minus(t); + y = divide(t.times(x2), new Ctor(n++ * n++), pr, 1); + t = u.plus(y); + + if (t.d[k] !== void 0) { + for (j = k; t.d[j] === u.d[j] && j--;); + if (j == -1) break; + } + + j = u; + u = y; + y = t; + t = j; + i++; + } + + external = true; + t.d.length = k + 1; + + return t; +} + + +// Exponent e must be positive and non-zero. +function tinyPow(b, e) { + var n = b; + while (--e) n *= b; + return n; +} + + +// Return the absolute value of `x` reduced to less than or equal to half pi. +function toLessThanHalfPi(Ctor, x) { + var t, + isNeg = x.s < 0, + pi = getPi(Ctor, Ctor.precision, 1), + halfPi = pi.times(0.5); + + x = x.abs(); + + if (x.lte(halfPi)) { + quadrant = isNeg ? 4 : 1; + return x; + } + + t = x.divToInt(pi); + + if (t.isZero()) { + quadrant = isNeg ? 3 : 2; + } else { + x = x.minus(t.times(pi)); + + // 0 <= x < pi + if (x.lte(halfPi)) { + quadrant = isOdd(t) ? (isNeg ? 2 : 3) : (isNeg ? 4 : 1); + return x; + } + + quadrant = isOdd(t) ? (isNeg ? 1 : 4) : (isNeg ? 3 : 2); + } + + return x.minus(pi).abs(); +} + + +/* + * Return the value of Decimal `x` as a string in base `baseOut`. + * + * If the optional `sd` argument is present include a binary exponent suffix. + */ +function toStringBinary(x, baseOut, sd, rm) { + var base, e, i, k, len, roundUp, str, xd, y, + Ctor = x.constructor, + isExp = sd !== void 0; + + if (isExp) { + checkInt32(sd, 1, MAX_DIGITS); + if (rm === void 0) rm = Ctor.rounding; + else checkInt32(rm, 0, 8); + } else { + sd = Ctor.precision; + rm = Ctor.rounding; + } + + if (!x.isFinite()) { + str = nonFiniteToString(x); + } else { + str = finiteToString(x); + i = str.indexOf('.'); + + // Use exponential notation according to `toExpPos` and `toExpNeg`? No, but if required: + // maxBinaryExponent = floor((decimalExponent + 1) * log[2](10)) + // minBinaryExponent = floor(decimalExponent * log[2](10)) + // log[2](10) = 3.321928094887362347870319429489390175864 + + if (isExp) { + base = 2; + if (baseOut == 16) { + sd = sd * 4 - 3; + } else if (baseOut == 8) { + sd = sd * 3 - 2; + } + } else { + base = baseOut; + } + + // Convert the number as an integer then divide the result by its base raised to a power such + // that the fraction part will be restored. + + // Non-integer. + if (i >= 0) { + str = str.replace('.', ''); + y = new Ctor(1); + y.e = str.length - i; + y.d = convertBase(finiteToString(y), 10, base); + y.e = y.d.length; + } + + xd = convertBase(str, 10, base); + e = len = xd.length; + + // Remove trailing zeros. + for (; xd[--len] == 0;) xd.pop(); + + if (!xd[0]) { + str = isExp ? '0p+0' : '0'; + } else { + if (i < 0) { + e--; + } else { + x = new Ctor(x); + x.d = xd; + x.e = e; + x = divide(x, y, sd, rm, 0, base); + xd = x.d; + e = x.e; + roundUp = inexact; + } + + // The rounding digit, i.e. the digit after the digit that may be rounded up. + i = xd[sd]; + k = base / 2; + roundUp = roundUp || xd[sd + 1] !== void 0; + + roundUp = rm < 4 + ? (i !== void 0 || roundUp) && (rm === 0 || rm === (x.s < 0 ? 3 : 2)) + : i > k || i === k && (rm === 4 || roundUp || rm === 6 && xd[sd - 1] & 1 || + rm === (x.s < 0 ? 8 : 7)); + + xd.length = sd; + + if (roundUp) { + + // Rounding up may mean the previous digit has to be rounded up and so on. + for (; ++xd[--sd] > base - 1;) { + xd[sd] = 0; + if (!sd) { + ++e; + xd.unshift(1); + } + } + } + + // Determine trailing zeros. + for (len = xd.length; !xd[len - 1]; --len); + + // E.g. [4, 11, 15] becomes 4bf. + for (i = 0, str = ''; i < len; i++) str += NUMERALS.charAt(xd[i]); + + // Add binary exponent suffix? + if (isExp) { + if (len > 1) { + if (baseOut == 16 || baseOut == 8) { + i = baseOut == 16 ? 4 : 3; + for (--len; len % i; len++) str += '0'; + xd = convertBase(str, base, baseOut); + for (len = xd.length; !xd[len - 1]; --len); + + // xd[0] will always be be 1 + for (i = 1, str = '1.'; i < len; i++) str += NUMERALS.charAt(xd[i]); + } else { + str = str.charAt(0) + '.' + str.slice(1); + } + } + + str = str + (e < 0 ? 'p' : 'p+') + e; + } else if (e < 0) { + for (; ++e;) str = '0' + str; + str = '0.' + str; + } else { + if (++e > len) for (e -= len; e-- ;) str += '0'; + else if (e < len) str = str.slice(0, e) + '.' + str.slice(e); + } + } + + str = (baseOut == 16 ? '0x' : baseOut == 2 ? '0b' : baseOut == 8 ? '0o' : '') + str; + } + + return x.s < 0 ? '-' + str : str; +} + + +// Does not strip trailing zeros. +function truncate(arr, len) { + if (arr.length > len) { + arr.length = len; + return true; + } +} + + +// Decimal methods + + +/* + * abs + * acos + * acosh + * add + * asin + * asinh + * atan + * atanh + * atan2 + * cbrt + * ceil + * clone + * config + * cos + * cosh + * div + * exp + * floor + * hypot + * ln + * log + * log2 + * log10 + * max + * min + * mod + * mul + * pow + * random + * round + * set + * sign + * sin + * sinh + * sqrt + * sub + * tan + * tanh + * trunc + */ + + +/* + * Return a new Decimal whose value is the absolute value of `x`. + * + * x {number|string|Decimal} + * + */ +function abs(x) { + return new this(x).abs(); +} + + +/* + * Return a new Decimal whose value is the arccosine in radians of `x`. + * + * x {number|string|Decimal} + * + */ +function acos(x) { + return new this(x).acos(); +} + + +/* + * Return a new Decimal whose value is the inverse of the hyperbolic cosine of `x`, rounded to + * `precision` significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} A value in radians. + * + */ +function acosh(x) { + return new this(x).acosh(); +} + + +/* + * Return a new Decimal whose value is the sum of `x` and `y`, rounded to `precision` significant + * digits using rounding mode `rounding`. + * + * x {number|string|Decimal} + * y {number|string|Decimal} + * + */ +function add(x, y) { + return new this(x).plus(y); +} + + +/* + * Return a new Decimal whose value is the arcsine in radians of `x`, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} + * + */ +function asin(x) { + return new this(x).asin(); +} + + +/* + * Return a new Decimal whose value is the inverse of the hyperbolic sine of `x`, rounded to + * `precision` significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} A value in radians. + * + */ +function asinh(x) { + return new this(x).asinh(); +} + + +/* + * Return a new Decimal whose value is the arctangent in radians of `x`, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} + * + */ +function atan(x) { + return new this(x).atan(); +} + + +/* + * Return a new Decimal whose value is the inverse of the hyperbolic tangent of `x`, rounded to + * `precision` significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} A value in radians. + * + */ +function atanh(x) { + return new this(x).atanh(); +} + + +/* + * Return a new Decimal whose value is the arctangent in radians of `y/x` in the range -pi to pi + * (inclusive), rounded to `precision` significant digits using rounding mode `rounding`. + * + * Domain: [-Infinity, Infinity] + * Range: [-pi, pi] + * + * y {number|string|Decimal} The y-coordinate. + * x {number|string|Decimal} The x-coordinate. + * + * atan2(±0, -0) = ±pi + * atan2(±0, +0) = ±0 + * atan2(±0, -x) = ±pi for x > 0 + * atan2(±0, x) = ±0 for x > 0 + * atan2(-y, ±0) = -pi/2 for y > 0 + * atan2(y, ±0) = pi/2 for y > 0 + * atan2(±y, -Infinity) = ±pi for finite y > 0 + * atan2(±y, +Infinity) = ±0 for finite y > 0 + * atan2(±Infinity, x) = ±pi/2 for finite x + * atan2(±Infinity, -Infinity) = ±3*pi/4 + * atan2(±Infinity, +Infinity) = ±pi/4 + * atan2(NaN, x) = NaN + * atan2(y, NaN) = NaN + * + */ +function atan2(y, x) { + y = new this(y); + x = new this(x); + var r, + pr = this.precision, + rm = this.rounding, + wpr = pr + 4; + + // Either NaN + if (!y.s || !x.s) { + r = new this(NaN); + + // Both ±Infinity + } else if (!y.d && !x.d) { + r = getPi(this, wpr, 1).times(x.s > 0 ? 0.25 : 0.75); + r.s = y.s; + + // x is ±Infinity or y is ±0 + } else if (!x.d || y.isZero()) { + r = x.s < 0 ? getPi(this, pr, rm) : new this(0); + r.s = y.s; + + // y is ±Infinity or x is ±0 + } else if (!y.d || x.isZero()) { + r = getPi(this, wpr, 1).times(0.5); + r.s = y.s; + + // Both non-zero and finite + } else if (x.s < 0) { + this.precision = wpr; + this.rounding = 1; + r = this.atan(divide(y, x, wpr, 1)); + x = getPi(this, wpr, 1); + this.precision = pr; + this.rounding = rm; + r = y.s < 0 ? r.minus(x) : r.plus(x); + } else { + r = this.atan(divide(y, x, wpr, 1)); + } + + return r; +} + + +/* + * Return a new Decimal whose value is the cube root of `x`, rounded to `precision` significant + * digits using rounding mode `rounding`. + * + * x {number|string|Decimal} + * + */ +function cbrt(x) { + return new this(x).cbrt(); +} + + +/* + * Return a new Decimal whose value is `x` rounded to an integer using `ROUND_CEIL`. + * + * x {number|string|Decimal} + * + */ +function ceil(x) { + return finalise(x = new this(x), x.e + 1, 2); +} + + +/* + * Configure global settings for a Decimal constructor. + * + * `obj` is an object with one or more of the following properties, + * + * precision {number} + * rounding {number} + * toExpNeg {number} + * toExpPos {number} + * maxE {number} + * minE {number} + * modulo {number} + * crypto {boolean|number} + * defaults {true} + * + * E.g. Decimal.config({ precision: 20, rounding: 4 }) + * + */ +function config(obj) { + if (!obj || typeof obj !== 'object') throw Error(decimalError + 'Object expected'); + var i, p, v, + useDefaults = obj.defaults === true, + ps = [ + 'precision', 1, MAX_DIGITS, + 'rounding', 0, 8, + 'toExpNeg', -EXP_LIMIT, 0, + 'toExpPos', 0, EXP_LIMIT, + 'maxE', 0, EXP_LIMIT, + 'minE', -EXP_LIMIT, 0, + 'modulo', 0, 9 + ]; + + for (i = 0; i < ps.length; i += 3) { + if (p = ps[i], useDefaults) this[p] = DEFAULTS[p]; + if ((v = obj[p]) !== void 0) { + if (mathfloor(v) === v && v >= ps[i + 1] && v <= ps[i + 2]) this[p] = v; + else throw Error(invalidArgument + p + ': ' + v); + } + } + + if (p = 'crypto', useDefaults) this[p] = DEFAULTS[p]; + if ((v = obj[p]) !== void 0) { + if (v === true || v === false || v === 0 || v === 1) { + if (v) { + if (typeof crypto != 'undefined' && crypto && + (crypto.getRandomValues || crypto.randomBytes)) { + this[p] = true; + } else { + throw Error(cryptoUnavailable); + } + } else { + this[p] = false; + } + } else { + throw Error(invalidArgument + p + ': ' + v); + } + } + + return this; +} + + +/* + * Return a new Decimal whose value is the cosine of `x`, rounded to `precision` significant + * digits using rounding mode `rounding`. + * + * x {number|string|Decimal} A value in radians. + * + */ +function cos(x) { + return new this(x).cos(); +} + + +/* + * Return a new Decimal whose value is the hyperbolic cosine of `x`, rounded to precision + * significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} A value in radians. + * + */ +function cosh(x) { + return new this(x).cosh(); +} + + +/* + * Create and return a Decimal constructor with the same configuration properties as this Decimal + * constructor. + * + */ +function clone(obj) { + var i, p, ps; + + /* + * The Decimal constructor and exported function. + * Return a new Decimal instance. + * + * v {number|string|Decimal} A numeric value. + * + */ + function Decimal(v) { + var e, i, t, + x = this; + + // Decimal called without new. + if (!(x instanceof Decimal)) return new Decimal(v); + + // Retain a reference to this Decimal constructor, and shadow Decimal.prototype.constructor + // which points to Object. + x.constructor = Decimal; + + // Duplicate. + if (v instanceof Decimal) { + x.s = v.s; + + if (external) { + if (!v.d || v.e > Decimal.maxE) { + + // Infinity. + x.e = NaN; + x.d = null; + } else if (v.e < Decimal.minE) { + + // Zero. + x.e = 0; + x.d = [0]; + } else { + x.e = v.e; + x.d = v.d.slice(); + } + } else { + x.e = v.e; + x.d = v.d ? v.d.slice() : v.d; + } + + return; + } + + t = typeof v; + + if (t === 'number') { + if (v === 0) { + x.s = 1 / v < 0 ? -1 : 1; + x.e = 0; + x.d = [0]; + return; + } + + if (v < 0) { + v = -v; + x.s = -1; + } else { + x.s = 1; + } + + // Fast path for small integers. + if (v === ~~v && v < 1e7) { + for (e = 0, i = v; i >= 10; i /= 10) e++; + + if (external) { + if (e > Decimal.maxE) { + x.e = NaN; + x.d = null; + } else if (e < Decimal.minE) { + x.e = 0; + x.d = [0]; + } else { + x.e = e; + x.d = [v]; + } + } else { + x.e = e; + x.d = [v]; + } + + return; + + // Infinity, NaN. + } else if (v * 0 !== 0) { + if (!v) x.s = NaN; + x.e = NaN; + x.d = null; + return; + } + + return parseDecimal(x, v.toString()); + + } else if (t !== 'string') { + throw Error(invalidArgument + v); + } + + // Minus sign? + if ((i = v.charCodeAt(0)) === 45) { + v = v.slice(1); + x.s = -1; + } else { + // Plus sign? + if (i === 43) v = v.slice(1); + x.s = 1; + } + + return isDecimal.test(v) ? parseDecimal(x, v) : parseOther(x, v); + } + + Decimal.prototype = P; + + Decimal.ROUND_UP = 0; + Decimal.ROUND_DOWN = 1; + Decimal.ROUND_CEIL = 2; + Decimal.ROUND_FLOOR = 3; + Decimal.ROUND_HALF_UP = 4; + Decimal.ROUND_HALF_DOWN = 5; + Decimal.ROUND_HALF_EVEN = 6; + Decimal.ROUND_HALF_CEIL = 7; + Decimal.ROUND_HALF_FLOOR = 8; + Decimal.EUCLID = 9; + + Decimal.config = Decimal.set = config; + Decimal.clone = clone; + Decimal.isDecimal = isDecimalInstance; + + Decimal.abs = abs; + Decimal.acos = acos; + Decimal.acosh = acosh; // ES6 + Decimal.add = add; + Decimal.asin = asin; + Decimal.asinh = asinh; // ES6 + Decimal.atan = atan; + Decimal.atanh = atanh; // ES6 + Decimal.atan2 = atan2; + Decimal.cbrt = cbrt; // ES6 + Decimal.ceil = ceil; + Decimal.cos = cos; + Decimal.cosh = cosh; // ES6 + Decimal.div = div; + Decimal.exp = exp; + Decimal.floor = floor; + Decimal.hypot = hypot; // ES6 + Decimal.ln = ln; + Decimal.log = log; + Decimal.log10 = log10; // ES6 + Decimal.log2 = log2; // ES6 + Decimal.max = max; + Decimal.min = min; + Decimal.mod = mod; + Decimal.mul = mul; + Decimal.pow = pow; + Decimal.random = random; + Decimal.round = round; + Decimal.sign = sign; // ES6 + Decimal.sin = sin; + Decimal.sinh = sinh; // ES6 + Decimal.sqrt = sqrt; + Decimal.sub = sub; + Decimal.tan = tan; + Decimal.tanh = tanh; // ES6 + Decimal.trunc = trunc; // ES6 + + if (obj === void 0) obj = {}; + if (obj) { + if (obj.defaults !== true) { + ps = ['precision', 'rounding', 'toExpNeg', 'toExpPos', 'maxE', 'minE', 'modulo', 'crypto']; + for (i = 0; i < ps.length;) if (!obj.hasOwnProperty(p = ps[i++])) obj[p] = this[p]; + } + } + + Decimal.config(obj); + + return Decimal; +} + + +/* + * Return a new Decimal whose value is `x` divided by `y`, rounded to `precision` significant + * digits using rounding mode `rounding`. + * + * x {number|string|Decimal} + * y {number|string|Decimal} + * + */ +function div(x, y) { + return new this(x).div(y); +} + + +/* + * Return a new Decimal whose value is the natural exponential of `x`, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} The power to which to raise the base of the natural log. + * + */ +function exp(x) { + return new this(x).exp(); +} + + +/* + * Return a new Decimal whose value is `x` round to an integer using `ROUND_FLOOR`. + * + * x {number|string|Decimal} + * + */ +function floor(x) { + return finalise(x = new this(x), x.e + 1, 3); +} + + +/* + * Return a new Decimal whose value is the square root of the sum of the squares of the arguments, + * rounded to `precision` significant digits using rounding mode `rounding`. + * + * hypot(a, b, ...) = sqrt(a^2 + b^2 + ...) + * + * arguments {number|string|Decimal} + * + */ +function hypot() { + var i, n, + t = new this(0); + + external = false; + + for (i = 0; i < arguments.length;) { + n = new this(arguments[i++]); + if (!n.d) { + if (n.s) { + external = true; + return new this(1 / 0); + } + t = n; + } else if (t.d) { + t = t.plus(n.times(n)); + } + } + + external = true; + + return t.sqrt(); +} + + +/* + * Return true if object is a Decimal instance (where Decimal is any Decimal constructor), + * otherwise return false. + * + */ +function isDecimalInstance(obj) { + return obj instanceof Decimal || obj && obj.name === '[object Decimal]' || false; +} + + +/* + * Return a new Decimal whose value is the natural logarithm of `x`, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} + * + */ +function ln(x) { + return new this(x).ln(); +} + + +/* + * Return a new Decimal whose value is the log of `x` to the base `y`, or to base 10 if no base + * is specified, rounded to `precision` significant digits using rounding mode `rounding`. + * + * log[y](x) + * + * x {number|string|Decimal} The argument of the logarithm. + * y {number|string|Decimal} The base of the logarithm. + * + */ +function log(x, y) { + return new this(x).log(y); +} + + +/* + * Return a new Decimal whose value is the base 2 logarithm of `x`, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} + * + */ +function log2(x) { + return new this(x).log(2); +} + + +/* + * Return a new Decimal whose value is the base 10 logarithm of `x`, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} + * + */ +function log10(x) { + return new this(x).log(10); +} + + +/* + * Return a new Decimal whose value is the maximum of the arguments. + * + * arguments {number|string|Decimal} + * + */ +function max() { + return maxOrMin(this, arguments, 'lt'); +} + + +/* + * Return a new Decimal whose value is the minimum of the arguments. + * + * arguments {number|string|Decimal} + * + */ +function min() { + return maxOrMin(this, arguments, 'gt'); +} + + +/* + * Return a new Decimal whose value is `x` modulo `y`, rounded to `precision` significant digits + * using rounding mode `rounding`. + * + * x {number|string|Decimal} + * y {number|string|Decimal} + * + */ +function mod(x, y) { + return new this(x).mod(y); +} + + +/* + * Return a new Decimal whose value is `x` multiplied by `y`, rounded to `precision` significant + * digits using rounding mode `rounding`. + * + * x {number|string|Decimal} + * y {number|string|Decimal} + * + */ +function mul(x, y) { + return new this(x).mul(y); +} + + +/* + * Return a new Decimal whose value is `x` raised to the power `y`, rounded to precision + * significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} The base. + * y {number|string|Decimal} The exponent. + * + */ +function pow(x, y) { + return new this(x).pow(y); +} + + +/* + * Returns a new Decimal with a random value equal to or greater than 0 and less than 1, and with + * `sd`, or `Decimal.precision` if `sd` is omitted, significant digits (or less if trailing zeros + * are produced). + * + * [sd] {number} Significant digits. Integer, 0 to MAX_DIGITS inclusive. + * + */ +function random(sd) { + var d, e, k, n, + i = 0, + r = new this(1), + rd = []; + + if (sd === void 0) sd = this.precision; + else checkInt32(sd, 1, MAX_DIGITS); + + k = Math.ceil(sd / LOG_BASE); + + if (!this.crypto) { + for (; i < k;) rd[i++] = Math.random() * 1e7 | 0; + + // Browsers supporting crypto.getRandomValues. + } else if (crypto.getRandomValues) { + d = crypto.getRandomValues(new Uint32Array(k)); + + for (; i < k;) { + n = d[i]; + + // 0 <= n < 4294967296 + // Probability n >= 4.29e9, is 4967296 / 4294967296 = 0.00116 (1 in 865). + if (n >= 4.29e9) { + d[i] = crypto.getRandomValues(new Uint32Array(1))[0]; + } else { + + // 0 <= n <= 4289999999 + // 0 <= (n % 1e7) <= 9999999 + rd[i++] = n % 1e7; + } + } + + // Node.js supporting crypto.randomBytes. + } else if (crypto.randomBytes) { + + // buffer + d = crypto.randomBytes(k *= 4); + + for (; i < k;) { + + // 0 <= n < 2147483648 + n = d[i] + (d[i + 1] << 8) + (d[i + 2] << 16) + ((d[i + 3] & 0x7f) << 24); + + // Probability n >= 2.14e9, is 7483648 / 2147483648 = 0.0035 (1 in 286). + if (n >= 2.14e9) { + crypto.randomBytes(4).copy(d, i); + } else { + + // 0 <= n <= 2139999999 + // 0 <= (n % 1e7) <= 9999999 + rd.push(n % 1e7); + i += 4; + } + } + + i = k / 4; + } else { + throw Error(cryptoUnavailable); + } + + k = rd[--i]; + sd %= LOG_BASE; + + // Convert trailing digits to zeros according to sd. + if (k && sd) { + n = mathpow(10, LOG_BASE - sd); + rd[i] = (k / n | 0) * n; + } + + // Remove trailing words which are zero. + for (; rd[i] === 0; i--) rd.pop(); + + // Zero? + if (i < 0) { + e = 0; + rd = [0]; + } else { + e = -1; + + // Remove leading words which are zero and adjust exponent accordingly. + for (; rd[0] === 0; e -= LOG_BASE) rd.shift(); + + // Count the digits of the first word of rd to determine leading zeros. + for (k = 1, n = rd[0]; n >= 10; n /= 10) k++; + + // Adjust the exponent for leading zeros of the first word of rd. + if (k < LOG_BASE) e -= LOG_BASE - k; + } + + r.e = e; + r.d = rd; + + return r; +} + + +/* + * Return a new Decimal whose value is `x` rounded to an integer using rounding mode `rounding`. + * + * To emulate `Math.round`, set rounding to 7 (ROUND_HALF_CEIL). + * + * x {number|string|Decimal} + * + */ +function round(x) { + return finalise(x = new this(x), x.e + 1, this.rounding); +} + + +/* + * Return + * 1 if x > 0, + * -1 if x < 0, + * 0 if x is 0, + * -0 if x is -0, + * NaN otherwise + * + * x {number|string|Decimal} + * + */ +function sign(x) { + x = new this(x); + return x.d ? (x.d[0] ? x.s : 0 * x.s) : x.s || NaN; +} + + +/* + * Return a new Decimal whose value is the sine of `x`, rounded to `precision` significant digits + * using rounding mode `rounding`. + * + * x {number|string|Decimal} A value in radians. + * + */ +function sin(x) { + return new this(x).sin(); +} + + +/* + * Return a new Decimal whose value is the hyperbolic sine of `x`, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} A value in radians. + * + */ +function sinh(x) { + return new this(x).sinh(); +} + + +/* + * Return a new Decimal whose value is the square root of `x`, rounded to `precision` significant + * digits using rounding mode `rounding`. + * + * x {number|string|Decimal} + * + */ +function sqrt(x) { + return new this(x).sqrt(); +} + + +/* + * Return a new Decimal whose value is `x` minus `y`, rounded to `precision` significant digits + * using rounding mode `rounding`. + * + * x {number|string|Decimal} + * y {number|string|Decimal} + * + */ +function sub(x, y) { + return new this(x).sub(y); +} + + +/* + * Return a new Decimal whose value is the tangent of `x`, rounded to `precision` significant + * digits using rounding mode `rounding`. + * + * x {number|string|Decimal} A value in radians. + * + */ +function tan(x) { + return new this(x).tan(); +} + + +/* + * Return a new Decimal whose value is the hyperbolic tangent of `x`, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} A value in radians. + * + */ +function tanh(x) { + return new this(x).tanh(); +} + + +/* + * Return a new Decimal whose value is `x` truncated to an integer. + * + * x {number|string|Decimal} + * + */ +function trunc(x) { + return finalise(x = new this(x), x.e + 1, 1); +} + + +P[Symbol.for('nodejs.util.inspect.custom')] = P.toString; +P[Symbol.toStringTag] = 'Decimal'; + +// Create and configure initial Decimal constructor. +export var Decimal = clone(DEFAULTS); + +// Create the internal constants from their string values. +LN10 = new Decimal(LN10); +PI = new Decimal(PI); + +export default Decimal; diff --git a/node_modules/decimal.js/doc/API.html b/node_modules/decimal.js/doc/API.html new file mode 100644 index 0000000..9eb8e14 --- /dev/null +++ b/node_modules/decimal.js/doc/API.html @@ -0,0 +1,2686 @@ + + + + + + + decimal.js API + + + + + + +
      + +

      decimal.js

      + +

      An arbitrary-precision Decimal type for JavaScript.

      +

      Hosted on GitHub.

      + +

      API

      + +

      + See the README on GitHub for a quick-start + introduction. +

      +

      + In all examples below, var and semicolons are not shown, and if a commented-out + value is in quotes it means toString has been called on the preceding expression. +


      +

      + When the library is loaded, it defines a single function object, + Decimal, the constructor of Decimal instances. +

      +

      + + If necessary, multiple Decimal constructors can be created, each with their own independent + configuration, e.g. precision and range, which applies to all Decimal instances created from + it. + +

      +

      + + A new Decimal constructor is created by calling the clone + method of an already existing Decimal constructor. + +

      + + + +

      CONSTRUCTOR

      + +
      + DecimalDecimal(value) ⇒ Decimal +
      +
      +
      value: number|string|Decimal
      +
      + A legitimate value is an integer or float, including ±0, or + is ±Infinity, or NaN. +
      +
      + The number of digits of value is not limited, except by JavaScript's maximum + array size and, in practice, the processing time required. +
      +
      + The allowable range of value is defined in terms of a maximum exponent, see + maxE, and a minimum exponent, see minE. +
      +
      + As well as in decimal, a string value may be expressed in binary, hexadecimal + or octal, if the appropriate prefix is included: 0x or 0X for + hexadecimal, 0b or 0B for binary, and 0o or + 0O for octal. +
      +
      + Both decimal and non-decimal string values may use exponential (floating-point), as well as + normal (fixed-point) notation. +
      +
      + In exponential notation, e or E defines a power-of-ten exponent + for decimal values, and p or P defines a power-of-two exponent for + non-decimal values, i.e. binary, hexadecimal or octal. +
      +
      +

      Returns a new Decimal object instance.

      +

      Throws on an invalid value.

      +
      +x = new Decimal(9)                       // '9'
      +y = new Decimal(x)                       // '9'
      +
      +new Decimal('5032485723458348569331745.33434346346912144534543')
      +new Decimal('4.321e+4')                  // '43210'
      +new Decimal('-735.0918e-430')            // '-7.350918e-428'
      +new Decimal('5.6700000')                 // '5.67'
      +new Decimal(Infinity)                    // 'Infinity'
      +new Decimal(NaN)                         // 'NaN'
      +new Decimal('.5')                        // '0.5'
      +new Decimal('-0b10110100.1')             // '-180.5'
      +new Decimal('0xff.8')                    // '255.5'
      +
      +new Decimal(0.046875)                    // '0.046875'
      +new Decimal('0.046875000000')            // '0.046875'
      +
      +new Decimal(4.6875e-2)                   // '0.046875'
      +new Decimal('468.75e-4')                 // '0.046875'
      +
      +new Decimal('0b0.000011')                // '0.046875'
      +new Decimal('0o0.03')                    // '0.046875'
      +new Decimal('0x0.0c')                    // '0.046875'
      +
      +new Decimal('0b1.1p-5')                  // '0.046875'
      +new Decimal('0o1.4p-5')                  // '0.046875'
      +new Decimal('0x1.8p-5')                  // '0.046875'
      + + + +

      Methods

      +

      The methods of a Decimal constructor.

      + + + +
      abs.abs(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      See absoluteValue.

      +
      a = Decimal.abs(x)
      +b = new Decimal(x).abs()
      +a.equals(b)                    // true
      + + + +
      acos.acos(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      See inverseCosine.

      +
      a = Decimal.acos(x)
      +b = new Decimal(x).acos()
      +a.equals(b)                    // true
      + + + +
      acosh.acosh(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      See inverseHyperbolicCosine.

      +
      a = Decimal.acosh(x)
      +b = new Decimal(x).acosh()
      +a.equals(b)                    // true
      + + + +
      add.add(x, y) ⇒ Decimal
      +

      + x: number|string|Decimal
      + y: number|string|Decimal +

      +

      See plus.

      +
      a = Decimal.add(x, y)
      +b = new Decimal(x).plus(y)
      +a.equals(b)                    // true
      + + + +
      asin.asin(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      See inverseSine.

      +
      a = Decimal.asin(x)
      +b = new Decimal(x).asin()
      +a.equals(b)                    // true
      + + + +
      asinh.asinh(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      See inverseHyperbolicSine.

      +
      a = Decimal.asinh(x)
      +b = new Decimal(x).asinh()
      +a.equals(b)                    // true
      + + + +
      atan.atan(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      See inverseTangent.

      +
      a = Decimal.atan(x)
      +b = new Decimal(x).atan()
      +a.equals(b)                    // true
      + + + +
      atanh.atanh(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      See inverseHyperbolicTangent.

      +
      a = Decimal.atanh(x)
      +b = new Decimal(x).atanh()
      +a.equals(b)                    // true
      + + + +
      atan2.atan2(y, x) ⇒ Decimal
      +

      + y: number|string|Decimal
      + x: number|string|Decimal +

      +

      + Returns a new Decimal whose value is the inverse tangent in radians of the quotient of + y and x, rounded to precision + significant digits using rounding mode rounding. +

      +

      + The signs of y and x are used to determine the quadrant of the + result. +

      +

      + Domain: [-Infinity, Infinity]
      + Range: [-pi, pi] +

      +

      + See Pi and + Math.atan2(). +

      +
      r = Decimal.atan2(y, x)
      + + + +
      cbrt.cbrt(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      See cubeRoot.

      +
      a = Decimal.cbrt(x)
      +b = new Decimal(x).cbrt()
      +a.equals(b)                    // true
      + + + +
      ceil.ceil(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      See ceil.

      +
      a = Decimal.ceil(x)
      +b = new Decimal(x).ceil()
      +a.equals(b)                    // true
      + + + +
      + clone + .clone([object]) ⇒ Decimal constructor +
      +

      object: object

      +

      + Returns a new independent Decimal constructor with configuration settings as described by + object (see set), or with the same + settings as this Decimal constructor if object is omitted. +

      +
      Decimal.set({ precision: 5 })
      +Decimal9 = Decimal.clone({ precision: 9 })
      +
      +a = new Decimal(1)
      +b = new Decimal9(1)
      +
      +a.div(3)                           // 0.33333
      +b.div(3)                           // 0.333333333
      +
      +// Decimal9 = Decimal.clone({ precision: 9 }) is equivalent to:
      +Decimal9 = Decimal.clone()
      +Decimal9.set({ precision: 9 })
      +

      + If object has a 'defaults' property with value true + then the new constructor will use the default configuration. +

      +
      +D1 = Decimal.clone({ defaults: true })
      +
      +// Use the defaults except for precision
      +D2 = Decimal.clone({ defaults: true, precision: 50 })
      +

      + It is not inefficient in terms of memory usage to use multiple Decimal constructors as + functions are shared between them. +

      + + +
      cos.cos(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      See cosine.

      +
      a = Decimal.cos(x)
      +b = new Decimal(x).cos()
      +a.equals(b)                    // true
      + + + +
      cosh.cosh(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      See hyperbolicCosine.

      +
      a = Decimal.cosh(x)
      +b = new Decimal(x).cosh()
      +a.equals(b)                    // true
      + + + +
      div.div(x, y) ⇒ Decimal
      +

      + x: number|string|Decimal
      + y: number|string|Decimal +

      +

      See dividedBy.

      +
      a = Decimal.div(x, y)
      +b = new Decimal(x).div(y)
      +a.equals(b)                    // true
      + + + +
      exp.exp(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      See naturalExponential.

      +
      a = Decimal.exp(x)
      +b = new Decimal(x).exp()
      +a.equals(b)                    // true
      + + + +
      floor.floor(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      See floor.

      +
      a = Decimal.floor(x)
      +b = new Decimal(x).floor()
      +a.equals(b)                    // true
      + + + +
      + hypot.hypot([x [, y, ...]]) ⇒ Decimal +
      +

      + x: number|string|Decimal
      + y: number|string|Decimal +

      +

      + Returns a new Decimal whose value is the square root of the sum of the squares of the + arguments, rounded to precision significant digits using + rounding mode rounding. +

      +
      r = Decimal.hypot(x, y)
      + + + +
      ln.ln(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      See naturalLogarithm.

      +
      a = Decimal.ln(x)
      +b = new Decimal(x).ln()
      +a.equals(b)                    // true
      + + + +
      + isDecimal.isDecimal(object) ⇒ boolean +
      +

      object: any

      +

      + Returns true if object is a Decimal instance (where Decimal is any + Decimal constructor), or false if it is not. +

      +
      a = new Decimal(1)
      +b = {}
      +a instanceof Decimal           // true
      +Decimal.isDecimal(a)           // true
      +Decimal.isDecimal(b)           // false
      + + + +
      log.log(x [, base]) ⇒ Decimal
      +

      + x: number|string|Decimal
      + base: number|string|Decimal +

      +

      See logarithm.

      +

      + The default base is 10, which is not the same as JavaScript's + Math.log(), which returns the natural logarithm (base e). +

      +
      a = Decimal.log(x, y)
      +b = new Decimal(x).log(y)
      +a.equals(b)                    // true
      + + + +
      log2.log2(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      + Returns a new Decimal whose value is the base 2 logarithm of x, + rounded to precision significant digits using rounding + mode rounding. +

      +
      r = Decimal.log2(x)
      + + + +
      log10.log10(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      + Returns a new Decimal whose value is the base 10 logarithm of x, + rounded to precision significant digits using rounding + mode rounding. +

      +
      r = Decimal.log10(x)
      + + + +
      + max.max([x [, y, ...]]) ⇒ Decimal +
      +

      + x: number|string|Decimal
      + y: number|string|Decimal +

      +

      Returns a new Decimal whose value is the maximum of the arguments.

      +
      r = Decimal.max(x, y, z)
      + + + +
      + min.min([x [, y, ...]]) ⇒ Decimal +
      +

      + x: number|string|Decimal
      + y: number|string|Decimal +

      +

      Returns a new Decimal whose value is the minimum of the arguments.

      +
      r = Decimal.min(x, y, z)
      + + + +
      mod.mod(x, y) ⇒ Decimal
      +

      + x: number|string|Decimal
      + y: number|string|Decimal +

      +

      See modulo.

      +
      a = Decimal.mod(x, y)
      +b = new Decimal(x).mod(y)
      +a.equals(b)                    // true
      + + + +
      mul.mul(x, y) ⇒ Decimal
      +

      + x: number|string|Decimal
      + y: number|string|Decimal +

      +

      See times.

      +
      a = Decimal.mul(x, y)
      +b = new Decimal(x).mul(y)
      +a.equals(b)                    // true
      + + + +
      + noConflict.noConflict() ⇒ Decimal constructor +
      +

      Browsers only.

      +

      + Reverts the Decimal variable to the value it had before this library was loaded + and returns a reference to the original Decimal constructor so it can be assigned to a + variable with a different name. +

      +
      +<script> Decimal = 1 </script>
      +<script src='/path/to/decimal.js'></script>
      +<script>
      +  a = new Decimal(2)      // '2'
      +  D = Decimal.noConflict()
      +  Decimal                 // 1
      +  b = new D(3)            // '3'
      +</script>
      + + + +
      pow.pow(base, exponent) ⇒ Decimal
      +

      + base: number|string|Decimal
      + exponent: number|string|Decimal +

      +

      See toPower.

      +
      a = Decimal.pow(x, y)
      +b = new Decimal(x).pow(y)
      +a.equals(b)                    // true
      + + + +
      + random.random([dp]) ⇒ Decimal +
      +

      dp: number: integer, 0 to 1e+9 inclusive

      +

      + Returns a new Decimal with a pseudo-random value equal to or greater than 0 and + less than 1. +

      +

      + The return value will have dp decimal places (or less if trailing zeros are + produced). If dp is omitted then the number of decimal places will + default to the current precision setting. +

      +

      + If the value of this Decimal constructor's + crypto property is true, and the + crypto object is available globally in the host environment, the random digits of + the return value are generated by either crypto.getRandomValues (Web Cryptography + API in modern browsers) or crypto.randomBytes (Node.js), otherwise, if the the + value of the property is false the return value is generated by + Math.random (fastest). +

      +

      To make the crypto object available globally in Node.js use

      +
      global.crypto = require('crypto')
      +

      + If the value of this Decimal constructor's + crypto property is set true and the + crypto object and associated method are not available, an exception will be + thrown. +

      +

      + If one of the crypto methods is used, the value of the returned Decimal should be + cryptographically-secure and statistically indistinguishable from a random value. +

      +
      Decimal.set({ precision: 10 })
      +Decimal.random()                    // '0.4117936847'
      +Decimal.random(20)                  // '0.78193327636914089009'
      + + +
      round.round(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      See round.

      +
      a = Decimal.round(x)
      +b = new Decimal(x).round()
      +a.equals(b)                    // true
      + + + +
      set.set(object) ⇒ Decimal constructor
      +

      object: object

      +

      + Configures the 'global' settings for this particular Decimal constructor, i.e. + the settings which apply to operations performed on the Decimal instances created by it. +

      +

      Returns this Decimal constructor.

      +

      + The configuration object, object, can contain some or all of the properties + described in detail at Properties and shown in the + example below. +

      +

      + The values of the configuration object properties are checked for validity and then stored as + equivalently-named properties of this Decimal constructor. +

      +

      + If object has a 'defaults' property with value true + then any unspecified properties will be reset to their default values. +

      +

      Throws on an invalid object or configuration property value.

      +
      +// Defaults
      +Decimal.set({
      +    precision: 20,
      +    rounding: 4,
      +    toExpNeg: -7,
      +    toExpPos: 21,
      +    maxE: 9e15,
      +    minE: -9e15,
      +    modulo: 1,
      +    crypto: false
      +})
      +
      +// Reset all properties to their default values
      +Decimal.set({ defaults: true })
      +
      +// Set precision to 50 and all other properties to their default values
      +Decimal.set({ precision: 50, defaults: true })
      +

      + The properties of a Decimal constructor can also be set by direct assignment, but that will + by-pass the validity checking that this method performs - this is not a problem if the user + knows that the assignment is valid. +

      +
      Decimal.precision = 40
      + + + +
      sign.sign(x) ⇒ number
      +

      x: number|string|Decimal

      + + + + + + + + + + + + + + + + + + + + + + +
      Returns 
      1if the value of x is non-zero and its sign is positive
      -1if the value of x is non-zero and its sign is negative
      0if the value of x is positive zero
      -0if the value of x is negative zero
      NaNif the value of x is NaN
      +
      r = Decimal.sign(x)
      + + + +
      sin.sin(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      See sine.

      +
      a = Decimal.sin(x)
      +b = new Decimal(x).sin()
      +a.equals(b)                    // true
      + + + +
      sinh.sinh(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      See hyperbolicSine.

      +
      a = Decimal.sinh(x)
      +b = new Decimal(x).sinh()
      +a.equals(b)                    // true
      + + + +
      sqrt.sqrt(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      See squareRoot.

      +
      a = Decimal.sqrt(x)
      +b = new Decimal(x).sqrt()
      +a.equals(b)                    // true
      + + + +
      sub.sub(x, y) ⇒ Decimal
      +

      + x: number|string|Decimal
      + y: number|string|Decimal +

      +

      See minus.

      +
      a = Decimal.sub(x, y)
      +b = new Decimal(x).sub(y)
      +a.equals(b)                    // true
      + + + +
      tan.tan(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      See tangent.

      +
      a = Decimal.tan(x)
      +b = new Decimal(x).tan()
      +a.equals(b)                    // true
      + + + +
      tanh.tanh(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      See hyperbolicTangent.

      +
      a = Decimal.tanh(x)
      +b = new Decimal(x).tanh()
      +a.equals(b)                    // true
      + + + +
      trunc.trunc(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      See truncated.

      +
      a = Decimal.trunc(x)
      +b = new Decimal(x).trunc()
      +a.equals(b)                    // true
      + + + + +

      Properties

      +

      The properties of a Decimal constructor.

      + + + +
      Configuration properties
      +

      + The values of the configuration properties precision, + rounding, minE, + maxE, toExpNeg, + toExpPos, modulo, and + crypto are set using the + set method. +

      +

      + As simple object properties they can be set directly without using + set, and it is fine to do so, but the values assigned + will not then be checked for validity. For example: +

      +
      Decimal.set({ precision: 0 })
      +// '[DecimalError] Invalid argument: precision: 0'
      +
      +Decimal.precision = 0
      +// No error is thrown and the results of calculations are unreliable
      + + + +
      precision
      +

      + number: integer, 1 to 1e+9 inclusive
      + Default value: 20 +

      +

      The maximum number of significant digits of the result of an operation.

      +

      + All functions which return a Decimal will round the return value to precision + significant digits except Decimal, + absoluteValue, + ceil, floor, + negated, round, + toDecimalPlaces, + toNearest and + truncated. +

      +

      + See Pi for the precision limit of the trigonometric methods. +

      +
      Decimal.set({ precision: 5 })
      +Decimal.precision                  // 5
      + + + +
      rounding
      +

      + number: integer, 0 to 8 inclusive
      + Default value: 4 (ROUND_HALF_UP) +

      +

      + The default rounding mode used when rounding the result of an operation to + precision significant digits, and when rounding the + return value of the round, + toBinary, + toDecimalPlaces, + toExponential, + toFixed, + toHexadecimal, + toNearest, + toOctal, + toPrecision and + toSignificantDigits methods. +

      +

      + The rounding modes are available as enumerated properties of the + constructor. +

      +
      Decimal.set({ rounding: Decimal.ROUND_UP })
      +Decimal.set({ rounding: 0 })       // equivalent
      +Decimal.rounding                   // 0
      + + + +
      minE
      +

      + number: integer, -9e15 to 0 inclusive
      + Default value: -9e15 +

      +

      + The negative exponent limit, i.e. the exponent value below which underflow to zero occurs. +

      +

      + If the Decimal to be returned by a calculation would have an exponent lower than + minE then the value of that Decimal becomes zero. +

      + JavaScript numbers underflow to zero for exponents below -324. +

      +
      Decimal.set({ minE: -500 })
      +Decimal.minE                       // -500
      +new Decimal('1e-500')              // '1e-500'
      +new Decimal('9.9e-501')            // '0'
      +
      +Decimal.set({ minE: -3 })
      +new Decimal(0.001)                 // '0.01'       e is -3
      +new Decimal(0.0001)                // '0'          e is -4
      +

      + The smallest possible magnitude of a non-zero Decimal is 1e-9000000000000000 +

      + + + +
      maxE
      +

      + number: integer, 0 to 9e15 inclusive
      + Default value: 9e15 +

      +

      + The positive exponent limit, i.e. the exponent value above which overflow to + Infinity occurs. +

      +

      + If the Decimal to be returned by a calculation would have an exponent higher than + maxE then the value of that Decimal becomes Infinity. +

      + JavaScript numbers overflow to Infinity for exponents above 308. +

      +
      Decimal.set({ maxE: 500 })
      +Decimal.maxE                       // 500
      +new Decimal('9.999e500')           // '9.999e+500'
      +new Decimal('1e501')               // 'Infinity'
      +
      +Decimal.set({ maxE: 4 })
      +new Decimal(99999)                 // '99999'      e is 4
      +new Decimal(100000)                // 'Infinity'
      +

      + The largest possible magnitude of a finite Decimal is 9.999...e+9000000000000000 +

      + + + +
      toExpNeg
      +

      + number: integer, -9e15 to 0 inclusive
      + Default value: -7 +

      +

      + The negative exponent value at and below which toString + returns exponential notation. +

      +
      Decimal.set({ toExpNeg: -7 })
      +Decimal.toExpNeg                   // -7
      +new Decimal(0.00000123)            // '0.00000123'       e is -6
      +new Decimal(0.000000123)           // '1.23e-7'
      +
      +// Always return exponential notation:
      +Decimal.set({ toExpNeg: 0 })
      +

      + JavaScript numbers use exponential notation for negative exponents of -7 and + below. +

      +

      + Regardless of the value of toExpNeg, the + toFixed method will always return a value in normal + notation and the toExponential method will always + return a value in exponential form. +

      + + + +
      toExpPos
      +

      + number: integer, 0 to 9e15 inclusive
      + Default value: 20 +

      +

      + The positive exponent value at and above which toString + returns exponential notation. +

      +
      Decimal.set({ toExpPos: 2 })
      +Decimal.toExpPos                   // 2
      +new Decimal(12.3)                  // '12.3'        e is 1
      +new Decimal(123)                   // '1.23e+2'
      +
      +// Always return exponential notation:
      +Decimal.set({ toExpPos: 0 })
      +

      + JavaScript numbers use exponential notation for positive exponents of 20 and + above. +

      +

      + Regardless of the value of toExpPos, the + toFixed method will always return a value in normal + notation and the toExponential method will always + return a value in exponential form. +

      + + + +
      modulo
      +

      + number: integer, 0 to 9 inclusive
      + Default value: 1 (ROUND_DOWN) +

      +

      The modulo mode used when calculating the modulus: a mod n.

      +

      + The quotient, q = a / n, is calculated according to the + rounding mode that corresponds to the chosen + modulo mode. +

      +

      The remainder, r, is calculated as: r = a - n * q.

      +

      + The modes that are most commonly used for the modulus/remainder operation are shown in the + following table. Although the other rounding modes can + be used, they may not give useful results. +

      + + + + + + + + + + + + + + + + + + + + + + +
      PropertyValueDescription
      ROUND_UP0The remainder is positive if the dividend is negative, else is negative
      ROUND_DOWN1 + The remainder has the same sign as the dividend.
      + This uses truncating division and matches the behaviour of JavaScript's remainder + operator %. +
      ROUND_FLOOR3 + The remainder has the same sign as the divisor.
      + (This matches Python's % operator) +
      ROUND_HALF_EVEN6The IEEE 754 remainder function
      EUCLID9 + The remainder is always positive.
      + Euclidian division: q = sign(x) * floor(a / abs(x)). +
      +

      + The rounding/modulo modes are available as enumerated properties of the Decimal constructor. +

      +
      Decimal.set({ modulo: Decimal.EUCLID })
      +Decimal.set({ modulo: 9 })         // equivalent
      +Decimal.modulo                     // 9
      + + + +
      crypto
      +

      + boolean: true/false
      Default value: false +

      +

      + The value that determines whether cryptographically-secure pseudo-random number generation is + used. +

      +

      See random.

      +
      +// Node.js
      +global.crypto = require('crypto')
      +
      +Decimal.crypto                     // false
      +Decimal.set({ crypto: true })
      +Decimal.crypto                     // true
      + + + +
      Rounding modes
      +

      + The library's enumerated rounding modes are stored as properties of the Decimal constructor. +
      They are not referenced internally by the library itself. +

      +

      Rounding modes 0 to 6 (inclusive) are the same as those of Java's BigDecimal class.

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      PropertyValueDescription
      ROUND_UP0Rounds away from zero
      ROUND_DOWN1Rounds towards zero
      ROUND_CEIL2Rounds towards Infinity
      ROUND_FLOOR3Rounds towards -Infinity
      ROUND_HALF_UP4Rounds towards nearest neighbour.
      If equidistant, rounds away from zero
      ROUND_HALF_DOWN5Rounds towards nearest neighbour.
      If equidistant, rounds towards zero
      ROUND_HALF_EVEN6 + Rounds towards nearest neighbour.
      If equidistant, rounds towards even neighbour +
      ROUND_HALF_CEIL7Rounds towards nearest neighbour.
      If equidistant, rounds towards Infinity
      ROUND_HALF_FLOOR8Rounds towards nearest neighbour.
      If equidistant, rounds towards -Infinity
      EUCLID9Not a rounding mode, see modulo
      +
      Decimal.set({ rounding: Decimal.ROUND_CEIL })
      +Decimal.set({ rounding: 2 })       // equivalent
      +Decimal.rounding                   // 2
      + + + + +

      INSTANCE

      + +

      Methods

      +

      The methods inherited by a Decimal instance from its constructor's prototype object.

      +

      A Decimal instance is immutable in the sense that it is not changed by its methods.

      +

      Methods that return a Decimal can be chained:

      +
      x = new Decimal(2).times('999.999999999999999').dividedBy(4).ceil()
      +

      Methods do not round their arguments before execution.

      +

      + The treatment of ±0, ±Infinity and NaN + is consistent with how JavaScript treats these values. +

      +

      + Many method names have a shorter alias. (Internally, the library always uses the shorter + method names.) +

      + + + +
      absoluteValue.abs() ⇒ Decimal
      +

      + Returns a new Decimal whose value is the absolute value, i.e. the magnitude, of the value of + this Decimal. +

      +

      + The return value is not affected by the value of the + precision setting. +

      +
      +x = new Decimal(-0.8)
      +y = x.absoluteValue()         // '0.8'
      +z = y.abs()                   // '0.8'
      + + + +
      ceil.ceil() ⇒ Decimal
      +

      + Returns a new Decimal whose value is the value of this Decimal rounded to a whole number in + the direction of positive Infinity. +

      +

      + The return value is not affected by the value of the + precision setting. +

      +
      +x = new Decimal(1.3)
      +x.ceil()                      // '2'
      +y = new Decimal(-1.8)
      +y.ceil()                      // '-1'
      + + + +
      comparedTo.cmp(x) ⇒ number
      +

      x: number|string|Decimal

      + + + + + + + + + + + + + + + + + + +
      Returns 
      1if the value of this Decimal is greater than the value of x
      -1if the value of this Decimal is less than the value of x
      0if this Decimal and x have the same value
      NaNif the value of either this Decimal or x is NaN
      +
      +x = new Decimal(Infinity)
      +y = new Decimal(5)
      +x.comparedTo(y)                // 1
      +x.comparedTo(x.minus(1))       // 0
      +y.cmp(NaN)                     // NaN
      + + + +
      cosine.cos() ⇒ Decimal
      +

      + Returns a new Decimal whose value is the cosine of the value in radians of this Decimal, + rounded to precision significant digits using rounding + mode rounding. +

      +

      + Domain: [-Infinity, Infinity]
      + Range: [-1, 1] +

      +

      See Pi for the precision limit of this method.

      +
      +x = new Decimal(0.25)
      +x.cosine()                      // '0.96891242171064478414'
      +y = new Decimal(-0.25)
      +y.cos()                         // '0.96891242171064478414'
      + + + +
      cubeRoot.cbrt() ⇒ Decimal
      +

      + Returns a new Decimal whose value is the cube root of this Decimal, rounded to + precision significant digits using rounding mode + rounding. +

      +

      + The return value will be correctly rounded, i.e. rounded as if the result was first calculated + to an infinite number of correct digits before rounding. +

      +
      +x = new Decimal(125)
      +x.cubeRoot()                    // '5'
      +y = new Decimal(3)
      +y.cbrt()                        // '1.4422495703074083823'
      + + + +
      decimalPlaces.dp() ⇒ number
      +

      + Returns the number of decimal places, i.e. the number of digits after the decimal point, of + the value of this Decimal. +

      +
      +x = new Decimal(1.234)
      +x.decimalPlaces()              // '3'
      +y = new Decimal(987.654321)
      +y.dp()                         // '6'
      + + + +
      dividedBy.div(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      + Returns a new Decimal whose value is the value of this Decimal divided by x, + rounded to precision significant digits using rounding + mode rounding. +

      +
      +x = new Decimal(355)
      +y = new Decimal(113)
      +x.dividedBy(y)             // '3.14159292035398230088'
      +x.div(5)                   // '71'
      + + + +
      + dividedToIntegerBy.divToInt(x) ⇒ Decimal +
      +

      x: number|string|Decimal

      +

      + Return a new Decimal whose value is the integer part of dividing this Decimal by + x, rounded to precision significant digits + using rounding mode rounding. +

      +
      +x = new Decimal(5)
      +y = new Decimal(3)
      +x.dividedToIntegerBy(y)     // '1'
      +x.divToInt(0.7)             // '7'
      + + + +
      equals.eq(x) ⇒ boolean
      +

      x: number|string|Decimal

      +

      + Returns true if the value of this Decimal equals the value of x, + otherwise returns false.
      As with JavaScript, NaN does not + equal NaN. +

      +

      Note: This method uses the cmp method internally.

      +
      +0 === 1e-324                     // true
      +x = new Decimal(0)
      +x.equals('1e-324')               // false
      +new Decimal(-0).eq(x)            // true  ( -0 === 0 )
      +
      +y = new Decimal(NaN)
      +y.equals(NaN)                    // false
      + + + +
      floor.floor() ⇒ Decimal
      +

      + Returns a new Decimal whose value is the value of this Decimal rounded to a whole number in + the direction of negative Infinity. +

      +

      + The return value is not affected by the value of the + precision setting. +

      +
      +x = new Decimal(1.8)
      +x.floor()                   // '1'
      +y = new Decimal(-1.3)
      +y.floor()                   // '-2'
      + + + +
      greaterThan.gt(x) ⇒ boolean
      +

      x: number|string|Decimal

      +

      + Returns true if the value of this Decimal is greater than the value of + x, otherwise returns false. +

      +

      Note: This method uses the cmp method internally.

      +
      +0.1 > (0.3 - 0.2)                            // true
      +x = new Decimal(0.1)
      +x.greaterThan(Decimal(0.3).minus(0.2))       // false
      +new Decimal(0).gt(x)                         // false
      + + + +
      + greaterThanOrEqualTo.gte(x) ⇒ boolean +
      +

      x: number|string|Decimal

      +

      + Returns true if the value of this Decimal is greater than or equal to the value + of x, otherwise returns false. +

      +

      Note: This method uses the cmp method internally.

      +
      +(0.3 - 0.2) >= 0.1                       // false
      +x = new Decimal(0.3).minus(0.2)
      +x.greaterThanOrEqualTo(0.1)              // true
      +new Decimal(1).gte(x)                    // true
      + + + +
      hyperbolicCosine.cosh() ⇒ Decimal
      +

      + Returns a new Decimal whose value is the hyperbolic cosine of the value in radians of this + Decimal, rounded to precision significant digits using + rounding mode rounding. +

      +

      + Domain: [-Infinity, Infinity]
      + Range: [1, Infinity] +

      +

      See Pi for the precision limit of this method.

      +
      +x = new Decimal(1)
      +x.hyperbolicCosine()                     // '1.5430806348152437785'
      +y = new Decimal(0.5)
      +y.cosh()                                 // '1.1276259652063807852'
      + + + +
      hyperbolicSine.sinh() ⇒ Decimal
      +

      + Returns a new Decimal whose value is the hyperbolic sine of the value in radians of this + Decimal, rounded to precision significant digits using + rounding mode rounding. +

      +

      + Domain: [-Infinity, Infinity]
      + Range: [-Infinity, Infinity] +

      +

      See Pi for the precision limit of this method.

      +
      +x = new Decimal(1)
      +x.hyperbolicSine()                       // '1.1752011936438014569'
      +y = new Decimal(0.5)
      +y.sinh()                                 // '0.52109530549374736162'
      + + + +
      hyperbolicTangent.tanh() ⇒ Decimal
      +

      + Returns a new Decimal whose value is the hyperbolic tangent of the value in radians of this + Decimal, rounded to precision significant digits using + rounding mode rounding. +

      +

      + Domain: [-Infinity, Infinity]
      + Range: [-1, 1] +

      +

      See Pi for the precision limit of this method.

      +
      +x = new Decimal(1)
      +x.hyperbolicTangent()                    // '0.76159415595576488812'
      +y = new Decimal(0.5)
      +y.tanh()                                 // '0.4621171572600097585'
      + + + +
      inverseCosine.acos() ⇒ Decimal
      +

      + Returns a new Decimal whose value is the inverse cosine in radians of the value of this + Decimal, rounded to precision significant digits using + rounding mode rounding. +

      +

      + Domain: [-1, 1]
      + Range: [0, pi] +

      +

      See Pi for the precision limit of this method.

      +
      +x = new Decimal(0)
      +x.inverseCosine()                        // '1.5707963267948966192'
      +y = new Decimal(0.5)
      +y.acos()                                 // '1.0471975511965977462'
      + + + +
      + inverseHyperbolicCosine.acosh() ⇒ Decimal +
      +

      + Returns a new Decimal whose value is the inverse hyperbolic cosine in radians of the value of + this Decimal, rounded to precision significant + digits using rounding mode rounding. +

      +

      + Domain: [1, Infinity]
      + Range: [0, Infinity] +

      +

      See Pi for the precision limit of this method.

      +
      +x = new Decimal(5)
      +x.inverseHyperbolicCosine()              // '2.2924316695611776878'
      +y = new Decimal(50)
      +y.acosh()                                // '4.6050701709847571595'
      + + + +
      + inverseHyperbolicSine.asinh() ⇒ Decimal +
      +

      + Returns a new Decimal whose value is the inverse hyperbolic sine in radians of the value of + this Decimal, rounded to precision significant digits + using rounding mode rounding. +

      +

      + Domain: [-Infinity, Infinity]
      + Range: [-Infinity, Infinity] +

      +

      See Pi for the precision limit of this method.

      +
      +x = new Decimal(5)
      +x.inverseHyperbolicSine()                // '2.3124383412727526203'
      +y = new Decimal(50)
      +y.asinh()                                // '4.6052701709914238266'
      + + + +
      + inverseHyperbolicTangent.atanh() ⇒ Decimal +
      +

      + Returns a new Decimal whose value is the inverse hyperbolic tangent in radians of the value of + this Decimal, rounded to precision significant + digits using rounding mode rounding. +

      +

      + Domain: [-1, 1]
      + Range: [-Infinity, Infinity] +

      +

      See Pi for the precision limit of this method.

      +
      +x = new Decimal(0.5)
      +x.inverseHyperbolicTangent()             // '0.5493061443340548457'
      +y = new Decimal(0.75)
      +y.atanh()                                // '0.97295507452765665255'
      + + + +
      inverseSine.asin() ⇒ Decimal
      +

      + Returns a new Decimal whose value is the inverse sine in radians of the value of this Decimal, + rounded to precision significant digits using rounding + mode rounding. +

      +

      + Domain: [-1, 1]
      + Range: [-pi/2, pi/2] +

      +

      See Pi for the precision limit of this method.

      +
      +x = new Decimal(0.5)
      +x.inverseSine()                          // '0.52359877559829887308'
      +y = new Decimal(0.75)
      +y.asin()                                 // '0.84806207898148100805'
      + + + +
      inverseTangent.atan() ⇒ Decimal
      +

      + Returns a new Decimal whose value is the inverse tangent in radians of the value of this + Decimal, rounded to precision significant digits using + rounding mode rounding. +

      +

      + Domain: [-Infinity, Infinity]
      + Range: [-pi/2, pi/2] +

      +

      See Pi for the precision limit of this method.

      +
      +x = new Decimal(0.5)
      +x.inverseTangent()                       // '0.46364760900080611621'
      +y = new Decimal(0.75)
      +y.atan()                                 // '0.6435011087932843868'
      + + + +
      isFinite.isFinite() ⇒ boolean
      +

      + Returns true if the value of this Decimal is a finite number, otherwise returns + false.
      + The only possible non-finite values of a Decimal are NaN, Infinity + and -Infinity. +

      +
      +x = new Decimal(1)
      +x.isFinite()                             // true
      +y = new Decimal(Infinity)
      +y.isFinite()                             // false
      +

      + Note: The native method isFinite() can be used if + n <= Number.MAX_VALUE. +

      + + + +
      isInteger.isInt() ⇒ boolean
      +

      + Returns true if the value of this Decimal is a whole number, otherwise returns + false. +

      +
      +x = new Decimal(1)
      +x.isInteger()                            // true
      +y = new Decimal(123.456)
      +y.isInt()                                // false
      + + + +
      isNaN.isNaN() ⇒ boolean
      +

      + Returns true if the value of this Decimal is NaN, otherwise returns + false. +

      +
      +x = new Decimal(NaN)
      +x.isNaN()                                // true
      +y = new Decimal('Infinity')
      +y.isNaN()                                // false
      +

      Note: The native method isNaN() can also be used.

      + + + +
      isNegative.isNeg() ⇒ boolean
      +

      + Returns true if the value of this Decimal is negative, otherwise returns + false. +

      +
      +x = new Decimal(-0)
      +x.isNegative()                           // true
      +y = new Decimal(2)
      +y.isNeg                                  // false
      +

      Note: n < 0 can be used if n <= -Number.MIN_VALUE.

      + +

      Also note that signed zeroes are implemented, following the IEEE Standard + for Floating-Point Arithmetic (IEEE 754).

      + +
      +Decimal(0).valueOf()                 // '0'
      +Decimal(0).isNegative()              // false
      +Decimal(0).negated().valueOf()       // '-0'
      +Decimal(0).negated().isNegative()    // true
      +    
      + +
      isPositive.isPos() ⇒ boolean
      +

      + Returns true if the value of this Decimal is positive, otherwise returns + false. +

      +
      +x = new Decimal(0)
      +x.isPositive()                           // true
      +y = new Decimal(-2)
      +y.isPos                                  // false
      +

      Note: n < 0 can be used if n <= -Number.MIN_VALUE.

      + + + +
      isZero.isZero() ⇒ boolean
      +

      + Returns true if the value of this Decimal is zero or minus zero, otherwise + returns false. +

      +
      +x = new Decimal(-0)
      +x.isZero() && x.isNeg()                  // true
      +y = new Decimal(Infinity)
      +y.isZero()                               // false
      +

      Note: n == 0 can be used if n >= Number.MIN_VALUE.

      + + + +
      lessThan.lt(x) ⇒ boolean
      +

      x: number|string|Decimal

      +

      + Returns true if the value of this Decimal is less than the value of + x, otherwise returns false. +

      +

      Note: This method uses the cmp method internally.

      +
      +(0.3 - 0.2) < 0.1                        // true
      +x = new Decimal(0.3).minus(0.2)
      +x.lessThan(0.1)                          // false
      +new Decimal(0).lt(x)                     // true
      + + + +
      lessThanOrEqualTo.lte(x) ⇒ boolean
      +

      x: number|string|Decimal

      +

      + Returns true if the value of this Decimal is less than or equal to the value of + x, otherwise returns false. +

      +

      Note: This method uses the cmp method internally.

      +
      +0.1 <= (0.3 - 0.2)                              // false
      +x = new Decimal(0.1)
      +x.lessThanOrEqualTo(Decimal(0.3).minus(0.2))    // true
      +new Decimal(-1).lte(x)                          // true
      + + + +
      logarithm.log(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      + Returns a new Decimal whose value is the base x logarithm of the value of this + Decimal, rounded to precision significant digits using + rounding mode rounding. +

      +

      + If x is omitted, the base 10 logarithm of the value of this Decimal will be + returned. +

      +
      +x = new Decimal(1000)
      +x.logarithm()                            // '3'
      +y = new Decimal(256)
      +y.log(2)                                 // '8'
      +

      + The return value will almost always be correctly rounded, i.e. rounded as if the result + was first calculated to an infinite number of correct digits before rounding. If a result is + incorrectly rounded the maximum error will be 1 ulp (unit in the last + place). +

      +

      Logarithms to base 2 or 10 will always be correctly rounded.

      +

      + See toPower for the circumstances in which this method may + return an incorrectly rounded result, and see naturalLogarithm + for the precision limit. +

      +

      The performance of this method degrades exponentially with increasing digits.

      + + + +
      minus.minus(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      + Returns a new Decimal whose value is the value of this Decimal minus x, rounded + to precision significant digits using rounding mode + rounding. +

      +
      +0.3 - 0.1                                // 0.19999999999999998
      +x = new Decimal(0.3)
      +x.minus(0.1)                             // '0.2'
      + + + +
      modulo.mod(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      + Returns a new Decimal whose value is the value of this Decimal modulo x, + rounded to precision significant digits using rounding + mode rounding. +

      +

      + The value returned, and in particular its sign, is dependent on the value of the + modulo property of this Decimal's constructor. If it is + 1 (default value), the result will have the same sign as this Decimal, and it + will match that of Javascript's % operator (within the limits of double + precision) and BigDecimal's remainder method. +

      +

      + See modulo for a description of the other modulo modes. +

      +
      +1 % 0.9                                  // 0.09999999999999998
      +x = new Decimal(1)
      +x.modulo(0.9)                            // '0.1'
      +
      +y = new Decimal(8)
      +z = new Decimal(-3)
      +Decimal.modulo = 1
      +y.mod(z)                                 // '2'
      +Decimal.modulo = 3
      +y.mod(z)                                 // '-1'
      + + + +
      naturalExponential.exp() ⇒ Decimal
      +

      + Returns a new Decimal whose value is the base e (Euler's number, the base of the + natural logarithm) exponential of the value of this Decimal, rounded to + precision significant digits using rounding mode + rounding. +

      +

      + The naturalLogarithm function is the inverse of this function. +

      +
      +x = new Decimal(1)
      +x.naturalExponential()                   // '2.7182818284590452354'
      +y = new Decimal(2)
      +y.exp()                                  // '7.3890560989306502272'
      +

      + The return value will be correctly rounded, i.e. rounded as if the result was first calculated + to an infinite number of correct digits before rounding. (The mathematical result of the + exponential function is non-terminating, unless its argument is 0). +

      +

      The performance of this method degrades exponentially with increasing digits.

      + + + +
      naturalLogarithm.ln() ⇒ Decimal
      +

      + Returns a new Decimal whose value is the natural logarithm of the value of this Decimal, + rounded to precision significant digits using rounding + mode rounding. +

      +

      + The natural logarithm is the inverse of the naturalExponential + function. +

      +
      +x = new Decimal(10)
      +x.naturalLogarithm()                     // '2.3026'
      +y = new Decimal('1.23e+30')
      +y.ln()                                   // '69.28'
      +

      + The return value will be correctly rounded, i.e. rounded as if the result was first calculated + to an infinite number of correct digits before rounding. (The mathematical result of the + natural logarithm function is non-terminating, unless its argument is 1). +

      +

      + Internally, this method is dependent on a constant whose value is the natural logarithm of + 10. This LN10 variable in the source code currently has a precision + of 1025 digits, meaning that this method can accurately calculate up to + 1000 digits. +

      +

      + If more than 1000 digits is required then the precision of LN10 + will need to be increased to 25 digits more than is required - though, as the + time-taken by this method increases exponentially with increasing digits, it is unlikely to be + viable to calculate over 1000 digits anyway. +

      + + + +
      negated.neg() ⇒ Decimal
      +

      + Returns a new Decimal whose value is the value of this Decimal negated, i.e. multiplied by + -1. +

      +

      + The return value is not affected by the value of the + precision setting. +

      +
      +x = new Decimal(1.8)
      +x.negated()                              // '-1.8'
      +y = new Decimal(-1.3)
      +y.neg()                                  // '1.3'
      + + + +
      plus.plus(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      + Returns a new Decimal whose value is the value of this Decimal plus x, rounded to + precision significant digits using rounding mode + rounding. +

      +
      +0.1 + 0.2                                // 0.30000000000000004
      +x = new Decimal(0.1)
      +y = x.plus(0.2)                          // '0.3'
      +new Decimal(0.7).plus(x).plus(y)         // '1.1'
      + + + +
      precision.sd([include_zeros]) ⇒ number
      +

      Returns the number of significant digits of the value of this Decimal.

      +

      + If include_zeros is true or 1 then any trailing zeros + of the integer part of a number are counted as significant digits, otherwise they are not. +

      +
      +x = new Decimal(1.234)
      +x.precision()                            // '4'
      +y = new Decimal(987000)
      +y.sd()                                   // '3'
      +y.sd(true)                               // '6'
      + + + +
      round.round() ⇒ Decimal
      +

      + Returns a new Decimal whose value is the value of this Decimal rounded to a whole number using + rounding mode rounding. +

      +

      + To emulate Math.round, set rounding to + 7, i.e. ROUND_HALF_CEIL. +

      +
      +Decimal.set({ rounding: 4 })
      +x = 1234.5
      +x.round()                                // '1235'
      +
      +Decimal.rounding = Decimal.ROUND_DOWN
      +x.round()                                // '1234'
      +x                                        // '1234.5'
      + + + +
      sine.sin() ⇒ Decimal
      +

      + Returns a new Decimal whose value is the sine of the value in radians of this Decimal, + rounded to precision significant digits using rounding + mode rounding. +

      +

      + Domain: [-Infinity, Infinity]
      + Range: [-1, 1] +

      +

      See Pi for the precision limit of this method.

      +
      +x = new Decimal(0.5)
      +x.sine()                                 // '0.47942553860420300027'
      +y = new Decimal(0.75)
      +y.sin()                                  // '0.68163876002333416673'
      + + + +
      squareRoot.sqrt() ⇒ Decimal
      +

      + Returns a new Decimal whose value is the square root of this Decimal, rounded to + precision significant digits using rounding mode + rounding. +

      +

      + The return value will be correctly rounded, i.e. rounded as if the result was first calculated + to an infinite number of correct digits before rounding. +

      +

      + This method is much faster than using the toPower method with + an exponent of 0.5. +

      +
      +x = new Decimal(16)
      +x.squareRoot()                           // '4'
      +y = new Decimal(3)
      +y.sqrt()                                 // '1.73205080756887729353'
      +y.sqrt().eq( y.pow(0.5) )                // true
      + + + +
      tangent.tan() ⇒ Decimal
      +

      + Returns a new Decimal whose value is the tangent of the value in radians of this Decimal, + rounded to precision significant digits using rounding + mode rounding. +

      +

      + Domain: [-Infinity, Infinity]
      + Range: [-Infinity, Infinity] +

      +

      See Pi for the precision limit of this method.

      +
      +x = new Decimal(0.5)
      +x.tangent()                              // '0.54630248984379051326'
      +y = new Decimal(0.75)
      +y.tan()                                  // '0.93159645994407246117'
      + + + +
      times.times(x) ⇒ Decimal
      +

      x: number|string|Decimal

      +

      + Returns a new Decimal whose value is the value of this Decimal times x, + rounded to precision significant digits using rounding + mode rounding. +

      +
      +0.6 * 3                                  // 1.7999999999999998
      +x = new Decimal(0.6)
      +y = x.times(3)                           // '1.8'
      +new Decimal('7e+500').times(y)           // '1.26e+501'
      + + + +
      + toBinary.toBinary([sd [, rm]]) ⇒ string +
      +

      + sd: number: integer, 0 to 1e+9 inclusive
      + rm: number: integer, 0 to 8 inclusive +

      +

      + Returns a string representing the value of this Decimal in binary, rounded to sd + significant digits using rounding mode rm. +

      +

      + If sd is defined, the return value will use binary exponential notation. +

      +

      + If sd is omitted, the return value will be rounded to + precision significant digits. +

      +

      + If rm is omitted, rounding mode rounding + will be used. +

      +

      Throws on an invalid sd or rm value.

      +
      +x = new Decimal(256)
      +x.toBinary()                             // '0b100000000'
      +x.toBinary(1)                            // '0b1p+8'
      + + + +
      + toDecimalPlaces.toDP([dp [, rm]]) ⇒ Decimal +
      +

      + dp: number: integer, 0 to 1e+9 inclusive
      + rm: number: integer, 0 to 8 inclusive. +

      +

      + Returns a new Decimal whose value is the value of this Decimal rounded to dp + decimal places using rounding mode rm. +

      +

      + If dp is omitted, the return value will have the same value as this Decimal. +

      +

      + If rm is omitted, rounding mode rounding + is used. +

      +

      Throws on an invalid dp or rm value.

      +
      +x = new Decimal(12.34567)
      +x.toDecimalPlaces(0)                      // '12'
      +x.toDecimalPlaces(1, Decimal.ROUND_UP)    // '12.4'
      +
      +y = new Decimal(9876.54321)
      +y.toDP(3)                           // '9876.543'
      +y.toDP(1, 0)                        // '9876.6'
      +y.toDP(1, Decimal.ROUND_DOWN)       // '9876.5'
      + + + +
      + toExponential.toExponential([dp [, rm]]) ⇒ string +
      +

      + dp: number: integer, 0 to 1e+9 inclusive
      + rm: number: integer, 0 to 8 inclusive +

      +

      + Returns a string representing the value of this Decimal in exponential notation rounded + using rounding mode rm to dp decimal places, i.e with one digit + before the decimal point and dp digits after it. +

      +

      + If the value of this Decimal in exponential notation has fewer than dp fraction + digits, the return value will be appended with zeros accordingly. +

      +

      + If dp is omitted, the number of digits after the decimal point defaults to the + minimum number of digits necessary to represent the value exactly. +

      +

      + If rm is omitted, rounding mode rounding is + used. +

      +

      Throws on an invalid dp or rm value.

      +
      +x = 45.6
      +y = new Decimal(x)
      +x.toExponential()                        // '4.56e+1'
      +y.toExponential()                        // '4.56e+1'
      +x.toExponential(0)                       // '5e+1'
      +y.toExponential(0)                       // '5e+1'
      +x.toExponential(1)                       // '4.6e+1'
      +y.toExponential(1)                       // '4.6e+1'
      +y.toExponential(1, Decimal.ROUND_DOWN)   // '4.5e+1'
      +x.toExponential(3)                       // '4.560e+1'
      +y.toExponential(3)                       // '4.560e+1'
      + + + +
      + toFixed.toFixed([dp [, rm]]) ⇒ string +
      +

      + dp: number: integer, 0 to 1e+9 inclusive
      + rm: number: integer, 0 to 8 inclusive +

      +

      + Returns a string representing the value of this Decimal in normal (fixed-point) notation + rounded to dp decimal places using rounding mode rm. +

      +

      + If the value of this Decimal in normal notation has fewer than dp fraction + digits, the return value will be appended with zeros accordingly. +

      +

      + Unlike Number.prototype.toFixed, which returns exponential notation if a number + is greater or equal to 1021, this method will always return normal + notation. +

      +

      + If dp is omitted, the return value will be unrounded and in normal notation. This + is unlike Number.prototype.toFixed, which returns the value to zero decimal + places, but is useful when because of the current + toExpNeg or + toExpNeg values, + toString returns exponential notation. +

      +

      + If rm is omitted, rounding mode rounding is + used. +

      +

      Throws on an invalid dp or rm value.

      +
      +x = 3.456
      +y = new Decimal(x)
      +x.toFixed()                       // '3'
      +y.toFixed()                       // '3.456'
      +y.toFixed(0)                      // '3'
      +x.toFixed(2)                      // '3.46'
      +y.toFixed(2)                      // '3.46'
      +y.toFixed(2, Decimal.ROUND_DOWN)  // '3.45'
      +x.toFixed(5)                      // '3.45600'
      +y.toFixed(5)                      // '3.45600'
      + + + +
      + toFraction + .toFraction([max_denominator]) ⇒ [Decimal, Decimal] +
      +

      + max_denominator: number|string|Decimal: 1 >= integer < + Infinity +

      +

      + Returns an array of two Decimals representing the value of this Decimal as a simple fraction + with an integer numerator and an integer denominator. The denominator will be a positive + non-zero value less than or equal to max_denominator. +

      +

      + If a maximum denominator is omitted, the denominator will be the lowest value necessary to + represent the number exactly. +

      +

      Throws on an invalid max_denominator value.

      +
      +x = new Decimal(1.75)
      +x.toFraction()                       // '7, 4'
      +
      +pi = new Decimal('3.14159265358')
      +pi.toFraction()                      // '157079632679,50000000000'
      +pi.toFraction(100000)                // '312689, 99532'
      +pi.toFraction(10000)                 // '355, 113'
      +pi.toFraction(100)                   // '311, 99'
      +pi.toFraction(10)                    // '22, 7'
      +pi.toFraction(1)                     // '3, 1'
      + + + +
      + toHexadecimal.toHex([sd [, rm]]) ⇒ string +
      +

      + sd: number: integer, 0 to 1e+9 inclusive
      + rm: number: integer, 0 to 8 inclusive +

      +

      + Returns a string representing the value of this Decimal in hexadecimal, rounded to + sd significant digits using rounding mode rm. +

      +

      + If sd is defined, the return value will use binary exponential notation. +

      +

      + If sd is omitted, the return value will be rounded to + precision significant digits. +

      +

      + If rm is omitted, rounding mode rounding + will be used. +

      +

      Throws on an invalid sd or rm value.

      +
      +x = new Decimal(256)
      +x.toHexadecimal()                        // '0x100'
      +x.toHex(1)                               // '0x1p+8'
      + + + +
      toJSON.toJSON() ⇒ string
      +

      As valueOf.

      + + + +
      + toNearest.toNearest(x [, rm]) ⇒ Decimal +
      +

      + x: number|string|Decimal
      + rm: number: integer, 0 to 8 inclusive +

      +

      + Returns a new Decimal whose value is the nearest multiple of x in the direction + of rounding mode rm, or rounding if + rm is omitted, to the value of this Decimal. +

      +

      + The return value will always have the same sign as this Decimal, unless either this Decimal + or x is NaN, in which case the return value will be also be + NaN. +

      +

      + The return value is not affected by the value of the + precision setting. +

      +
      +x = new Decimal(1.39)
      +x.toNearest(0.25)                        // '1.5'
      +
      +y = new Decimal(9.499)
      +y.toNearest(0.5, Decimal.ROUND_UP)       // '9.5'
      +y.toNearest(0.5, Decimal.ROUND_DOWN)     // '9'
      + + + +
      toNumber.toNumber() ⇒ number
      +

      Returns the value of this Decimal converted to a primitive number.

      +

      + Type coercion with, for example, JavaScript's unary plus operator will also work, except that + a Decimal with the value minus zero will convert to positive zero. +

      +
      +x = new Decimal(456.789)
      +x.toNumber()                   // 456.789
      ++x                             // 456.789
      +
      +y = new Decimal('45987349857634085409857349856430985')
      +y.toNumber()                   // 4.598734985763409e+34
      +
      +z = new Decimal(-0)
      +1 / +z                         // Infinity
      +1 / z.toNumber()               // -Infinity
      + + + +
      + toOctal.toOctal([sd [, rm]]) ⇒ string +
      +

      + sd: number: integer, 0 to 1e+9 inclusive
      + rm: number: integer, 0 to 8 inclusive +

      +

      + Returns a string representing the value of this Decimal in octal, rounded to sd + significant digits using rounding mode rm. +

      +

      + If sd is defined, the return value will use binary exponential notation. +

      +

      + If sd is omitted, the return value will be rounded to + precision significant digits. +

      +

      + If rm is omitted, rounding mode rounding + will be used. +

      +

      Throws on an invalid sd or rm value.

      +
      +x = new Decimal(256)
      +x.toOctal()                              // '0o400'
      +x.toOctal(1)                             // '0o1p+8'
      + + + +
      toPower.pow(x) ⇒ Decimal
      +

      x: number|string|Decimal: integer or non-integer

      +

      + Returns a new Decimal whose value is the value of this Decimal raised to the power + x, rounded to precision significant digits + using rounding mode rounding. +

      +

      + The performance of this method degrades exponentially with increasing digits. For + non-integer exponents in particular, the performance of this method may not be adequate. +

      +
      +Math.pow(0.7, 2)               // 0.48999999999999994
      +x = new Decimal(0.7)
      +x.toPower(2)                   // '0.49'
      +new Decimal(3).pow(-2)         // '0.11111111111111111111'
      +
      +new Decimal(1217652.23).pow('98765.489305603941')
      +// '4.8227010515242461181e+601039'
      +

      Is the pow function guaranteed to be correctly rounded?

      +

      + The return value will almost always be correctly rounded, i.e. rounded as if the result + was first calculated to an infinite number of correct digits before rounding. If a result is + incorrectly rounded the maximum error will be 1 ulp (unit in the last + place). +

      +

      For non-integer and larger exponents this method uses the formula

      +
      xy = exp(y*ln(x))
      +

      + As the mathematical return values of the exp and + ln functions are both non-terminating (excluding arguments of + 0 or 1), the values of the Decimals returned by the functions as + implemented by this library will necessarily be rounded approximations, which means that there + can be no guarantee of correct rounding when they are combined in the above formula. +

      +

      + The return value may, depending on the rounding mode, be incorrectly rounded only if the first + 15 rounding digits are 15 zeros (and there are non-zero digits + following at some point), or 15 nines, or a 5 or 4 + followed by 14 nines. +

      +

      + Therefore, assuming the first 15 rounding digits are each equally likely to be + any digit, 0-9, the probability of an incorrectly rounded result is less than + 1 in 250,000,000,000,000. +

      +

      + An example of incorrect rounding: +

      +
      +Decimal.set({ precision: 20, rounding: 1 })
      +new Decimal(28).pow('6.166675020000903537297764507632802193308677149')
      +// 839756321.64088511
      +

      As the exact mathematical result begins

      +
      839756321.6408851099999999999999999999999999998969466049426031167...
      +

      + and the rounding mode is set to ROUND_DOWN, the correct + return value should be +

      +
      839756321.64088510999
      + + + +
      + toPrecision.toPrecision([sd [, rm]]) ⇒ string +
      +

      + sd: number: integer, 1 to 1e+9 inclusive
      + rm: number: integer, 0 to 8 inclusive +

      +

      + Returns a string representing the value of this Decimal rounded to sd significant + digits using rounding mode rm. +

      +

      + If sd is less than the number of digits necessary to represent the integer part + of the value in normal (fixed-point) notation, then exponential notation is used. +

      +

      + If sd is omitted, the return value is the same as + toString. +

      +

      + If rm is omitted, rounding mode rounding is + used. +

      +

      Throws on an invalid sd or rm value.

      +
      +x = 45.6
      +y = new Decimal(x)
      +x.toPrecision()                          // '45.6'
      +y.toPrecision()                          // '45.6'
      +x.toPrecision(1)                         // '5e+1'
      +y.toPrecision(1)                         // '5e+1'
      +y.toPrecision(2, Decimal.ROUND_UP)       // '46'
      +y.toPrecision(2, Decimal.ROUND_DOWN)     // '45'
      +x.toPrecision(5)                         // '45.600'
      +y.toPrecision(5)                         // '45.600'
      + + + +
      + toSignificantDigits.toSD([sd [, rm]]) ⇒ Decimal +
      +

      + sd: number: integer, 1 to 1e+9 inclusive.
      + rm: number: integer, 0 to 8 inclusive. +

      +

      + Returns a new Decimal whose value is the value of this Decimal rounded to sd + significant digits using rounding mode rm. +

      +

      + If sd is omitted, the return value will be rounded to + precision significant digits. +

      +

      + If rm is omitted, rounding mode rounding + will be used. +

      +

      Throws on an invalid sd or rm value.

      +
      +Decimal.set({ precision: 5, rounding: 4 })
      +x = new Decimal(9876.54321)
      +
      +x.toSignificantDigits()                          // '9876.5'
      +x.toSignificantDigits(6)                         // '9876.54'
      +x.toSignificantDigits(6, Decimal.ROUND_UP)       // '9876.55'
      +x.toSD(2)                                        // '9900'
      +x.toSD(2, 1)                                     // '9800'
      +x                                                // '9876.54321'
      + + + +
      toString.toString() ⇒ string
      +

      Returns a string representing the value of this Decimal.

      +

      + If this Decimal has a positive exponent that is equal to or greater than + toExpPos, or a negative exponent equal to or less than + toExpNeg, then exponential notation will be returned. +

      +
      +x = new Decimal(750000)
      +x.toString()                             // '750000'
      +Decimal.set({ toExpPos: 5 })
      +x.toString()                             // '7.5e+5'
      +
      +Decimal.set({ precision: 4 })
      +y = new Decimal('1.23456789')
      +y.toString()                             // '1.23456789'
      + + + +
      truncated.trunc() ⇒ Decimal
      +

      + Returns a new Decimal whose value is the value of this Decimal truncated to a whole number. +

      +

      + The return value is not affected by the value of the + precision setting. +

      +
      +x = new Decimal(123.456)
      +x.truncated()                            // '123'
      +y = new Decimal(-12.3)
      +y.trunc()                                // '-12'
      + + + +
      valueOf.valueOf() ⇒ string
      +

      As toString, but zero is signed.

      +
      +x = new Decimal(-0)
      +x.valueOf()                              // '-0'
      + + + + + + +

      Properties

      +

      + The value of a Decimal is stored in a normalised base 10000000 floating point + format. +

      +

      + A Decimal instance is an object with three properties: +

      + + + + + + + + + + + + + + + + + + + + + + + + + +
      PropertyDescriptionTypeValue
      ddigitsnumber[] Array of integers, each 0 - 1e7, or null
      eexponentnumberInteger, -9e15 to 9e15 inclusive, or NaN
      ssignnumber-1, 1, or NaN
      +

      All the properties are best considered to be read-only.

      +

      + As with JavaScript numbers, the original exponent and fractional trailing zeros of a value + are not preserved. +

      +
      +x = new Decimal(0.123)                   // '0.123'
      +x.toExponential()                        // '1.23e-1'
      +x.d                                      // [ 1230000 ]
      +x.e                                      // -1
      +x.s                                      // 1
      +
      +y = new Number(-123.4567000e+2)          // '-12345.67'
      +y.toExponential()                        // '-1.234567e+4'
      +z = new Decimal('-123.4567000e+2')       // '-12345.67'
      +z.toExponential()                        // '-1.234567e+4'
      +z.d                                      // [ 12345, 6700000 ]
      +z.e                                      // 4
      +z.s                                      // -1
      + + + +

      Zero, NaN and Infinity

      +

      + The table below shows how ±0, NaN and + ±Infinity are stored. +

      + + + + + + + + + + + + + + + + + + + + + + + + + +
      ±0NaN±Infinity
       d [0]nullnull
       e 0NaNNaN
       s ±1NaN±1
      +
      +x = new Number(-0)                       // 0
      +1 / x == -Infinity                       // true
      +
      +y = new Decimal(-0)
      +y.d                                      // '0' ( [0].toString() )
      +y.e                                      //  0
      +y.s                                      // -1
      +y.toString()                             // '0'
      +y.valueOf()                              // '-0'
      + + + +

      Errors

      +

      + The errors that are thrown are generic Error objects whose message + property begins with "[DecimalError]". +

      +

      To determine if an exception is a Decimal Error:

      +
      +try {
      +    // ...
      +} catch (e) {
      +    if ( e instanceof Error && /DecimalError/.test(e.message) ) {
      +        // ...
      +    }
      +}
      + + + +

      Pi

      +

      + The maximum precision of the trigonometric methods is dependent on the internal value of the + constant pi, which is defined as the string PI near the top of the source file. +

      +

      + It has a precision of 1025 digits, meaning that the trigonometric methods + can calculate up to just over 1000 digits, but the actual figure depends on the + precision of the argument passed to them. To calculate the actual figure use: +

      +

      maximum_result_precision = 1000 - argument_precision

      + For example, the following both work fine: +
      +Decimal.set({precision: 991}).tan(123456789)
      +Decimal.set({precision: 9}).tan(991_digit_number)
      +

      + as, for each, the result precision plus the argument precision, i.e. 991 + 9 and + 9 + 991, is less than or equal to 1000. +

      +

      + If greater precision is required then the value of PI will need to be extended to + about 25 digits more than the precision required. The time taken by the methods + will then be the limiting factor. +

      +

      + The value can also be shortened to reduce the size of the source file if such high precision + is not required. +

      +

      To get the value of pi:

      +
      +pi = Decimal.acos(-1)
      + + + +

      FAQ

      +
      Why are trailing fractional zeros removed from Decimals?
      +

      + Some arbitrary-precision libraries retain trailing fractional zeros as they can indicate the + precision of a value. This can be useful but the results of arithmetic operations can be + misleading. +

      +
      +x = new BigDecimal("1.0")
      +y = new BigDecimal("1.1000")
      +z = x.add(y)                      // 2.1000
      +
      +x = new BigDecimal("1.20")
      +y = new BigDecimal("3.45000")
      +z = x.multiply(y)                 // 4.1400000
      +

      + To specify the precision of a value is to specify that the value lies + within a certain range. +

      +

      + In the first example, x has a value of 1.0. The trailing zero shows + the precision of the value, implying that it is in the range 0.95 to + 1.05. Similarly, the precision indicated by the trailing zeros of y + indicates that the value is in the range 1.09995 to 1.10005. +

      +

      + If we add the two lowest values in the ranges we have, 0.95 + 1.09995 = 2.04995, + and if we add the two highest values we have, 1.05 + 1.10005 = 2.15005, so the + range of the result of the addition implied by the precision of its operands is + 2.04995 to 2.15005. +

      +

      + The result given by BigDecimal of 2.1000 however, indicates that the value is in + the range 2.09995 to 2.10005 and therefore the precision implied by + its trailing zeros may be misleading. +

      +

      + In the second example, the true range is 4.122744 to 4.157256 yet + the BigDecimal answer of 4.1400000 indicates a range of 4.13999995 + to 4.14000005. Again, the precision implied by the trailing zeros may be + misleading. +

      +

      + This library, like binary floating point and most calculators, does not retain trailing + fractional zeros. Instead, the toExponential, toFixed and + toPrecision methods enable trailing zeros to be added if and when required.
      +

      +
      + + + diff --git a/node_modules/decimal.js/package.json b/node_modules/decimal.js/package.json new file mode 100644 index 0000000..3f0dba9 --- /dev/null +++ b/node_modules/decimal.js/package.json @@ -0,0 +1,36 @@ +{ + "name": "decimal.js", + "description": "An arbitrary-precision Decimal type for JavaScript.", + "version": "10.2.1", + "keywords": [ + "arbitrary", + "precision", + "arithmetic", + "big", + "number", + "decimal", + "float", + "biginteger", + "bigdecimal", + "bignumber", + "bigint", + "bignum" + ], + "repository" : { + "type": "git", + "url": "https://github.com/MikeMcl/decimal.js.git" + }, + "main": "decimal", + "module": "decimal.mjs", + "browser": "decimal.js", + "author": { + "name": "Michael Mclaughlin", + "email": "M8ch88l@gmail.com" + }, + "license": "MIT", + "scripts": { + "test": "node ./test/test.js", + "build": "uglifyjs decimal.js --source-map url=decimal.min.js.map -c -m -o decimal.min.js" + }, + "types": "decimal.d.ts" +} diff --git a/node_modules/deep-is/.npmignore b/node_modules/deep-is/.npmignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/node_modules/deep-is/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/deep-is/.travis.yml b/node_modules/deep-is/.travis.yml new file mode 100644 index 0000000..d523c5f --- /dev/null +++ b/node_modules/deep-is/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - 0.4 + - 0.6 + - 0.8 + - 0.10 diff --git a/node_modules/deep-is/LICENSE b/node_modules/deep-is/LICENSE new file mode 100644 index 0000000..c38f840 --- /dev/null +++ b/node_modules/deep-is/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2012, 2013 Thorsten Lorenz +Copyright (c) 2012 James Halliday +Copyright (c) 2009 Thomas Robinson <280north.com> + +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/deep-is/README.markdown b/node_modules/deep-is/README.markdown new file mode 100644 index 0000000..eb69a83 --- /dev/null +++ b/node_modules/deep-is/README.markdown @@ -0,0 +1,70 @@ +deep-is +========== + +Node's `assert.deepEqual() algorithm` as a standalone module. Exactly like +[deep-equal](https://github.com/substack/node-deep-equal) except for the fact that `deepEqual(NaN, NaN) === true`. + +This module is around [5 times faster](https://gist.github.com/2790507) +than wrapping `assert.deepEqual()` in a `try/catch`. + +[![browser support](http://ci.testling.com/thlorenz/deep-is.png)](http://ci.testling.com/thlorenz/deep-is) + +[![build status](https://secure.travis-ci.org/thlorenz/deep-is.png)](http://travis-ci.org/thlorenz/deep-is) + +example +======= + +``` js +var equal = require('deep-is'); +console.dir([ + equal( + { a : [ 2, 3 ], b : [ 4 ] }, + { a : [ 2, 3 ], b : [ 4 ] } + ), + equal( + { x : 5, y : [6] }, + { x : 5, y : 6 } + ) +]); +``` + +methods +======= + +var deepIs = require('deep-is') + +deepIs(a, b) +--------------- + +Compare objects `a` and `b`, returning whether they are equal according to a +recursive equality algorithm. + +install +======= + +With [npm](http://npmjs.org) do: + +``` +npm install deep-is +``` + +test +==== + +With [npm](http://npmjs.org) do: + +``` +npm test +``` + +license +======= + +Copyright (c) 2012, 2013 Thorsten Lorenz +Copyright (c) 2012 James Halliday + +Derived largely from node's assert module, which has the copyright statement: + +Copyright (c) 2009 Thomas Robinson <280north.com> + +Released under the MIT license, see LICENSE for details. diff --git a/node_modules/deep-is/example/cmp.js b/node_modules/deep-is/example/cmp.js new file mode 100644 index 0000000..67014b8 --- /dev/null +++ b/node_modules/deep-is/example/cmp.js @@ -0,0 +1,11 @@ +var equal = require('../'); +console.dir([ + equal( + { a : [ 2, 3 ], b : [ 4 ] }, + { a : [ 2, 3 ], b : [ 4 ] } + ), + equal( + { x : 5, y : [6] }, + { x : 5, y : 6 } + ) +]); diff --git a/node_modules/deep-is/index.js b/node_modules/deep-is/index.js new file mode 100644 index 0000000..506fe27 --- /dev/null +++ b/node_modules/deep-is/index.js @@ -0,0 +1,102 @@ +var pSlice = Array.prototype.slice; +var Object_keys = typeof Object.keys === 'function' + ? Object.keys + : function (obj) { + var keys = []; + for (var key in obj) keys.push(key); + return keys; + } +; + +var deepEqual = module.exports = function (actual, expected) { + // enforce Object.is +0 !== -0 + if (actual === 0 && expected === 0) { + return areZerosEqual(actual, expected); + + // 7.1. All identical values are equivalent, as determined by ===. + } else if (actual === expected) { + return true; + + } else if (actual instanceof Date && expected instanceof Date) { + return actual.getTime() === expected.getTime(); + + } else if (isNumberNaN(actual)) { + return isNumberNaN(expected); + + // 7.3. Other pairs that do not both pass typeof value == 'object', + // equivalence is determined by ==. + } else if (typeof actual != 'object' && typeof expected != 'object') { + return actual == expected; + + // 7.4. For all other Object pairs, including Array objects, equivalence is + // determined by having the same number of owned properties (as verified + // with Object.prototype.hasOwnProperty.call), the same set of keys + // (although not necessarily the same order), equivalent values for every + // corresponding key, and an identical 'prototype' property. Note: this + // accounts for both named and indexed properties on Arrays. + } else { + return objEquiv(actual, expected); + } +}; + +function isUndefinedOrNull(value) { + return value === null || value === undefined; +} + +function isArguments(object) { + return Object.prototype.toString.call(object) == '[object Arguments]'; +} + +function isNumberNaN(value) { + // NaN === NaN -> false + return typeof value == 'number' && value !== value; +} + +function areZerosEqual(zeroA, zeroB) { + // (1 / +0|0) -> Infinity, but (1 / -0) -> -Infinity and (Infinity !== -Infinity) + return (1 / zeroA) === (1 / zeroB); +} + +function objEquiv(a, b) { + if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) + return false; + + // an identical 'prototype' property. + if (a.prototype !== b.prototype) return false; + //~~~I've managed to break Object.keys through screwy arguments passing. + // Converting to array solves the problem. + if (isArguments(a)) { + if (!isArguments(b)) { + return false; + } + a = pSlice.call(a); + b = pSlice.call(b); + return deepEqual(a, b); + } + try { + var ka = Object_keys(a), + kb = Object_keys(b), + key, i; + } catch (e) {//happens when one is a string literal and the other isn't + return false; + } + // having the same number of owned properties (keys incorporates + // hasOwnProperty) + if (ka.length != kb.length) + return false; + //the same set of keys (although not necessarily the same order), + ka.sort(); + kb.sort(); + //~~~cheap key test + for (i = ka.length - 1; i >= 0; i--) { + if (ka[i] != kb[i]) + return false; + } + //equivalent values for every corresponding key, and + //~~~possibly expensive deep test + for (i = ka.length - 1; i >= 0; i--) { + key = ka[i]; + if (!deepEqual(a[key], b[key])) return false; + } + return true; +} diff --git a/node_modules/deep-is/package.json b/node_modules/deep-is/package.json new file mode 100644 index 0000000..63628f0 --- /dev/null +++ b/node_modules/deep-is/package.json @@ -0,0 +1,61 @@ +{ + "name": "deep-is", + "version": "0.1.3", + "description": "node's assert.deepEqual algorithm except for NaN being equal to NaN", + "main": "index.js", + "directories": { + "lib": ".", + "example": "example", + "test": "test" + }, + "scripts": { + "test": "tape test/*.js" + }, + "devDependencies": { + "tape": "~1.0.2" + }, + "repository": { + "type": "git", + "url": "http://github.com/thlorenz/deep-is.git" + }, + "keywords": [ + "equality", + "equal", + "compare" + ], + "author": { + "name": "Thorsten Lorenz", + "email": "thlorenz@gmx.de", + "url": "http://thlorenz.com" + }, + "license": { + "type": "MIT", + "url": "https://github.com/thlorenz/deep-is/blob/master/LICENSE" + }, + "testling": { + "files": "test/*.js", + "browsers": { + "ie": [ + 6, + 7, + 8, + 9 + ], + "ff": [ + 3.5, + 10, + 15 + ], + "chrome": [ + 10, + 22 + ], + "safari": [ + 5.1 + ], + "opera": [ + 12 + ] + } + } +} diff --git a/node_modules/deep-is/test/NaN.js b/node_modules/deep-is/test/NaN.js new file mode 100644 index 0000000..ddaa5a7 --- /dev/null +++ b/node_modules/deep-is/test/NaN.js @@ -0,0 +1,16 @@ +var test = require('tape'); +var equal = require('../'); + +test('NaN and 0 values', function (t) { + t.ok(equal(NaN, NaN)); + t.notOk(equal(0, NaN)); + t.ok(equal(0, 0)); + t.notOk(equal(0, 1)); + t.end(); +}); + + +test('nested NaN values', function (t) { + t.ok(equal([ NaN, 1, NaN ], [ NaN, 1, NaN ])); + t.end(); +}); diff --git a/node_modules/deep-is/test/cmp.js b/node_modules/deep-is/test/cmp.js new file mode 100644 index 0000000..3071013 --- /dev/null +++ b/node_modules/deep-is/test/cmp.js @@ -0,0 +1,23 @@ +var test = require('tape'); +var equal = require('../'); + +test('equal', function (t) { + t.ok(equal( + { a : [ 2, 3 ], b : [ 4 ] }, + { a : [ 2, 3 ], b : [ 4 ] } + )); + t.end(); +}); + +test('not equal', function (t) { + t.notOk(equal( + { x : 5, y : [6] }, + { x : 5, y : 6 } + )); + t.end(); +}); + +test('nested nulls', function (t) { + t.ok(equal([ null, null, null ], [ null, null, null ])); + t.end(); +}); diff --git a/node_modules/deep-is/test/neg-vs-pos-0.js b/node_modules/deep-is/test/neg-vs-pos-0.js new file mode 100644 index 0000000..ac26130 --- /dev/null +++ b/node_modules/deep-is/test/neg-vs-pos-0.js @@ -0,0 +1,15 @@ +var test = require('tape'); +var equal = require('../'); + +test('0 values', function (t) { + t.ok(equal( 0, 0), ' 0 === 0'); + t.ok(equal( 0, +0), ' 0 === +0'); + t.ok(equal(+0, +0), '+0 === +0'); + t.ok(equal(-0, -0), '-0 === -0'); + + t.notOk(equal(-0, 0), '-0 !== 0'); + t.notOk(equal(-0, +0), '-0 !== +0'); + + t.end(); +}); + diff --git a/node_modules/delayed-stream/.npmignore b/node_modules/delayed-stream/.npmignore new file mode 100644 index 0000000..9daeafb --- /dev/null +++ b/node_modules/delayed-stream/.npmignore @@ -0,0 +1 @@ +test diff --git a/node_modules/delayed-stream/License b/node_modules/delayed-stream/License new file mode 100644 index 0000000..4804b7a --- /dev/null +++ b/node_modules/delayed-stream/License @@ -0,0 +1,19 @@ +Copyright (c) 2011 Debuggable Limited + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/delayed-stream/Makefile b/node_modules/delayed-stream/Makefile new file mode 100644 index 0000000..b4ff85a --- /dev/null +++ b/node_modules/delayed-stream/Makefile @@ -0,0 +1,7 @@ +SHELL := /bin/bash + +test: + @./test/run.js + +.PHONY: test + diff --git a/node_modules/delayed-stream/Readme.md b/node_modules/delayed-stream/Readme.md new file mode 100644 index 0000000..aca36f9 --- /dev/null +++ b/node_modules/delayed-stream/Readme.md @@ -0,0 +1,141 @@ +# delayed-stream + +Buffers events from a stream until you are ready to handle them. + +## Installation + +``` bash +npm install delayed-stream +``` + +## Usage + +The following example shows how to write a http echo server that delays its +response by 1000 ms. + +``` javascript +var DelayedStream = require('delayed-stream'); +var http = require('http'); + +http.createServer(function(req, res) { + var delayed = DelayedStream.create(req); + + setTimeout(function() { + res.writeHead(200); + delayed.pipe(res); + }, 1000); +}); +``` + +If you are not using `Stream#pipe`, you can also manually release the buffered +events by calling `delayedStream.resume()`: + +``` javascript +var delayed = DelayedStream.create(req); + +setTimeout(function() { + // Emit all buffered events and resume underlaying source + delayed.resume(); +}, 1000); +``` + +## Implementation + +In order to use this meta stream properly, here are a few things you should +know about the implementation. + +### Event Buffering / Proxying + +All events of the `source` stream are hijacked by overwriting the `source.emit` +method. Until node implements a catch-all event listener, this is the only way. + +However, delayed-stream still continues to emit all events it captures on the +`source`, regardless of whether you have released the delayed stream yet or +not. + +Upon creation, delayed-stream captures all `source` events and stores them in +an internal event buffer. Once `delayedStream.release()` is called, all +buffered events are emitted on the `delayedStream`, and the event buffer is +cleared. After that, delayed-stream merely acts as a proxy for the underlaying +source. + +### Error handling + +Error events on `source` are buffered / proxied just like any other events. +However, `delayedStream.create` attaches a no-op `'error'` listener to the +`source`. This way you only have to handle errors on the `delayedStream` +object, rather than in two places. + +### Buffer limits + +delayed-stream provides a `maxDataSize` property that can be used to limit +the amount of data being buffered. In order to protect you from bad `source` +streams that don't react to `source.pause()`, this feature is enabled by +default. + +## API + +### DelayedStream.create(source, [options]) + +Returns a new `delayedStream`. Available options are: + +* `pauseStream` +* `maxDataSize` + +The description for those properties can be found below. + +### delayedStream.source + +The `source` stream managed by this object. This is useful if you are +passing your `delayedStream` around, and you still want to access properties +on the `source` object. + +### delayedStream.pauseStream = true + +Whether to pause the underlaying `source` when calling +`DelayedStream.create()`. Modifying this property afterwards has no effect. + +### delayedStream.maxDataSize = 1024 * 1024 + +The amount of data to buffer before emitting an `error`. + +If the underlaying source is emitting `Buffer` objects, the `maxDataSize` +refers to bytes. + +If the underlaying source is emitting JavaScript strings, the size refers to +characters. + +If you know what you are doing, you can set this property to `Infinity` to +disable this feature. You can also modify this property during runtime. + +### delayedStream.dataSize = 0 + +The amount of data buffered so far. + +### delayedStream.readable + +An ECMA5 getter that returns the value of `source.readable`. + +### delayedStream.resume() + +If the `delayedStream` has not been released so far, `delayedStream.release()` +is called. + +In either case, `source.resume()` is called. + +### delayedStream.pause() + +Calls `source.pause()`. + +### delayedStream.pipe(dest) + +Calls `delayedStream.resume()` and then proxies the arguments to `source.pipe`. + +### delayedStream.release() + +Emits and clears all events that have been buffered up so far. This does not +resume the underlaying source, use `delayedStream.resume()` instead. + +## License + +delayed-stream is licensed under the MIT license. diff --git a/node_modules/delayed-stream/lib/delayed_stream.js b/node_modules/delayed-stream/lib/delayed_stream.js new file mode 100644 index 0000000..b38fc85 --- /dev/null +++ b/node_modules/delayed-stream/lib/delayed_stream.js @@ -0,0 +1,107 @@ +var Stream = require('stream').Stream; +var util = require('util'); + +module.exports = DelayedStream; +function DelayedStream() { + this.source = null; + this.dataSize = 0; + this.maxDataSize = 1024 * 1024; + this.pauseStream = true; + + this._maxDataSizeExceeded = false; + this._released = false; + this._bufferedEvents = []; +} +util.inherits(DelayedStream, Stream); + +DelayedStream.create = function(source, options) { + var delayedStream = new this(); + + options = options || {}; + for (var option in options) { + delayedStream[option] = options[option]; + } + + delayedStream.source = source; + + var realEmit = source.emit; + source.emit = function() { + delayedStream._handleEmit(arguments); + return realEmit.apply(source, arguments); + }; + + source.on('error', function() {}); + if (delayedStream.pauseStream) { + source.pause(); + } + + return delayedStream; +}; + +Object.defineProperty(DelayedStream.prototype, 'readable', { + configurable: true, + enumerable: true, + get: function() { + return this.source.readable; + } +}); + +DelayedStream.prototype.setEncoding = function() { + return this.source.setEncoding.apply(this.source, arguments); +}; + +DelayedStream.prototype.resume = function() { + if (!this._released) { + this.release(); + } + + this.source.resume(); +}; + +DelayedStream.prototype.pause = function() { + this.source.pause(); +}; + +DelayedStream.prototype.release = function() { + this._released = true; + + this._bufferedEvents.forEach(function(args) { + this.emit.apply(this, args); + }.bind(this)); + this._bufferedEvents = []; +}; + +DelayedStream.prototype.pipe = function() { + var r = Stream.prototype.pipe.apply(this, arguments); + this.resume(); + return r; +}; + +DelayedStream.prototype._handleEmit = function(args) { + if (this._released) { + this.emit.apply(this, args); + return; + } + + if (args[0] === 'data') { + this.dataSize += args[1].length; + this._checkIfMaxDataSizeExceeded(); + } + + this._bufferedEvents.push(args); +}; + +DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { + if (this._maxDataSizeExceeded) { + return; + } + + if (this.dataSize <= this.maxDataSize) { + return; + } + + this._maxDataSizeExceeded = true; + var message = + 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' + this.emit('error', new Error(message)); +}; diff --git a/node_modules/delayed-stream/package.json b/node_modules/delayed-stream/package.json new file mode 100644 index 0000000..eea3291 --- /dev/null +++ b/node_modules/delayed-stream/package.json @@ -0,0 +1,27 @@ +{ + "author": "Felix Geisendörfer (http://debuggable.com/)", + "contributors": [ + "Mike Atkins " + ], + "name": "delayed-stream", + "description": "Buffers events from a stream until you are ready to handle them.", + "license": "MIT", + "version": "1.0.0", + "homepage": "https://github.com/felixge/node-delayed-stream", + "repository": { + "type": "git", + "url": "git://github.com/felixge/node-delayed-stream.git" + }, + "main": "./lib/delayed_stream", + "engines": { + "node": ">=0.4.0" + }, + "scripts": { + "test": "make test" + }, + "dependencies": {}, + "devDependencies": { + "fake": "0.2.0", + "far": "0.0.1" + } +} diff --git a/node_modules/domexception/LICENSE.txt b/node_modules/domexception/LICENSE.txt new file mode 100644 index 0000000..991b146 --- /dev/null +++ b/node_modules/domexception/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright © 2017 Domenic Denicola + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/domexception/README.md b/node_modules/domexception/README.md new file mode 100644 index 0000000..fc1ef59 --- /dev/null +++ b/node_modules/domexception/README.md @@ -0,0 +1,31 @@ +# DOMException + +This package implements the [`DOMException`](https://heycam.github.io/webidl/#idl-DOMException) class, from web browsers. It exists in service of [jsdom](https://github.com/tmpvar/jsdom) and related packages. + +Example usage: + +```js +const DOMException = require("domexception"); + +const e1 = new DOMException("Something went wrong", "BadThingsError"); +console.assert(e1.name === "BadThingsError"); +console.assert(e1.code === 0); + +const e2 = new DOMException("Another exciting error message", "NoModificationAllowedError"); +console.assert(e2.name === "NoModificationAllowedError"); +console.assert(e2.code === 7); + +console.assert(DOMException.INUSE_ATTRIBUTE_ERR === 10); +``` + +## APIs + +This package exposes two flavors of the `DOMException` interface depending on the imported module. + +### `domexception` module + +This module default-exports the `DOMException` interface constructor. + +### `domexception/webidl2js-wrapper` module + +This module exports the `DOMException` [interface wrapper API](https://github.com/jsdom/webidl2js#for-interfaces) generated by [webidl2js](https://github.com/jsdom/webidl2js). diff --git a/node_modules/domexception/index.js b/node_modules/domexception/index.js new file mode 100644 index 0000000..6651596 --- /dev/null +++ b/node_modules/domexception/index.js @@ -0,0 +1,7 @@ +"use strict"; +const DOMException = require("./webidl2js-wrapper.js"); + +const sharedGlobalObject = { Error }; +DOMException.install(sharedGlobalObject); + +module.exports = sharedGlobalObject.DOMException; diff --git a/node_modules/domexception/lib/DOMException-impl.js b/node_modules/domexception/lib/DOMException-impl.js new file mode 100644 index 0000000..7395751 --- /dev/null +++ b/node_modules/domexception/lib/DOMException-impl.js @@ -0,0 +1,22 @@ +"use strict"; +const legacyErrorCodes = require("./legacy-error-codes.json"); +const idlUtils = require("./utils.js"); + +exports.implementation = class DOMExceptionImpl { + constructor(globalObject, [message, name]) { + this.name = name; + this.message = message; + } + + get code() { + return legacyErrorCodes[this.name] || 0; + } +}; + +// A proprietary V8 extension that causes the stack property to appear. +exports.init = impl => { + if (Error.captureStackTrace) { + const wrapper = idlUtils.wrapperForImpl(impl); + Error.captureStackTrace(wrapper, wrapper.constructor); + } +}; diff --git a/node_modules/domexception/lib/DOMException.js b/node_modules/domexception/lib/DOMException.js new file mode 100644 index 0000000..b63c31d --- /dev/null +++ b/node_modules/domexception/lib/DOMException.js @@ -0,0 +1,205 @@ +"use strict"; + +const conversions = require("webidl-conversions"); +const utils = require("./utils.js"); + +const impl = utils.implSymbol; +const ctorRegistry = utils.ctorRegistrySymbol; + +const iface = { + // When an interface-module that implements this interface as a mixin is loaded, it will append its own `.is()` + // method into this array. It allows objects that directly implements *those* interfaces to be recognized as + // implementing this mixin interface. + _mixedIntoPredicates: [], + is(obj) { + if (obj) { + if (utils.hasOwn(obj, impl) && obj[impl] instanceof Impl.implementation) { + return true; + } + for (const isMixedInto of module.exports._mixedIntoPredicates) { + if (isMixedInto(obj)) { + return true; + } + } + } + return false; + }, + isImpl(obj) { + if (obj) { + if (obj instanceof Impl.implementation) { + return true; + } + + const wrapper = utils.wrapperForImpl(obj); + for (const isMixedInto of module.exports._mixedIntoPredicates) { + if (isMixedInto(wrapper)) { + return true; + } + } + } + return false; + }, + convert(obj, { context = "The provided value" } = {}) { + if (module.exports.is(obj)) { + return utils.implForWrapper(obj); + } + throw new TypeError(`${context} is not of type 'DOMException'.`); + }, + + create(globalObject, constructorArgs, privateData) { + if (globalObject[ctorRegistry] === undefined) { + throw new Error("Internal error: invalid global object"); + } + + const ctor = globalObject[ctorRegistry]["DOMException"]; + if (ctor === undefined) { + throw new Error("Internal error: constructor DOMException is not installed on the passed global object"); + } + + let obj = Object.create(ctor.prototype); + obj = iface.setup(obj, globalObject, constructorArgs, privateData); + return obj; + }, + createImpl(globalObject, constructorArgs, privateData) { + const obj = iface.create(globalObject, constructorArgs, privateData); + return utils.implForWrapper(obj); + }, + _internalSetup(obj) {}, + setup(obj, globalObject, constructorArgs = [], privateData = {}) { + privateData.wrapper = obj; + + iface._internalSetup(obj); + Object.defineProperty(obj, impl, { + value: new Impl.implementation(globalObject, constructorArgs, privateData), + configurable: true + }); + + obj[impl][utils.wrapperSymbol] = obj; + if (Impl.init) { + Impl.init(obj[impl], privateData); + } + return obj; + }, + + install(globalObject) { + class DOMException { + constructor() { + const args = []; + { + let curArg = arguments[0]; + if (curArg !== undefined) { + curArg = conversions["DOMString"](curArg, { context: "Failed to construct 'DOMException': parameter 1" }); + } else { + curArg = ""; + } + args.push(curArg); + } + { + let curArg = arguments[1]; + if (curArg !== undefined) { + curArg = conversions["DOMString"](curArg, { context: "Failed to construct 'DOMException': parameter 2" }); + } else { + curArg = "Error"; + } + args.push(curArg); + } + return iface.setup(Object.create(new.target.prototype), globalObject, args); + } + + get name() { + if (!this || !module.exports.is(this)) { + throw new TypeError("Illegal invocation"); + } + + return this[impl]["name"]; + } + + get message() { + if (!this || !module.exports.is(this)) { + throw new TypeError("Illegal invocation"); + } + + return this[impl]["message"]; + } + + get code() { + if (!this || !module.exports.is(this)) { + throw new TypeError("Illegal invocation"); + } + + return this[impl]["code"]; + } + } + Object.defineProperties(DOMException.prototype, { + name: { enumerable: true }, + message: { enumerable: true }, + code: { enumerable: true }, + [Symbol.toStringTag]: { value: "DOMException", configurable: true }, + INDEX_SIZE_ERR: { value: 1, enumerable: true }, + DOMSTRING_SIZE_ERR: { value: 2, enumerable: true }, + HIERARCHY_REQUEST_ERR: { value: 3, enumerable: true }, + WRONG_DOCUMENT_ERR: { value: 4, enumerable: true }, + INVALID_CHARACTER_ERR: { value: 5, enumerable: true }, + NO_DATA_ALLOWED_ERR: { value: 6, enumerable: true }, + NO_MODIFICATION_ALLOWED_ERR: { value: 7, enumerable: true }, + NOT_FOUND_ERR: { value: 8, enumerable: true }, + NOT_SUPPORTED_ERR: { value: 9, enumerable: true }, + INUSE_ATTRIBUTE_ERR: { value: 10, enumerable: true }, + INVALID_STATE_ERR: { value: 11, enumerable: true }, + SYNTAX_ERR: { value: 12, enumerable: true }, + INVALID_MODIFICATION_ERR: { value: 13, enumerable: true }, + NAMESPACE_ERR: { value: 14, enumerable: true }, + INVALID_ACCESS_ERR: { value: 15, enumerable: true }, + VALIDATION_ERR: { value: 16, enumerable: true }, + TYPE_MISMATCH_ERR: { value: 17, enumerable: true }, + SECURITY_ERR: { value: 18, enumerable: true }, + NETWORK_ERR: { value: 19, enumerable: true }, + ABORT_ERR: { value: 20, enumerable: true }, + URL_MISMATCH_ERR: { value: 21, enumerable: true }, + QUOTA_EXCEEDED_ERR: { value: 22, enumerable: true }, + TIMEOUT_ERR: { value: 23, enumerable: true }, + INVALID_NODE_TYPE_ERR: { value: 24, enumerable: true }, + DATA_CLONE_ERR: { value: 25, enumerable: true } + }); + Object.defineProperties(DOMException, { + INDEX_SIZE_ERR: { value: 1, enumerable: true }, + DOMSTRING_SIZE_ERR: { value: 2, enumerable: true }, + HIERARCHY_REQUEST_ERR: { value: 3, enumerable: true }, + WRONG_DOCUMENT_ERR: { value: 4, enumerable: true }, + INVALID_CHARACTER_ERR: { value: 5, enumerable: true }, + NO_DATA_ALLOWED_ERR: { value: 6, enumerable: true }, + NO_MODIFICATION_ALLOWED_ERR: { value: 7, enumerable: true }, + NOT_FOUND_ERR: { value: 8, enumerable: true }, + NOT_SUPPORTED_ERR: { value: 9, enumerable: true }, + INUSE_ATTRIBUTE_ERR: { value: 10, enumerable: true }, + INVALID_STATE_ERR: { value: 11, enumerable: true }, + SYNTAX_ERR: { value: 12, enumerable: true }, + INVALID_MODIFICATION_ERR: { value: 13, enumerable: true }, + NAMESPACE_ERR: { value: 14, enumerable: true }, + INVALID_ACCESS_ERR: { value: 15, enumerable: true }, + VALIDATION_ERR: { value: 16, enumerable: true }, + TYPE_MISMATCH_ERR: { value: 17, enumerable: true }, + SECURITY_ERR: { value: 18, enumerable: true }, + NETWORK_ERR: { value: 19, enumerable: true }, + ABORT_ERR: { value: 20, enumerable: true }, + URL_MISMATCH_ERR: { value: 21, enumerable: true }, + QUOTA_EXCEEDED_ERR: { value: 22, enumerable: true }, + TIMEOUT_ERR: { value: 23, enumerable: true }, + INVALID_NODE_TYPE_ERR: { value: 24, enumerable: true }, + DATA_CLONE_ERR: { value: 25, enumerable: true } + }); + if (globalObject[ctorRegistry] === undefined) { + globalObject[ctorRegistry] = Object.create(null); + } + globalObject[ctorRegistry]["DOMException"] = DOMException; + + Object.defineProperty(globalObject, "DOMException", { + configurable: true, + writable: true, + value: DOMException + }); + } +}; // iface +module.exports = iface; + +const Impl = require("./DOMException-impl.js"); diff --git a/node_modules/domexception/lib/legacy-error-codes.json b/node_modules/domexception/lib/legacy-error-codes.json new file mode 100644 index 0000000..d8b1e14 --- /dev/null +++ b/node_modules/domexception/lib/legacy-error-codes.json @@ -0,0 +1,27 @@ +{ + "IndexSizeError": 1, + "DOMStringSizeError": 2, + "HierarchyRequestError": 3, + "WrongDocumentError": 4, + "InvalidCharacterError": 5, + "NoDataAllowedError": 6, + "NoModificationAllowedError": 7, + "NotFoundError": 8, + "NotSupportedError": 9, + "InUseAttributeError": 10, + "InvalidStateError": 11, + "SyntaxError": 12, + "InvalidModificationError": 13, + "NamespaceError": 14, + "InvalidAccessError": 15, + "ValidationError": 16, + "TypeMismatchError": 17, + "SecurityError": 18, + "NetworkError": 19, + "AbortError": 20, + "URLMismatchError": 21, + "QuotaExceededError": 22, + "TimeoutError": 23, + "InvalidNodeTypeError": 24, + "DataCloneError": 25 +} diff --git a/node_modules/domexception/lib/utils.js b/node_modules/domexception/lib/utils.js new file mode 100644 index 0000000..c020d0b --- /dev/null +++ b/node_modules/domexception/lib/utils.js @@ -0,0 +1,115 @@ +"use strict"; + +// Returns "Type(value) is Object" in ES terminology. +function isObject(value) { + return typeof value === "object" && value !== null || typeof value === "function"; +} + +function hasOwn(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +const wrapperSymbol = Symbol("wrapper"); +const implSymbol = Symbol("impl"); +const sameObjectCaches = Symbol("SameObject caches"); +const ctorRegistrySymbol = Symbol.for("[webidl2js] constructor registry"); + +function getSameObject(wrapper, prop, creator) { + if (!wrapper[sameObjectCaches]) { + wrapper[sameObjectCaches] = Object.create(null); + } + + if (prop in wrapper[sameObjectCaches]) { + return wrapper[sameObjectCaches][prop]; + } + + wrapper[sameObjectCaches][prop] = creator(); + return wrapper[sameObjectCaches][prop]; +} + +function wrapperForImpl(impl) { + return impl ? impl[wrapperSymbol] : null; +} + +function implForWrapper(wrapper) { + return wrapper ? wrapper[implSymbol] : null; +} + +function tryWrapperForImpl(impl) { + const wrapper = wrapperForImpl(impl); + return wrapper ? wrapper : impl; +} + +function tryImplForWrapper(wrapper) { + const impl = implForWrapper(wrapper); + return impl ? impl : wrapper; +} + +const iterInternalSymbol = Symbol("internal"); +const IteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); + +function isArrayIndexPropName(P) { + if (typeof P !== "string") { + return false; + } + const i = P >>> 0; + if (i === Math.pow(2, 32) - 1) { + return false; + } + const s = `${i}`; + if (P !== s) { + return false; + } + return true; +} + +const byteLengthGetter = + Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get; +function isArrayBuffer(value) { + try { + byteLengthGetter.call(value); + return true; + } catch (e) { + return false; + } +} + +const supportsPropertyIndex = Symbol("supports property index"); +const supportedPropertyIndices = Symbol("supported property indices"); +const supportsPropertyName = Symbol("supports property name"); +const supportedPropertyNames = Symbol("supported property names"); +const indexedGet = Symbol("indexed property get"); +const indexedSetNew = Symbol("indexed property set new"); +const indexedSetExisting = Symbol("indexed property set existing"); +const namedGet = Symbol("named property get"); +const namedSetNew = Symbol("named property set new"); +const namedSetExisting = Symbol("named property set existing"); +const namedDelete = Symbol("named property delete"); + +module.exports = exports = { + isObject, + hasOwn, + wrapperSymbol, + implSymbol, + getSameObject, + ctorRegistrySymbol, + wrapperForImpl, + implForWrapper, + tryWrapperForImpl, + tryImplForWrapper, + iterInternalSymbol, + IteratorPrototype, + isArrayBuffer, + isArrayIndexPropName, + supportsPropertyIndex, + supportedPropertyIndices, + supportsPropertyName, + supportedPropertyNames, + indexedGet, + indexedSetNew, + indexedSetExisting, + namedGet, + namedSetNew, + namedSetExisting, + namedDelete +}; diff --git a/node_modules/domexception/node_modules/webidl-conversions/LICENSE.md b/node_modules/domexception/node_modules/webidl-conversions/LICENSE.md new file mode 100644 index 0000000..d4a994f --- /dev/null +++ b/node_modules/domexception/node_modules/webidl-conversions/LICENSE.md @@ -0,0 +1,12 @@ +# The BSD 2-Clause License + +Copyright (c) 2014, Domenic Denicola +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/domexception/node_modules/webidl-conversions/README.md b/node_modules/domexception/node_modules/webidl-conversions/README.md new file mode 100644 index 0000000..b2905df --- /dev/null +++ b/node_modules/domexception/node_modules/webidl-conversions/README.md @@ -0,0 +1,79 @@ +# Web IDL Type Conversions on JavaScript Values + +This package implements, in JavaScript, the algorithms to convert a given JavaScript value according to a given [Web IDL](http://heycam.github.io/webidl/) [type](http://heycam.github.io/webidl/#idl-types). + +The goal is that you should be able to write code like + +```js +"use strict"; +const conversions = require("webidl-conversions"); + +function doStuff(x, y) { + x = conversions["boolean"](x); + y = conversions["unsigned long"](y); + // actual algorithm code here +} +``` + +and your function `doStuff` will behave the same as a Web IDL operation declared as + +```webidl +void doStuff(boolean x, unsigned long y); +``` + +## API + +This package's main module's default export is an object with a variety of methods, each corresponding to a different Web IDL type. Each method, when invoked on a JavaScript value, will give back the new JavaScript value that results after passing through the Web IDL conversion rules. (See below for more details on what that means.) Alternately, the method could throw an error, if the Web IDL algorithm is specified to do so: for example `conversions["float"](NaN)` [will throw a `TypeError`](http://heycam.github.io/webidl/#es-float). + +Each method also accepts a second, optional, parameter for miscellaneous options. For conversion methods that throw errors, a string option `{ context }` may be provided to provide more information in the error message. (For example, `conversions["float"](NaN, { context: "Argument 1 of Interface's operation" })` will throw an error with message `"Argument 1 of Interface's operation is not a finite floating-point value."`) Specific conversions may also accept other options, the details of which can be found below. + +## Conversions implemented + +Conversions for all of the basic types from the Web IDL specification are implemented: + +- [`any`](https://heycam.github.io/webidl/#es-any) +- [`void`](https://heycam.github.io/webidl/#es-void) +- [`boolean`](https://heycam.github.io/webidl/#es-boolean) +- [Integer types](https://heycam.github.io/webidl/#es-integer-types), which can additionally be provided the boolean options `{ clamp, enforceRange }` as a second parameter +- [`float`](https://heycam.github.io/webidl/#es-float), [`unrestricted float`](https://heycam.github.io/webidl/#es-unrestricted-float) +- [`double`](https://heycam.github.io/webidl/#es-double), [`unrestricted double`](https://heycam.github.io/webidl/#es-unrestricted-double) +- [`DOMString`](https://heycam.github.io/webidl/#es-DOMString), which can additionally be provided the boolean option `{ treatNullAsEmptyString }` as a second parameter +- [`ByteString`](https://heycam.github.io/webidl/#es-ByteString), [`USVString`](https://heycam.github.io/webidl/#es-USVString) +- [`object`](https://heycam.github.io/webidl/#es-object) +- [Buffer source types](https://heycam.github.io/webidl/#es-buffer-source-types) + +Additionally, for convenience, the following derived type definitions are implemented: + +- [`ArrayBufferView`](https://heycam.github.io/webidl/#ArrayBufferView) +- [`BufferSource`](https://heycam.github.io/webidl/#BufferSource) +- [`DOMTimeStamp`](https://heycam.github.io/webidl/#DOMTimeStamp) +- [`Function`](https://heycam.github.io/webidl/#Function) +- [`VoidFunction`](https://heycam.github.io/webidl/#VoidFunction) (although it will not censor the return type) + +Derived types, such as nullable types, promise types, sequences, records, etc. are not handled by this library. You may wish to investigate the [webidl2js](https://github.com/jsdom/webidl2js) project. + +### A note on the `long long` types + +The `long long` and `unsigned long long` Web IDL types can hold values that cannot be stored in JavaScript numbers, so the conversion is imperfect. For example, converting the JavaScript number `18446744073709552000` to a Web IDL `long long` is supposed to produce the Web IDL value `-18446744073709551232`. Since we are representing our Web IDL values in JavaScript, we can't represent `-18446744073709551232`, so we instead the best we could do is `-18446744073709552000` as the output. + +This library actually doesn't even get that far. Producing those results would require doing accurate modular arithmetic on 64-bit intermediate values, but JavaScript does not make this easy. We could pull in a big-integer library as a dependency, but in lieu of that, we for now have decided to just produce inaccurate results if you pass in numbers that are not strictly between `Number.MIN_SAFE_INTEGER` and `Number.MAX_SAFE_INTEGER`. + +## Background + +What's actually going on here, conceptually, is pretty weird. Let's try to explain. + +Web IDL, as part of its madness-inducing design, has its own type system. When people write algorithms in web platform specs, they usually operate on Web IDL values, i.e. instances of Web IDL types. For example, if they were specifying the algorithm for our `doStuff` operation above, they would treat `x` as a Web IDL value of [Web IDL type `boolean`](http://heycam.github.io/webidl/#idl-boolean). Crucially, they would _not_ treat `x` as a JavaScript variable whose value is either the JavaScript `true` or `false`. They're instead working in a different type system altogether, with its own rules. + +Separately from its type system, Web IDL defines a ["binding"](http://heycam.github.io/webidl/#ecmascript-binding) of the type system into JavaScript. This contains rules like: when you pass a JavaScript value to the JavaScript method that manifests a given Web IDL operation, how does that get converted into a Web IDL value? For example, a JavaScript `true` passed in the position of a Web IDL `boolean` argument becomes a Web IDL `true`. But, a JavaScript `true` passed in the position of a [Web IDL `unsigned long`](http://heycam.github.io/webidl/#idl-unsigned-long) becomes a Web IDL `1`. And so on. + +Finally, we have the actual implementation code. This is usually C++, although these days [some smart people are using Rust](https://github.com/servo/servo). The implementation, of course, has its own type system. So when they implement the Web IDL algorithms, they don't actually use Web IDL values, since those aren't "real" outside of specs. Instead, implementations apply the Web IDL binding rules in such a way as to convert incoming JavaScript values into C++ values. For example, if code in the browser called `doStuff(true, true)`, then the implementation code would eventually receive a C++ `bool` containing `true` and a C++ `uint32_t` containing `1`. + +The upside of all this is that implementations can abstract all the conversion logic away, letting Web IDL handle it, and focus on implementing the relevant methods in C++ with values of the correct type already provided. That is payoff of Web IDL, in a nutshell. + +And getting to that payoff is the goal of _this_ project—but for JavaScript implementations, instead of C++ ones. That is, this library is designed to make it easier for JavaScript developers to write functions that behave like a given Web IDL operation. So conceptually, the conversion pipeline, which in its general form is JavaScript values ↦ Web IDL values ↦ implementation-language values, in this case becomes JavaScript values ↦ Web IDL values ↦ JavaScript values. And that intermediate step is where all the logic is performed: a JavaScript `true` becomes a Web IDL `1` in an unsigned long context, which then becomes a JavaScript `1`. + +## Don't use this + +Seriously, why would you ever use this? You really shouldn't. Web IDL is … strange, and you shouldn't be emulating its semantics. If you're looking for a generic argument-processing library, you should find one with better rules than those from Web IDL. In general, your JavaScript should not be trying to become more like Web IDL; if anything, we should fix Web IDL to make it more like JavaScript. + +The _only_ people who should use this are those trying to create faithful implementations (or polyfills) of web platform interfaces defined in Web IDL. Its main consumer is the [jsdom](https://github.com/jsdom/jsdom) project. diff --git a/node_modules/domexception/node_modules/webidl-conversions/lib/index.js b/node_modules/domexception/node_modules/webidl-conversions/lib/index.js new file mode 100644 index 0000000..bae66dc --- /dev/null +++ b/node_modules/domexception/node_modules/webidl-conversions/lib/index.js @@ -0,0 +1,361 @@ +"use strict"; + +function _(message, opts) { + return `${opts && opts.context ? opts.context : "Value"} ${message}.`; +} + +function type(V) { + if (V === null) { + return "Null"; + } + switch (typeof V) { + case "undefined": + return "Undefined"; + case "boolean": + return "Boolean"; + case "number": + return "Number"; + case "string": + return "String"; + case "symbol": + return "Symbol"; + case "object": + // Falls through + case "function": + // Falls through + default: + // Per ES spec, typeof returns an implemention-defined value that is not any of the existing ones for + // uncallable non-standard exotic objects. Yet Type() which the Web IDL spec depends on returns Object for + // such cases. So treat the default case as an object. + return "Object"; + } +} + +// Round x to the nearest integer, choosing the even integer if it lies halfway between two. +function evenRound(x) { + // There are four cases for numbers with fractional part being .5: + // + // case | x | floor(x) | round(x) | expected | x <> 0 | x % 1 | x & 1 | example + // 1 | 2n + 0.5 | 2n | 2n + 1 | 2n | > | 0.5 | 0 | 0.5 -> 0 + // 2 | 2n + 1.5 | 2n + 1 | 2n + 2 | 2n + 2 | > | 0.5 | 1 | 1.5 -> 2 + // 3 | -2n - 0.5 | -2n - 1 | -2n | -2n | < | -0.5 | 0 | -0.5 -> 0 + // 4 | -2n - 1.5 | -2n - 2 | -2n - 1 | -2n - 2 | < | -0.5 | 1 | -1.5 -> -2 + // (where n is a non-negative integer) + // + // Branch here for cases 1 and 4 + if ((x > 0 && (x % 1) === +0.5 && (x & 1) === 0) || + (x < 0 && (x % 1) === -0.5 && (x & 1) === 1)) { + return censorNegativeZero(Math.floor(x)); + } + + return censorNegativeZero(Math.round(x)); +} + +function integerPart(n) { + return censorNegativeZero(Math.trunc(n)); +} + +function sign(x) { + return x < 0 ? -1 : 1; +} + +function modulo(x, y) { + // https://tc39.github.io/ecma262/#eqn-modulo + // Note that http://stackoverflow.com/a/4467559/3191 does NOT work for large modulos + const signMightNotMatch = x % y; + if (sign(y) !== sign(signMightNotMatch)) { + return signMightNotMatch + y; + } + return signMightNotMatch; +} + +function censorNegativeZero(x) { + return x === 0 ? 0 : x; +} + +function createIntegerConversion(bitLength, typeOpts) { + const isSigned = !typeOpts.unsigned; + + let lowerBound; + let upperBound; + if (bitLength === 64) { + upperBound = Math.pow(2, 53) - 1; + lowerBound = !isSigned ? 0 : -Math.pow(2, 53) + 1; + } else if (!isSigned) { + lowerBound = 0; + upperBound = Math.pow(2, bitLength) - 1; + } else { + lowerBound = -Math.pow(2, bitLength - 1); + upperBound = Math.pow(2, bitLength - 1) - 1; + } + + const twoToTheBitLength = Math.pow(2, bitLength); + const twoToOneLessThanTheBitLength = Math.pow(2, bitLength - 1); + + return (V, opts) => { + if (opts === undefined) { + opts = {}; + } + + let x = +V; + x = censorNegativeZero(x); // Spec discussion ongoing: https://github.com/heycam/webidl/issues/306 + + if (opts.enforceRange) { + if (!Number.isFinite(x)) { + throw new TypeError(_("is not a finite number", opts)); + } + + x = integerPart(x); + + if (x < lowerBound || x > upperBound) { + throw new TypeError(_( + `is outside the accepted range of ${lowerBound} to ${upperBound}, inclusive`, opts)); + } + + return x; + } + + if (!Number.isNaN(x) && opts.clamp) { + x = Math.min(Math.max(x, lowerBound), upperBound); + x = evenRound(x); + return x; + } + + if (!Number.isFinite(x) || x === 0) { + return 0; + } + x = integerPart(x); + + // Math.pow(2, 64) is not accurately representable in JavaScript, so try to avoid these per-spec operations if + // possible. Hopefully it's an optimization for the non-64-bitLength cases too. + if (x >= lowerBound && x <= upperBound) { + return x; + } + + // These will not work great for bitLength of 64, but oh well. See the README for more details. + x = modulo(x, twoToTheBitLength); + if (isSigned && x >= twoToOneLessThanTheBitLength) { + return x - twoToTheBitLength; + } + return x; + }; +} + +exports.any = V => { + return V; +}; + +exports.void = function () { + return undefined; +}; + +exports.boolean = function (val) { + return !!val; +}; + +exports.byte = createIntegerConversion(8, { unsigned: false }); +exports.octet = createIntegerConversion(8, { unsigned: true }); + +exports.short = createIntegerConversion(16, { unsigned: false }); +exports["unsigned short"] = createIntegerConversion(16, { unsigned: true }); + +exports.long = createIntegerConversion(32, { unsigned: false }); +exports["unsigned long"] = createIntegerConversion(32, { unsigned: true }); + +exports["long long"] = createIntegerConversion(64, { unsigned: false }); +exports["unsigned long long"] = createIntegerConversion(64, { unsigned: true }); + +exports.double = (V, opts) => { + const x = +V; + + if (!Number.isFinite(x)) { + throw new TypeError(_("is not a finite floating-point value", opts)); + } + + return x; +}; + +exports["unrestricted double"] = V => { + const x = +V; + + return x; +}; + +exports.float = (V, opts) => { + const x = +V; + + if (!Number.isFinite(x)) { + throw new TypeError(_("is not a finite floating-point value", opts)); + } + + if (Object.is(x, -0)) { + return x; + } + + const y = Math.fround(x); + + if (!Number.isFinite(y)) { + throw new TypeError(_("is outside the range of a single-precision floating-point value", opts)); + } + + return y; +}; + +exports["unrestricted float"] = V => { + const x = +V; + + if (isNaN(x)) { + return x; + } + + if (Object.is(x, -0)) { + return x; + } + + return Math.fround(x); +}; + +exports.DOMString = function (V, opts) { + if (opts === undefined) { + opts = {}; + } + + if (opts.treatNullAsEmptyString && V === null) { + return ""; + } + + if (typeof V === "symbol") { + throw new TypeError(_("is a symbol, which cannot be converted to a string", opts)); + } + + return String(V); +}; + +exports.ByteString = (V, opts) => { + const x = exports.DOMString(V, opts); + let c; + for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) { + if (c > 255) { + throw new TypeError(_("is not a valid ByteString", opts)); + } + } + + return x; +}; + +exports.USVString = (V, opts) => { + const S = exports.DOMString(V, opts); + const n = S.length; + const U = []; + for (let i = 0; i < n; ++i) { + const c = S.charCodeAt(i); + if (c < 0xD800 || c > 0xDFFF) { + U.push(String.fromCodePoint(c)); + } else if (0xDC00 <= c && c <= 0xDFFF) { + U.push(String.fromCodePoint(0xFFFD)); + } else if (i === n - 1) { + U.push(String.fromCodePoint(0xFFFD)); + } else { + const d = S.charCodeAt(i + 1); + if (0xDC00 <= d && d <= 0xDFFF) { + const a = c & 0x3FF; + const b = d & 0x3FF; + U.push(String.fromCodePoint((2 << 15) + ((2 << 9) * a) + b)); + ++i; + } else { + U.push(String.fromCodePoint(0xFFFD)); + } + } + } + + return U.join(""); +}; + +exports.object = (V, opts) => { + if (type(V) !== "Object") { + throw new TypeError(_("is not an object", opts)); + } + + return V; +}; + +// Not exported, but used in Function and VoidFunction. + +// Neither Function nor VoidFunction is defined with [TreatNonObjectAsNull], so +// handling for that is omitted. +function convertCallbackFunction(V, opts) { + if (typeof V !== "function") { + throw new TypeError(_("is not a function", opts)); + } + return V; +} + +const abByteLengthGetter = + Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get; + +function isArrayBuffer(V) { + try { + abByteLengthGetter.call(V); + return true; + } catch (e) { + return false; + } +} + +// I don't think we can reliably detect detached ArrayBuffers. +exports.ArrayBuffer = (V, opts) => { + if (!isArrayBuffer(V)) { + throw new TypeError(_("is not a view on an ArrayBuffer object", opts)); + } + return V; +}; + +const dvByteLengthGetter = + Object.getOwnPropertyDescriptor(DataView.prototype, "byteLength").get; +exports.DataView = (V, opts) => { + try { + dvByteLengthGetter.call(V); + return V; + } catch (e) { + throw new TypeError(_("is not a view on an DataView object", opts)); + } +}; + +[ + Int8Array, Int16Array, Int32Array, Uint8Array, + Uint16Array, Uint32Array, Uint8ClampedArray, Float32Array, Float64Array +].forEach(func => { + const name = func.name; + const article = /^[AEIOU]/.test(name) ? "an" : "a"; + exports[name] = (V, opts) => { + if (!ArrayBuffer.isView(V) || V.constructor.name !== name) { + throw new TypeError(_(`is not ${article} ${name} object`, opts)); + } + + return V; + }; +}); + +// Common definitions + +exports.ArrayBufferView = (V, opts) => { + if (!ArrayBuffer.isView(V)) { + throw new TypeError(_("is not a view on an ArrayBuffer object", opts)); + } + + return V; +}; + +exports.BufferSource = (V, opts) => { + if (!ArrayBuffer.isView(V) && !isArrayBuffer(V)) { + throw new TypeError(_("is not an ArrayBuffer object or a view on one", opts)); + } + + return V; +}; + +exports.DOMTimeStamp = exports["unsigned long long"]; + +exports.Function = convertCallbackFunction; + +exports.VoidFunction = convertCallbackFunction; diff --git a/node_modules/domexception/node_modules/webidl-conversions/package.json b/node_modules/domexception/node_modules/webidl-conversions/package.json new file mode 100644 index 0000000..4087df5 --- /dev/null +++ b/node_modules/domexception/node_modules/webidl-conversions/package.json @@ -0,0 +1,30 @@ +{ + "name": "webidl-conversions", + "version": "5.0.0", + "description": "Implements the WebIDL algorithms for converting to and from JavaScript values", + "main": "lib/index.js", + "scripts": { + "lint": "eslint .", + "test": "mocha test/*.js", + "coverage": "nyc mocha test/*.js" + }, + "repository": "jsdom/webidl-conversions", + "keywords": [ + "webidl", + "web", + "types" + ], + "files": [ + "lib/" + ], + "author": "Domenic Denicola (https://domenic.me/)", + "license": "BSD-2-Clause", + "devDependencies": { + "eslint": "^6.7.2", + "mocha": "^6.2.2", + "nyc": "^14.1.1" + }, + "engines": { + "node": ">=8" + } +} diff --git a/node_modules/domexception/package.json b/node_modules/domexception/package.json new file mode 100644 index 0000000..e594e10 --- /dev/null +++ b/node_modules/domexception/package.json @@ -0,0 +1,42 @@ +{ + "name": "domexception", + "description": "An implementation of the DOMException class from browsers", + "keywords": [ + "dom", + "webidl", + "web idl", + "domexception", + "error", + "exception" + ], + "version": "2.0.1", + "author": "Domenic Denicola (https://domenic.me/)", + "license": "MIT", + "repository": "jsdom/domexception", + "main": "index.js", + "files": [ + "index.js", + "webidl2js-wrapper.js", + "lib/" + ], + "scripts": { + "prepare": "node scripts/generate.js", + "init-wpt": "node scripts/get-latest-platform-tests.js", + "pretest": "npm run prepare && npm run init-wpt", + "test": "mocha", + "lint": "eslint lib" + }, + "dependencies": { + "webidl-conversions": "^5.0.0" + }, + "devDependencies": { + "eslint": "^6.7.2", + "mkdirp": "^0.5.1", + "mocha": "^6.2.2", + "request": "^2.88.0", + "webidl2js": "^12.0.0" + }, + "engines": { + "node": ">=8" + } +} diff --git a/node_modules/domexception/webidl2js-wrapper.js b/node_modules/domexception/webidl2js-wrapper.js new file mode 100644 index 0000000..05d3470 --- /dev/null +++ b/node_modules/domexception/webidl2js-wrapper.js @@ -0,0 +1,15 @@ +"use strict"; +const DOMException = require("./lib/DOMException.js"); + +// Special install function to make the DOMException inherit from Error. +// https://heycam.github.io/webidl/#es-DOMException-specialness +function installOverride(globalObject) { + if (typeof globalObject.Error !== "function") { + throw new Error("Internal error: Error constructor is not present on the given global object."); + } + + DOMException.install(globalObject); + Object.setPrototypeOf(globalObject.DOMException.prototype, globalObject.Error.prototype); +} + +module.exports = {...DOMException, install: installOverride }; diff --git a/node_modules/escodegen/LICENSE.BSD b/node_modules/escodegen/LICENSE.BSD new file mode 100644 index 0000000..426019d --- /dev/null +++ b/node_modules/escodegen/LICENSE.BSD @@ -0,0 +1,21 @@ +Copyright (C) 2012 Yusuke Suzuki (twitter: @Constellation) and other contributors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/escodegen/README.md b/node_modules/escodegen/README.md new file mode 100644 index 0000000..c4917b8 --- /dev/null +++ b/node_modules/escodegen/README.md @@ -0,0 +1,84 @@ +## Escodegen +[![npm version](https://badge.fury.io/js/escodegen.svg)](http://badge.fury.io/js/escodegen) +[![Build Status](https://secure.travis-ci.org/estools/escodegen.svg)](http://travis-ci.org/estools/escodegen) +[![Dependency Status](https://david-dm.org/estools/escodegen.svg)](https://david-dm.org/estools/escodegen) +[![devDependency Status](https://david-dm.org/estools/escodegen/dev-status.svg)](https://david-dm.org/estools/escodegen#info=devDependencies) + +Escodegen ([escodegen](http://github.com/estools/escodegen)) is an +[ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) +(also popularly known as [JavaScript](http://en.wikipedia.org/wiki/JavaScript)) +code generator from [Mozilla's Parser API](https://developer.mozilla.org/en/SpiderMonkey/Parser_API) +AST. See the [online generator](https://estools.github.io/escodegen/demo/index.html) +for a demo. + + +### Install + +Escodegen can be used in a web browser: + + + +escodegen.browser.js can be found in tagged revisions on GitHub. + +Or in a Node.js application via npm: + + npm install escodegen + +### Usage + +A simple example: the program + + escodegen.generate({ + type: 'BinaryExpression', + operator: '+', + left: { type: 'Literal', value: 40 }, + right: { type: 'Literal', value: 2 } + }); + +produces the string `'40 + 2'`. + +See the [API page](https://github.com/estools/escodegen/wiki/API) for +options. To run the tests, execute `npm test` in the root directory. + +### Building browser bundle / minified browser bundle + +At first, execute `npm install` to install the all dev dependencies. +After that, + + npm run-script build + +will generate `escodegen.browser.js`, which can be used in browser environments. + +And, + + npm run-script build-min + +will generate the minified file `escodegen.browser.min.js`. + +### License + +#### Escodegen + +Copyright (C) 2012 [Yusuke Suzuki](http://github.com/Constellation) + (twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/escodegen/bin/escodegen.js b/node_modules/escodegen/bin/escodegen.js new file mode 100644 index 0000000..a7c38aa --- /dev/null +++ b/node_modules/escodegen/bin/escodegen.js @@ -0,0 +1,77 @@ +#!/usr/bin/env node +/* + Copyright (C) 2012 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint sloppy:true node:true */ + +var fs = require('fs'), + path = require('path'), + root = path.join(path.dirname(fs.realpathSync(__filename)), '..'), + esprima = require('esprima'), + escodegen = require(root), + optionator = require('optionator')({ + prepend: 'Usage: escodegen [options] file...', + options: [ + { + option: 'config', + alias: 'c', + type: 'String', + description: 'configuration json for escodegen' + } + ] + }), + args = optionator.parse(process.argv), + files = args._, + options, + esprimaOptions = { + raw: true, + tokens: true, + range: true, + comment: true + }; + +if (files.length === 0) { + console.log(optionator.generateHelp()); + process.exit(1); +} + +if (args.config) { + try { + options = JSON.parse(fs.readFileSync(args.config, 'utf-8')); + } catch (err) { + console.error('Error parsing config: ', err); + } +} + +files.forEach(function (filename) { + var content = fs.readFileSync(filename, 'utf-8'), + syntax = esprima.parse(content, esprimaOptions); + + if (options.comment) { + escodegen.attachComments(syntax, syntax.comments, syntax.tokens); + } + + console.log(escodegen.generate(syntax, options)); +}); +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/escodegen/bin/esgenerate.js b/node_modules/escodegen/bin/esgenerate.js new file mode 100644 index 0000000..449abcc --- /dev/null +++ b/node_modules/escodegen/bin/esgenerate.js @@ -0,0 +1,64 @@ +#!/usr/bin/env node +/* + Copyright (C) 2012 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint sloppy:true node:true */ + +var fs = require('fs'), + path = require('path'), + root = path.join(path.dirname(fs.realpathSync(__filename)), '..'), + escodegen = require(root), + optionator = require('optionator')({ + prepend: 'Usage: esgenerate [options] file.json ...', + options: [ + { + option: 'config', + alias: 'c', + type: 'String', + description: 'configuration json for escodegen' + } + ] + }), + args = optionator.parse(process.argv), + files = args._, + options; + +if (files.length === 0) { + console.log(optionator.generateHelp()); + process.exit(1); +} + +if (args.config) { + try { + options = JSON.parse(fs.readFileSync(args.config, 'utf-8')) + } catch (err) { + console.error('Error parsing config: ', err); + } +} + +files.forEach(function (filename) { + var content = fs.readFileSync(filename, 'utf-8'); + console.log(escodegen.generate(JSON.parse(content), options)); +}); +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/escodegen/escodegen.js b/node_modules/escodegen/escodegen.js new file mode 100644 index 0000000..847fc37 --- /dev/null +++ b/node_modules/escodegen/escodegen.js @@ -0,0 +1,2647 @@ +/* + Copyright (C) 2012-2014 Yusuke Suzuki + Copyright (C) 2015 Ingvar Stepanyan + Copyright (C) 2014 Ivan Nikulin + Copyright (C) 2012-2013 Michael Ficarra + Copyright (C) 2012-2013 Mathias Bynens + Copyright (C) 2013 Irakli Gozalishvili + Copyright (C) 2012 Robert Gust-Bardon + Copyright (C) 2012 John Freeman + Copyright (C) 2011-2012 Ariya Hidayat + Copyright (C) 2012 Joost-Wim Boekesteijn + Copyright (C) 2012 Kris Kowal + Copyright (C) 2012 Arpad Borsos + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*global exports:true, require:true, global:true*/ +(function () { + 'use strict'; + + var Syntax, + Precedence, + BinaryPrecedence, + SourceNode, + estraverse, + esutils, + base, + indent, + json, + renumber, + hexadecimal, + quotes, + escapeless, + newline, + space, + parentheses, + semicolons, + safeConcatenation, + directive, + extra, + parse, + sourceMap, + sourceCode, + preserveBlankLines, + FORMAT_MINIFY, + FORMAT_DEFAULTS; + + estraverse = require('estraverse'); + esutils = require('esutils'); + + Syntax = estraverse.Syntax; + + // Generation is done by generateExpression. + function isExpression(node) { + return CodeGenerator.Expression.hasOwnProperty(node.type); + } + + // Generation is done by generateStatement. + function isStatement(node) { + return CodeGenerator.Statement.hasOwnProperty(node.type); + } + + Precedence = { + Sequence: 0, + Yield: 1, + Assignment: 1, + Conditional: 2, + ArrowFunction: 2, + LogicalOR: 3, + LogicalAND: 4, + BitwiseOR: 5, + BitwiseXOR: 6, + BitwiseAND: 7, + Equality: 8, + Relational: 9, + BitwiseSHIFT: 10, + Additive: 11, + Multiplicative: 12, + Exponentiation: 13, + Await: 14, + Unary: 14, + Postfix: 15, + OptionalChaining: 16, + Call: 17, + New: 18, + TaggedTemplate: 19, + Member: 20, + Primary: 21 + }; + + BinaryPrecedence = { + '||': Precedence.LogicalOR, + '&&': Precedence.LogicalAND, + '|': Precedence.BitwiseOR, + '^': Precedence.BitwiseXOR, + '&': Precedence.BitwiseAND, + '==': Precedence.Equality, + '!=': Precedence.Equality, + '===': Precedence.Equality, + '!==': Precedence.Equality, + 'is': Precedence.Equality, + 'isnt': Precedence.Equality, + '<': Precedence.Relational, + '>': Precedence.Relational, + '<=': Precedence.Relational, + '>=': Precedence.Relational, + 'in': Precedence.Relational, + 'instanceof': Precedence.Relational, + '<<': Precedence.BitwiseSHIFT, + '>>': Precedence.BitwiseSHIFT, + '>>>': Precedence.BitwiseSHIFT, + '+': Precedence.Additive, + '-': Precedence.Additive, + '*': Precedence.Multiplicative, + '%': Precedence.Multiplicative, + '/': Precedence.Multiplicative, + '**': Precedence.Exponentiation + }; + + //Flags + var F_ALLOW_IN = 1, + F_ALLOW_CALL = 1 << 1, + F_ALLOW_UNPARATH_NEW = 1 << 2, + F_FUNC_BODY = 1 << 3, + F_DIRECTIVE_CTX = 1 << 4, + F_SEMICOLON_OPT = 1 << 5; + + //Expression flag sets + //NOTE: Flag order: + // F_ALLOW_IN + // F_ALLOW_CALL + // F_ALLOW_UNPARATH_NEW + var E_FTT = F_ALLOW_CALL | F_ALLOW_UNPARATH_NEW, + E_TTF = F_ALLOW_IN | F_ALLOW_CALL, + E_TTT = F_ALLOW_IN | F_ALLOW_CALL | F_ALLOW_UNPARATH_NEW, + E_TFF = F_ALLOW_IN, + E_FFT = F_ALLOW_UNPARATH_NEW, + E_TFT = F_ALLOW_IN | F_ALLOW_UNPARATH_NEW; + + //Statement flag sets + //NOTE: Flag order: + // F_ALLOW_IN + // F_FUNC_BODY + // F_DIRECTIVE_CTX + // F_SEMICOLON_OPT + var S_TFFF = F_ALLOW_IN, + S_TFFT = F_ALLOW_IN | F_SEMICOLON_OPT, + S_FFFF = 0x00, + S_TFTF = F_ALLOW_IN | F_DIRECTIVE_CTX, + S_TTFF = F_ALLOW_IN | F_FUNC_BODY; + + function getDefaultOptions() { + // default options + return { + indent: null, + base: null, + parse: null, + comment: false, + format: { + indent: { + style: ' ', + base: 0, + adjustMultilineComment: false + }, + newline: '\n', + space: ' ', + json: false, + renumber: false, + hexadecimal: false, + quotes: 'single', + escapeless: false, + compact: false, + parentheses: true, + semicolons: true, + safeConcatenation: false, + preserveBlankLines: false + }, + moz: { + comprehensionExpressionStartsWithAssignment: false, + starlessGenerator: false + }, + sourceMap: null, + sourceMapRoot: null, + sourceMapWithCode: false, + directive: false, + raw: true, + verbatim: null, + sourceCode: null + }; + } + + function stringRepeat(str, num) { + var result = ''; + + for (num |= 0; num > 0; num >>>= 1, str += str) { + if (num & 1) { + result += str; + } + } + + return result; + } + + function hasLineTerminator(str) { + return (/[\r\n]/g).test(str); + } + + function endsWithLineTerminator(str) { + var len = str.length; + return len && esutils.code.isLineTerminator(str.charCodeAt(len - 1)); + } + + function merge(target, override) { + var key; + for (key in override) { + if (override.hasOwnProperty(key)) { + target[key] = override[key]; + } + } + return target; + } + + function updateDeeply(target, override) { + var key, val; + + function isHashObject(target) { + return typeof target === 'object' && target instanceof Object && !(target instanceof RegExp); + } + + for (key in override) { + if (override.hasOwnProperty(key)) { + val = override[key]; + if (isHashObject(val)) { + if (isHashObject(target[key])) { + updateDeeply(target[key], val); + } else { + target[key] = updateDeeply({}, val); + } + } else { + target[key] = val; + } + } + } + return target; + } + + function generateNumber(value) { + var result, point, temp, exponent, pos; + + if (value !== value) { + throw new Error('Numeric literal whose value is NaN'); + } + if (value < 0 || (value === 0 && 1 / value < 0)) { + throw new Error('Numeric literal whose value is negative'); + } + + if (value === 1 / 0) { + return json ? 'null' : renumber ? '1e400' : '1e+400'; + } + + result = '' + value; + if (!renumber || result.length < 3) { + return result; + } + + point = result.indexOf('.'); + if (!json && result.charCodeAt(0) === 0x30 /* 0 */ && point === 1) { + point = 0; + result = result.slice(1); + } + temp = result; + result = result.replace('e+', 'e'); + exponent = 0; + if ((pos = temp.indexOf('e')) > 0) { + exponent = +temp.slice(pos + 1); + temp = temp.slice(0, pos); + } + if (point >= 0) { + exponent -= temp.length - point - 1; + temp = +(temp.slice(0, point) + temp.slice(point + 1)) + ''; + } + pos = 0; + while (temp.charCodeAt(temp.length + pos - 1) === 0x30 /* 0 */) { + --pos; + } + if (pos !== 0) { + exponent -= pos; + temp = temp.slice(0, pos); + } + if (exponent !== 0) { + temp += 'e' + exponent; + } + if ((temp.length < result.length || + (hexadecimal && value > 1e12 && Math.floor(value) === value && (temp = '0x' + value.toString(16)).length < result.length)) && + +temp === value) { + result = temp; + } + + return result; + } + + // Generate valid RegExp expression. + // This function is based on https://github.com/Constellation/iv Engine + + function escapeRegExpCharacter(ch, previousIsBackslash) { + // not handling '\' and handling \u2028 or \u2029 to unicode escape sequence + if ((ch & ~1) === 0x2028) { + return (previousIsBackslash ? 'u' : '\\u') + ((ch === 0x2028) ? '2028' : '2029'); + } else if (ch === 10 || ch === 13) { // \n, \r + return (previousIsBackslash ? '' : '\\') + ((ch === 10) ? 'n' : 'r'); + } + return String.fromCharCode(ch); + } + + function generateRegExp(reg) { + var match, result, flags, i, iz, ch, characterInBrack, previousIsBackslash; + + result = reg.toString(); + + if (reg.source) { + // extract flag from toString result + match = result.match(/\/([^/]*)$/); + if (!match) { + return result; + } + + flags = match[1]; + result = ''; + + characterInBrack = false; + previousIsBackslash = false; + for (i = 0, iz = reg.source.length; i < iz; ++i) { + ch = reg.source.charCodeAt(i); + + if (!previousIsBackslash) { + if (characterInBrack) { + if (ch === 93) { // ] + characterInBrack = false; + } + } else { + if (ch === 47) { // / + result += '\\'; + } else if (ch === 91) { // [ + characterInBrack = true; + } + } + result += escapeRegExpCharacter(ch, previousIsBackslash); + previousIsBackslash = ch === 92; // \ + } else { + // if new RegExp("\\\n') is provided, create /\n/ + result += escapeRegExpCharacter(ch, previousIsBackslash); + // prevent like /\\[/]/ + previousIsBackslash = false; + } + } + + return '/' + result + '/' + flags; + } + + return result; + } + + function escapeAllowedCharacter(code, next) { + var hex; + + if (code === 0x08 /* \b */) { + return '\\b'; + } + + if (code === 0x0C /* \f */) { + return '\\f'; + } + + if (code === 0x09 /* \t */) { + return '\\t'; + } + + hex = code.toString(16).toUpperCase(); + if (json || code > 0xFF) { + return '\\u' + '0000'.slice(hex.length) + hex; + } else if (code === 0x0000 && !esutils.code.isDecimalDigit(next)) { + return '\\0'; + } else if (code === 0x000B /* \v */) { // '\v' + return '\\x0B'; + } else { + return '\\x' + '00'.slice(hex.length) + hex; + } + } + + function escapeDisallowedCharacter(code) { + if (code === 0x5C /* \ */) { + return '\\\\'; + } + + if (code === 0x0A /* \n */) { + return '\\n'; + } + + if (code === 0x0D /* \r */) { + return '\\r'; + } + + if (code === 0x2028) { + return '\\u2028'; + } + + if (code === 0x2029) { + return '\\u2029'; + } + + throw new Error('Incorrectly classified character'); + } + + function escapeDirective(str) { + var i, iz, code, quote; + + quote = quotes === 'double' ? '"' : '\''; + for (i = 0, iz = str.length; i < iz; ++i) { + code = str.charCodeAt(i); + if (code === 0x27 /* ' */) { + quote = '"'; + break; + } else if (code === 0x22 /* " */) { + quote = '\''; + break; + } else if (code === 0x5C /* \ */) { + ++i; + } + } + + return quote + str + quote; + } + + function escapeString(str) { + var result = '', i, len, code, singleQuotes = 0, doubleQuotes = 0, single, quote; + + for (i = 0, len = str.length; i < len; ++i) { + code = str.charCodeAt(i); + if (code === 0x27 /* ' */) { + ++singleQuotes; + } else if (code === 0x22 /* " */) { + ++doubleQuotes; + } else if (code === 0x2F /* / */ && json) { + result += '\\'; + } else if (esutils.code.isLineTerminator(code) || code === 0x5C /* \ */) { + result += escapeDisallowedCharacter(code); + continue; + } else if (!esutils.code.isIdentifierPartES5(code) && (json && code < 0x20 /* SP */ || !json && !escapeless && (code < 0x20 /* SP */ || code > 0x7E /* ~ */))) { + result += escapeAllowedCharacter(code, str.charCodeAt(i + 1)); + continue; + } + result += String.fromCharCode(code); + } + + single = !(quotes === 'double' || (quotes === 'auto' && doubleQuotes < singleQuotes)); + quote = single ? '\'' : '"'; + + if (!(single ? singleQuotes : doubleQuotes)) { + return quote + result + quote; + } + + str = result; + result = quote; + + for (i = 0, len = str.length; i < len; ++i) { + code = str.charCodeAt(i); + if ((code === 0x27 /* ' */ && single) || (code === 0x22 /* " */ && !single)) { + result += '\\'; + } + result += String.fromCharCode(code); + } + + return result + quote; + } + + /** + * flatten an array to a string, where the array can contain + * either strings or nested arrays + */ + function flattenToString(arr) { + var i, iz, elem, result = ''; + for (i = 0, iz = arr.length; i < iz; ++i) { + elem = arr[i]; + result += Array.isArray(elem) ? flattenToString(elem) : elem; + } + return result; + } + + /** + * convert generated to a SourceNode when source maps are enabled. + */ + function toSourceNodeWhenNeeded(generated, node) { + if (!sourceMap) { + // with no source maps, generated is either an + // array or a string. if an array, flatten it. + // if a string, just return it + if (Array.isArray(generated)) { + return flattenToString(generated); + } else { + return generated; + } + } + if (node == null) { + if (generated instanceof SourceNode) { + return generated; + } else { + node = {}; + } + } + if (node.loc == null) { + return new SourceNode(null, null, sourceMap, generated, node.name || null); + } + return new SourceNode(node.loc.start.line, node.loc.start.column, (sourceMap === true ? node.loc.source || null : sourceMap), generated, node.name || null); + } + + function noEmptySpace() { + return (space) ? space : ' '; + } + + function join(left, right) { + var leftSource, + rightSource, + leftCharCode, + rightCharCode; + + leftSource = toSourceNodeWhenNeeded(left).toString(); + if (leftSource.length === 0) { + return [right]; + } + + rightSource = toSourceNodeWhenNeeded(right).toString(); + if (rightSource.length === 0) { + return [left]; + } + + leftCharCode = leftSource.charCodeAt(leftSource.length - 1); + rightCharCode = rightSource.charCodeAt(0); + + if ((leftCharCode === 0x2B /* + */ || leftCharCode === 0x2D /* - */) && leftCharCode === rightCharCode || + esutils.code.isIdentifierPartES5(leftCharCode) && esutils.code.isIdentifierPartES5(rightCharCode) || + leftCharCode === 0x2F /* / */ && rightCharCode === 0x69 /* i */) { // infix word operators all start with `i` + return [left, noEmptySpace(), right]; + } else if (esutils.code.isWhiteSpace(leftCharCode) || esutils.code.isLineTerminator(leftCharCode) || + esutils.code.isWhiteSpace(rightCharCode) || esutils.code.isLineTerminator(rightCharCode)) { + return [left, right]; + } + return [left, space, right]; + } + + function addIndent(stmt) { + return [base, stmt]; + } + + function withIndent(fn) { + var previousBase; + previousBase = base; + base += indent; + fn(base); + base = previousBase; + } + + function calculateSpaces(str) { + var i; + for (i = str.length - 1; i >= 0; --i) { + if (esutils.code.isLineTerminator(str.charCodeAt(i))) { + break; + } + } + return (str.length - 1) - i; + } + + function adjustMultilineComment(value, specialBase) { + var array, i, len, line, j, spaces, previousBase, sn; + + array = value.split(/\r\n|[\r\n]/); + spaces = Number.MAX_VALUE; + + // first line doesn't have indentation + for (i = 1, len = array.length; i < len; ++i) { + line = array[i]; + j = 0; + while (j < line.length && esutils.code.isWhiteSpace(line.charCodeAt(j))) { + ++j; + } + if (spaces > j) { + spaces = j; + } + } + + if (typeof specialBase !== 'undefined') { + // pattern like + // { + // var t = 20; /* + // * this is comment + // */ + // } + previousBase = base; + if (array[1][spaces] === '*') { + specialBase += ' '; + } + base = specialBase; + } else { + if (spaces & 1) { + // /* + // * + // */ + // If spaces are odd number, above pattern is considered. + // We waste 1 space. + --spaces; + } + previousBase = base; + } + + for (i = 1, len = array.length; i < len; ++i) { + sn = toSourceNodeWhenNeeded(addIndent(array[i].slice(spaces))); + array[i] = sourceMap ? sn.join('') : sn; + } + + base = previousBase; + + return array.join('\n'); + } + + function generateComment(comment, specialBase) { + if (comment.type === 'Line') { + if (endsWithLineTerminator(comment.value)) { + return '//' + comment.value; + } else { + // Always use LineTerminator + var result = '//' + comment.value; + if (!preserveBlankLines) { + result += '\n'; + } + return result; + } + } + if (extra.format.indent.adjustMultilineComment && /[\n\r]/.test(comment.value)) { + return adjustMultilineComment('/*' + comment.value + '*/', specialBase); + } + return '/*' + comment.value + '*/'; + } + + function addComments(stmt, result) { + var i, len, comment, save, tailingToStatement, specialBase, fragment, + extRange, range, prevRange, prefix, infix, suffix, count; + + if (stmt.leadingComments && stmt.leadingComments.length > 0) { + save = result; + + if (preserveBlankLines) { + comment = stmt.leadingComments[0]; + result = []; + + extRange = comment.extendedRange; + range = comment.range; + + prefix = sourceCode.substring(extRange[0], range[0]); + count = (prefix.match(/\n/g) || []).length; + if (count > 0) { + result.push(stringRepeat('\n', count)); + result.push(addIndent(generateComment(comment))); + } else { + result.push(prefix); + result.push(generateComment(comment)); + } + + prevRange = range; + + for (i = 1, len = stmt.leadingComments.length; i < len; i++) { + comment = stmt.leadingComments[i]; + range = comment.range; + + infix = sourceCode.substring(prevRange[1], range[0]); + count = (infix.match(/\n/g) || []).length; + result.push(stringRepeat('\n', count)); + result.push(addIndent(generateComment(comment))); + + prevRange = range; + } + + suffix = sourceCode.substring(range[1], extRange[1]); + count = (suffix.match(/\n/g) || []).length; + result.push(stringRepeat('\n', count)); + } else { + comment = stmt.leadingComments[0]; + result = []; + if (safeConcatenation && stmt.type === Syntax.Program && stmt.body.length === 0) { + result.push('\n'); + } + result.push(generateComment(comment)); + if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { + result.push('\n'); + } + + for (i = 1, len = stmt.leadingComments.length; i < len; ++i) { + comment = stmt.leadingComments[i]; + fragment = [generateComment(comment)]; + if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { + fragment.push('\n'); + } + result.push(addIndent(fragment)); + } + } + + result.push(addIndent(save)); + } + + if (stmt.trailingComments) { + + if (preserveBlankLines) { + comment = stmt.trailingComments[0]; + extRange = comment.extendedRange; + range = comment.range; + + prefix = sourceCode.substring(extRange[0], range[0]); + count = (prefix.match(/\n/g) || []).length; + + if (count > 0) { + result.push(stringRepeat('\n', count)); + result.push(addIndent(generateComment(comment))); + } else { + result.push(prefix); + result.push(generateComment(comment)); + } + } else { + tailingToStatement = !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()); + specialBase = stringRepeat(' ', calculateSpaces(toSourceNodeWhenNeeded([base, result, indent]).toString())); + for (i = 0, len = stmt.trailingComments.length; i < len; ++i) { + comment = stmt.trailingComments[i]; + if (tailingToStatement) { + // We assume target like following script + // + // var t = 20; /** + // * This is comment of t + // */ + if (i === 0) { + // first case + result = [result, indent]; + } else { + result = [result, specialBase]; + } + result.push(generateComment(comment, specialBase)); + } else { + result = [result, addIndent(generateComment(comment))]; + } + if (i !== len - 1 && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { + result = [result, '\n']; + } + } + } + } + + return result; + } + + function generateBlankLines(start, end, result) { + var j, newlineCount = 0; + + for (j = start; j < end; j++) { + if (sourceCode[j] === '\n') { + newlineCount++; + } + } + + for (j = 1; j < newlineCount; j++) { + result.push(newline); + } + } + + function parenthesize(text, current, should) { + if (current < should) { + return ['(', text, ')']; + } + return text; + } + + function generateVerbatimString(string) { + var i, iz, result; + result = string.split(/\r\n|\n/); + for (i = 1, iz = result.length; i < iz; i++) { + result[i] = newline + base + result[i]; + } + return result; + } + + function generateVerbatim(expr, precedence) { + var verbatim, result, prec; + verbatim = expr[extra.verbatim]; + + if (typeof verbatim === 'string') { + result = parenthesize(generateVerbatimString(verbatim), Precedence.Sequence, precedence); + } else { + // verbatim is object + result = generateVerbatimString(verbatim.content); + prec = (verbatim.precedence != null) ? verbatim.precedence : Precedence.Sequence; + result = parenthesize(result, prec, precedence); + } + + return toSourceNodeWhenNeeded(result, expr); + } + + function CodeGenerator() { + } + + // Helpers. + + CodeGenerator.prototype.maybeBlock = function(stmt, flags) { + var result, noLeadingComment, that = this; + + noLeadingComment = !extra.comment || !stmt.leadingComments; + + if (stmt.type === Syntax.BlockStatement && noLeadingComment) { + return [space, this.generateStatement(stmt, flags)]; + } + + if (stmt.type === Syntax.EmptyStatement && noLeadingComment) { + return ';'; + } + + withIndent(function () { + result = [ + newline, + addIndent(that.generateStatement(stmt, flags)) + ]; + }); + + return result; + }; + + CodeGenerator.prototype.maybeBlockSuffix = function (stmt, result) { + var ends = endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()); + if (stmt.type === Syntax.BlockStatement && (!extra.comment || !stmt.leadingComments) && !ends) { + return [result, space]; + } + if (ends) { + return [result, base]; + } + return [result, newline, base]; + }; + + function generateIdentifier(node) { + return toSourceNodeWhenNeeded(node.name, node); + } + + function generateAsyncPrefix(node, spaceRequired) { + return node.async ? 'async' + (spaceRequired ? noEmptySpace() : space) : ''; + } + + function generateStarSuffix(node) { + var isGenerator = node.generator && !extra.moz.starlessGenerator; + return isGenerator ? '*' + space : ''; + } + + function generateMethodPrefix(prop) { + var func = prop.value, prefix = ''; + if (func.async) { + prefix += generateAsyncPrefix(func, !prop.computed); + } + if (func.generator) { + // avoid space before method name + prefix += generateStarSuffix(func) ? '*' : ''; + } + return prefix; + } + + CodeGenerator.prototype.generatePattern = function (node, precedence, flags) { + if (node.type === Syntax.Identifier) { + return generateIdentifier(node); + } + return this.generateExpression(node, precedence, flags); + }; + + CodeGenerator.prototype.generateFunctionParams = function (node) { + var i, iz, result, hasDefault; + + hasDefault = false; + + if (node.type === Syntax.ArrowFunctionExpression && + !node.rest && (!node.defaults || node.defaults.length === 0) && + node.params.length === 1 && node.params[0].type === Syntax.Identifier) { + // arg => { } case + result = [generateAsyncPrefix(node, true), generateIdentifier(node.params[0])]; + } else { + result = node.type === Syntax.ArrowFunctionExpression ? [generateAsyncPrefix(node, false)] : []; + result.push('('); + if (node.defaults) { + hasDefault = true; + } + for (i = 0, iz = node.params.length; i < iz; ++i) { + if (hasDefault && node.defaults[i]) { + // Handle default values. + result.push(this.generateAssignment(node.params[i], node.defaults[i], '=', Precedence.Assignment, E_TTT)); + } else { + result.push(this.generatePattern(node.params[i], Precedence.Assignment, E_TTT)); + } + if (i + 1 < iz) { + result.push(',' + space); + } + } + + if (node.rest) { + if (node.params.length) { + result.push(',' + space); + } + result.push('...'); + result.push(generateIdentifier(node.rest)); + } + + result.push(')'); + } + + return result; + }; + + CodeGenerator.prototype.generateFunctionBody = function (node) { + var result, expr; + + result = this.generateFunctionParams(node); + + if (node.type === Syntax.ArrowFunctionExpression) { + result.push(space); + result.push('=>'); + } + + if (node.expression) { + result.push(space); + expr = this.generateExpression(node.body, Precedence.Assignment, E_TTT); + if (expr.toString().charAt(0) === '{') { + expr = ['(', expr, ')']; + } + result.push(expr); + } else { + result.push(this.maybeBlock(node.body, S_TTFF)); + } + + return result; + }; + + CodeGenerator.prototype.generateIterationForStatement = function (operator, stmt, flags) { + var result = ['for' + (stmt.await ? noEmptySpace() + 'await' : '') + space + '('], that = this; + withIndent(function () { + if (stmt.left.type === Syntax.VariableDeclaration) { + withIndent(function () { + result.push(stmt.left.kind + noEmptySpace()); + result.push(that.generateStatement(stmt.left.declarations[0], S_FFFF)); + }); + } else { + result.push(that.generateExpression(stmt.left, Precedence.Call, E_TTT)); + } + + result = join(result, operator); + result = [join( + result, + that.generateExpression(stmt.right, Precedence.Assignment, E_TTT) + ), ')']; + }); + result.push(this.maybeBlock(stmt.body, flags)); + return result; + }; + + CodeGenerator.prototype.generatePropertyKey = function (expr, computed) { + var result = []; + + if (computed) { + result.push('['); + } + + result.push(this.generateExpression(expr, Precedence.Assignment, E_TTT)); + + if (computed) { + result.push(']'); + } + + return result; + }; + + CodeGenerator.prototype.generateAssignment = function (left, right, operator, precedence, flags) { + if (Precedence.Assignment < precedence) { + flags |= F_ALLOW_IN; + } + + return parenthesize( + [ + this.generateExpression(left, Precedence.Call, flags), + space + operator + space, + this.generateExpression(right, Precedence.Assignment, flags) + ], + Precedence.Assignment, + precedence + ); + }; + + CodeGenerator.prototype.semicolon = function (flags) { + if (!semicolons && flags & F_SEMICOLON_OPT) { + return ''; + } + return ';'; + }; + + // Statements. + + CodeGenerator.Statement = { + + BlockStatement: function (stmt, flags) { + var range, content, result = ['{', newline], that = this; + + withIndent(function () { + // handle functions without any code + if (stmt.body.length === 0 && preserveBlankLines) { + range = stmt.range; + if (range[1] - range[0] > 2) { + content = sourceCode.substring(range[0] + 1, range[1] - 1); + if (content[0] === '\n') { + result = ['{']; + } + result.push(content); + } + } + + var i, iz, fragment, bodyFlags; + bodyFlags = S_TFFF; + if (flags & F_FUNC_BODY) { + bodyFlags |= F_DIRECTIVE_CTX; + } + + for (i = 0, iz = stmt.body.length; i < iz; ++i) { + if (preserveBlankLines) { + // handle spaces before the first line + if (i === 0) { + if (stmt.body[0].leadingComments) { + range = stmt.body[0].leadingComments[0].extendedRange; + content = sourceCode.substring(range[0], range[1]); + if (content[0] === '\n') { + result = ['{']; + } + } + if (!stmt.body[0].leadingComments) { + generateBlankLines(stmt.range[0], stmt.body[0].range[0], result); + } + } + + // handle spaces between lines + if (i > 0) { + if (!stmt.body[i - 1].trailingComments && !stmt.body[i].leadingComments) { + generateBlankLines(stmt.body[i - 1].range[1], stmt.body[i].range[0], result); + } + } + } + + if (i === iz - 1) { + bodyFlags |= F_SEMICOLON_OPT; + } + + if (stmt.body[i].leadingComments && preserveBlankLines) { + fragment = that.generateStatement(stmt.body[i], bodyFlags); + } else { + fragment = addIndent(that.generateStatement(stmt.body[i], bodyFlags)); + } + + result.push(fragment); + if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { + if (preserveBlankLines && i < iz - 1) { + // don't add a new line if there are leading coments + // in the next statement + if (!stmt.body[i + 1].leadingComments) { + result.push(newline); + } + } else { + result.push(newline); + } + } + + if (preserveBlankLines) { + // handle spaces after the last line + if (i === iz - 1) { + if (!stmt.body[i].trailingComments) { + generateBlankLines(stmt.body[i].range[1], stmt.range[1], result); + } + } + } + } + }); + + result.push(addIndent('}')); + return result; + }, + + BreakStatement: function (stmt, flags) { + if (stmt.label) { + return 'break ' + stmt.label.name + this.semicolon(flags); + } + return 'break' + this.semicolon(flags); + }, + + ContinueStatement: function (stmt, flags) { + if (stmt.label) { + return 'continue ' + stmt.label.name + this.semicolon(flags); + } + return 'continue' + this.semicolon(flags); + }, + + ClassBody: function (stmt, flags) { + var result = [ '{', newline], that = this; + + withIndent(function (indent) { + var i, iz; + + for (i = 0, iz = stmt.body.length; i < iz; ++i) { + result.push(indent); + result.push(that.generateExpression(stmt.body[i], Precedence.Sequence, E_TTT)); + if (i + 1 < iz) { + result.push(newline); + } + } + }); + + if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { + result.push(newline); + } + result.push(base); + result.push('}'); + return result; + }, + + ClassDeclaration: function (stmt, flags) { + var result, fragment; + result = ['class']; + if (stmt.id) { + result = join(result, this.generateExpression(stmt.id, Precedence.Sequence, E_TTT)); + } + if (stmt.superClass) { + fragment = join('extends', this.generateExpression(stmt.superClass, Precedence.Unary, E_TTT)); + result = join(result, fragment); + } + result.push(space); + result.push(this.generateStatement(stmt.body, S_TFFT)); + return result; + }, + + DirectiveStatement: function (stmt, flags) { + if (extra.raw && stmt.raw) { + return stmt.raw + this.semicolon(flags); + } + return escapeDirective(stmt.directive) + this.semicolon(flags); + }, + + DoWhileStatement: function (stmt, flags) { + // Because `do 42 while (cond)` is Syntax Error. We need semicolon. + var result = join('do', this.maybeBlock(stmt.body, S_TFFF)); + result = this.maybeBlockSuffix(stmt.body, result); + return join(result, [ + 'while' + space + '(', + this.generateExpression(stmt.test, Precedence.Sequence, E_TTT), + ')' + this.semicolon(flags) + ]); + }, + + CatchClause: function (stmt, flags) { + var result, that = this; + withIndent(function () { + var guard; + + if (stmt.param) { + result = [ + 'catch' + space + '(', + that.generateExpression(stmt.param, Precedence.Sequence, E_TTT), + ')' + ]; + + if (stmt.guard) { + guard = that.generateExpression(stmt.guard, Precedence.Sequence, E_TTT); + result.splice(2, 0, ' if ', guard); + } + } else { + result = ['catch']; + } + }); + result.push(this.maybeBlock(stmt.body, S_TFFF)); + return result; + }, + + DebuggerStatement: function (stmt, flags) { + return 'debugger' + this.semicolon(flags); + }, + + EmptyStatement: function (stmt, flags) { + return ';'; + }, + + ExportDefaultDeclaration: function (stmt, flags) { + var result = [ 'export' ], bodyFlags; + + bodyFlags = (flags & F_SEMICOLON_OPT) ? S_TFFT : S_TFFF; + + // export default HoistableDeclaration[Default] + // export default AssignmentExpression[In] ; + result = join(result, 'default'); + if (isStatement(stmt.declaration)) { + result = join(result, this.generateStatement(stmt.declaration, bodyFlags)); + } else { + result = join(result, this.generateExpression(stmt.declaration, Precedence.Assignment, E_TTT) + this.semicolon(flags)); + } + return result; + }, + + ExportNamedDeclaration: function (stmt, flags) { + var result = [ 'export' ], bodyFlags, that = this; + + bodyFlags = (flags & F_SEMICOLON_OPT) ? S_TFFT : S_TFFF; + + // export VariableStatement + // export Declaration[Default] + if (stmt.declaration) { + return join(result, this.generateStatement(stmt.declaration, bodyFlags)); + } + + // export ExportClause[NoReference] FromClause ; + // export ExportClause ; + if (stmt.specifiers) { + if (stmt.specifiers.length === 0) { + result = join(result, '{' + space + '}'); + } else if (stmt.specifiers[0].type === Syntax.ExportBatchSpecifier) { + result = join(result, this.generateExpression(stmt.specifiers[0], Precedence.Sequence, E_TTT)); + } else { + result = join(result, '{'); + withIndent(function (indent) { + var i, iz; + result.push(newline); + for (i = 0, iz = stmt.specifiers.length; i < iz; ++i) { + result.push(indent); + result.push(that.generateExpression(stmt.specifiers[i], Precedence.Sequence, E_TTT)); + if (i + 1 < iz) { + result.push(',' + newline); + } + } + }); + if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { + result.push(newline); + } + result.push(base + '}'); + } + + if (stmt.source) { + result = join(result, [ + 'from' + space, + // ModuleSpecifier + this.generateExpression(stmt.source, Precedence.Sequence, E_TTT), + this.semicolon(flags) + ]); + } else { + result.push(this.semicolon(flags)); + } + } + return result; + }, + + ExportAllDeclaration: function (stmt, flags) { + // export * FromClause ; + return [ + 'export' + space, + '*' + space, + 'from' + space, + // ModuleSpecifier + this.generateExpression(stmt.source, Precedence.Sequence, E_TTT), + this.semicolon(flags) + ]; + }, + + ExpressionStatement: function (stmt, flags) { + var result, fragment; + + function isClassPrefixed(fragment) { + var code; + if (fragment.slice(0, 5) !== 'class') { + return false; + } + code = fragment.charCodeAt(5); + return code === 0x7B /* '{' */ || esutils.code.isWhiteSpace(code) || esutils.code.isLineTerminator(code); + } + + function isFunctionPrefixed(fragment) { + var code; + if (fragment.slice(0, 8) !== 'function') { + return false; + } + code = fragment.charCodeAt(8); + return code === 0x28 /* '(' */ || esutils.code.isWhiteSpace(code) || code === 0x2A /* '*' */ || esutils.code.isLineTerminator(code); + } + + function isAsyncPrefixed(fragment) { + var code, i, iz; + if (fragment.slice(0, 5) !== 'async') { + return false; + } + if (!esutils.code.isWhiteSpace(fragment.charCodeAt(5))) { + return false; + } + for (i = 6, iz = fragment.length; i < iz; ++i) { + if (!esutils.code.isWhiteSpace(fragment.charCodeAt(i))) { + break; + } + } + if (i === iz) { + return false; + } + if (fragment.slice(i, i + 8) !== 'function') { + return false; + } + code = fragment.charCodeAt(i + 8); + return code === 0x28 /* '(' */ || esutils.code.isWhiteSpace(code) || code === 0x2A /* '*' */ || esutils.code.isLineTerminator(code); + } + + result = [this.generateExpression(stmt.expression, Precedence.Sequence, E_TTT)]; + // 12.4 '{', 'function', 'class' is not allowed in this position. + // wrap expression with parentheses + fragment = toSourceNodeWhenNeeded(result).toString(); + if (fragment.charCodeAt(0) === 0x7B /* '{' */ || // ObjectExpression + isClassPrefixed(fragment) || + isFunctionPrefixed(fragment) || + isAsyncPrefixed(fragment) || + (directive && (flags & F_DIRECTIVE_CTX) && stmt.expression.type === Syntax.Literal && typeof stmt.expression.value === 'string')) { + result = ['(', result, ')' + this.semicolon(flags)]; + } else { + result.push(this.semicolon(flags)); + } + return result; + }, + + ImportDeclaration: function (stmt, flags) { + // ES6: 15.2.1 valid import declarations: + // - import ImportClause FromClause ; + // - import ModuleSpecifier ; + var result, cursor, that = this; + + // If no ImportClause is present, + // this should be `import ModuleSpecifier` so skip `from` + // ModuleSpecifier is StringLiteral. + if (stmt.specifiers.length === 0) { + // import ModuleSpecifier ; + return [ + 'import', + space, + // ModuleSpecifier + this.generateExpression(stmt.source, Precedence.Sequence, E_TTT), + this.semicolon(flags) + ]; + } + + // import ImportClause FromClause ; + result = [ + 'import' + ]; + cursor = 0; + + // ImportedBinding + if (stmt.specifiers[cursor].type === Syntax.ImportDefaultSpecifier) { + result = join(result, [ + this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT) + ]); + ++cursor; + } + + if (stmt.specifiers[cursor]) { + if (cursor !== 0) { + result.push(','); + } + + if (stmt.specifiers[cursor].type === Syntax.ImportNamespaceSpecifier) { + // NameSpaceImport + result = join(result, [ + space, + this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT) + ]); + } else { + // NamedImports + result.push(space + '{'); + + if ((stmt.specifiers.length - cursor) === 1) { + // import { ... } from "..."; + result.push(space); + result.push(this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)); + result.push(space + '}' + space); + } else { + // import { + // ..., + // ..., + // } from "..."; + withIndent(function (indent) { + var i, iz; + result.push(newline); + for (i = cursor, iz = stmt.specifiers.length; i < iz; ++i) { + result.push(indent); + result.push(that.generateExpression(stmt.specifiers[i], Precedence.Sequence, E_TTT)); + if (i + 1 < iz) { + result.push(',' + newline); + } + } + }); + if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { + result.push(newline); + } + result.push(base + '}' + space); + } + } + } + + result = join(result, [ + 'from' + space, + // ModuleSpecifier + this.generateExpression(stmt.source, Precedence.Sequence, E_TTT), + this.semicolon(flags) + ]); + return result; + }, + + VariableDeclarator: function (stmt, flags) { + var itemFlags = (flags & F_ALLOW_IN) ? E_TTT : E_FTT; + if (stmt.init) { + return [ + this.generateExpression(stmt.id, Precedence.Assignment, itemFlags), + space, + '=', + space, + this.generateExpression(stmt.init, Precedence.Assignment, itemFlags) + ]; + } + return this.generatePattern(stmt.id, Precedence.Assignment, itemFlags); + }, + + VariableDeclaration: function (stmt, flags) { + // VariableDeclarator is typed as Statement, + // but joined with comma (not LineTerminator). + // So if comment is attached to target node, we should specialize. + var result, i, iz, node, bodyFlags, that = this; + + result = [ stmt.kind ]; + + bodyFlags = (flags & F_ALLOW_IN) ? S_TFFF : S_FFFF; + + function block() { + node = stmt.declarations[0]; + if (extra.comment && node.leadingComments) { + result.push('\n'); + result.push(addIndent(that.generateStatement(node, bodyFlags))); + } else { + result.push(noEmptySpace()); + result.push(that.generateStatement(node, bodyFlags)); + } + + for (i = 1, iz = stmt.declarations.length; i < iz; ++i) { + node = stmt.declarations[i]; + if (extra.comment && node.leadingComments) { + result.push(',' + newline); + result.push(addIndent(that.generateStatement(node, bodyFlags))); + } else { + result.push(',' + space); + result.push(that.generateStatement(node, bodyFlags)); + } + } + } + + if (stmt.declarations.length > 1) { + withIndent(block); + } else { + block(); + } + + result.push(this.semicolon(flags)); + + return result; + }, + + ThrowStatement: function (stmt, flags) { + return [join( + 'throw', + this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT) + ), this.semicolon(flags)]; + }, + + TryStatement: function (stmt, flags) { + var result, i, iz, guardedHandlers; + + result = ['try', this.maybeBlock(stmt.block, S_TFFF)]; + result = this.maybeBlockSuffix(stmt.block, result); + + if (stmt.handlers) { + // old interface + for (i = 0, iz = stmt.handlers.length; i < iz; ++i) { + result = join(result, this.generateStatement(stmt.handlers[i], S_TFFF)); + if (stmt.finalizer || i + 1 !== iz) { + result = this.maybeBlockSuffix(stmt.handlers[i].body, result); + } + } + } else { + guardedHandlers = stmt.guardedHandlers || []; + + for (i = 0, iz = guardedHandlers.length; i < iz; ++i) { + result = join(result, this.generateStatement(guardedHandlers[i], S_TFFF)); + if (stmt.finalizer || i + 1 !== iz) { + result = this.maybeBlockSuffix(guardedHandlers[i].body, result); + } + } + + // new interface + if (stmt.handler) { + if (Array.isArray(stmt.handler)) { + for (i = 0, iz = stmt.handler.length; i < iz; ++i) { + result = join(result, this.generateStatement(stmt.handler[i], S_TFFF)); + if (stmt.finalizer || i + 1 !== iz) { + result = this.maybeBlockSuffix(stmt.handler[i].body, result); + } + } + } else { + result = join(result, this.generateStatement(stmt.handler, S_TFFF)); + if (stmt.finalizer) { + result = this.maybeBlockSuffix(stmt.handler.body, result); + } + } + } + } + if (stmt.finalizer) { + result = join(result, ['finally', this.maybeBlock(stmt.finalizer, S_TFFF)]); + } + return result; + }, + + SwitchStatement: function (stmt, flags) { + var result, fragment, i, iz, bodyFlags, that = this; + withIndent(function () { + result = [ + 'switch' + space + '(', + that.generateExpression(stmt.discriminant, Precedence.Sequence, E_TTT), + ')' + space + '{' + newline + ]; + }); + if (stmt.cases) { + bodyFlags = S_TFFF; + for (i = 0, iz = stmt.cases.length; i < iz; ++i) { + if (i === iz - 1) { + bodyFlags |= F_SEMICOLON_OPT; + } + fragment = addIndent(this.generateStatement(stmt.cases[i], bodyFlags)); + result.push(fragment); + if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { + result.push(newline); + } + } + } + result.push(addIndent('}')); + return result; + }, + + SwitchCase: function (stmt, flags) { + var result, fragment, i, iz, bodyFlags, that = this; + withIndent(function () { + if (stmt.test) { + result = [ + join('case', that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)), + ':' + ]; + } else { + result = ['default:']; + } + + i = 0; + iz = stmt.consequent.length; + if (iz && stmt.consequent[0].type === Syntax.BlockStatement) { + fragment = that.maybeBlock(stmt.consequent[0], S_TFFF); + result.push(fragment); + i = 1; + } + + if (i !== iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { + result.push(newline); + } + + bodyFlags = S_TFFF; + for (; i < iz; ++i) { + if (i === iz - 1 && flags & F_SEMICOLON_OPT) { + bodyFlags |= F_SEMICOLON_OPT; + } + fragment = addIndent(that.generateStatement(stmt.consequent[i], bodyFlags)); + result.push(fragment); + if (i + 1 !== iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { + result.push(newline); + } + } + }); + return result; + }, + + IfStatement: function (stmt, flags) { + var result, bodyFlags, semicolonOptional, that = this; + withIndent(function () { + result = [ + 'if' + space + '(', + that.generateExpression(stmt.test, Precedence.Sequence, E_TTT), + ')' + ]; + }); + semicolonOptional = flags & F_SEMICOLON_OPT; + bodyFlags = S_TFFF; + if (semicolonOptional) { + bodyFlags |= F_SEMICOLON_OPT; + } + if (stmt.alternate) { + result.push(this.maybeBlock(stmt.consequent, S_TFFF)); + result = this.maybeBlockSuffix(stmt.consequent, result); + if (stmt.alternate.type === Syntax.IfStatement) { + result = join(result, ['else ', this.generateStatement(stmt.alternate, bodyFlags)]); + } else { + result = join(result, join('else', this.maybeBlock(stmt.alternate, bodyFlags))); + } + } else { + result.push(this.maybeBlock(stmt.consequent, bodyFlags)); + } + return result; + }, + + ForStatement: function (stmt, flags) { + var result, that = this; + withIndent(function () { + result = ['for' + space + '(']; + if (stmt.init) { + if (stmt.init.type === Syntax.VariableDeclaration) { + result.push(that.generateStatement(stmt.init, S_FFFF)); + } else { + // F_ALLOW_IN becomes false. + result.push(that.generateExpression(stmt.init, Precedence.Sequence, E_FTT)); + result.push(';'); + } + } else { + result.push(';'); + } + + if (stmt.test) { + result.push(space); + result.push(that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)); + result.push(';'); + } else { + result.push(';'); + } + + if (stmt.update) { + result.push(space); + result.push(that.generateExpression(stmt.update, Precedence.Sequence, E_TTT)); + result.push(')'); + } else { + result.push(')'); + } + }); + + result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF)); + return result; + }, + + ForInStatement: function (stmt, flags) { + return this.generateIterationForStatement('in', stmt, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF); + }, + + ForOfStatement: function (stmt, flags) { + return this.generateIterationForStatement('of', stmt, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF); + }, + + LabeledStatement: function (stmt, flags) { + return [stmt.label.name + ':', this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF)]; + }, + + Program: function (stmt, flags) { + var result, fragment, i, iz, bodyFlags; + iz = stmt.body.length; + result = [safeConcatenation && iz > 0 ? '\n' : '']; + bodyFlags = S_TFTF; + for (i = 0; i < iz; ++i) { + if (!safeConcatenation && i === iz - 1) { + bodyFlags |= F_SEMICOLON_OPT; + } + + if (preserveBlankLines) { + // handle spaces before the first line + if (i === 0) { + if (!stmt.body[0].leadingComments) { + generateBlankLines(stmt.range[0], stmt.body[i].range[0], result); + } + } + + // handle spaces between lines + if (i > 0) { + if (!stmt.body[i - 1].trailingComments && !stmt.body[i].leadingComments) { + generateBlankLines(stmt.body[i - 1].range[1], stmt.body[i].range[0], result); + } + } + } + + fragment = addIndent(this.generateStatement(stmt.body[i], bodyFlags)); + result.push(fragment); + if (i + 1 < iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { + if (preserveBlankLines) { + if (!stmt.body[i + 1].leadingComments) { + result.push(newline); + } + } else { + result.push(newline); + } + } + + if (preserveBlankLines) { + // handle spaces after the last line + if (i === iz - 1) { + if (!stmt.body[i].trailingComments) { + generateBlankLines(stmt.body[i].range[1], stmt.range[1], result); + } + } + } + } + return result; + }, + + FunctionDeclaration: function (stmt, flags) { + return [ + generateAsyncPrefix(stmt, true), + 'function', + generateStarSuffix(stmt) || noEmptySpace(), + stmt.id ? generateIdentifier(stmt.id) : '', + this.generateFunctionBody(stmt) + ]; + }, + + ReturnStatement: function (stmt, flags) { + if (stmt.argument) { + return [join( + 'return', + this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT) + ), this.semicolon(flags)]; + } + return ['return' + this.semicolon(flags)]; + }, + + WhileStatement: function (stmt, flags) { + var result, that = this; + withIndent(function () { + result = [ + 'while' + space + '(', + that.generateExpression(stmt.test, Precedence.Sequence, E_TTT), + ')' + ]; + }); + result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF)); + return result; + }, + + WithStatement: function (stmt, flags) { + var result, that = this; + withIndent(function () { + result = [ + 'with' + space + '(', + that.generateExpression(stmt.object, Precedence.Sequence, E_TTT), + ')' + ]; + }); + result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF)); + return result; + } + + }; + + merge(CodeGenerator.prototype, CodeGenerator.Statement); + + // Expressions. + + CodeGenerator.Expression = { + + SequenceExpression: function (expr, precedence, flags) { + var result, i, iz; + if (Precedence.Sequence < precedence) { + flags |= F_ALLOW_IN; + } + result = []; + for (i = 0, iz = expr.expressions.length; i < iz; ++i) { + result.push(this.generateExpression(expr.expressions[i], Precedence.Assignment, flags)); + if (i + 1 < iz) { + result.push(',' + space); + } + } + return parenthesize(result, Precedence.Sequence, precedence); + }, + + AssignmentExpression: function (expr, precedence, flags) { + return this.generateAssignment(expr.left, expr.right, expr.operator, precedence, flags); + }, + + ArrowFunctionExpression: function (expr, precedence, flags) { + return parenthesize(this.generateFunctionBody(expr), Precedence.ArrowFunction, precedence); + }, + + ConditionalExpression: function (expr, precedence, flags) { + if (Precedence.Conditional < precedence) { + flags |= F_ALLOW_IN; + } + return parenthesize( + [ + this.generateExpression(expr.test, Precedence.LogicalOR, flags), + space + '?' + space, + this.generateExpression(expr.consequent, Precedence.Assignment, flags), + space + ':' + space, + this.generateExpression(expr.alternate, Precedence.Assignment, flags) + ], + Precedence.Conditional, + precedence + ); + }, + + LogicalExpression: function (expr, precedence, flags) { + return this.BinaryExpression(expr, precedence, flags); + }, + + BinaryExpression: function (expr, precedence, flags) { + var result, leftPrecedence, rightPrecedence, currentPrecedence, fragment, leftSource; + currentPrecedence = BinaryPrecedence[expr.operator]; + leftPrecedence = expr.operator === '**' ? Precedence.Postfix : currentPrecedence; + rightPrecedence = expr.operator === '**' ? currentPrecedence : currentPrecedence + 1; + + if (currentPrecedence < precedence) { + flags |= F_ALLOW_IN; + } + + fragment = this.generateExpression(expr.left, leftPrecedence, flags); + + leftSource = fragment.toString(); + + if (leftSource.charCodeAt(leftSource.length - 1) === 0x2F /* / */ && esutils.code.isIdentifierPartES5(expr.operator.charCodeAt(0))) { + result = [fragment, noEmptySpace(), expr.operator]; + } else { + result = join(fragment, expr.operator); + } + + fragment = this.generateExpression(expr.right, rightPrecedence, flags); + + if (expr.operator === '/' && fragment.toString().charAt(0) === '/' || + expr.operator.slice(-1) === '<' && fragment.toString().slice(0, 3) === '!--') { + // If '/' concats with '/' or `<` concats with `!--`, it is interpreted as comment start + result.push(noEmptySpace()); + result.push(fragment); + } else { + result = join(result, fragment); + } + + if (expr.operator === 'in' && !(flags & F_ALLOW_IN)) { + return ['(', result, ')']; + } + return parenthesize(result, currentPrecedence, precedence); + }, + + CallExpression: function (expr, precedence, flags) { + var result, i, iz; + + // F_ALLOW_UNPARATH_NEW becomes false. + result = [this.generateExpression(expr.callee, Precedence.Call, E_TTF)]; + + if (expr.optional) { + result.push('?.'); + } + + result.push('('); + for (i = 0, iz = expr['arguments'].length; i < iz; ++i) { + result.push(this.generateExpression(expr['arguments'][i], Precedence.Assignment, E_TTT)); + if (i + 1 < iz) { + result.push(',' + space); + } + } + result.push(')'); + + if (!(flags & F_ALLOW_CALL)) { + return ['(', result, ')']; + } + + return parenthesize(result, Precedence.Call, precedence); + }, + + ChainExpression: function (expr, precedence, flags) { + if (Precedence.OptionalChaining < precedence) { + flags |= F_ALLOW_CALL; + } + + var result = this.generateExpression(expr.expression, Precedence.OptionalChaining, flags); + + return parenthesize(result, Precedence.OptionalChaining, precedence); + }, + + NewExpression: function (expr, precedence, flags) { + var result, length, i, iz, itemFlags; + length = expr['arguments'].length; + + // F_ALLOW_CALL becomes false. + // F_ALLOW_UNPARATH_NEW may become false. + itemFlags = (flags & F_ALLOW_UNPARATH_NEW && !parentheses && length === 0) ? E_TFT : E_TFF; + + result = join( + 'new', + this.generateExpression(expr.callee, Precedence.New, itemFlags) + ); + + if (!(flags & F_ALLOW_UNPARATH_NEW) || parentheses || length > 0) { + result.push('('); + for (i = 0, iz = length; i < iz; ++i) { + result.push(this.generateExpression(expr['arguments'][i], Precedence.Assignment, E_TTT)); + if (i + 1 < iz) { + result.push(',' + space); + } + } + result.push(')'); + } + + return parenthesize(result, Precedence.New, precedence); + }, + + MemberExpression: function (expr, precedence, flags) { + var result, fragment; + + // F_ALLOW_UNPARATH_NEW becomes false. + result = [this.generateExpression(expr.object, Precedence.Call, (flags & F_ALLOW_CALL) ? E_TTF : E_TFF)]; + + if (expr.computed) { + if (expr.optional) { + result.push('?.'); + } + + result.push('['); + result.push(this.generateExpression(expr.property, Precedence.Sequence, flags & F_ALLOW_CALL ? E_TTT : E_TFT)); + result.push(']'); + } else { + if (!expr.optional && expr.object.type === Syntax.Literal && typeof expr.object.value === 'number') { + fragment = toSourceNodeWhenNeeded(result).toString(); + // When the following conditions are all true, + // 1. No floating point + // 2. Don't have exponents + // 3. The last character is a decimal digit + // 4. Not hexadecimal OR octal number literal + // we should add a floating point. + if ( + fragment.indexOf('.') < 0 && + !/[eExX]/.test(fragment) && + esutils.code.isDecimalDigit(fragment.charCodeAt(fragment.length - 1)) && + !(fragment.length >= 2 && fragment.charCodeAt(0) === 48) // '0' + ) { + result.push(' '); + } + } + result.push(expr.optional ? '?.' : '.'); + result.push(generateIdentifier(expr.property)); + } + + return parenthesize(result, Precedence.Member, precedence); + }, + + MetaProperty: function (expr, precedence, flags) { + var result; + result = []; + result.push(typeof expr.meta === "string" ? expr.meta : generateIdentifier(expr.meta)); + result.push('.'); + result.push(typeof expr.property === "string" ? expr.property : generateIdentifier(expr.property)); + return parenthesize(result, Precedence.Member, precedence); + }, + + UnaryExpression: function (expr, precedence, flags) { + var result, fragment, rightCharCode, leftSource, leftCharCode; + fragment = this.generateExpression(expr.argument, Precedence.Unary, E_TTT); + + if (space === '') { + result = join(expr.operator, fragment); + } else { + result = [expr.operator]; + if (expr.operator.length > 2) { + // delete, void, typeof + // get `typeof []`, not `typeof[]` + result = join(result, fragment); + } else { + // Prevent inserting spaces between operator and argument if it is unnecessary + // like, `!cond` + leftSource = toSourceNodeWhenNeeded(result).toString(); + leftCharCode = leftSource.charCodeAt(leftSource.length - 1); + rightCharCode = fragment.toString().charCodeAt(0); + + if (((leftCharCode === 0x2B /* + */ || leftCharCode === 0x2D /* - */) && leftCharCode === rightCharCode) || + (esutils.code.isIdentifierPartES5(leftCharCode) && esutils.code.isIdentifierPartES5(rightCharCode))) { + result.push(noEmptySpace()); + result.push(fragment); + } else { + result.push(fragment); + } + } + } + return parenthesize(result, Precedence.Unary, precedence); + }, + + YieldExpression: function (expr, precedence, flags) { + var result; + if (expr.delegate) { + result = 'yield*'; + } else { + result = 'yield'; + } + if (expr.argument) { + result = join( + result, + this.generateExpression(expr.argument, Precedence.Yield, E_TTT) + ); + } + return parenthesize(result, Precedence.Yield, precedence); + }, + + AwaitExpression: function (expr, precedence, flags) { + var result = join( + expr.all ? 'await*' : 'await', + this.generateExpression(expr.argument, Precedence.Await, E_TTT) + ); + return parenthesize(result, Precedence.Await, precedence); + }, + + UpdateExpression: function (expr, precedence, flags) { + if (expr.prefix) { + return parenthesize( + [ + expr.operator, + this.generateExpression(expr.argument, Precedence.Unary, E_TTT) + ], + Precedence.Unary, + precedence + ); + } + return parenthesize( + [ + this.generateExpression(expr.argument, Precedence.Postfix, E_TTT), + expr.operator + ], + Precedence.Postfix, + precedence + ); + }, + + FunctionExpression: function (expr, precedence, flags) { + var result = [ + generateAsyncPrefix(expr, true), + 'function' + ]; + if (expr.id) { + result.push(generateStarSuffix(expr) || noEmptySpace()); + result.push(generateIdentifier(expr.id)); + } else { + result.push(generateStarSuffix(expr) || space); + } + result.push(this.generateFunctionBody(expr)); + return result; + }, + + ArrayPattern: function (expr, precedence, flags) { + return this.ArrayExpression(expr, precedence, flags, true); + }, + + ArrayExpression: function (expr, precedence, flags, isPattern) { + var result, multiline, that = this; + if (!expr.elements.length) { + return '[]'; + } + multiline = isPattern ? false : expr.elements.length > 1; + result = ['[', multiline ? newline : '']; + withIndent(function (indent) { + var i, iz; + for (i = 0, iz = expr.elements.length; i < iz; ++i) { + if (!expr.elements[i]) { + if (multiline) { + result.push(indent); + } + if (i + 1 === iz) { + result.push(','); + } + } else { + result.push(multiline ? indent : ''); + result.push(that.generateExpression(expr.elements[i], Precedence.Assignment, E_TTT)); + } + if (i + 1 < iz) { + result.push(',' + (multiline ? newline : space)); + } + } + }); + if (multiline && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { + result.push(newline); + } + result.push(multiline ? base : ''); + result.push(']'); + return result; + }, + + RestElement: function(expr, precedence, flags) { + return '...' + this.generatePattern(expr.argument); + }, + + ClassExpression: function (expr, precedence, flags) { + var result, fragment; + result = ['class']; + if (expr.id) { + result = join(result, this.generateExpression(expr.id, Precedence.Sequence, E_TTT)); + } + if (expr.superClass) { + fragment = join('extends', this.generateExpression(expr.superClass, Precedence.Unary, E_TTT)); + result = join(result, fragment); + } + result.push(space); + result.push(this.generateStatement(expr.body, S_TFFT)); + return result; + }, + + MethodDefinition: function (expr, precedence, flags) { + var result, fragment; + if (expr['static']) { + result = ['static' + space]; + } else { + result = []; + } + if (expr.kind === 'get' || expr.kind === 'set') { + fragment = [ + join(expr.kind, this.generatePropertyKey(expr.key, expr.computed)), + this.generateFunctionBody(expr.value) + ]; + } else { + fragment = [ + generateMethodPrefix(expr), + this.generatePropertyKey(expr.key, expr.computed), + this.generateFunctionBody(expr.value) + ]; + } + return join(result, fragment); + }, + + Property: function (expr, precedence, flags) { + if (expr.kind === 'get' || expr.kind === 'set') { + return [ + expr.kind, noEmptySpace(), + this.generatePropertyKey(expr.key, expr.computed), + this.generateFunctionBody(expr.value) + ]; + } + + if (expr.shorthand) { + if (expr.value.type === "AssignmentPattern") { + return this.AssignmentPattern(expr.value, Precedence.Sequence, E_TTT); + } + return this.generatePropertyKey(expr.key, expr.computed); + } + + if (expr.method) { + return [ + generateMethodPrefix(expr), + this.generatePropertyKey(expr.key, expr.computed), + this.generateFunctionBody(expr.value) + ]; + } + + return [ + this.generatePropertyKey(expr.key, expr.computed), + ':' + space, + this.generateExpression(expr.value, Precedence.Assignment, E_TTT) + ]; + }, + + ObjectExpression: function (expr, precedence, flags) { + var multiline, result, fragment, that = this; + + if (!expr.properties.length) { + return '{}'; + } + multiline = expr.properties.length > 1; + + withIndent(function () { + fragment = that.generateExpression(expr.properties[0], Precedence.Sequence, E_TTT); + }); + + if (!multiline) { + // issues 4 + // Do not transform from + // dejavu.Class.declare({ + // method2: function () {} + // }); + // to + // dejavu.Class.declare({method2: function () { + // }}); + if (!hasLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { + return [ '{', space, fragment, space, '}' ]; + } + } + + withIndent(function (indent) { + var i, iz; + result = [ '{', newline, indent, fragment ]; + + if (multiline) { + result.push(',' + newline); + for (i = 1, iz = expr.properties.length; i < iz; ++i) { + result.push(indent); + result.push(that.generateExpression(expr.properties[i], Precedence.Sequence, E_TTT)); + if (i + 1 < iz) { + result.push(',' + newline); + } + } + } + }); + + if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { + result.push(newline); + } + result.push(base); + result.push('}'); + return result; + }, + + AssignmentPattern: function(expr, precedence, flags) { + return this.generateAssignment(expr.left, expr.right, '=', precedence, flags); + }, + + ObjectPattern: function (expr, precedence, flags) { + var result, i, iz, multiline, property, that = this; + if (!expr.properties.length) { + return '{}'; + } + + multiline = false; + if (expr.properties.length === 1) { + property = expr.properties[0]; + if ( + property.type === Syntax.Property + && property.value.type !== Syntax.Identifier + ) { + multiline = true; + } + } else { + for (i = 0, iz = expr.properties.length; i < iz; ++i) { + property = expr.properties[i]; + if ( + property.type === Syntax.Property + && !property.shorthand + ) { + multiline = true; + break; + } + } + } + result = ['{', multiline ? newline : '' ]; + + withIndent(function (indent) { + var i, iz; + for (i = 0, iz = expr.properties.length; i < iz; ++i) { + result.push(multiline ? indent : ''); + result.push(that.generateExpression(expr.properties[i], Precedence.Sequence, E_TTT)); + if (i + 1 < iz) { + result.push(',' + (multiline ? newline : space)); + } + } + }); + + if (multiline && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { + result.push(newline); + } + result.push(multiline ? base : ''); + result.push('}'); + return result; + }, + + ThisExpression: function (expr, precedence, flags) { + return 'this'; + }, + + Super: function (expr, precedence, flags) { + return 'super'; + }, + + Identifier: function (expr, precedence, flags) { + return generateIdentifier(expr); + }, + + ImportDefaultSpecifier: function (expr, precedence, flags) { + return generateIdentifier(expr.id || expr.local); + }, + + ImportNamespaceSpecifier: function (expr, precedence, flags) { + var result = ['*']; + var id = expr.id || expr.local; + if (id) { + result.push(space + 'as' + noEmptySpace() + generateIdentifier(id)); + } + return result; + }, + + ImportSpecifier: function (expr, precedence, flags) { + var imported = expr.imported; + var result = [ imported.name ]; + var local = expr.local; + if (local && local.name !== imported.name) { + result.push(noEmptySpace() + 'as' + noEmptySpace() + generateIdentifier(local)); + } + return result; + }, + + ExportSpecifier: function (expr, precedence, flags) { + var local = expr.local; + var result = [ local.name ]; + var exported = expr.exported; + if (exported && exported.name !== local.name) { + result.push(noEmptySpace() + 'as' + noEmptySpace() + generateIdentifier(exported)); + } + return result; + }, + + Literal: function (expr, precedence, flags) { + var raw; + if (expr.hasOwnProperty('raw') && parse && extra.raw) { + try { + raw = parse(expr.raw).body[0].expression; + if (raw.type === Syntax.Literal) { + if (raw.value === expr.value) { + return expr.raw; + } + } + } catch (e) { + // not use raw property + } + } + + if (expr.regex) { + return '/' + expr.regex.pattern + '/' + expr.regex.flags; + } + + if (expr.value === null) { + return 'null'; + } + + if (typeof expr.value === 'string') { + return escapeString(expr.value); + } + + if (typeof expr.value === 'number') { + return generateNumber(expr.value); + } + + if (typeof expr.value === 'boolean') { + return expr.value ? 'true' : 'false'; + } + + return generateRegExp(expr.value); + }, + + GeneratorExpression: function (expr, precedence, flags) { + return this.ComprehensionExpression(expr, precedence, flags); + }, + + ComprehensionExpression: function (expr, precedence, flags) { + // GeneratorExpression should be parenthesized with (...), ComprehensionExpression with [...] + // Due to https://bugzilla.mozilla.org/show_bug.cgi?id=883468 position of expr.body can differ in Spidermonkey and ES6 + + var result, i, iz, fragment, that = this; + result = (expr.type === Syntax.GeneratorExpression) ? ['('] : ['[']; + + if (extra.moz.comprehensionExpressionStartsWithAssignment) { + fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT); + result.push(fragment); + } + + if (expr.blocks) { + withIndent(function () { + for (i = 0, iz = expr.blocks.length; i < iz; ++i) { + fragment = that.generateExpression(expr.blocks[i], Precedence.Sequence, E_TTT); + if (i > 0 || extra.moz.comprehensionExpressionStartsWithAssignment) { + result = join(result, fragment); + } else { + result.push(fragment); + } + } + }); + } + + if (expr.filter) { + result = join(result, 'if' + space); + fragment = this.generateExpression(expr.filter, Precedence.Sequence, E_TTT); + result = join(result, [ '(', fragment, ')' ]); + } + + if (!extra.moz.comprehensionExpressionStartsWithAssignment) { + fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT); + + result = join(result, fragment); + } + + result.push((expr.type === Syntax.GeneratorExpression) ? ')' : ']'); + return result; + }, + + ComprehensionBlock: function (expr, precedence, flags) { + var fragment; + if (expr.left.type === Syntax.VariableDeclaration) { + fragment = [ + expr.left.kind, noEmptySpace(), + this.generateStatement(expr.left.declarations[0], S_FFFF) + ]; + } else { + fragment = this.generateExpression(expr.left, Precedence.Call, E_TTT); + } + + fragment = join(fragment, expr.of ? 'of' : 'in'); + fragment = join(fragment, this.generateExpression(expr.right, Precedence.Sequence, E_TTT)); + + return [ 'for' + space + '(', fragment, ')' ]; + }, + + SpreadElement: function (expr, precedence, flags) { + return [ + '...', + this.generateExpression(expr.argument, Precedence.Assignment, E_TTT) + ]; + }, + + TaggedTemplateExpression: function (expr, precedence, flags) { + var itemFlags = E_TTF; + if (!(flags & F_ALLOW_CALL)) { + itemFlags = E_TFF; + } + var result = [ + this.generateExpression(expr.tag, Precedence.Call, itemFlags), + this.generateExpression(expr.quasi, Precedence.Primary, E_FFT) + ]; + return parenthesize(result, Precedence.TaggedTemplate, precedence); + }, + + TemplateElement: function (expr, precedence, flags) { + // Don't use "cooked". Since tagged template can use raw template + // representation. So if we do so, it breaks the script semantics. + return expr.value.raw; + }, + + TemplateLiteral: function (expr, precedence, flags) { + var result, i, iz; + result = [ '`' ]; + for (i = 0, iz = expr.quasis.length; i < iz; ++i) { + result.push(this.generateExpression(expr.quasis[i], Precedence.Primary, E_TTT)); + if (i + 1 < iz) { + result.push('${' + space); + result.push(this.generateExpression(expr.expressions[i], Precedence.Sequence, E_TTT)); + result.push(space + '}'); + } + } + result.push('`'); + return result; + }, + + ModuleSpecifier: function (expr, precedence, flags) { + return this.Literal(expr, precedence, flags); + }, + + ImportExpression: function(expr, precedence, flag) { + return parenthesize([ + 'import(', + this.generateExpression(expr.source, Precedence.Assignment, E_TTT), + ')' + ], Precedence.Call, precedence); + } + }; + + merge(CodeGenerator.prototype, CodeGenerator.Expression); + + CodeGenerator.prototype.generateExpression = function (expr, precedence, flags) { + var result, type; + + type = expr.type || Syntax.Property; + + if (extra.verbatim && expr.hasOwnProperty(extra.verbatim)) { + return generateVerbatim(expr, precedence); + } + + result = this[type](expr, precedence, flags); + + + if (extra.comment) { + result = addComments(expr, result); + } + return toSourceNodeWhenNeeded(result, expr); + }; + + CodeGenerator.prototype.generateStatement = function (stmt, flags) { + var result, + fragment; + + result = this[stmt.type](stmt, flags); + + // Attach comments + + if (extra.comment) { + result = addComments(stmt, result); + } + + fragment = toSourceNodeWhenNeeded(result).toString(); + if (stmt.type === Syntax.Program && !safeConcatenation && newline === '' && fragment.charAt(fragment.length - 1) === '\n') { + result = sourceMap ? toSourceNodeWhenNeeded(result).replaceRight(/\s+$/, '') : fragment.replace(/\s+$/, ''); + } + + return toSourceNodeWhenNeeded(result, stmt); + }; + + function generateInternal(node) { + var codegen; + + codegen = new CodeGenerator(); + if (isStatement(node)) { + return codegen.generateStatement(node, S_TFFF); + } + + if (isExpression(node)) { + return codegen.generateExpression(node, Precedence.Sequence, E_TTT); + } + + throw new Error('Unknown node type: ' + node.type); + } + + function generate(node, options) { + var defaultOptions = getDefaultOptions(), result, pair; + + if (options != null) { + // Obsolete options + // + // `options.indent` + // `options.base` + // + // Instead of them, we can use `option.format.indent`. + if (typeof options.indent === 'string') { + defaultOptions.format.indent.style = options.indent; + } + if (typeof options.base === 'number') { + defaultOptions.format.indent.base = options.base; + } + options = updateDeeply(defaultOptions, options); + indent = options.format.indent.style; + if (typeof options.base === 'string') { + base = options.base; + } else { + base = stringRepeat(indent, options.format.indent.base); + } + } else { + options = defaultOptions; + indent = options.format.indent.style; + base = stringRepeat(indent, options.format.indent.base); + } + json = options.format.json; + renumber = options.format.renumber; + hexadecimal = json ? false : options.format.hexadecimal; + quotes = json ? 'double' : options.format.quotes; + escapeless = options.format.escapeless; + newline = options.format.newline; + space = options.format.space; + if (options.format.compact) { + newline = space = indent = base = ''; + } + parentheses = options.format.parentheses; + semicolons = options.format.semicolons; + safeConcatenation = options.format.safeConcatenation; + directive = options.directive; + parse = json ? null : options.parse; + sourceMap = options.sourceMap; + sourceCode = options.sourceCode; + preserveBlankLines = options.format.preserveBlankLines && sourceCode !== null; + extra = options; + + if (sourceMap) { + if (!exports.browser) { + // We assume environment is node.js + // And prevent from including source-map by browserify + SourceNode = require('source-map').SourceNode; + } else { + SourceNode = global.sourceMap.SourceNode; + } + } + + result = generateInternal(node); + + if (!sourceMap) { + pair = {code: result.toString(), map: null}; + return options.sourceMapWithCode ? pair : pair.code; + } + + + pair = result.toStringWithSourceMap({ + file: options.file, + sourceRoot: options.sourceMapRoot + }); + + if (options.sourceContent) { + pair.map.setSourceContent(options.sourceMap, + options.sourceContent); + } + + if (options.sourceMapWithCode) { + return pair; + } + + return pair.map.toString(); + } + + FORMAT_MINIFY = { + indent: { + style: '', + base: 0 + }, + renumber: true, + hexadecimal: true, + quotes: 'auto', + escapeless: true, + compact: true, + parentheses: false, + semicolons: false + }; + + FORMAT_DEFAULTS = getDefaultOptions().format; + + exports.version = require('./package.json').version; + exports.generate = generate; + exports.attachComments = estraverse.attachComments; + exports.Precedence = updateDeeply({}, Precedence); + exports.browser = false; + exports.FORMAT_MINIFY = FORMAT_MINIFY; + exports.FORMAT_DEFAULTS = FORMAT_DEFAULTS; +}()); +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/escodegen/package.json b/node_modules/escodegen/package.json new file mode 100644 index 0000000..73307cc --- /dev/null +++ b/node_modules/escodegen/package.json @@ -0,0 +1,62 @@ +{ + "name": "escodegen", + "description": "ECMAScript code generator", + "homepage": "http://github.com/estools/escodegen", + "main": "escodegen.js", + "bin": { + "esgenerate": "./bin/esgenerate.js", + "escodegen": "./bin/escodegen.js" + }, + "files": [ + "LICENSE.BSD", + "README.md", + "bin", + "escodegen.js", + "package.json" + ], + "version": "2.0.0", + "engines": { + "node": ">=6.0" + }, + "maintainers": [ + { + "name": "Yusuke Suzuki", + "email": "utatane.tea@gmail.com", + "web": "http://github.com/Constellation" + } + ], + "repository": { + "type": "git", + "url": "http://github.com/estools/escodegen.git" + }, + "dependencies": { + "estraverse": "^5.2.0", + "esutils": "^2.0.2", + "esprima": "^4.0.1", + "optionator": "^0.8.1" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + }, + "devDependencies": { + "acorn": "^7.3.1", + "bluebird": "^3.4.7", + "bower-registry-client": "^1.0.0", + "chai": "^4.2.0", + "chai-exclude": "^2.0.2", + "commonjs-everywhere": "^0.9.7", + "gulp": "^3.8.10", + "gulp-eslint": "^3.0.1", + "gulp-mocha": "^3.0.1", + "semver": "^5.1.0" + }, + "license": "BSD-2-Clause", + "scripts": { + "test": "gulp travis", + "unit-test": "gulp test", + "lint": "gulp lint", + "release": "node tools/release.js", + "build-min": "./node_modules/.bin/cjsify -ma path: tools/entry-point.js > escodegen.browser.min.js", + "build": "./node_modules/.bin/cjsify -a path: tools/entry-point.js > escodegen.browser.js" + } +} diff --git a/node_modules/esprima/ChangeLog b/node_modules/esprima/ChangeLog new file mode 100644 index 0000000..fafe1c9 --- /dev/null +++ b/node_modules/esprima/ChangeLog @@ -0,0 +1,235 @@ +2018-06-17: Version 4.0.1 + + * Fix parsing async get/set in a class (issue 1861, 1875) + * Account for different return statement argument (issue 1829, 1897, 1928) + * Correct the handling of HTML comment when parsing a module (issue 1841) + * Fix incorrect parse async with proto-identifier-shorthand (issue 1847) + * Fix negative column in binary expression (issue 1844) + * Fix incorrect YieldExpression in object methods (issue 1834) + * Various documentation fixes + +2017-06-10: Version 4.0.0 + + * Support ES2017 async function and await expression (issue 1079) + * Support ES2017 trailing commas in function parameters (issue 1550) + * Explicitly distinguish parsing a module vs a script (issue 1576) + * Fix JSX non-empty container (issue 1786) + * Allow JSX element in a yield expression (issue 1765) + * Allow `in` expression in a concise body with a function body (issue 1793) + * Setter function argument must not be a rest parameter (issue 1693) + * Limit strict mode directive to functions with a simple parameter list (issue 1677) + * Prohibit any escape sequence in a reserved word (issue 1612) + * Only permit hex digits in hex escape sequence (issue 1619) + * Prohibit labelled class/generator/function declaration (issue 1484) + * Limit function declaration as if statement clause only in non-strict mode (issue 1657) + * Tolerate missing ) in a with and do-while statement (issue 1481) + +2016-12-22: Version 3.1.3 + + * Support binding patterns as rest element (issue 1681) + * Account for different possible arguments of a yield expression (issue 1469) + +2016-11-24: Version 3.1.2 + + * Ensure that import specifier is more restrictive (issue 1615) + * Fix duplicated JSX tokens (issue 1613) + * Scan template literal in a JSX expression container (issue 1622) + * Improve XHTML entity scanning in JSX (issue 1629) + +2016-10-31: Version 3.1.1 + + * Fix assignment expression problem in an export declaration (issue 1596) + * Fix incorrect tokenization of hex digits (issue 1605) + +2016-10-09: Version 3.1.0 + + * Do not implicitly collect comments when comment attachment is specified (issue 1553) + * Fix incorrect handling of duplicated proto shorthand fields (issue 1485) + * Prohibit initialization in some variants of for statements (issue 1309, 1561) + * Fix incorrect parsing of export specifier (issue 1578) + * Fix ESTree compatibility for assignment pattern (issue 1575) + +2016-09-03: Version 3.0.0 + + * Support ES2016 exponentiation expression (issue 1490) + * Support JSX syntax (issue 1467) + * Use the latest Unicode 8.0 (issue 1475) + * Add the support for syntax node delegate (issue 1435) + * Fix ESTree compatibility on meta property (issue 1338) + * Fix ESTree compatibility on default parameter value (issue 1081) + * Fix ESTree compatibility on try handler (issue 1030) + +2016-08-23: Version 2.7.3 + + * Fix tokenizer confusion with a comment (issue 1493, 1516) + +2016-02-02: Version 2.7.2 + + * Fix out-of-bound error location in an invalid string literal (issue 1457) + * Fix shorthand object destructuring defaults in variable declarations (issue 1459) + +2015-12-10: Version 2.7.1 + + * Do not allow trailing comma in a variable declaration (issue 1360) + * Fix assignment to `let` in non-strict mode (issue 1376) + * Fix missing delegate property in YieldExpression (issue 1407) + +2015-10-22: Version 2.7.0 + + * Fix the handling of semicolon in a break statement (issue 1044) + * Run the test suite with major web browsers (issue 1259, 1317) + * Allow `let` as an identifier in non-strict mode (issue 1289) + * Attach orphaned comments as `innerComments` (issue 1328) + * Add the support for token delegator (issue 1332) + +2015-09-01: Version 2.6.0 + + * Properly allow or prohibit `let` in a binding identifier/pattern (issue 1048, 1098) + * Add sourceType field for Program node (issue 1159) + * Ensure that strict mode reserved word binding throw an error (issue 1171) + * Run the test suite with Node.js and IE 11 on Windows (issue 1294) + * Allow binding pattern with no initializer in a for statement (issue 1301) + +2015-07-31: Version 2.5.0 + + * Run the test suite in a browser environment (issue 1004) + * Ensure a comma between imported default binding and named imports (issue 1046) + * Distinguish `yield` as a keyword vs an identifier (issue 1186) + * Support ES6 meta property `new.target` (issue 1203) + * Fix the syntax node for yield with expression (issue 1223) + * Fix the check of duplicated proto in property names (issue 1225) + * Fix ES6 Unicode escape in identifier name (issue 1229) + * Support ES6 IdentifierStart and IdentifierPart (issue 1232) + * Treat await as a reserved word when parsing as a module (issue 1234) + * Recognize identifier characters from Unicode SMP (issue 1244) + * Ensure that export and import can be followed by a comma (issue 1250) + * Fix yield operator precedence (issue 1262) + +2015-07-01: Version 2.4.1 + + * Fix some cases of comment attachment (issue 1071, 1175) + * Fix the handling of destructuring in function arguments (issue 1193) + * Fix invalid ranges in assignment expression (issue 1201) + +2015-06-26: Version 2.4.0 + + * Support ES6 for-of iteration (issue 1047) + * Support ES6 spread arguments (issue 1169) + * Minimize npm payload (issue 1191) + +2015-06-16: Version 2.3.0 + + * Support ES6 generator (issue 1033) + * Improve parsing of regular expressions with `u` flag (issue 1179) + +2015-04-17: Version 2.2.0 + + * Support ES6 import and export declarations (issue 1000) + * Fix line terminator before arrow not recognized as error (issue 1009) + * Support ES6 destructuring (issue 1045) + * Support ES6 template literal (issue 1074) + * Fix the handling of invalid/incomplete string escape sequences (issue 1106) + * Fix ES3 static member access restriction (issue 1120) + * Support for `super` in ES6 class (issue 1147) + +2015-03-09: Version 2.1.0 + + * Support ES6 class (issue 1001) + * Support ES6 rest parameter (issue 1011) + * Expand the location of property getter, setter, and methods (issue 1029) + * Enable TryStatement transition to a single handler (issue 1031) + * Support ES6 computed property name (issue 1037) + * Tolerate unclosed block comment (issue 1041) + * Support ES6 lexical declaration (issue 1065) + +2015-02-06: Version 2.0.0 + + * Support ES6 arrow function (issue 517) + * Support ES6 Unicode code point escape (issue 521) + * Improve the speed and accuracy of comment attachment (issue 522) + * Support ES6 default parameter (issue 519) + * Support ES6 regular expression flags (issue 557) + * Fix scanning of implicit octal literals (issue 565) + * Fix the handling of automatic semicolon insertion (issue 574) + * Support ES6 method definition (issue 620) + * Support ES6 octal integer literal (issue 621) + * Support ES6 binary integer literal (issue 622) + * Support ES6 object literal property value shorthand (issue 624) + +2015-03-03: Version 1.2.5 + + * Fix scanning of implicit octal literals (issue 565) + +2015-02-05: Version 1.2.4 + + * Fix parsing of LeftHandSideExpression in ForInStatement (issue 560) + * Fix the handling of automatic semicolon insertion (issue 574) + +2015-01-18: Version 1.2.3 + + * Fix division by this (issue 616) + +2014-05-18: Version 1.2.2 + + * Fix duplicated tokens when collecting comments (issue 537) + +2014-05-04: Version 1.2.1 + + * Ensure that Program node may still have leading comments (issue 536) + +2014-04-29: Version 1.2.0 + + * Fix semicolon handling for expression statement (issue 462, 533) + * Disallow escaped characters in regular expression flags (issue 503) + * Performance improvement for location tracking (issue 520) + * Improve the speed of comment attachment (issue 522) + +2014-03-26: Version 1.1.1 + + * Fix token handling of forward slash after an array literal (issue 512) + +2014-03-23: Version 1.1.0 + + * Optionally attach comments to the owning syntax nodes (issue 197) + * Simplify binary parsing with stack-based shift reduce (issue 352) + * Always include the raw source of literals (issue 376) + * Add optional input source information (issue 386) + * Tokenizer API for pure lexical scanning (issue 398) + * Improve the web site and its online demos (issue 337, 400, 404) + * Performance improvement for location tracking (issue 417, 424) + * Support HTML comment syntax (issue 451) + * Drop support for legacy browsers (issue 474) + +2013-08-27: Version 1.0.4 + + * Minimize the payload for packages (issue 362) + * Fix missing cases on an empty switch statement (issue 436) + * Support escaped ] in regexp literal character classes (issue 442) + * Tolerate invalid left-hand side expression (issue 130) + +2013-05-17: Version 1.0.3 + + * Variable declaration needs at least one declarator (issue 391) + * Fix benchmark's variance unit conversion (issue 397) + * IE < 9: \v should be treated as vertical tab (issue 405) + * Unary expressions should always have prefix: true (issue 418) + * Catch clause should only accept an identifier (issue 423) + * Tolerate setters without parameter (issue 426) + +2012-11-02: Version 1.0.2 + + Improvement: + + * Fix esvalidate JUnit output upon a syntax error (issue 374) + +2012-10-28: Version 1.0.1 + + Improvements: + + * esvalidate understands shebang in a Unix shell script (issue 361) + * esvalidate treats fatal parsing failure as an error (issue 361) + * Reduce Node.js package via .npmignore (issue 362) + +2012-10-22: Version 1.0.0 + + Initial release. diff --git a/node_modules/esprima/LICENSE.BSD b/node_modules/esprima/LICENSE.BSD new file mode 100644 index 0000000..7a55160 --- /dev/null +++ b/node_modules/esprima/LICENSE.BSD @@ -0,0 +1,21 @@ +Copyright JS Foundation and other contributors, https://js.foundation/ + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/esprima/README.md b/node_modules/esprima/README.md new file mode 100644 index 0000000..8fb25e6 --- /dev/null +++ b/node_modules/esprima/README.md @@ -0,0 +1,46 @@ +[![NPM version](https://img.shields.io/npm/v/esprima.svg)](https://www.npmjs.com/package/esprima) +[![npm download](https://img.shields.io/npm/dm/esprima.svg)](https://www.npmjs.com/package/esprima) +[![Build Status](https://img.shields.io/travis/jquery/esprima/master.svg)](https://travis-ci.org/jquery/esprima) +[![Coverage Status](https://img.shields.io/codecov/c/github/jquery/esprima/master.svg)](https://codecov.io/github/jquery/esprima) + +**Esprima** ([esprima.org](http://esprima.org), BSD license) is a high performance, +standard-compliant [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) +parser written in ECMAScript (also popularly known as +[JavaScript](https://en.wikipedia.org/wiki/JavaScript)). +Esprima is created and maintained by [Ariya Hidayat](https://twitter.com/ariyahidayat), +with the help of [many contributors](https://github.com/jquery/esprima/contributors). + +### Features + +- Full support for ECMAScript 2017 ([ECMA-262 8th Edition](http://www.ecma-international.org/publications/standards/Ecma-262.htm)) +- Sensible [syntax tree format](https://github.com/estree/estree/blob/master/es5.md) as standardized by [ESTree project](https://github.com/estree/estree) +- Experimental support for [JSX](https://facebook.github.io/jsx/), a syntax extension for [React](https://facebook.github.io/react/) +- Optional tracking of syntax node location (index-based and line-column) +- [Heavily tested](http://esprima.org/test/ci.html) (~1500 [unit tests](https://github.com/jquery/esprima/tree/master/test/fixtures) with [full code coverage](https://codecov.io/github/jquery/esprima)) + +### API + +Esprima can be used to perform [lexical analysis](https://en.wikipedia.org/wiki/Lexical_analysis) (tokenization) or [syntactic analysis](https://en.wikipedia.org/wiki/Parsing) (parsing) of a JavaScript program. + +A simple example on Node.js REPL: + +```javascript +> var esprima = require('esprima'); +> var program = 'const answer = 42'; + +> esprima.tokenize(program); +[ { type: 'Keyword', value: 'const' }, + { type: 'Identifier', value: 'answer' }, + { type: 'Punctuator', value: '=' }, + { type: 'Numeric', value: '42' } ] + +> esprima.parseScript(program); +{ type: 'Program', + body: + [ { type: 'VariableDeclaration', + declarations: [Object], + kind: 'const' } ], + sourceType: 'script' } +``` + +For more information, please read the [complete documentation](http://esprima.org/doc). \ No newline at end of file diff --git a/node_modules/esprima/bin/esparse.js b/node_modules/esprima/bin/esparse.js new file mode 100644 index 0000000..45d05fb --- /dev/null +++ b/node_modules/esprima/bin/esparse.js @@ -0,0 +1,139 @@ +#!/usr/bin/env node +/* + Copyright JS Foundation and other contributors, https://js.foundation/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint sloppy:true node:true rhino:true */ + +var fs, esprima, fname, forceFile, content, options, syntax; + +if (typeof require === 'function') { + fs = require('fs'); + try { + esprima = require('esprima'); + } catch (e) { + esprima = require('../'); + } +} else if (typeof load === 'function') { + try { + load('esprima.js'); + } catch (e) { + load('../esprima.js'); + } +} + +// Shims to Node.js objects when running under Rhino. +if (typeof console === 'undefined' && typeof process === 'undefined') { + console = { log: print }; + fs = { readFileSync: readFile }; + process = { argv: arguments, exit: quit }; + process.argv.unshift('esparse.js'); + process.argv.unshift('rhino'); +} + +function showUsage() { + console.log('Usage:'); + console.log(' esparse [options] [file.js]'); + console.log(); + console.log('Available options:'); + console.log(); + console.log(' --comment Gather all line and block comments in an array'); + console.log(' --loc Include line-column location info for each syntax node'); + console.log(' --range Include index-based range for each syntax node'); + console.log(' --raw Display the raw value of literals'); + console.log(' --tokens List all tokens in an array'); + console.log(' --tolerant Tolerate errors on a best-effort basis (experimental)'); + console.log(' -v, --version Shows program version'); + console.log(); + process.exit(1); +} + +options = {}; + +process.argv.splice(2).forEach(function (entry) { + + if (forceFile || entry === '-' || entry.slice(0, 1) !== '-') { + if (typeof fname === 'string') { + console.log('Error: more than one input file.'); + process.exit(1); + } else { + fname = entry; + } + } else if (entry === '-h' || entry === '--help') { + showUsage(); + } else if (entry === '-v' || entry === '--version') { + console.log('ECMAScript Parser (using Esprima version', esprima.version, ')'); + console.log(); + process.exit(0); + } else if (entry === '--comment') { + options.comment = true; + } else if (entry === '--loc') { + options.loc = true; + } else if (entry === '--range') { + options.range = true; + } else if (entry === '--raw') { + options.raw = true; + } else if (entry === '--tokens') { + options.tokens = true; + } else if (entry === '--tolerant') { + options.tolerant = true; + } else if (entry === '--') { + forceFile = true; + } else { + console.log('Error: unknown option ' + entry + '.'); + process.exit(1); + } +}); + +// Special handling for regular expression literal since we need to +// convert it to a string literal, otherwise it will be decoded +// as object "{}" and the regular expression would be lost. +function adjustRegexLiteral(key, value) { + if (key === 'value' && value instanceof RegExp) { + value = value.toString(); + } + return value; +} + +function run(content) { + syntax = esprima.parse(content, options); + console.log(JSON.stringify(syntax, adjustRegexLiteral, 4)); +} + +try { + if (fname && (fname !== '-' || forceFile)) { + run(fs.readFileSync(fname, 'utf-8')); + } else { + var content = ''; + process.stdin.resume(); + process.stdin.on('data', function(chunk) { + content += chunk; + }); + process.stdin.on('end', function() { + run(content); + }); + } +} catch (e) { + console.log('Error: ' + e.message); + process.exit(1); +} diff --git a/node_modules/esprima/bin/esvalidate.js b/node_modules/esprima/bin/esvalidate.js new file mode 100644 index 0000000..d49a7e4 --- /dev/null +++ b/node_modules/esprima/bin/esvalidate.js @@ -0,0 +1,236 @@ +#!/usr/bin/env node +/* + Copyright JS Foundation and other contributors, https://js.foundation/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint sloppy:true plusplus:true node:true rhino:true */ +/*global phantom:true */ + +var fs, system, esprima, options, fnames, forceFile, count; + +if (typeof esprima === 'undefined') { + // PhantomJS can only require() relative files + if (typeof phantom === 'object') { + fs = require('fs'); + system = require('system'); + esprima = require('./esprima'); + } else if (typeof require === 'function') { + fs = require('fs'); + try { + esprima = require('esprima'); + } catch (e) { + esprima = require('../'); + } + } else if (typeof load === 'function') { + try { + load('esprima.js'); + } catch (e) { + load('../esprima.js'); + } + } +} + +// Shims to Node.js objects when running under PhantomJS 1.7+. +if (typeof phantom === 'object') { + fs.readFileSync = fs.read; + process = { + argv: [].slice.call(system.args), + exit: phantom.exit, + on: function (evt, callback) { + callback(); + } + }; + process.argv.unshift('phantomjs'); +} + +// Shims to Node.js objects when running under Rhino. +if (typeof console === 'undefined' && typeof process === 'undefined') { + console = { log: print }; + fs = { readFileSync: readFile }; + process = { + argv: arguments, + exit: quit, + on: function (evt, callback) { + callback(); + } + }; + process.argv.unshift('esvalidate.js'); + process.argv.unshift('rhino'); +} + +function showUsage() { + console.log('Usage:'); + console.log(' esvalidate [options] [file.js...]'); + console.log(); + console.log('Available options:'); + console.log(); + console.log(' --format=type Set the report format, plain (default) or junit'); + console.log(' -v, --version Print program version'); + console.log(); + process.exit(1); +} + +options = { + format: 'plain' +}; + +fnames = []; + +process.argv.splice(2).forEach(function (entry) { + + if (forceFile || entry === '-' || entry.slice(0, 1) !== '-') { + fnames.push(entry); + } else if (entry === '-h' || entry === '--help') { + showUsage(); + } else if (entry === '-v' || entry === '--version') { + console.log('ECMAScript Validator (using Esprima version', esprima.version, ')'); + console.log(); + process.exit(0); + } else if (entry.slice(0, 9) === '--format=') { + options.format = entry.slice(9); + if (options.format !== 'plain' && options.format !== 'junit') { + console.log('Error: unknown report format ' + options.format + '.'); + process.exit(1); + } + } else if (entry === '--') { + forceFile = true; + } else { + console.log('Error: unknown option ' + entry + '.'); + process.exit(1); + } +}); + +if (fnames.length === 0) { + fnames.push(''); +} + +if (options.format === 'junit') { + console.log(''); + console.log(''); +} + +count = 0; + +function run(fname, content) { + var timestamp, syntax, name; + try { + if (typeof content !== 'string') { + throw content; + } + + if (content[0] === '#' && content[1] === '!') { + content = '//' + content.substr(2, content.length); + } + + timestamp = Date.now(); + syntax = esprima.parse(content, { tolerant: true }); + + if (options.format === 'junit') { + + name = fname; + if (name.lastIndexOf('/') >= 0) { + name = name.slice(name.lastIndexOf('/') + 1); + } + + console.log(''); + + syntax.errors.forEach(function (error) { + var msg = error.message; + msg = msg.replace(/^Line\ [0-9]*\:\ /, ''); + console.log(' '); + console.log(' ' + + error.message + '(' + name + ':' + error.lineNumber + ')' + + ''); + console.log(' '); + }); + + console.log(''); + + } else if (options.format === 'plain') { + + syntax.errors.forEach(function (error) { + var msg = error.message; + msg = msg.replace(/^Line\ [0-9]*\:\ /, ''); + msg = fname + ':' + error.lineNumber + ': ' + msg; + console.log(msg); + ++count; + }); + + } + } catch (e) { + ++count; + if (options.format === 'junit') { + console.log(''); + console.log(' '); + console.log(' ' + + e.message + '(' + fname + ((e.lineNumber) ? ':' + e.lineNumber : '') + + ')'); + console.log(' '); + console.log(''); + } else { + console.log(fname + ':' + e.lineNumber + ': ' + e.message.replace(/^Line\ [0-9]*\:\ /, '')); + } + } +} + +fnames.forEach(function (fname) { + var content = ''; + try { + if (fname && (fname !== '-' || forceFile)) { + content = fs.readFileSync(fname, 'utf-8'); + } else { + fname = ''; + process.stdin.resume(); + process.stdin.on('data', function(chunk) { + content += chunk; + }); + process.stdin.on('end', function() { + run(fname, content); + }); + return; + } + } catch (e) { + content = e; + } + run(fname, content); +}); + +process.on('exit', function () { + if (options.format === 'junit') { + console.log(''); + } + + if (count > 0) { + process.exit(1); + } + + if (count === 0 && typeof phantom === 'object') { + process.exit(0); + } +}); diff --git a/node_modules/esprima/dist/esprima.js b/node_modules/esprima/dist/esprima.js new file mode 100644 index 0000000..2af3eee --- /dev/null +++ b/node_modules/esprima/dist/esprima.js @@ -0,0 +1,6709 @@ +(function webpackUniversalModuleDefinition(root, factory) { +/* istanbul ignore next */ + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); +/* istanbul ignore next */ + else if(typeof exports === 'object') + exports["esprima"] = factory(); + else + root["esprima"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/* istanbul ignore if */ +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + /* + Copyright JS Foundation and other contributors, https://js.foundation/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + Object.defineProperty(exports, "__esModule", { value: true }); + var comment_handler_1 = __webpack_require__(1); + var jsx_parser_1 = __webpack_require__(3); + var parser_1 = __webpack_require__(8); + var tokenizer_1 = __webpack_require__(15); + function parse(code, options, delegate) { + var commentHandler = null; + var proxyDelegate = function (node, metadata) { + if (delegate) { + delegate(node, metadata); + } + if (commentHandler) { + commentHandler.visit(node, metadata); + } + }; + var parserDelegate = (typeof delegate === 'function') ? proxyDelegate : null; + var collectComment = false; + if (options) { + collectComment = (typeof options.comment === 'boolean' && options.comment); + var attachComment = (typeof options.attachComment === 'boolean' && options.attachComment); + if (collectComment || attachComment) { + commentHandler = new comment_handler_1.CommentHandler(); + commentHandler.attach = attachComment; + options.comment = true; + parserDelegate = proxyDelegate; + } + } + var isModule = false; + if (options && typeof options.sourceType === 'string') { + isModule = (options.sourceType === 'module'); + } + var parser; + if (options && typeof options.jsx === 'boolean' && options.jsx) { + parser = new jsx_parser_1.JSXParser(code, options, parserDelegate); + } + else { + parser = new parser_1.Parser(code, options, parserDelegate); + } + var program = isModule ? parser.parseModule() : parser.parseScript(); + var ast = program; + if (collectComment && commentHandler) { + ast.comments = commentHandler.comments; + } + if (parser.config.tokens) { + ast.tokens = parser.tokens; + } + if (parser.config.tolerant) { + ast.errors = parser.errorHandler.errors; + } + return ast; + } + exports.parse = parse; + function parseModule(code, options, delegate) { + var parsingOptions = options || {}; + parsingOptions.sourceType = 'module'; + return parse(code, parsingOptions, delegate); + } + exports.parseModule = parseModule; + function parseScript(code, options, delegate) { + var parsingOptions = options || {}; + parsingOptions.sourceType = 'script'; + return parse(code, parsingOptions, delegate); + } + exports.parseScript = parseScript; + function tokenize(code, options, delegate) { + var tokenizer = new tokenizer_1.Tokenizer(code, options); + var tokens; + tokens = []; + try { + while (true) { + var token = tokenizer.getNextToken(); + if (!token) { + break; + } + if (delegate) { + token = delegate(token); + } + tokens.push(token); + } + } + catch (e) { + tokenizer.errorHandler.tolerate(e); + } + if (tokenizer.errorHandler.tolerant) { + tokens.errors = tokenizer.errors(); + } + return tokens; + } + exports.tokenize = tokenize; + var syntax_1 = __webpack_require__(2); + exports.Syntax = syntax_1.Syntax; + // Sync with *.json manifests. + exports.version = '4.0.1'; + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var syntax_1 = __webpack_require__(2); + var CommentHandler = (function () { + function CommentHandler() { + this.attach = false; + this.comments = []; + this.stack = []; + this.leading = []; + this.trailing = []; + } + CommentHandler.prototype.insertInnerComments = function (node, metadata) { + // innnerComments for properties empty block + // `function a() {/** comments **\/}` + if (node.type === syntax_1.Syntax.BlockStatement && node.body.length === 0) { + var innerComments = []; + for (var i = this.leading.length - 1; i >= 0; --i) { + var entry = this.leading[i]; + if (metadata.end.offset >= entry.start) { + innerComments.unshift(entry.comment); + this.leading.splice(i, 1); + this.trailing.splice(i, 1); + } + } + if (innerComments.length) { + node.innerComments = innerComments; + } + } + }; + CommentHandler.prototype.findTrailingComments = function (metadata) { + var trailingComments = []; + if (this.trailing.length > 0) { + for (var i = this.trailing.length - 1; i >= 0; --i) { + var entry_1 = this.trailing[i]; + if (entry_1.start >= metadata.end.offset) { + trailingComments.unshift(entry_1.comment); + } + } + this.trailing.length = 0; + return trailingComments; + } + var entry = this.stack[this.stack.length - 1]; + if (entry && entry.node.trailingComments) { + var firstComment = entry.node.trailingComments[0]; + if (firstComment && firstComment.range[0] >= metadata.end.offset) { + trailingComments = entry.node.trailingComments; + delete entry.node.trailingComments; + } + } + return trailingComments; + }; + CommentHandler.prototype.findLeadingComments = function (metadata) { + var leadingComments = []; + var target; + while (this.stack.length > 0) { + var entry = this.stack[this.stack.length - 1]; + if (entry && entry.start >= metadata.start.offset) { + target = entry.node; + this.stack.pop(); + } + else { + break; + } + } + if (target) { + var count = target.leadingComments ? target.leadingComments.length : 0; + for (var i = count - 1; i >= 0; --i) { + var comment = target.leadingComments[i]; + if (comment.range[1] <= metadata.start.offset) { + leadingComments.unshift(comment); + target.leadingComments.splice(i, 1); + } + } + if (target.leadingComments && target.leadingComments.length === 0) { + delete target.leadingComments; + } + return leadingComments; + } + for (var i = this.leading.length - 1; i >= 0; --i) { + var entry = this.leading[i]; + if (entry.start <= metadata.start.offset) { + leadingComments.unshift(entry.comment); + this.leading.splice(i, 1); + } + } + return leadingComments; + }; + CommentHandler.prototype.visitNode = function (node, metadata) { + if (node.type === syntax_1.Syntax.Program && node.body.length > 0) { + return; + } + this.insertInnerComments(node, metadata); + var trailingComments = this.findTrailingComments(metadata); + var leadingComments = this.findLeadingComments(metadata); + if (leadingComments.length > 0) { + node.leadingComments = leadingComments; + } + if (trailingComments.length > 0) { + node.trailingComments = trailingComments; + } + this.stack.push({ + node: node, + start: metadata.start.offset + }); + }; + CommentHandler.prototype.visitComment = function (node, metadata) { + var type = (node.type[0] === 'L') ? 'Line' : 'Block'; + var comment = { + type: type, + value: node.value + }; + if (node.range) { + comment.range = node.range; + } + if (node.loc) { + comment.loc = node.loc; + } + this.comments.push(comment); + if (this.attach) { + var entry = { + comment: { + type: type, + value: node.value, + range: [metadata.start.offset, metadata.end.offset] + }, + start: metadata.start.offset + }; + if (node.loc) { + entry.comment.loc = node.loc; + } + node.type = type; + this.leading.push(entry); + this.trailing.push(entry); + } + }; + CommentHandler.prototype.visit = function (node, metadata) { + if (node.type === 'LineComment') { + this.visitComment(node, metadata); + } + else if (node.type === 'BlockComment') { + this.visitComment(node, metadata); + } + else if (this.attach) { + this.visitNode(node, metadata); + } + }; + return CommentHandler; + }()); + exports.CommentHandler = CommentHandler; + + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Syntax = { + AssignmentExpression: 'AssignmentExpression', + AssignmentPattern: 'AssignmentPattern', + ArrayExpression: 'ArrayExpression', + ArrayPattern: 'ArrayPattern', + ArrowFunctionExpression: 'ArrowFunctionExpression', + AwaitExpression: 'AwaitExpression', + BlockStatement: 'BlockStatement', + BinaryExpression: 'BinaryExpression', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ClassBody: 'ClassBody', + ClassDeclaration: 'ClassDeclaration', + ClassExpression: 'ClassExpression', + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DoWhileStatement: 'DoWhileStatement', + DebuggerStatement: 'DebuggerStatement', + EmptyStatement: 'EmptyStatement', + ExportAllDeclaration: 'ExportAllDeclaration', + ExportDefaultDeclaration: 'ExportDefaultDeclaration', + ExportNamedDeclaration: 'ExportNamedDeclaration', + ExportSpecifier: 'ExportSpecifier', + ExpressionStatement: 'ExpressionStatement', + ForStatement: 'ForStatement', + ForOfStatement: 'ForOfStatement', + ForInStatement: 'ForInStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + Identifier: 'Identifier', + IfStatement: 'IfStatement', + ImportDeclaration: 'ImportDeclaration', + ImportDefaultSpecifier: 'ImportDefaultSpecifier', + ImportNamespaceSpecifier: 'ImportNamespaceSpecifier', + ImportSpecifier: 'ImportSpecifier', + Literal: 'Literal', + LabeledStatement: 'LabeledStatement', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + MetaProperty: 'MetaProperty', + MethodDefinition: 'MethodDefinition', + NewExpression: 'NewExpression', + ObjectExpression: 'ObjectExpression', + ObjectPattern: 'ObjectPattern', + Program: 'Program', + Property: 'Property', + RestElement: 'RestElement', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SpreadElement: 'SpreadElement', + Super: 'Super', + SwitchCase: 'SwitchCase', + SwitchStatement: 'SwitchStatement', + TaggedTemplateExpression: 'TaggedTemplateExpression', + TemplateElement: 'TemplateElement', + TemplateLiteral: 'TemplateLiteral', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TryStatement: 'TryStatement', + UnaryExpression: 'UnaryExpression', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement', + YieldExpression: 'YieldExpression' + }; + + +/***/ }, +/* 3 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; +/* istanbul ignore next */ + var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + var character_1 = __webpack_require__(4); + var JSXNode = __webpack_require__(5); + var jsx_syntax_1 = __webpack_require__(6); + var Node = __webpack_require__(7); + var parser_1 = __webpack_require__(8); + var token_1 = __webpack_require__(13); + var xhtml_entities_1 = __webpack_require__(14); + token_1.TokenName[100 /* Identifier */] = 'JSXIdentifier'; + token_1.TokenName[101 /* Text */] = 'JSXText'; + // Fully qualified element name, e.g. returns "svg:path" + function getQualifiedElementName(elementName) { + var qualifiedName; + switch (elementName.type) { + case jsx_syntax_1.JSXSyntax.JSXIdentifier: + var id = elementName; + qualifiedName = id.name; + break; + case jsx_syntax_1.JSXSyntax.JSXNamespacedName: + var ns = elementName; + qualifiedName = getQualifiedElementName(ns.namespace) + ':' + + getQualifiedElementName(ns.name); + break; + case jsx_syntax_1.JSXSyntax.JSXMemberExpression: + var expr = elementName; + qualifiedName = getQualifiedElementName(expr.object) + '.' + + getQualifiedElementName(expr.property); + break; + /* istanbul ignore next */ + default: + break; + } + return qualifiedName; + } + var JSXParser = (function (_super) { + __extends(JSXParser, _super); + function JSXParser(code, options, delegate) { + return _super.call(this, code, options, delegate) || this; + } + JSXParser.prototype.parsePrimaryExpression = function () { + return this.match('<') ? this.parseJSXRoot() : _super.prototype.parsePrimaryExpression.call(this); + }; + JSXParser.prototype.startJSX = function () { + // Unwind the scanner before the lookahead token. + this.scanner.index = this.startMarker.index; + this.scanner.lineNumber = this.startMarker.line; + this.scanner.lineStart = this.startMarker.index - this.startMarker.column; + }; + JSXParser.prototype.finishJSX = function () { + // Prime the next lookahead. + this.nextToken(); + }; + JSXParser.prototype.reenterJSX = function () { + this.startJSX(); + this.expectJSX('}'); + // Pop the closing '}' added from the lookahead. + if (this.config.tokens) { + this.tokens.pop(); + } + }; + JSXParser.prototype.createJSXNode = function () { + this.collectComments(); + return { + index: this.scanner.index, + line: this.scanner.lineNumber, + column: this.scanner.index - this.scanner.lineStart + }; + }; + JSXParser.prototype.createJSXChildNode = function () { + return { + index: this.scanner.index, + line: this.scanner.lineNumber, + column: this.scanner.index - this.scanner.lineStart + }; + }; + JSXParser.prototype.scanXHTMLEntity = function (quote) { + var result = '&'; + var valid = true; + var terminated = false; + var numeric = false; + var hex = false; + while (!this.scanner.eof() && valid && !terminated) { + var ch = this.scanner.source[this.scanner.index]; + if (ch === quote) { + break; + } + terminated = (ch === ';'); + result += ch; + ++this.scanner.index; + if (!terminated) { + switch (result.length) { + case 2: + // e.g. '{' + numeric = (ch === '#'); + break; + case 3: + if (numeric) { + // e.g. 'A' + hex = (ch === 'x'); + valid = hex || character_1.Character.isDecimalDigit(ch.charCodeAt(0)); + numeric = numeric && !hex; + } + break; + default: + valid = valid && !(numeric && !character_1.Character.isDecimalDigit(ch.charCodeAt(0))); + valid = valid && !(hex && !character_1.Character.isHexDigit(ch.charCodeAt(0))); + break; + } + } + } + if (valid && terminated && result.length > 2) { + // e.g. 'A' becomes just '#x41' + var str = result.substr(1, result.length - 2); + if (numeric && str.length > 1) { + result = String.fromCharCode(parseInt(str.substr(1), 10)); + } + else if (hex && str.length > 2) { + result = String.fromCharCode(parseInt('0' + str.substr(1), 16)); + } + else if (!numeric && !hex && xhtml_entities_1.XHTMLEntities[str]) { + result = xhtml_entities_1.XHTMLEntities[str]; + } + } + return result; + }; + // Scan the next JSX token. This replaces Scanner#lex when in JSX mode. + JSXParser.prototype.lexJSX = function () { + var cp = this.scanner.source.charCodeAt(this.scanner.index); + // < > / : = { } + if (cp === 60 || cp === 62 || cp === 47 || cp === 58 || cp === 61 || cp === 123 || cp === 125) { + var value = this.scanner.source[this.scanner.index++]; + return { + type: 7 /* Punctuator */, + value: value, + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start: this.scanner.index - 1, + end: this.scanner.index + }; + } + // " ' + if (cp === 34 || cp === 39) { + var start = this.scanner.index; + var quote = this.scanner.source[this.scanner.index++]; + var str = ''; + while (!this.scanner.eof()) { + var ch = this.scanner.source[this.scanner.index++]; + if (ch === quote) { + break; + } + else if (ch === '&') { + str += this.scanXHTMLEntity(quote); + } + else { + str += ch; + } + } + return { + type: 8 /* StringLiteral */, + value: str, + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start: start, + end: this.scanner.index + }; + } + // ... or . + if (cp === 46) { + var n1 = this.scanner.source.charCodeAt(this.scanner.index + 1); + var n2 = this.scanner.source.charCodeAt(this.scanner.index + 2); + var value = (n1 === 46 && n2 === 46) ? '...' : '.'; + var start = this.scanner.index; + this.scanner.index += value.length; + return { + type: 7 /* Punctuator */, + value: value, + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start: start, + end: this.scanner.index + }; + } + // ` + if (cp === 96) { + // Only placeholder, since it will be rescanned as a real assignment expression. + return { + type: 10 /* Template */, + value: '', + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start: this.scanner.index, + end: this.scanner.index + }; + } + // Identifer can not contain backslash (char code 92). + if (character_1.Character.isIdentifierStart(cp) && (cp !== 92)) { + var start = this.scanner.index; + ++this.scanner.index; + while (!this.scanner.eof()) { + var ch = this.scanner.source.charCodeAt(this.scanner.index); + if (character_1.Character.isIdentifierPart(ch) && (ch !== 92)) { + ++this.scanner.index; + } + else if (ch === 45) { + // Hyphen (char code 45) can be part of an identifier. + ++this.scanner.index; + } + else { + break; + } + } + var id = this.scanner.source.slice(start, this.scanner.index); + return { + type: 100 /* Identifier */, + value: id, + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start: start, + end: this.scanner.index + }; + } + return this.scanner.lex(); + }; + JSXParser.prototype.nextJSXToken = function () { + this.collectComments(); + this.startMarker.index = this.scanner.index; + this.startMarker.line = this.scanner.lineNumber; + this.startMarker.column = this.scanner.index - this.scanner.lineStart; + var token = this.lexJSX(); + this.lastMarker.index = this.scanner.index; + this.lastMarker.line = this.scanner.lineNumber; + this.lastMarker.column = this.scanner.index - this.scanner.lineStart; + if (this.config.tokens) { + this.tokens.push(this.convertToken(token)); + } + return token; + }; + JSXParser.prototype.nextJSXText = function () { + this.startMarker.index = this.scanner.index; + this.startMarker.line = this.scanner.lineNumber; + this.startMarker.column = this.scanner.index - this.scanner.lineStart; + var start = this.scanner.index; + var text = ''; + while (!this.scanner.eof()) { + var ch = this.scanner.source[this.scanner.index]; + if (ch === '{' || ch === '<') { + break; + } + ++this.scanner.index; + text += ch; + if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) { + ++this.scanner.lineNumber; + if (ch === '\r' && this.scanner.source[this.scanner.index] === '\n') { + ++this.scanner.index; + } + this.scanner.lineStart = this.scanner.index; + } + } + this.lastMarker.index = this.scanner.index; + this.lastMarker.line = this.scanner.lineNumber; + this.lastMarker.column = this.scanner.index - this.scanner.lineStart; + var token = { + type: 101 /* Text */, + value: text, + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start: start, + end: this.scanner.index + }; + if ((text.length > 0) && this.config.tokens) { + this.tokens.push(this.convertToken(token)); + } + return token; + }; + JSXParser.prototype.peekJSXToken = function () { + var state = this.scanner.saveState(); + this.scanner.scanComments(); + var next = this.lexJSX(); + this.scanner.restoreState(state); + return next; + }; + // Expect the next JSX token to match the specified punctuator. + // If not, an exception will be thrown. + JSXParser.prototype.expectJSX = function (value) { + var token = this.nextJSXToken(); + if (token.type !== 7 /* Punctuator */ || token.value !== value) { + this.throwUnexpectedToken(token); + } + }; + // Return true if the next JSX token matches the specified punctuator. + JSXParser.prototype.matchJSX = function (value) { + var next = this.peekJSXToken(); + return next.type === 7 /* Punctuator */ && next.value === value; + }; + JSXParser.prototype.parseJSXIdentifier = function () { + var node = this.createJSXNode(); + var token = this.nextJSXToken(); + if (token.type !== 100 /* Identifier */) { + this.throwUnexpectedToken(token); + } + return this.finalize(node, new JSXNode.JSXIdentifier(token.value)); + }; + JSXParser.prototype.parseJSXElementName = function () { + var node = this.createJSXNode(); + var elementName = this.parseJSXIdentifier(); + if (this.matchJSX(':')) { + var namespace = elementName; + this.expectJSX(':'); + var name_1 = this.parseJSXIdentifier(); + elementName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name_1)); + } + else if (this.matchJSX('.')) { + while (this.matchJSX('.')) { + var object = elementName; + this.expectJSX('.'); + var property = this.parseJSXIdentifier(); + elementName = this.finalize(node, new JSXNode.JSXMemberExpression(object, property)); + } + } + return elementName; + }; + JSXParser.prototype.parseJSXAttributeName = function () { + var node = this.createJSXNode(); + var attributeName; + var identifier = this.parseJSXIdentifier(); + if (this.matchJSX(':')) { + var namespace = identifier; + this.expectJSX(':'); + var name_2 = this.parseJSXIdentifier(); + attributeName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name_2)); + } + else { + attributeName = identifier; + } + return attributeName; + }; + JSXParser.prototype.parseJSXStringLiteralAttribute = function () { + var node = this.createJSXNode(); + var token = this.nextJSXToken(); + if (token.type !== 8 /* StringLiteral */) { + this.throwUnexpectedToken(token); + } + var raw = this.getTokenRaw(token); + return this.finalize(node, new Node.Literal(token.value, raw)); + }; + JSXParser.prototype.parseJSXExpressionAttribute = function () { + var node = this.createJSXNode(); + this.expectJSX('{'); + this.finishJSX(); + if (this.match('}')) { + this.tolerateError('JSX attributes must only be assigned a non-empty expression'); + } + var expression = this.parseAssignmentExpression(); + this.reenterJSX(); + return this.finalize(node, new JSXNode.JSXExpressionContainer(expression)); + }; + JSXParser.prototype.parseJSXAttributeValue = function () { + return this.matchJSX('{') ? this.parseJSXExpressionAttribute() : + this.matchJSX('<') ? this.parseJSXElement() : this.parseJSXStringLiteralAttribute(); + }; + JSXParser.prototype.parseJSXNameValueAttribute = function () { + var node = this.createJSXNode(); + var name = this.parseJSXAttributeName(); + var value = null; + if (this.matchJSX('=')) { + this.expectJSX('='); + value = this.parseJSXAttributeValue(); + } + return this.finalize(node, new JSXNode.JSXAttribute(name, value)); + }; + JSXParser.prototype.parseJSXSpreadAttribute = function () { + var node = this.createJSXNode(); + this.expectJSX('{'); + this.expectJSX('...'); + this.finishJSX(); + var argument = this.parseAssignmentExpression(); + this.reenterJSX(); + return this.finalize(node, new JSXNode.JSXSpreadAttribute(argument)); + }; + JSXParser.prototype.parseJSXAttributes = function () { + var attributes = []; + while (!this.matchJSX('/') && !this.matchJSX('>')) { + var attribute = this.matchJSX('{') ? this.parseJSXSpreadAttribute() : + this.parseJSXNameValueAttribute(); + attributes.push(attribute); + } + return attributes; + }; + JSXParser.prototype.parseJSXOpeningElement = function () { + var node = this.createJSXNode(); + this.expectJSX('<'); + var name = this.parseJSXElementName(); + var attributes = this.parseJSXAttributes(); + var selfClosing = this.matchJSX('/'); + if (selfClosing) { + this.expectJSX('/'); + } + this.expectJSX('>'); + return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes)); + }; + JSXParser.prototype.parseJSXBoundaryElement = function () { + var node = this.createJSXNode(); + this.expectJSX('<'); + if (this.matchJSX('/')) { + this.expectJSX('/'); + var name_3 = this.parseJSXElementName(); + this.expectJSX('>'); + return this.finalize(node, new JSXNode.JSXClosingElement(name_3)); + } + var name = this.parseJSXElementName(); + var attributes = this.parseJSXAttributes(); + var selfClosing = this.matchJSX('/'); + if (selfClosing) { + this.expectJSX('/'); + } + this.expectJSX('>'); + return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes)); + }; + JSXParser.prototype.parseJSXEmptyExpression = function () { + var node = this.createJSXChildNode(); + this.collectComments(); + this.lastMarker.index = this.scanner.index; + this.lastMarker.line = this.scanner.lineNumber; + this.lastMarker.column = this.scanner.index - this.scanner.lineStart; + return this.finalize(node, new JSXNode.JSXEmptyExpression()); + }; + JSXParser.prototype.parseJSXExpressionContainer = function () { + var node = this.createJSXNode(); + this.expectJSX('{'); + var expression; + if (this.matchJSX('}')) { + expression = this.parseJSXEmptyExpression(); + this.expectJSX('}'); + } + else { + this.finishJSX(); + expression = this.parseAssignmentExpression(); + this.reenterJSX(); + } + return this.finalize(node, new JSXNode.JSXExpressionContainer(expression)); + }; + JSXParser.prototype.parseJSXChildren = function () { + var children = []; + while (!this.scanner.eof()) { + var node = this.createJSXChildNode(); + var token = this.nextJSXText(); + if (token.start < token.end) { + var raw = this.getTokenRaw(token); + var child = this.finalize(node, new JSXNode.JSXText(token.value, raw)); + children.push(child); + } + if (this.scanner.source[this.scanner.index] === '{') { + var container = this.parseJSXExpressionContainer(); + children.push(container); + } + else { + break; + } + } + return children; + }; + JSXParser.prototype.parseComplexJSXElement = function (el) { + var stack = []; + while (!this.scanner.eof()) { + el.children = el.children.concat(this.parseJSXChildren()); + var node = this.createJSXChildNode(); + var element = this.parseJSXBoundaryElement(); + if (element.type === jsx_syntax_1.JSXSyntax.JSXOpeningElement) { + var opening = element; + if (opening.selfClosing) { + var child = this.finalize(node, new JSXNode.JSXElement(opening, [], null)); + el.children.push(child); + } + else { + stack.push(el); + el = { node: node, opening: opening, closing: null, children: [] }; + } + } + if (element.type === jsx_syntax_1.JSXSyntax.JSXClosingElement) { + el.closing = element; + var open_1 = getQualifiedElementName(el.opening.name); + var close_1 = getQualifiedElementName(el.closing.name); + if (open_1 !== close_1) { + this.tolerateError('Expected corresponding JSX closing tag for %0', open_1); + } + if (stack.length > 0) { + var child = this.finalize(el.node, new JSXNode.JSXElement(el.opening, el.children, el.closing)); + el = stack[stack.length - 1]; + el.children.push(child); + stack.pop(); + } + else { + break; + } + } + } + return el; + }; + JSXParser.prototype.parseJSXElement = function () { + var node = this.createJSXNode(); + var opening = this.parseJSXOpeningElement(); + var children = []; + var closing = null; + if (!opening.selfClosing) { + var el = this.parseComplexJSXElement({ node: node, opening: opening, closing: closing, children: children }); + children = el.children; + closing = el.closing; + } + return this.finalize(node, new JSXNode.JSXElement(opening, children, closing)); + }; + JSXParser.prototype.parseJSXRoot = function () { + // Pop the opening '<' added from the lookahead. + if (this.config.tokens) { + this.tokens.pop(); + } + this.startJSX(); + var element = this.parseJSXElement(); + this.finishJSX(); + return element; + }; + JSXParser.prototype.isStartOfExpression = function () { + return _super.prototype.isStartOfExpression.call(this) || this.match('<'); + }; + return JSXParser; + }(parser_1.Parser)); + exports.JSXParser = JSXParser; + + +/***/ }, +/* 4 */ +/***/ function(module, exports) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + // See also tools/generate-unicode-regex.js. + var Regex = { + // Unicode v8.0.0 NonAsciiIdentifierStart: + NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/, + // Unicode v8.0.0 NonAsciiIdentifierPart: + NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ + }; + exports.Character = { + /* tslint:disable:no-bitwise */ + fromCodePoint: function (cp) { + return (cp < 0x10000) ? String.fromCharCode(cp) : + String.fromCharCode(0xD800 + ((cp - 0x10000) >> 10)) + + String.fromCharCode(0xDC00 + ((cp - 0x10000) & 1023)); + }, + // https://tc39.github.io/ecma262/#sec-white-space + isWhiteSpace: function (cp) { + return (cp === 0x20) || (cp === 0x09) || (cp === 0x0B) || (cp === 0x0C) || (cp === 0xA0) || + (cp >= 0x1680 && [0x1680, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].indexOf(cp) >= 0); + }, + // https://tc39.github.io/ecma262/#sec-line-terminators + isLineTerminator: function (cp) { + return (cp === 0x0A) || (cp === 0x0D) || (cp === 0x2028) || (cp === 0x2029); + }, + // https://tc39.github.io/ecma262/#sec-names-and-keywords + isIdentifierStart: function (cp) { + return (cp === 0x24) || (cp === 0x5F) || + (cp >= 0x41 && cp <= 0x5A) || + (cp >= 0x61 && cp <= 0x7A) || + (cp === 0x5C) || + ((cp >= 0x80) && Regex.NonAsciiIdentifierStart.test(exports.Character.fromCodePoint(cp))); + }, + isIdentifierPart: function (cp) { + return (cp === 0x24) || (cp === 0x5F) || + (cp >= 0x41 && cp <= 0x5A) || + (cp >= 0x61 && cp <= 0x7A) || + (cp >= 0x30 && cp <= 0x39) || + (cp === 0x5C) || + ((cp >= 0x80) && Regex.NonAsciiIdentifierPart.test(exports.Character.fromCodePoint(cp))); + }, + // https://tc39.github.io/ecma262/#sec-literals-numeric-literals + isDecimalDigit: function (cp) { + return (cp >= 0x30 && cp <= 0x39); // 0..9 + }, + isHexDigit: function (cp) { + return (cp >= 0x30 && cp <= 0x39) || + (cp >= 0x41 && cp <= 0x46) || + (cp >= 0x61 && cp <= 0x66); // a..f + }, + isOctalDigit: function (cp) { + return (cp >= 0x30 && cp <= 0x37); // 0..7 + } + }; + + +/***/ }, +/* 5 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var jsx_syntax_1 = __webpack_require__(6); + /* tslint:disable:max-classes-per-file */ + var JSXClosingElement = (function () { + function JSXClosingElement(name) { + this.type = jsx_syntax_1.JSXSyntax.JSXClosingElement; + this.name = name; + } + return JSXClosingElement; + }()); + exports.JSXClosingElement = JSXClosingElement; + var JSXElement = (function () { + function JSXElement(openingElement, children, closingElement) { + this.type = jsx_syntax_1.JSXSyntax.JSXElement; + this.openingElement = openingElement; + this.children = children; + this.closingElement = closingElement; + } + return JSXElement; + }()); + exports.JSXElement = JSXElement; + var JSXEmptyExpression = (function () { + function JSXEmptyExpression() { + this.type = jsx_syntax_1.JSXSyntax.JSXEmptyExpression; + } + return JSXEmptyExpression; + }()); + exports.JSXEmptyExpression = JSXEmptyExpression; + var JSXExpressionContainer = (function () { + function JSXExpressionContainer(expression) { + this.type = jsx_syntax_1.JSXSyntax.JSXExpressionContainer; + this.expression = expression; + } + return JSXExpressionContainer; + }()); + exports.JSXExpressionContainer = JSXExpressionContainer; + var JSXIdentifier = (function () { + function JSXIdentifier(name) { + this.type = jsx_syntax_1.JSXSyntax.JSXIdentifier; + this.name = name; + } + return JSXIdentifier; + }()); + exports.JSXIdentifier = JSXIdentifier; + var JSXMemberExpression = (function () { + function JSXMemberExpression(object, property) { + this.type = jsx_syntax_1.JSXSyntax.JSXMemberExpression; + this.object = object; + this.property = property; + } + return JSXMemberExpression; + }()); + exports.JSXMemberExpression = JSXMemberExpression; + var JSXAttribute = (function () { + function JSXAttribute(name, value) { + this.type = jsx_syntax_1.JSXSyntax.JSXAttribute; + this.name = name; + this.value = value; + } + return JSXAttribute; + }()); + exports.JSXAttribute = JSXAttribute; + var JSXNamespacedName = (function () { + function JSXNamespacedName(namespace, name) { + this.type = jsx_syntax_1.JSXSyntax.JSXNamespacedName; + this.namespace = namespace; + this.name = name; + } + return JSXNamespacedName; + }()); + exports.JSXNamespacedName = JSXNamespacedName; + var JSXOpeningElement = (function () { + function JSXOpeningElement(name, selfClosing, attributes) { + this.type = jsx_syntax_1.JSXSyntax.JSXOpeningElement; + this.name = name; + this.selfClosing = selfClosing; + this.attributes = attributes; + } + return JSXOpeningElement; + }()); + exports.JSXOpeningElement = JSXOpeningElement; + var JSXSpreadAttribute = (function () { + function JSXSpreadAttribute(argument) { + this.type = jsx_syntax_1.JSXSyntax.JSXSpreadAttribute; + this.argument = argument; + } + return JSXSpreadAttribute; + }()); + exports.JSXSpreadAttribute = JSXSpreadAttribute; + var JSXText = (function () { + function JSXText(value, raw) { + this.type = jsx_syntax_1.JSXSyntax.JSXText; + this.value = value; + this.raw = raw; + } + return JSXText; + }()); + exports.JSXText = JSXText; + + +/***/ }, +/* 6 */ +/***/ function(module, exports) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.JSXSyntax = { + JSXAttribute: 'JSXAttribute', + JSXClosingElement: 'JSXClosingElement', + JSXElement: 'JSXElement', + JSXEmptyExpression: 'JSXEmptyExpression', + JSXExpressionContainer: 'JSXExpressionContainer', + JSXIdentifier: 'JSXIdentifier', + JSXMemberExpression: 'JSXMemberExpression', + JSXNamespacedName: 'JSXNamespacedName', + JSXOpeningElement: 'JSXOpeningElement', + JSXSpreadAttribute: 'JSXSpreadAttribute', + JSXText: 'JSXText' + }; + + +/***/ }, +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var syntax_1 = __webpack_require__(2); + /* tslint:disable:max-classes-per-file */ + var ArrayExpression = (function () { + function ArrayExpression(elements) { + this.type = syntax_1.Syntax.ArrayExpression; + this.elements = elements; + } + return ArrayExpression; + }()); + exports.ArrayExpression = ArrayExpression; + var ArrayPattern = (function () { + function ArrayPattern(elements) { + this.type = syntax_1.Syntax.ArrayPattern; + this.elements = elements; + } + return ArrayPattern; + }()); + exports.ArrayPattern = ArrayPattern; + var ArrowFunctionExpression = (function () { + function ArrowFunctionExpression(params, body, expression) { + this.type = syntax_1.Syntax.ArrowFunctionExpression; + this.id = null; + this.params = params; + this.body = body; + this.generator = false; + this.expression = expression; + this.async = false; + } + return ArrowFunctionExpression; + }()); + exports.ArrowFunctionExpression = ArrowFunctionExpression; + var AssignmentExpression = (function () { + function AssignmentExpression(operator, left, right) { + this.type = syntax_1.Syntax.AssignmentExpression; + this.operator = operator; + this.left = left; + this.right = right; + } + return AssignmentExpression; + }()); + exports.AssignmentExpression = AssignmentExpression; + var AssignmentPattern = (function () { + function AssignmentPattern(left, right) { + this.type = syntax_1.Syntax.AssignmentPattern; + this.left = left; + this.right = right; + } + return AssignmentPattern; + }()); + exports.AssignmentPattern = AssignmentPattern; + var AsyncArrowFunctionExpression = (function () { + function AsyncArrowFunctionExpression(params, body, expression) { + this.type = syntax_1.Syntax.ArrowFunctionExpression; + this.id = null; + this.params = params; + this.body = body; + this.generator = false; + this.expression = expression; + this.async = true; + } + return AsyncArrowFunctionExpression; + }()); + exports.AsyncArrowFunctionExpression = AsyncArrowFunctionExpression; + var AsyncFunctionDeclaration = (function () { + function AsyncFunctionDeclaration(id, params, body) { + this.type = syntax_1.Syntax.FunctionDeclaration; + this.id = id; + this.params = params; + this.body = body; + this.generator = false; + this.expression = false; + this.async = true; + } + return AsyncFunctionDeclaration; + }()); + exports.AsyncFunctionDeclaration = AsyncFunctionDeclaration; + var AsyncFunctionExpression = (function () { + function AsyncFunctionExpression(id, params, body) { + this.type = syntax_1.Syntax.FunctionExpression; + this.id = id; + this.params = params; + this.body = body; + this.generator = false; + this.expression = false; + this.async = true; + } + return AsyncFunctionExpression; + }()); + exports.AsyncFunctionExpression = AsyncFunctionExpression; + var AwaitExpression = (function () { + function AwaitExpression(argument) { + this.type = syntax_1.Syntax.AwaitExpression; + this.argument = argument; + } + return AwaitExpression; + }()); + exports.AwaitExpression = AwaitExpression; + var BinaryExpression = (function () { + function BinaryExpression(operator, left, right) { + var logical = (operator === '||' || operator === '&&'); + this.type = logical ? syntax_1.Syntax.LogicalExpression : syntax_1.Syntax.BinaryExpression; + this.operator = operator; + this.left = left; + this.right = right; + } + return BinaryExpression; + }()); + exports.BinaryExpression = BinaryExpression; + var BlockStatement = (function () { + function BlockStatement(body) { + this.type = syntax_1.Syntax.BlockStatement; + this.body = body; + } + return BlockStatement; + }()); + exports.BlockStatement = BlockStatement; + var BreakStatement = (function () { + function BreakStatement(label) { + this.type = syntax_1.Syntax.BreakStatement; + this.label = label; + } + return BreakStatement; + }()); + exports.BreakStatement = BreakStatement; + var CallExpression = (function () { + function CallExpression(callee, args) { + this.type = syntax_1.Syntax.CallExpression; + this.callee = callee; + this.arguments = args; + } + return CallExpression; + }()); + exports.CallExpression = CallExpression; + var CatchClause = (function () { + function CatchClause(param, body) { + this.type = syntax_1.Syntax.CatchClause; + this.param = param; + this.body = body; + } + return CatchClause; + }()); + exports.CatchClause = CatchClause; + var ClassBody = (function () { + function ClassBody(body) { + this.type = syntax_1.Syntax.ClassBody; + this.body = body; + } + return ClassBody; + }()); + exports.ClassBody = ClassBody; + var ClassDeclaration = (function () { + function ClassDeclaration(id, superClass, body) { + this.type = syntax_1.Syntax.ClassDeclaration; + this.id = id; + this.superClass = superClass; + this.body = body; + } + return ClassDeclaration; + }()); + exports.ClassDeclaration = ClassDeclaration; + var ClassExpression = (function () { + function ClassExpression(id, superClass, body) { + this.type = syntax_1.Syntax.ClassExpression; + this.id = id; + this.superClass = superClass; + this.body = body; + } + return ClassExpression; + }()); + exports.ClassExpression = ClassExpression; + var ComputedMemberExpression = (function () { + function ComputedMemberExpression(object, property) { + this.type = syntax_1.Syntax.MemberExpression; + this.computed = true; + this.object = object; + this.property = property; + } + return ComputedMemberExpression; + }()); + exports.ComputedMemberExpression = ComputedMemberExpression; + var ConditionalExpression = (function () { + function ConditionalExpression(test, consequent, alternate) { + this.type = syntax_1.Syntax.ConditionalExpression; + this.test = test; + this.consequent = consequent; + this.alternate = alternate; + } + return ConditionalExpression; + }()); + exports.ConditionalExpression = ConditionalExpression; + var ContinueStatement = (function () { + function ContinueStatement(label) { + this.type = syntax_1.Syntax.ContinueStatement; + this.label = label; + } + return ContinueStatement; + }()); + exports.ContinueStatement = ContinueStatement; + var DebuggerStatement = (function () { + function DebuggerStatement() { + this.type = syntax_1.Syntax.DebuggerStatement; + } + return DebuggerStatement; + }()); + exports.DebuggerStatement = DebuggerStatement; + var Directive = (function () { + function Directive(expression, directive) { + this.type = syntax_1.Syntax.ExpressionStatement; + this.expression = expression; + this.directive = directive; + } + return Directive; + }()); + exports.Directive = Directive; + var DoWhileStatement = (function () { + function DoWhileStatement(body, test) { + this.type = syntax_1.Syntax.DoWhileStatement; + this.body = body; + this.test = test; + } + return DoWhileStatement; + }()); + exports.DoWhileStatement = DoWhileStatement; + var EmptyStatement = (function () { + function EmptyStatement() { + this.type = syntax_1.Syntax.EmptyStatement; + } + return EmptyStatement; + }()); + exports.EmptyStatement = EmptyStatement; + var ExportAllDeclaration = (function () { + function ExportAllDeclaration(source) { + this.type = syntax_1.Syntax.ExportAllDeclaration; + this.source = source; + } + return ExportAllDeclaration; + }()); + exports.ExportAllDeclaration = ExportAllDeclaration; + var ExportDefaultDeclaration = (function () { + function ExportDefaultDeclaration(declaration) { + this.type = syntax_1.Syntax.ExportDefaultDeclaration; + this.declaration = declaration; + } + return ExportDefaultDeclaration; + }()); + exports.ExportDefaultDeclaration = ExportDefaultDeclaration; + var ExportNamedDeclaration = (function () { + function ExportNamedDeclaration(declaration, specifiers, source) { + this.type = syntax_1.Syntax.ExportNamedDeclaration; + this.declaration = declaration; + this.specifiers = specifiers; + this.source = source; + } + return ExportNamedDeclaration; + }()); + exports.ExportNamedDeclaration = ExportNamedDeclaration; + var ExportSpecifier = (function () { + function ExportSpecifier(local, exported) { + this.type = syntax_1.Syntax.ExportSpecifier; + this.exported = exported; + this.local = local; + } + return ExportSpecifier; + }()); + exports.ExportSpecifier = ExportSpecifier; + var ExpressionStatement = (function () { + function ExpressionStatement(expression) { + this.type = syntax_1.Syntax.ExpressionStatement; + this.expression = expression; + } + return ExpressionStatement; + }()); + exports.ExpressionStatement = ExpressionStatement; + var ForInStatement = (function () { + function ForInStatement(left, right, body) { + this.type = syntax_1.Syntax.ForInStatement; + this.left = left; + this.right = right; + this.body = body; + this.each = false; + } + return ForInStatement; + }()); + exports.ForInStatement = ForInStatement; + var ForOfStatement = (function () { + function ForOfStatement(left, right, body) { + this.type = syntax_1.Syntax.ForOfStatement; + this.left = left; + this.right = right; + this.body = body; + } + return ForOfStatement; + }()); + exports.ForOfStatement = ForOfStatement; + var ForStatement = (function () { + function ForStatement(init, test, update, body) { + this.type = syntax_1.Syntax.ForStatement; + this.init = init; + this.test = test; + this.update = update; + this.body = body; + } + return ForStatement; + }()); + exports.ForStatement = ForStatement; + var FunctionDeclaration = (function () { + function FunctionDeclaration(id, params, body, generator) { + this.type = syntax_1.Syntax.FunctionDeclaration; + this.id = id; + this.params = params; + this.body = body; + this.generator = generator; + this.expression = false; + this.async = false; + } + return FunctionDeclaration; + }()); + exports.FunctionDeclaration = FunctionDeclaration; + var FunctionExpression = (function () { + function FunctionExpression(id, params, body, generator) { + this.type = syntax_1.Syntax.FunctionExpression; + this.id = id; + this.params = params; + this.body = body; + this.generator = generator; + this.expression = false; + this.async = false; + } + return FunctionExpression; + }()); + exports.FunctionExpression = FunctionExpression; + var Identifier = (function () { + function Identifier(name) { + this.type = syntax_1.Syntax.Identifier; + this.name = name; + } + return Identifier; + }()); + exports.Identifier = Identifier; + var IfStatement = (function () { + function IfStatement(test, consequent, alternate) { + this.type = syntax_1.Syntax.IfStatement; + this.test = test; + this.consequent = consequent; + this.alternate = alternate; + } + return IfStatement; + }()); + exports.IfStatement = IfStatement; + var ImportDeclaration = (function () { + function ImportDeclaration(specifiers, source) { + this.type = syntax_1.Syntax.ImportDeclaration; + this.specifiers = specifiers; + this.source = source; + } + return ImportDeclaration; + }()); + exports.ImportDeclaration = ImportDeclaration; + var ImportDefaultSpecifier = (function () { + function ImportDefaultSpecifier(local) { + this.type = syntax_1.Syntax.ImportDefaultSpecifier; + this.local = local; + } + return ImportDefaultSpecifier; + }()); + exports.ImportDefaultSpecifier = ImportDefaultSpecifier; + var ImportNamespaceSpecifier = (function () { + function ImportNamespaceSpecifier(local) { + this.type = syntax_1.Syntax.ImportNamespaceSpecifier; + this.local = local; + } + return ImportNamespaceSpecifier; + }()); + exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier; + var ImportSpecifier = (function () { + function ImportSpecifier(local, imported) { + this.type = syntax_1.Syntax.ImportSpecifier; + this.local = local; + this.imported = imported; + } + return ImportSpecifier; + }()); + exports.ImportSpecifier = ImportSpecifier; + var LabeledStatement = (function () { + function LabeledStatement(label, body) { + this.type = syntax_1.Syntax.LabeledStatement; + this.label = label; + this.body = body; + } + return LabeledStatement; + }()); + exports.LabeledStatement = LabeledStatement; + var Literal = (function () { + function Literal(value, raw) { + this.type = syntax_1.Syntax.Literal; + this.value = value; + this.raw = raw; + } + return Literal; + }()); + exports.Literal = Literal; + var MetaProperty = (function () { + function MetaProperty(meta, property) { + this.type = syntax_1.Syntax.MetaProperty; + this.meta = meta; + this.property = property; + } + return MetaProperty; + }()); + exports.MetaProperty = MetaProperty; + var MethodDefinition = (function () { + function MethodDefinition(key, computed, value, kind, isStatic) { + this.type = syntax_1.Syntax.MethodDefinition; + this.key = key; + this.computed = computed; + this.value = value; + this.kind = kind; + this.static = isStatic; + } + return MethodDefinition; + }()); + exports.MethodDefinition = MethodDefinition; + var Module = (function () { + function Module(body) { + this.type = syntax_1.Syntax.Program; + this.body = body; + this.sourceType = 'module'; + } + return Module; + }()); + exports.Module = Module; + var NewExpression = (function () { + function NewExpression(callee, args) { + this.type = syntax_1.Syntax.NewExpression; + this.callee = callee; + this.arguments = args; + } + return NewExpression; + }()); + exports.NewExpression = NewExpression; + var ObjectExpression = (function () { + function ObjectExpression(properties) { + this.type = syntax_1.Syntax.ObjectExpression; + this.properties = properties; + } + return ObjectExpression; + }()); + exports.ObjectExpression = ObjectExpression; + var ObjectPattern = (function () { + function ObjectPattern(properties) { + this.type = syntax_1.Syntax.ObjectPattern; + this.properties = properties; + } + return ObjectPattern; + }()); + exports.ObjectPattern = ObjectPattern; + var Property = (function () { + function Property(kind, key, computed, value, method, shorthand) { + this.type = syntax_1.Syntax.Property; + this.key = key; + this.computed = computed; + this.value = value; + this.kind = kind; + this.method = method; + this.shorthand = shorthand; + } + return Property; + }()); + exports.Property = Property; + var RegexLiteral = (function () { + function RegexLiteral(value, raw, pattern, flags) { + this.type = syntax_1.Syntax.Literal; + this.value = value; + this.raw = raw; + this.regex = { pattern: pattern, flags: flags }; + } + return RegexLiteral; + }()); + exports.RegexLiteral = RegexLiteral; + var RestElement = (function () { + function RestElement(argument) { + this.type = syntax_1.Syntax.RestElement; + this.argument = argument; + } + return RestElement; + }()); + exports.RestElement = RestElement; + var ReturnStatement = (function () { + function ReturnStatement(argument) { + this.type = syntax_1.Syntax.ReturnStatement; + this.argument = argument; + } + return ReturnStatement; + }()); + exports.ReturnStatement = ReturnStatement; + var Script = (function () { + function Script(body) { + this.type = syntax_1.Syntax.Program; + this.body = body; + this.sourceType = 'script'; + } + return Script; + }()); + exports.Script = Script; + var SequenceExpression = (function () { + function SequenceExpression(expressions) { + this.type = syntax_1.Syntax.SequenceExpression; + this.expressions = expressions; + } + return SequenceExpression; + }()); + exports.SequenceExpression = SequenceExpression; + var SpreadElement = (function () { + function SpreadElement(argument) { + this.type = syntax_1.Syntax.SpreadElement; + this.argument = argument; + } + return SpreadElement; + }()); + exports.SpreadElement = SpreadElement; + var StaticMemberExpression = (function () { + function StaticMemberExpression(object, property) { + this.type = syntax_1.Syntax.MemberExpression; + this.computed = false; + this.object = object; + this.property = property; + } + return StaticMemberExpression; + }()); + exports.StaticMemberExpression = StaticMemberExpression; + var Super = (function () { + function Super() { + this.type = syntax_1.Syntax.Super; + } + return Super; + }()); + exports.Super = Super; + var SwitchCase = (function () { + function SwitchCase(test, consequent) { + this.type = syntax_1.Syntax.SwitchCase; + this.test = test; + this.consequent = consequent; + } + return SwitchCase; + }()); + exports.SwitchCase = SwitchCase; + var SwitchStatement = (function () { + function SwitchStatement(discriminant, cases) { + this.type = syntax_1.Syntax.SwitchStatement; + this.discriminant = discriminant; + this.cases = cases; + } + return SwitchStatement; + }()); + exports.SwitchStatement = SwitchStatement; + var TaggedTemplateExpression = (function () { + function TaggedTemplateExpression(tag, quasi) { + this.type = syntax_1.Syntax.TaggedTemplateExpression; + this.tag = tag; + this.quasi = quasi; + } + return TaggedTemplateExpression; + }()); + exports.TaggedTemplateExpression = TaggedTemplateExpression; + var TemplateElement = (function () { + function TemplateElement(value, tail) { + this.type = syntax_1.Syntax.TemplateElement; + this.value = value; + this.tail = tail; + } + return TemplateElement; + }()); + exports.TemplateElement = TemplateElement; + var TemplateLiteral = (function () { + function TemplateLiteral(quasis, expressions) { + this.type = syntax_1.Syntax.TemplateLiteral; + this.quasis = quasis; + this.expressions = expressions; + } + return TemplateLiteral; + }()); + exports.TemplateLiteral = TemplateLiteral; + var ThisExpression = (function () { + function ThisExpression() { + this.type = syntax_1.Syntax.ThisExpression; + } + return ThisExpression; + }()); + exports.ThisExpression = ThisExpression; + var ThrowStatement = (function () { + function ThrowStatement(argument) { + this.type = syntax_1.Syntax.ThrowStatement; + this.argument = argument; + } + return ThrowStatement; + }()); + exports.ThrowStatement = ThrowStatement; + var TryStatement = (function () { + function TryStatement(block, handler, finalizer) { + this.type = syntax_1.Syntax.TryStatement; + this.block = block; + this.handler = handler; + this.finalizer = finalizer; + } + return TryStatement; + }()); + exports.TryStatement = TryStatement; + var UnaryExpression = (function () { + function UnaryExpression(operator, argument) { + this.type = syntax_1.Syntax.UnaryExpression; + this.operator = operator; + this.argument = argument; + this.prefix = true; + } + return UnaryExpression; + }()); + exports.UnaryExpression = UnaryExpression; + var UpdateExpression = (function () { + function UpdateExpression(operator, argument, prefix) { + this.type = syntax_1.Syntax.UpdateExpression; + this.operator = operator; + this.argument = argument; + this.prefix = prefix; + } + return UpdateExpression; + }()); + exports.UpdateExpression = UpdateExpression; + var VariableDeclaration = (function () { + function VariableDeclaration(declarations, kind) { + this.type = syntax_1.Syntax.VariableDeclaration; + this.declarations = declarations; + this.kind = kind; + } + return VariableDeclaration; + }()); + exports.VariableDeclaration = VariableDeclaration; + var VariableDeclarator = (function () { + function VariableDeclarator(id, init) { + this.type = syntax_1.Syntax.VariableDeclarator; + this.id = id; + this.init = init; + } + return VariableDeclarator; + }()); + exports.VariableDeclarator = VariableDeclarator; + var WhileStatement = (function () { + function WhileStatement(test, body) { + this.type = syntax_1.Syntax.WhileStatement; + this.test = test; + this.body = body; + } + return WhileStatement; + }()); + exports.WhileStatement = WhileStatement; + var WithStatement = (function () { + function WithStatement(object, body) { + this.type = syntax_1.Syntax.WithStatement; + this.object = object; + this.body = body; + } + return WithStatement; + }()); + exports.WithStatement = WithStatement; + var YieldExpression = (function () { + function YieldExpression(argument, delegate) { + this.type = syntax_1.Syntax.YieldExpression; + this.argument = argument; + this.delegate = delegate; + } + return YieldExpression; + }()); + exports.YieldExpression = YieldExpression; + + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var assert_1 = __webpack_require__(9); + var error_handler_1 = __webpack_require__(10); + var messages_1 = __webpack_require__(11); + var Node = __webpack_require__(7); + var scanner_1 = __webpack_require__(12); + var syntax_1 = __webpack_require__(2); + var token_1 = __webpack_require__(13); + var ArrowParameterPlaceHolder = 'ArrowParameterPlaceHolder'; + var Parser = (function () { + function Parser(code, options, delegate) { + if (options === void 0) { options = {}; } + this.config = { + range: (typeof options.range === 'boolean') && options.range, + loc: (typeof options.loc === 'boolean') && options.loc, + source: null, + tokens: (typeof options.tokens === 'boolean') && options.tokens, + comment: (typeof options.comment === 'boolean') && options.comment, + tolerant: (typeof options.tolerant === 'boolean') && options.tolerant + }; + if (this.config.loc && options.source && options.source !== null) { + this.config.source = String(options.source); + } + this.delegate = delegate; + this.errorHandler = new error_handler_1.ErrorHandler(); + this.errorHandler.tolerant = this.config.tolerant; + this.scanner = new scanner_1.Scanner(code, this.errorHandler); + this.scanner.trackComment = this.config.comment; + this.operatorPrecedence = { + ')': 0, + ';': 0, + ',': 0, + '=': 0, + ']': 0, + '||': 1, + '&&': 2, + '|': 3, + '^': 4, + '&': 5, + '==': 6, + '!=': 6, + '===': 6, + '!==': 6, + '<': 7, + '>': 7, + '<=': 7, + '>=': 7, + '<<': 8, + '>>': 8, + '>>>': 8, + '+': 9, + '-': 9, + '*': 11, + '/': 11, + '%': 11 + }; + this.lookahead = { + type: 2 /* EOF */, + value: '', + lineNumber: this.scanner.lineNumber, + lineStart: 0, + start: 0, + end: 0 + }; + this.hasLineTerminator = false; + this.context = { + isModule: false, + await: false, + allowIn: true, + allowStrictDirective: true, + allowYield: true, + firstCoverInitializedNameError: null, + isAssignmentTarget: false, + isBindingElement: false, + inFunctionBody: false, + inIteration: false, + inSwitch: false, + labelSet: {}, + strict: false + }; + this.tokens = []; + this.startMarker = { + index: 0, + line: this.scanner.lineNumber, + column: 0 + }; + this.lastMarker = { + index: 0, + line: this.scanner.lineNumber, + column: 0 + }; + this.nextToken(); + this.lastMarker = { + index: this.scanner.index, + line: this.scanner.lineNumber, + column: this.scanner.index - this.scanner.lineStart + }; + } + Parser.prototype.throwError = function (messageFormat) { + var values = []; + for (var _i = 1; _i < arguments.length; _i++) { + values[_i - 1] = arguments[_i]; + } + var args = Array.prototype.slice.call(arguments, 1); + var msg = messageFormat.replace(/%(\d)/g, function (whole, idx) { + assert_1.assert(idx < args.length, 'Message reference must be in range'); + return args[idx]; + }); + var index = this.lastMarker.index; + var line = this.lastMarker.line; + var column = this.lastMarker.column + 1; + throw this.errorHandler.createError(index, line, column, msg); + }; + Parser.prototype.tolerateError = function (messageFormat) { + var values = []; + for (var _i = 1; _i < arguments.length; _i++) { + values[_i - 1] = arguments[_i]; + } + var args = Array.prototype.slice.call(arguments, 1); + var msg = messageFormat.replace(/%(\d)/g, function (whole, idx) { + assert_1.assert(idx < args.length, 'Message reference must be in range'); + return args[idx]; + }); + var index = this.lastMarker.index; + var line = this.scanner.lineNumber; + var column = this.lastMarker.column + 1; + this.errorHandler.tolerateError(index, line, column, msg); + }; + // Throw an exception because of the token. + Parser.prototype.unexpectedTokenError = function (token, message) { + var msg = message || messages_1.Messages.UnexpectedToken; + var value; + if (token) { + if (!message) { + msg = (token.type === 2 /* EOF */) ? messages_1.Messages.UnexpectedEOS : + (token.type === 3 /* Identifier */) ? messages_1.Messages.UnexpectedIdentifier : + (token.type === 6 /* NumericLiteral */) ? messages_1.Messages.UnexpectedNumber : + (token.type === 8 /* StringLiteral */) ? messages_1.Messages.UnexpectedString : + (token.type === 10 /* Template */) ? messages_1.Messages.UnexpectedTemplate : + messages_1.Messages.UnexpectedToken; + if (token.type === 4 /* Keyword */) { + if (this.scanner.isFutureReservedWord(token.value)) { + msg = messages_1.Messages.UnexpectedReserved; + } + else if (this.context.strict && this.scanner.isStrictModeReservedWord(token.value)) { + msg = messages_1.Messages.StrictReservedWord; + } + } + } + value = token.value; + } + else { + value = 'ILLEGAL'; + } + msg = msg.replace('%0', value); + if (token && typeof token.lineNumber === 'number') { + var index = token.start; + var line = token.lineNumber; + var lastMarkerLineStart = this.lastMarker.index - this.lastMarker.column; + var column = token.start - lastMarkerLineStart + 1; + return this.errorHandler.createError(index, line, column, msg); + } + else { + var index = this.lastMarker.index; + var line = this.lastMarker.line; + var column = this.lastMarker.column + 1; + return this.errorHandler.createError(index, line, column, msg); + } + }; + Parser.prototype.throwUnexpectedToken = function (token, message) { + throw this.unexpectedTokenError(token, message); + }; + Parser.prototype.tolerateUnexpectedToken = function (token, message) { + this.errorHandler.tolerate(this.unexpectedTokenError(token, message)); + }; + Parser.prototype.collectComments = function () { + if (!this.config.comment) { + this.scanner.scanComments(); + } + else { + var comments = this.scanner.scanComments(); + if (comments.length > 0 && this.delegate) { + for (var i = 0; i < comments.length; ++i) { + var e = comments[i]; + var node = void 0; + node = { + type: e.multiLine ? 'BlockComment' : 'LineComment', + value: this.scanner.source.slice(e.slice[0], e.slice[1]) + }; + if (this.config.range) { + node.range = e.range; + } + if (this.config.loc) { + node.loc = e.loc; + } + var metadata = { + start: { + line: e.loc.start.line, + column: e.loc.start.column, + offset: e.range[0] + }, + end: { + line: e.loc.end.line, + column: e.loc.end.column, + offset: e.range[1] + } + }; + this.delegate(node, metadata); + } + } + } + }; + // From internal representation to an external structure + Parser.prototype.getTokenRaw = function (token) { + return this.scanner.source.slice(token.start, token.end); + }; + Parser.prototype.convertToken = function (token) { + var t = { + type: token_1.TokenName[token.type], + value: this.getTokenRaw(token) + }; + if (this.config.range) { + t.range = [token.start, token.end]; + } + if (this.config.loc) { + t.loc = { + start: { + line: this.startMarker.line, + column: this.startMarker.column + }, + end: { + line: this.scanner.lineNumber, + column: this.scanner.index - this.scanner.lineStart + } + }; + } + if (token.type === 9 /* RegularExpression */) { + var pattern = token.pattern; + var flags = token.flags; + t.regex = { pattern: pattern, flags: flags }; + } + return t; + }; + Parser.prototype.nextToken = function () { + var token = this.lookahead; + this.lastMarker.index = this.scanner.index; + this.lastMarker.line = this.scanner.lineNumber; + this.lastMarker.column = this.scanner.index - this.scanner.lineStart; + this.collectComments(); + if (this.scanner.index !== this.startMarker.index) { + this.startMarker.index = this.scanner.index; + this.startMarker.line = this.scanner.lineNumber; + this.startMarker.column = this.scanner.index - this.scanner.lineStart; + } + var next = this.scanner.lex(); + this.hasLineTerminator = (token.lineNumber !== next.lineNumber); + if (next && this.context.strict && next.type === 3 /* Identifier */) { + if (this.scanner.isStrictModeReservedWord(next.value)) { + next.type = 4 /* Keyword */; + } + } + this.lookahead = next; + if (this.config.tokens && next.type !== 2 /* EOF */) { + this.tokens.push(this.convertToken(next)); + } + return token; + }; + Parser.prototype.nextRegexToken = function () { + this.collectComments(); + var token = this.scanner.scanRegExp(); + if (this.config.tokens) { + // Pop the previous token, '/' or '/=' + // This is added from the lookahead token. + this.tokens.pop(); + this.tokens.push(this.convertToken(token)); + } + // Prime the next lookahead. + this.lookahead = token; + this.nextToken(); + return token; + }; + Parser.prototype.createNode = function () { + return { + index: this.startMarker.index, + line: this.startMarker.line, + column: this.startMarker.column + }; + }; + Parser.prototype.startNode = function (token, lastLineStart) { + if (lastLineStart === void 0) { lastLineStart = 0; } + var column = token.start - token.lineStart; + var line = token.lineNumber; + if (column < 0) { + column += lastLineStart; + line--; + } + return { + index: token.start, + line: line, + column: column + }; + }; + Parser.prototype.finalize = function (marker, node) { + if (this.config.range) { + node.range = [marker.index, this.lastMarker.index]; + } + if (this.config.loc) { + node.loc = { + start: { + line: marker.line, + column: marker.column, + }, + end: { + line: this.lastMarker.line, + column: this.lastMarker.column + } + }; + if (this.config.source) { + node.loc.source = this.config.source; + } + } + if (this.delegate) { + var metadata = { + start: { + line: marker.line, + column: marker.column, + offset: marker.index + }, + end: { + line: this.lastMarker.line, + column: this.lastMarker.column, + offset: this.lastMarker.index + } + }; + this.delegate(node, metadata); + } + return node; + }; + // Expect the next token to match the specified punctuator. + // If not, an exception will be thrown. + Parser.prototype.expect = function (value) { + var token = this.nextToken(); + if (token.type !== 7 /* Punctuator */ || token.value !== value) { + this.throwUnexpectedToken(token); + } + }; + // Quietly expect a comma when in tolerant mode, otherwise delegates to expect(). + Parser.prototype.expectCommaSeparator = function () { + if (this.config.tolerant) { + var token = this.lookahead; + if (token.type === 7 /* Punctuator */ && token.value === ',') { + this.nextToken(); + } + else if (token.type === 7 /* Punctuator */ && token.value === ';') { + this.nextToken(); + this.tolerateUnexpectedToken(token); + } + else { + this.tolerateUnexpectedToken(token, messages_1.Messages.UnexpectedToken); + } + } + else { + this.expect(','); + } + }; + // Expect the next token to match the specified keyword. + // If not, an exception will be thrown. + Parser.prototype.expectKeyword = function (keyword) { + var token = this.nextToken(); + if (token.type !== 4 /* Keyword */ || token.value !== keyword) { + this.throwUnexpectedToken(token); + } + }; + // Return true if the next token matches the specified punctuator. + Parser.prototype.match = function (value) { + return this.lookahead.type === 7 /* Punctuator */ && this.lookahead.value === value; + }; + // Return true if the next token matches the specified keyword + Parser.prototype.matchKeyword = function (keyword) { + return this.lookahead.type === 4 /* Keyword */ && this.lookahead.value === keyword; + }; + // Return true if the next token matches the specified contextual keyword + // (where an identifier is sometimes a keyword depending on the context) + Parser.prototype.matchContextualKeyword = function (keyword) { + return this.lookahead.type === 3 /* Identifier */ && this.lookahead.value === keyword; + }; + // Return true if the next token is an assignment operator + Parser.prototype.matchAssign = function () { + if (this.lookahead.type !== 7 /* Punctuator */) { + return false; + } + var op = this.lookahead.value; + return op === '=' || + op === '*=' || + op === '**=' || + op === '/=' || + op === '%=' || + op === '+=' || + op === '-=' || + op === '<<=' || + op === '>>=' || + op === '>>>=' || + op === '&=' || + op === '^=' || + op === '|='; + }; + // Cover grammar support. + // + // When an assignment expression position starts with an left parenthesis, the determination of the type + // of the syntax is to be deferred arbitrarily long until the end of the parentheses pair (plus a lookahead) + // or the first comma. This situation also defers the determination of all the expressions nested in the pair. + // + // There are three productions that can be parsed in a parentheses pair that needs to be determined + // after the outermost pair is closed. They are: + // + // 1. AssignmentExpression + // 2. BindingElements + // 3. AssignmentTargets + // + // In order to avoid exponential backtracking, we use two flags to denote if the production can be + // binding element or assignment target. + // + // The three productions have the relationship: + // + // BindingElements ⊆ AssignmentTargets ⊆ AssignmentExpression + // + // with a single exception that CoverInitializedName when used directly in an Expression, generates + // an early error. Therefore, we need the third state, firstCoverInitializedNameError, to track the + // first usage of CoverInitializedName and report it when we reached the end of the parentheses pair. + // + // isolateCoverGrammar function runs the given parser function with a new cover grammar context, and it does not + // effect the current flags. This means the production the parser parses is only used as an expression. Therefore + // the CoverInitializedName check is conducted. + // + // inheritCoverGrammar function runs the given parse function with a new cover grammar context, and it propagates + // the flags outside of the parser. This means the production the parser parses is used as a part of a potential + // pattern. The CoverInitializedName check is deferred. + Parser.prototype.isolateCoverGrammar = function (parseFunction) { + var previousIsBindingElement = this.context.isBindingElement; + var previousIsAssignmentTarget = this.context.isAssignmentTarget; + var previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError; + this.context.isBindingElement = true; + this.context.isAssignmentTarget = true; + this.context.firstCoverInitializedNameError = null; + var result = parseFunction.call(this); + if (this.context.firstCoverInitializedNameError !== null) { + this.throwUnexpectedToken(this.context.firstCoverInitializedNameError); + } + this.context.isBindingElement = previousIsBindingElement; + this.context.isAssignmentTarget = previousIsAssignmentTarget; + this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError; + return result; + }; + Parser.prototype.inheritCoverGrammar = function (parseFunction) { + var previousIsBindingElement = this.context.isBindingElement; + var previousIsAssignmentTarget = this.context.isAssignmentTarget; + var previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError; + this.context.isBindingElement = true; + this.context.isAssignmentTarget = true; + this.context.firstCoverInitializedNameError = null; + var result = parseFunction.call(this); + this.context.isBindingElement = this.context.isBindingElement && previousIsBindingElement; + this.context.isAssignmentTarget = this.context.isAssignmentTarget && previousIsAssignmentTarget; + this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError || this.context.firstCoverInitializedNameError; + return result; + }; + Parser.prototype.consumeSemicolon = function () { + if (this.match(';')) { + this.nextToken(); + } + else if (!this.hasLineTerminator) { + if (this.lookahead.type !== 2 /* EOF */ && !this.match('}')) { + this.throwUnexpectedToken(this.lookahead); + } + this.lastMarker.index = this.startMarker.index; + this.lastMarker.line = this.startMarker.line; + this.lastMarker.column = this.startMarker.column; + } + }; + // https://tc39.github.io/ecma262/#sec-primary-expression + Parser.prototype.parsePrimaryExpression = function () { + var node = this.createNode(); + var expr; + var token, raw; + switch (this.lookahead.type) { + case 3 /* Identifier */: + if ((this.context.isModule || this.context.await) && this.lookahead.value === 'await') { + this.tolerateUnexpectedToken(this.lookahead); + } + expr = this.matchAsyncFunction() ? this.parseFunctionExpression() : this.finalize(node, new Node.Identifier(this.nextToken().value)); + break; + case 6 /* NumericLiteral */: + case 8 /* StringLiteral */: + if (this.context.strict && this.lookahead.octal) { + this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.StrictOctalLiteral); + } + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + token = this.nextToken(); + raw = this.getTokenRaw(token); + expr = this.finalize(node, new Node.Literal(token.value, raw)); + break; + case 1 /* BooleanLiteral */: + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + token = this.nextToken(); + raw = this.getTokenRaw(token); + expr = this.finalize(node, new Node.Literal(token.value === 'true', raw)); + break; + case 5 /* NullLiteral */: + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + token = this.nextToken(); + raw = this.getTokenRaw(token); + expr = this.finalize(node, new Node.Literal(null, raw)); + break; + case 10 /* Template */: + expr = this.parseTemplateLiteral(); + break; + case 7 /* Punctuator */: + switch (this.lookahead.value) { + case '(': + this.context.isBindingElement = false; + expr = this.inheritCoverGrammar(this.parseGroupExpression); + break; + case '[': + expr = this.inheritCoverGrammar(this.parseArrayInitializer); + break; + case '{': + expr = this.inheritCoverGrammar(this.parseObjectInitializer); + break; + case '/': + case '/=': + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + this.scanner.index = this.startMarker.index; + token = this.nextRegexToken(); + raw = this.getTokenRaw(token); + expr = this.finalize(node, new Node.RegexLiteral(token.regex, raw, token.pattern, token.flags)); + break; + default: + expr = this.throwUnexpectedToken(this.nextToken()); + } + break; + case 4 /* Keyword */: + if (!this.context.strict && this.context.allowYield && this.matchKeyword('yield')) { + expr = this.parseIdentifierName(); + } + else if (!this.context.strict && this.matchKeyword('let')) { + expr = this.finalize(node, new Node.Identifier(this.nextToken().value)); + } + else { + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + if (this.matchKeyword('function')) { + expr = this.parseFunctionExpression(); + } + else if (this.matchKeyword('this')) { + this.nextToken(); + expr = this.finalize(node, new Node.ThisExpression()); + } + else if (this.matchKeyword('class')) { + expr = this.parseClassExpression(); + } + else { + expr = this.throwUnexpectedToken(this.nextToken()); + } + } + break; + default: + expr = this.throwUnexpectedToken(this.nextToken()); + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-array-initializer + Parser.prototype.parseSpreadElement = function () { + var node = this.createNode(); + this.expect('...'); + var arg = this.inheritCoverGrammar(this.parseAssignmentExpression); + return this.finalize(node, new Node.SpreadElement(arg)); + }; + Parser.prototype.parseArrayInitializer = function () { + var node = this.createNode(); + var elements = []; + this.expect('['); + while (!this.match(']')) { + if (this.match(',')) { + this.nextToken(); + elements.push(null); + } + else if (this.match('...')) { + var element = this.parseSpreadElement(); + if (!this.match(']')) { + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + this.expect(','); + } + elements.push(element); + } + else { + elements.push(this.inheritCoverGrammar(this.parseAssignmentExpression)); + if (!this.match(']')) { + this.expect(','); + } + } + } + this.expect(']'); + return this.finalize(node, new Node.ArrayExpression(elements)); + }; + // https://tc39.github.io/ecma262/#sec-object-initializer + Parser.prototype.parsePropertyMethod = function (params) { + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + var previousStrict = this.context.strict; + var previousAllowStrictDirective = this.context.allowStrictDirective; + this.context.allowStrictDirective = params.simple; + var body = this.isolateCoverGrammar(this.parseFunctionSourceElements); + if (this.context.strict && params.firstRestricted) { + this.tolerateUnexpectedToken(params.firstRestricted, params.message); + } + if (this.context.strict && params.stricted) { + this.tolerateUnexpectedToken(params.stricted, params.message); + } + this.context.strict = previousStrict; + this.context.allowStrictDirective = previousAllowStrictDirective; + return body; + }; + Parser.prototype.parsePropertyMethodFunction = function () { + var isGenerator = false; + var node = this.createNode(); + var previousAllowYield = this.context.allowYield; + this.context.allowYield = true; + var params = this.parseFormalParameters(); + var method = this.parsePropertyMethod(params); + this.context.allowYield = previousAllowYield; + return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator)); + }; + Parser.prototype.parsePropertyMethodAsyncFunction = function () { + var node = this.createNode(); + var previousAllowYield = this.context.allowYield; + var previousAwait = this.context.await; + this.context.allowYield = false; + this.context.await = true; + var params = this.parseFormalParameters(); + var method = this.parsePropertyMethod(params); + this.context.allowYield = previousAllowYield; + this.context.await = previousAwait; + return this.finalize(node, new Node.AsyncFunctionExpression(null, params.params, method)); + }; + Parser.prototype.parseObjectPropertyKey = function () { + var node = this.createNode(); + var token = this.nextToken(); + var key; + switch (token.type) { + case 8 /* StringLiteral */: + case 6 /* NumericLiteral */: + if (this.context.strict && token.octal) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictOctalLiteral); + } + var raw = this.getTokenRaw(token); + key = this.finalize(node, new Node.Literal(token.value, raw)); + break; + case 3 /* Identifier */: + case 1 /* BooleanLiteral */: + case 5 /* NullLiteral */: + case 4 /* Keyword */: + key = this.finalize(node, new Node.Identifier(token.value)); + break; + case 7 /* Punctuator */: + if (token.value === '[') { + key = this.isolateCoverGrammar(this.parseAssignmentExpression); + this.expect(']'); + } + else { + key = this.throwUnexpectedToken(token); + } + break; + default: + key = this.throwUnexpectedToken(token); + } + return key; + }; + Parser.prototype.isPropertyKey = function (key, value) { + return (key.type === syntax_1.Syntax.Identifier && key.name === value) || + (key.type === syntax_1.Syntax.Literal && key.value === value); + }; + Parser.prototype.parseObjectProperty = function (hasProto) { + var node = this.createNode(); + var token = this.lookahead; + var kind; + var key = null; + var value = null; + var computed = false; + var method = false; + var shorthand = false; + var isAsync = false; + if (token.type === 3 /* Identifier */) { + var id = token.value; + this.nextToken(); + computed = this.match('['); + isAsync = !this.hasLineTerminator && (id === 'async') && + !this.match(':') && !this.match('(') && !this.match('*') && !this.match(','); + key = isAsync ? this.parseObjectPropertyKey() : this.finalize(node, new Node.Identifier(id)); + } + else if (this.match('*')) { + this.nextToken(); + } + else { + computed = this.match('['); + key = this.parseObjectPropertyKey(); + } + var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead); + if (token.type === 3 /* Identifier */ && !isAsync && token.value === 'get' && lookaheadPropertyKey) { + kind = 'get'; + computed = this.match('['); + key = this.parseObjectPropertyKey(); + this.context.allowYield = false; + value = this.parseGetterMethod(); + } + else if (token.type === 3 /* Identifier */ && !isAsync && token.value === 'set' && lookaheadPropertyKey) { + kind = 'set'; + computed = this.match('['); + key = this.parseObjectPropertyKey(); + value = this.parseSetterMethod(); + } + else if (token.type === 7 /* Punctuator */ && token.value === '*' && lookaheadPropertyKey) { + kind = 'init'; + computed = this.match('['); + key = this.parseObjectPropertyKey(); + value = this.parseGeneratorMethod(); + method = true; + } + else { + if (!key) { + this.throwUnexpectedToken(this.lookahead); + } + kind = 'init'; + if (this.match(':') && !isAsync) { + if (!computed && this.isPropertyKey(key, '__proto__')) { + if (hasProto.value) { + this.tolerateError(messages_1.Messages.DuplicateProtoProperty); + } + hasProto.value = true; + } + this.nextToken(); + value = this.inheritCoverGrammar(this.parseAssignmentExpression); + } + else if (this.match('(')) { + value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction(); + method = true; + } + else if (token.type === 3 /* Identifier */) { + var id = this.finalize(node, new Node.Identifier(token.value)); + if (this.match('=')) { + this.context.firstCoverInitializedNameError = this.lookahead; + this.nextToken(); + shorthand = true; + var init = this.isolateCoverGrammar(this.parseAssignmentExpression); + value = this.finalize(node, new Node.AssignmentPattern(id, init)); + } + else { + shorthand = true; + value = id; + } + } + else { + this.throwUnexpectedToken(this.nextToken()); + } + } + return this.finalize(node, new Node.Property(kind, key, computed, value, method, shorthand)); + }; + Parser.prototype.parseObjectInitializer = function () { + var node = this.createNode(); + this.expect('{'); + var properties = []; + var hasProto = { value: false }; + while (!this.match('}')) { + properties.push(this.parseObjectProperty(hasProto)); + if (!this.match('}')) { + this.expectCommaSeparator(); + } + } + this.expect('}'); + return this.finalize(node, new Node.ObjectExpression(properties)); + }; + // https://tc39.github.io/ecma262/#sec-template-literals + Parser.prototype.parseTemplateHead = function () { + assert_1.assert(this.lookahead.head, 'Template literal must start with a template head'); + var node = this.createNode(); + var token = this.nextToken(); + var raw = token.value; + var cooked = token.cooked; + return this.finalize(node, new Node.TemplateElement({ raw: raw, cooked: cooked }, token.tail)); + }; + Parser.prototype.parseTemplateElement = function () { + if (this.lookahead.type !== 10 /* Template */) { + this.throwUnexpectedToken(); + } + var node = this.createNode(); + var token = this.nextToken(); + var raw = token.value; + var cooked = token.cooked; + return this.finalize(node, new Node.TemplateElement({ raw: raw, cooked: cooked }, token.tail)); + }; + Parser.prototype.parseTemplateLiteral = function () { + var node = this.createNode(); + var expressions = []; + var quasis = []; + var quasi = this.parseTemplateHead(); + quasis.push(quasi); + while (!quasi.tail) { + expressions.push(this.parseExpression()); + quasi = this.parseTemplateElement(); + quasis.push(quasi); + } + return this.finalize(node, new Node.TemplateLiteral(quasis, expressions)); + }; + // https://tc39.github.io/ecma262/#sec-grouping-operator + Parser.prototype.reinterpretExpressionAsPattern = function (expr) { + switch (expr.type) { + case syntax_1.Syntax.Identifier: + case syntax_1.Syntax.MemberExpression: + case syntax_1.Syntax.RestElement: + case syntax_1.Syntax.AssignmentPattern: + break; + case syntax_1.Syntax.SpreadElement: + expr.type = syntax_1.Syntax.RestElement; + this.reinterpretExpressionAsPattern(expr.argument); + break; + case syntax_1.Syntax.ArrayExpression: + expr.type = syntax_1.Syntax.ArrayPattern; + for (var i = 0; i < expr.elements.length; i++) { + if (expr.elements[i] !== null) { + this.reinterpretExpressionAsPattern(expr.elements[i]); + } + } + break; + case syntax_1.Syntax.ObjectExpression: + expr.type = syntax_1.Syntax.ObjectPattern; + for (var i = 0; i < expr.properties.length; i++) { + this.reinterpretExpressionAsPattern(expr.properties[i].value); + } + break; + case syntax_1.Syntax.AssignmentExpression: + expr.type = syntax_1.Syntax.AssignmentPattern; + delete expr.operator; + this.reinterpretExpressionAsPattern(expr.left); + break; + default: + // Allow other node type for tolerant parsing. + break; + } + }; + Parser.prototype.parseGroupExpression = function () { + var expr; + this.expect('('); + if (this.match(')')) { + this.nextToken(); + if (!this.match('=>')) { + this.expect('=>'); + } + expr = { + type: ArrowParameterPlaceHolder, + params: [], + async: false + }; + } + else { + var startToken = this.lookahead; + var params = []; + if (this.match('...')) { + expr = this.parseRestElement(params); + this.expect(')'); + if (!this.match('=>')) { + this.expect('=>'); + } + expr = { + type: ArrowParameterPlaceHolder, + params: [expr], + async: false + }; + } + else { + var arrow = false; + this.context.isBindingElement = true; + expr = this.inheritCoverGrammar(this.parseAssignmentExpression); + if (this.match(',')) { + var expressions = []; + this.context.isAssignmentTarget = false; + expressions.push(expr); + while (this.lookahead.type !== 2 /* EOF */) { + if (!this.match(',')) { + break; + } + this.nextToken(); + if (this.match(')')) { + this.nextToken(); + for (var i = 0; i < expressions.length; i++) { + this.reinterpretExpressionAsPattern(expressions[i]); + } + arrow = true; + expr = { + type: ArrowParameterPlaceHolder, + params: expressions, + async: false + }; + } + else if (this.match('...')) { + if (!this.context.isBindingElement) { + this.throwUnexpectedToken(this.lookahead); + } + expressions.push(this.parseRestElement(params)); + this.expect(')'); + if (!this.match('=>')) { + this.expect('=>'); + } + this.context.isBindingElement = false; + for (var i = 0; i < expressions.length; i++) { + this.reinterpretExpressionAsPattern(expressions[i]); + } + arrow = true; + expr = { + type: ArrowParameterPlaceHolder, + params: expressions, + async: false + }; + } + else { + expressions.push(this.inheritCoverGrammar(this.parseAssignmentExpression)); + } + if (arrow) { + break; + } + } + if (!arrow) { + expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions)); + } + } + if (!arrow) { + this.expect(')'); + if (this.match('=>')) { + if (expr.type === syntax_1.Syntax.Identifier && expr.name === 'yield') { + arrow = true; + expr = { + type: ArrowParameterPlaceHolder, + params: [expr], + async: false + }; + } + if (!arrow) { + if (!this.context.isBindingElement) { + this.throwUnexpectedToken(this.lookahead); + } + if (expr.type === syntax_1.Syntax.SequenceExpression) { + for (var i = 0; i < expr.expressions.length; i++) { + this.reinterpretExpressionAsPattern(expr.expressions[i]); + } + } + else { + this.reinterpretExpressionAsPattern(expr); + } + var parameters = (expr.type === syntax_1.Syntax.SequenceExpression ? expr.expressions : [expr]); + expr = { + type: ArrowParameterPlaceHolder, + params: parameters, + async: false + }; + } + } + this.context.isBindingElement = false; + } + } + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-left-hand-side-expressions + Parser.prototype.parseArguments = function () { + this.expect('('); + var args = []; + if (!this.match(')')) { + while (true) { + var expr = this.match('...') ? this.parseSpreadElement() : + this.isolateCoverGrammar(this.parseAssignmentExpression); + args.push(expr); + if (this.match(')')) { + break; + } + this.expectCommaSeparator(); + if (this.match(')')) { + break; + } + } + } + this.expect(')'); + return args; + }; + Parser.prototype.isIdentifierName = function (token) { + return token.type === 3 /* Identifier */ || + token.type === 4 /* Keyword */ || + token.type === 1 /* BooleanLiteral */ || + token.type === 5 /* NullLiteral */; + }; + Parser.prototype.parseIdentifierName = function () { + var node = this.createNode(); + var token = this.nextToken(); + if (!this.isIdentifierName(token)) { + this.throwUnexpectedToken(token); + } + return this.finalize(node, new Node.Identifier(token.value)); + }; + Parser.prototype.parseNewExpression = function () { + var node = this.createNode(); + var id = this.parseIdentifierName(); + assert_1.assert(id.name === 'new', 'New expression must start with `new`'); + var expr; + if (this.match('.')) { + this.nextToken(); + if (this.lookahead.type === 3 /* Identifier */ && this.context.inFunctionBody && this.lookahead.value === 'target') { + var property = this.parseIdentifierName(); + expr = new Node.MetaProperty(id, property); + } + else { + this.throwUnexpectedToken(this.lookahead); + } + } + else { + var callee = this.isolateCoverGrammar(this.parseLeftHandSideExpression); + var args = this.match('(') ? this.parseArguments() : []; + expr = new Node.NewExpression(callee, args); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + } + return this.finalize(node, expr); + }; + Parser.prototype.parseAsyncArgument = function () { + var arg = this.parseAssignmentExpression(); + this.context.firstCoverInitializedNameError = null; + return arg; + }; + Parser.prototype.parseAsyncArguments = function () { + this.expect('('); + var args = []; + if (!this.match(')')) { + while (true) { + var expr = this.match('...') ? this.parseSpreadElement() : + this.isolateCoverGrammar(this.parseAsyncArgument); + args.push(expr); + if (this.match(')')) { + break; + } + this.expectCommaSeparator(); + if (this.match(')')) { + break; + } + } + } + this.expect(')'); + return args; + }; + Parser.prototype.parseLeftHandSideExpressionAllowCall = function () { + var startToken = this.lookahead; + var maybeAsync = this.matchContextualKeyword('async'); + var previousAllowIn = this.context.allowIn; + this.context.allowIn = true; + var expr; + if (this.matchKeyword('super') && this.context.inFunctionBody) { + expr = this.createNode(); + this.nextToken(); + expr = this.finalize(expr, new Node.Super()); + if (!this.match('(') && !this.match('.') && !this.match('[')) { + this.throwUnexpectedToken(this.lookahead); + } + } + else { + expr = this.inheritCoverGrammar(this.matchKeyword('new') ? this.parseNewExpression : this.parsePrimaryExpression); + } + while (true) { + if (this.match('.')) { + this.context.isBindingElement = false; + this.context.isAssignmentTarget = true; + this.expect('.'); + var property = this.parseIdentifierName(); + expr = this.finalize(this.startNode(startToken), new Node.StaticMemberExpression(expr, property)); + } + else if (this.match('(')) { + var asyncArrow = maybeAsync && (startToken.lineNumber === this.lookahead.lineNumber); + this.context.isBindingElement = false; + this.context.isAssignmentTarget = false; + var args = asyncArrow ? this.parseAsyncArguments() : this.parseArguments(); + expr = this.finalize(this.startNode(startToken), new Node.CallExpression(expr, args)); + if (asyncArrow && this.match('=>')) { + for (var i = 0; i < args.length; ++i) { + this.reinterpretExpressionAsPattern(args[i]); + } + expr = { + type: ArrowParameterPlaceHolder, + params: args, + async: true + }; + } + } + else if (this.match('[')) { + this.context.isBindingElement = false; + this.context.isAssignmentTarget = true; + this.expect('['); + var property = this.isolateCoverGrammar(this.parseExpression); + this.expect(']'); + expr = this.finalize(this.startNode(startToken), new Node.ComputedMemberExpression(expr, property)); + } + else if (this.lookahead.type === 10 /* Template */ && this.lookahead.head) { + var quasi = this.parseTemplateLiteral(); + expr = this.finalize(this.startNode(startToken), new Node.TaggedTemplateExpression(expr, quasi)); + } + else { + break; + } + } + this.context.allowIn = previousAllowIn; + return expr; + }; + Parser.prototype.parseSuper = function () { + var node = this.createNode(); + this.expectKeyword('super'); + if (!this.match('[') && !this.match('.')) { + this.throwUnexpectedToken(this.lookahead); + } + return this.finalize(node, new Node.Super()); + }; + Parser.prototype.parseLeftHandSideExpression = function () { + assert_1.assert(this.context.allowIn, 'callee of new expression always allow in keyword.'); + var node = this.startNode(this.lookahead); + var expr = (this.matchKeyword('super') && this.context.inFunctionBody) ? this.parseSuper() : + this.inheritCoverGrammar(this.matchKeyword('new') ? this.parseNewExpression : this.parsePrimaryExpression); + while (true) { + if (this.match('[')) { + this.context.isBindingElement = false; + this.context.isAssignmentTarget = true; + this.expect('['); + var property = this.isolateCoverGrammar(this.parseExpression); + this.expect(']'); + expr = this.finalize(node, new Node.ComputedMemberExpression(expr, property)); + } + else if (this.match('.')) { + this.context.isBindingElement = false; + this.context.isAssignmentTarget = true; + this.expect('.'); + var property = this.parseIdentifierName(); + expr = this.finalize(node, new Node.StaticMemberExpression(expr, property)); + } + else if (this.lookahead.type === 10 /* Template */ && this.lookahead.head) { + var quasi = this.parseTemplateLiteral(); + expr = this.finalize(node, new Node.TaggedTemplateExpression(expr, quasi)); + } + else { + break; + } + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-update-expressions + Parser.prototype.parseUpdateExpression = function () { + var expr; + var startToken = this.lookahead; + if (this.match('++') || this.match('--')) { + var node = this.startNode(startToken); + var token = this.nextToken(); + expr = this.inheritCoverGrammar(this.parseUnaryExpression); + if (this.context.strict && expr.type === syntax_1.Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) { + this.tolerateError(messages_1.Messages.StrictLHSPrefix); + } + if (!this.context.isAssignmentTarget) { + this.tolerateError(messages_1.Messages.InvalidLHSInAssignment); + } + var prefix = true; + expr = this.finalize(node, new Node.UpdateExpression(token.value, expr, prefix)); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + } + else { + expr = this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall); + if (!this.hasLineTerminator && this.lookahead.type === 7 /* Punctuator */) { + if (this.match('++') || this.match('--')) { + if (this.context.strict && expr.type === syntax_1.Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) { + this.tolerateError(messages_1.Messages.StrictLHSPostfix); + } + if (!this.context.isAssignmentTarget) { + this.tolerateError(messages_1.Messages.InvalidLHSInAssignment); + } + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + var operator = this.nextToken().value; + var prefix = false; + expr = this.finalize(this.startNode(startToken), new Node.UpdateExpression(operator, expr, prefix)); + } + } + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-unary-operators + Parser.prototype.parseAwaitExpression = function () { + var node = this.createNode(); + this.nextToken(); + var argument = this.parseUnaryExpression(); + return this.finalize(node, new Node.AwaitExpression(argument)); + }; + Parser.prototype.parseUnaryExpression = function () { + var expr; + if (this.match('+') || this.match('-') || this.match('~') || this.match('!') || + this.matchKeyword('delete') || this.matchKeyword('void') || this.matchKeyword('typeof')) { + var node = this.startNode(this.lookahead); + var token = this.nextToken(); + expr = this.inheritCoverGrammar(this.parseUnaryExpression); + expr = this.finalize(node, new Node.UnaryExpression(token.value, expr)); + if (this.context.strict && expr.operator === 'delete' && expr.argument.type === syntax_1.Syntax.Identifier) { + this.tolerateError(messages_1.Messages.StrictDelete); + } + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + } + else if (this.context.await && this.matchContextualKeyword('await')) { + expr = this.parseAwaitExpression(); + } + else { + expr = this.parseUpdateExpression(); + } + return expr; + }; + Parser.prototype.parseExponentiationExpression = function () { + var startToken = this.lookahead; + var expr = this.inheritCoverGrammar(this.parseUnaryExpression); + if (expr.type !== syntax_1.Syntax.UnaryExpression && this.match('**')) { + this.nextToken(); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + var left = expr; + var right = this.isolateCoverGrammar(this.parseExponentiationExpression); + expr = this.finalize(this.startNode(startToken), new Node.BinaryExpression('**', left, right)); + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-exp-operator + // https://tc39.github.io/ecma262/#sec-multiplicative-operators + // https://tc39.github.io/ecma262/#sec-additive-operators + // https://tc39.github.io/ecma262/#sec-bitwise-shift-operators + // https://tc39.github.io/ecma262/#sec-relational-operators + // https://tc39.github.io/ecma262/#sec-equality-operators + // https://tc39.github.io/ecma262/#sec-binary-bitwise-operators + // https://tc39.github.io/ecma262/#sec-binary-logical-operators + Parser.prototype.binaryPrecedence = function (token) { + var op = token.value; + var precedence; + if (token.type === 7 /* Punctuator */) { + precedence = this.operatorPrecedence[op] || 0; + } + else if (token.type === 4 /* Keyword */) { + precedence = (op === 'instanceof' || (this.context.allowIn && op === 'in')) ? 7 : 0; + } + else { + precedence = 0; + } + return precedence; + }; + Parser.prototype.parseBinaryExpression = function () { + var startToken = this.lookahead; + var expr = this.inheritCoverGrammar(this.parseExponentiationExpression); + var token = this.lookahead; + var prec = this.binaryPrecedence(token); + if (prec > 0) { + this.nextToken(); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + var markers = [startToken, this.lookahead]; + var left = expr; + var right = this.isolateCoverGrammar(this.parseExponentiationExpression); + var stack = [left, token.value, right]; + var precedences = [prec]; + while (true) { + prec = this.binaryPrecedence(this.lookahead); + if (prec <= 0) { + break; + } + // Reduce: make a binary expression from the three topmost entries. + while ((stack.length > 2) && (prec <= precedences[precedences.length - 1])) { + right = stack.pop(); + var operator = stack.pop(); + precedences.pop(); + left = stack.pop(); + markers.pop(); + var node = this.startNode(markers[markers.length - 1]); + stack.push(this.finalize(node, new Node.BinaryExpression(operator, left, right))); + } + // Shift. + stack.push(this.nextToken().value); + precedences.push(prec); + markers.push(this.lookahead); + stack.push(this.isolateCoverGrammar(this.parseExponentiationExpression)); + } + // Final reduce to clean-up the stack. + var i = stack.length - 1; + expr = stack[i]; + var lastMarker = markers.pop(); + while (i > 1) { + var marker = markers.pop(); + var lastLineStart = lastMarker && lastMarker.lineStart; + var node = this.startNode(marker, lastLineStart); + var operator = stack[i - 1]; + expr = this.finalize(node, new Node.BinaryExpression(operator, stack[i - 2], expr)); + i -= 2; + lastMarker = marker; + } + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-conditional-operator + Parser.prototype.parseConditionalExpression = function () { + var startToken = this.lookahead; + var expr = this.inheritCoverGrammar(this.parseBinaryExpression); + if (this.match('?')) { + this.nextToken(); + var previousAllowIn = this.context.allowIn; + this.context.allowIn = true; + var consequent = this.isolateCoverGrammar(this.parseAssignmentExpression); + this.context.allowIn = previousAllowIn; + this.expect(':'); + var alternate = this.isolateCoverGrammar(this.parseAssignmentExpression); + expr = this.finalize(this.startNode(startToken), new Node.ConditionalExpression(expr, consequent, alternate)); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-assignment-operators + Parser.prototype.checkPatternParam = function (options, param) { + switch (param.type) { + case syntax_1.Syntax.Identifier: + this.validateParam(options, param, param.name); + break; + case syntax_1.Syntax.RestElement: + this.checkPatternParam(options, param.argument); + break; + case syntax_1.Syntax.AssignmentPattern: + this.checkPatternParam(options, param.left); + break; + case syntax_1.Syntax.ArrayPattern: + for (var i = 0; i < param.elements.length; i++) { + if (param.elements[i] !== null) { + this.checkPatternParam(options, param.elements[i]); + } + } + break; + case syntax_1.Syntax.ObjectPattern: + for (var i = 0; i < param.properties.length; i++) { + this.checkPatternParam(options, param.properties[i].value); + } + break; + default: + break; + } + options.simple = options.simple && (param instanceof Node.Identifier); + }; + Parser.prototype.reinterpretAsCoverFormalsList = function (expr) { + var params = [expr]; + var options; + var asyncArrow = false; + switch (expr.type) { + case syntax_1.Syntax.Identifier: + break; + case ArrowParameterPlaceHolder: + params = expr.params; + asyncArrow = expr.async; + break; + default: + return null; + } + options = { + simple: true, + paramSet: {} + }; + for (var i = 0; i < params.length; ++i) { + var param = params[i]; + if (param.type === syntax_1.Syntax.AssignmentPattern) { + if (param.right.type === syntax_1.Syntax.YieldExpression) { + if (param.right.argument) { + this.throwUnexpectedToken(this.lookahead); + } + param.right.type = syntax_1.Syntax.Identifier; + param.right.name = 'yield'; + delete param.right.argument; + delete param.right.delegate; + } + } + else if (asyncArrow && param.type === syntax_1.Syntax.Identifier && param.name === 'await') { + this.throwUnexpectedToken(this.lookahead); + } + this.checkPatternParam(options, param); + params[i] = param; + } + if (this.context.strict || !this.context.allowYield) { + for (var i = 0; i < params.length; ++i) { + var param = params[i]; + if (param.type === syntax_1.Syntax.YieldExpression) { + this.throwUnexpectedToken(this.lookahead); + } + } + } + if (options.message === messages_1.Messages.StrictParamDupe) { + var token = this.context.strict ? options.stricted : options.firstRestricted; + this.throwUnexpectedToken(token, options.message); + } + return { + simple: options.simple, + params: params, + stricted: options.stricted, + firstRestricted: options.firstRestricted, + message: options.message + }; + }; + Parser.prototype.parseAssignmentExpression = function () { + var expr; + if (!this.context.allowYield && this.matchKeyword('yield')) { + expr = this.parseYieldExpression(); + } + else { + var startToken = this.lookahead; + var token = startToken; + expr = this.parseConditionalExpression(); + if (token.type === 3 /* Identifier */ && (token.lineNumber === this.lookahead.lineNumber) && token.value === 'async') { + if (this.lookahead.type === 3 /* Identifier */ || this.matchKeyword('yield')) { + var arg = this.parsePrimaryExpression(); + this.reinterpretExpressionAsPattern(arg); + expr = { + type: ArrowParameterPlaceHolder, + params: [arg], + async: true + }; + } + } + if (expr.type === ArrowParameterPlaceHolder || this.match('=>')) { + // https://tc39.github.io/ecma262/#sec-arrow-function-definitions + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + var isAsync = expr.async; + var list = this.reinterpretAsCoverFormalsList(expr); + if (list) { + if (this.hasLineTerminator) { + this.tolerateUnexpectedToken(this.lookahead); + } + this.context.firstCoverInitializedNameError = null; + var previousStrict = this.context.strict; + var previousAllowStrictDirective = this.context.allowStrictDirective; + this.context.allowStrictDirective = list.simple; + var previousAllowYield = this.context.allowYield; + var previousAwait = this.context.await; + this.context.allowYield = true; + this.context.await = isAsync; + var node = this.startNode(startToken); + this.expect('=>'); + var body = void 0; + if (this.match('{')) { + var previousAllowIn = this.context.allowIn; + this.context.allowIn = true; + body = this.parseFunctionSourceElements(); + this.context.allowIn = previousAllowIn; + } + else { + body = this.isolateCoverGrammar(this.parseAssignmentExpression); + } + var expression = body.type !== syntax_1.Syntax.BlockStatement; + if (this.context.strict && list.firstRestricted) { + this.throwUnexpectedToken(list.firstRestricted, list.message); + } + if (this.context.strict && list.stricted) { + this.tolerateUnexpectedToken(list.stricted, list.message); + } + expr = isAsync ? this.finalize(node, new Node.AsyncArrowFunctionExpression(list.params, body, expression)) : + this.finalize(node, new Node.ArrowFunctionExpression(list.params, body, expression)); + this.context.strict = previousStrict; + this.context.allowStrictDirective = previousAllowStrictDirective; + this.context.allowYield = previousAllowYield; + this.context.await = previousAwait; + } + } + else { + if (this.matchAssign()) { + if (!this.context.isAssignmentTarget) { + this.tolerateError(messages_1.Messages.InvalidLHSInAssignment); + } + if (this.context.strict && expr.type === syntax_1.Syntax.Identifier) { + var id = expr; + if (this.scanner.isRestrictedWord(id.name)) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictLHSAssignment); + } + if (this.scanner.isStrictModeReservedWord(id.name)) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord); + } + } + if (!this.match('=')) { + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + } + else { + this.reinterpretExpressionAsPattern(expr); + } + token = this.nextToken(); + var operator = token.value; + var right = this.isolateCoverGrammar(this.parseAssignmentExpression); + expr = this.finalize(this.startNode(startToken), new Node.AssignmentExpression(operator, expr, right)); + this.context.firstCoverInitializedNameError = null; + } + } + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-comma-operator + Parser.prototype.parseExpression = function () { + var startToken = this.lookahead; + var expr = this.isolateCoverGrammar(this.parseAssignmentExpression); + if (this.match(',')) { + var expressions = []; + expressions.push(expr); + while (this.lookahead.type !== 2 /* EOF */) { + if (!this.match(',')) { + break; + } + this.nextToken(); + expressions.push(this.isolateCoverGrammar(this.parseAssignmentExpression)); + } + expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions)); + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-block + Parser.prototype.parseStatementListItem = function () { + var statement; + this.context.isAssignmentTarget = true; + this.context.isBindingElement = true; + if (this.lookahead.type === 4 /* Keyword */) { + switch (this.lookahead.value) { + case 'export': + if (!this.context.isModule) { + this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.IllegalExportDeclaration); + } + statement = this.parseExportDeclaration(); + break; + case 'import': + if (!this.context.isModule) { + this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.IllegalImportDeclaration); + } + statement = this.parseImportDeclaration(); + break; + case 'const': + statement = this.parseLexicalDeclaration({ inFor: false }); + break; + case 'function': + statement = this.parseFunctionDeclaration(); + break; + case 'class': + statement = this.parseClassDeclaration(); + break; + case 'let': + statement = this.isLexicalDeclaration() ? this.parseLexicalDeclaration({ inFor: false }) : this.parseStatement(); + break; + default: + statement = this.parseStatement(); + break; + } + } + else { + statement = this.parseStatement(); + } + return statement; + }; + Parser.prototype.parseBlock = function () { + var node = this.createNode(); + this.expect('{'); + var block = []; + while (true) { + if (this.match('}')) { + break; + } + block.push(this.parseStatementListItem()); + } + this.expect('}'); + return this.finalize(node, new Node.BlockStatement(block)); + }; + // https://tc39.github.io/ecma262/#sec-let-and-const-declarations + Parser.prototype.parseLexicalBinding = function (kind, options) { + var node = this.createNode(); + var params = []; + var id = this.parsePattern(params, kind); + if (this.context.strict && id.type === syntax_1.Syntax.Identifier) { + if (this.scanner.isRestrictedWord(id.name)) { + this.tolerateError(messages_1.Messages.StrictVarName); + } + } + var init = null; + if (kind === 'const') { + if (!this.matchKeyword('in') && !this.matchContextualKeyword('of')) { + if (this.match('=')) { + this.nextToken(); + init = this.isolateCoverGrammar(this.parseAssignmentExpression); + } + else { + this.throwError(messages_1.Messages.DeclarationMissingInitializer, 'const'); + } + } + } + else if ((!options.inFor && id.type !== syntax_1.Syntax.Identifier) || this.match('=')) { + this.expect('='); + init = this.isolateCoverGrammar(this.parseAssignmentExpression); + } + return this.finalize(node, new Node.VariableDeclarator(id, init)); + }; + Parser.prototype.parseBindingList = function (kind, options) { + var list = [this.parseLexicalBinding(kind, options)]; + while (this.match(',')) { + this.nextToken(); + list.push(this.parseLexicalBinding(kind, options)); + } + return list; + }; + Parser.prototype.isLexicalDeclaration = function () { + var state = this.scanner.saveState(); + this.scanner.scanComments(); + var next = this.scanner.lex(); + this.scanner.restoreState(state); + return (next.type === 3 /* Identifier */) || + (next.type === 7 /* Punctuator */ && next.value === '[') || + (next.type === 7 /* Punctuator */ && next.value === '{') || + (next.type === 4 /* Keyword */ && next.value === 'let') || + (next.type === 4 /* Keyword */ && next.value === 'yield'); + }; + Parser.prototype.parseLexicalDeclaration = function (options) { + var node = this.createNode(); + var kind = this.nextToken().value; + assert_1.assert(kind === 'let' || kind === 'const', 'Lexical declaration must be either let or const'); + var declarations = this.parseBindingList(kind, options); + this.consumeSemicolon(); + return this.finalize(node, new Node.VariableDeclaration(declarations, kind)); + }; + // https://tc39.github.io/ecma262/#sec-destructuring-binding-patterns + Parser.prototype.parseBindingRestElement = function (params, kind) { + var node = this.createNode(); + this.expect('...'); + var arg = this.parsePattern(params, kind); + return this.finalize(node, new Node.RestElement(arg)); + }; + Parser.prototype.parseArrayPattern = function (params, kind) { + var node = this.createNode(); + this.expect('['); + var elements = []; + while (!this.match(']')) { + if (this.match(',')) { + this.nextToken(); + elements.push(null); + } + else { + if (this.match('...')) { + elements.push(this.parseBindingRestElement(params, kind)); + break; + } + else { + elements.push(this.parsePatternWithDefault(params, kind)); + } + if (!this.match(']')) { + this.expect(','); + } + } + } + this.expect(']'); + return this.finalize(node, new Node.ArrayPattern(elements)); + }; + Parser.prototype.parsePropertyPattern = function (params, kind) { + var node = this.createNode(); + var computed = false; + var shorthand = false; + var method = false; + var key; + var value; + if (this.lookahead.type === 3 /* Identifier */) { + var keyToken = this.lookahead; + key = this.parseVariableIdentifier(); + var init = this.finalize(node, new Node.Identifier(keyToken.value)); + if (this.match('=')) { + params.push(keyToken); + shorthand = true; + this.nextToken(); + var expr = this.parseAssignmentExpression(); + value = this.finalize(this.startNode(keyToken), new Node.AssignmentPattern(init, expr)); + } + else if (!this.match(':')) { + params.push(keyToken); + shorthand = true; + value = init; + } + else { + this.expect(':'); + value = this.parsePatternWithDefault(params, kind); + } + } + else { + computed = this.match('['); + key = this.parseObjectPropertyKey(); + this.expect(':'); + value = this.parsePatternWithDefault(params, kind); + } + return this.finalize(node, new Node.Property('init', key, computed, value, method, shorthand)); + }; + Parser.prototype.parseObjectPattern = function (params, kind) { + var node = this.createNode(); + var properties = []; + this.expect('{'); + while (!this.match('}')) { + properties.push(this.parsePropertyPattern(params, kind)); + if (!this.match('}')) { + this.expect(','); + } + } + this.expect('}'); + return this.finalize(node, new Node.ObjectPattern(properties)); + }; + Parser.prototype.parsePattern = function (params, kind) { + var pattern; + if (this.match('[')) { + pattern = this.parseArrayPattern(params, kind); + } + else if (this.match('{')) { + pattern = this.parseObjectPattern(params, kind); + } + else { + if (this.matchKeyword('let') && (kind === 'const' || kind === 'let')) { + this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.LetInLexicalBinding); + } + params.push(this.lookahead); + pattern = this.parseVariableIdentifier(kind); + } + return pattern; + }; + Parser.prototype.parsePatternWithDefault = function (params, kind) { + var startToken = this.lookahead; + var pattern = this.parsePattern(params, kind); + if (this.match('=')) { + this.nextToken(); + var previousAllowYield = this.context.allowYield; + this.context.allowYield = true; + var right = this.isolateCoverGrammar(this.parseAssignmentExpression); + this.context.allowYield = previousAllowYield; + pattern = this.finalize(this.startNode(startToken), new Node.AssignmentPattern(pattern, right)); + } + return pattern; + }; + // https://tc39.github.io/ecma262/#sec-variable-statement + Parser.prototype.parseVariableIdentifier = function (kind) { + var node = this.createNode(); + var token = this.nextToken(); + if (token.type === 4 /* Keyword */ && token.value === 'yield') { + if (this.context.strict) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord); + } + else if (!this.context.allowYield) { + this.throwUnexpectedToken(token); + } + } + else if (token.type !== 3 /* Identifier */) { + if (this.context.strict && token.type === 4 /* Keyword */ && this.scanner.isStrictModeReservedWord(token.value)) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord); + } + else { + if (this.context.strict || token.value !== 'let' || kind !== 'var') { + this.throwUnexpectedToken(token); + } + } + } + else if ((this.context.isModule || this.context.await) && token.type === 3 /* Identifier */ && token.value === 'await') { + this.tolerateUnexpectedToken(token); + } + return this.finalize(node, new Node.Identifier(token.value)); + }; + Parser.prototype.parseVariableDeclaration = function (options) { + var node = this.createNode(); + var params = []; + var id = this.parsePattern(params, 'var'); + if (this.context.strict && id.type === syntax_1.Syntax.Identifier) { + if (this.scanner.isRestrictedWord(id.name)) { + this.tolerateError(messages_1.Messages.StrictVarName); + } + } + var init = null; + if (this.match('=')) { + this.nextToken(); + init = this.isolateCoverGrammar(this.parseAssignmentExpression); + } + else if (id.type !== syntax_1.Syntax.Identifier && !options.inFor) { + this.expect('='); + } + return this.finalize(node, new Node.VariableDeclarator(id, init)); + }; + Parser.prototype.parseVariableDeclarationList = function (options) { + var opt = { inFor: options.inFor }; + var list = []; + list.push(this.parseVariableDeclaration(opt)); + while (this.match(',')) { + this.nextToken(); + list.push(this.parseVariableDeclaration(opt)); + } + return list; + }; + Parser.prototype.parseVariableStatement = function () { + var node = this.createNode(); + this.expectKeyword('var'); + var declarations = this.parseVariableDeclarationList({ inFor: false }); + this.consumeSemicolon(); + return this.finalize(node, new Node.VariableDeclaration(declarations, 'var')); + }; + // https://tc39.github.io/ecma262/#sec-empty-statement + Parser.prototype.parseEmptyStatement = function () { + var node = this.createNode(); + this.expect(';'); + return this.finalize(node, new Node.EmptyStatement()); + }; + // https://tc39.github.io/ecma262/#sec-expression-statement + Parser.prototype.parseExpressionStatement = function () { + var node = this.createNode(); + var expr = this.parseExpression(); + this.consumeSemicolon(); + return this.finalize(node, new Node.ExpressionStatement(expr)); + }; + // https://tc39.github.io/ecma262/#sec-if-statement + Parser.prototype.parseIfClause = function () { + if (this.context.strict && this.matchKeyword('function')) { + this.tolerateError(messages_1.Messages.StrictFunction); + } + return this.parseStatement(); + }; + Parser.prototype.parseIfStatement = function () { + var node = this.createNode(); + var consequent; + var alternate = null; + this.expectKeyword('if'); + this.expect('('); + var test = this.parseExpression(); + if (!this.match(')') && this.config.tolerant) { + this.tolerateUnexpectedToken(this.nextToken()); + consequent = this.finalize(this.createNode(), new Node.EmptyStatement()); + } + else { + this.expect(')'); + consequent = this.parseIfClause(); + if (this.matchKeyword('else')) { + this.nextToken(); + alternate = this.parseIfClause(); + } + } + return this.finalize(node, new Node.IfStatement(test, consequent, alternate)); + }; + // https://tc39.github.io/ecma262/#sec-do-while-statement + Parser.prototype.parseDoWhileStatement = function () { + var node = this.createNode(); + this.expectKeyword('do'); + var previousInIteration = this.context.inIteration; + this.context.inIteration = true; + var body = this.parseStatement(); + this.context.inIteration = previousInIteration; + this.expectKeyword('while'); + this.expect('('); + var test = this.parseExpression(); + if (!this.match(')') && this.config.tolerant) { + this.tolerateUnexpectedToken(this.nextToken()); + } + else { + this.expect(')'); + if (this.match(';')) { + this.nextToken(); + } + } + return this.finalize(node, new Node.DoWhileStatement(body, test)); + }; + // https://tc39.github.io/ecma262/#sec-while-statement + Parser.prototype.parseWhileStatement = function () { + var node = this.createNode(); + var body; + this.expectKeyword('while'); + this.expect('('); + var test = this.parseExpression(); + if (!this.match(')') && this.config.tolerant) { + this.tolerateUnexpectedToken(this.nextToken()); + body = this.finalize(this.createNode(), new Node.EmptyStatement()); + } + else { + this.expect(')'); + var previousInIteration = this.context.inIteration; + this.context.inIteration = true; + body = this.parseStatement(); + this.context.inIteration = previousInIteration; + } + return this.finalize(node, new Node.WhileStatement(test, body)); + }; + // https://tc39.github.io/ecma262/#sec-for-statement + // https://tc39.github.io/ecma262/#sec-for-in-and-for-of-statements + Parser.prototype.parseForStatement = function () { + var init = null; + var test = null; + var update = null; + var forIn = true; + var left, right; + var node = this.createNode(); + this.expectKeyword('for'); + this.expect('('); + if (this.match(';')) { + this.nextToken(); + } + else { + if (this.matchKeyword('var')) { + init = this.createNode(); + this.nextToken(); + var previousAllowIn = this.context.allowIn; + this.context.allowIn = false; + var declarations = this.parseVariableDeclarationList({ inFor: true }); + this.context.allowIn = previousAllowIn; + if (declarations.length === 1 && this.matchKeyword('in')) { + var decl = declarations[0]; + if (decl.init && (decl.id.type === syntax_1.Syntax.ArrayPattern || decl.id.type === syntax_1.Syntax.ObjectPattern || this.context.strict)) { + this.tolerateError(messages_1.Messages.ForInOfLoopInitializer, 'for-in'); + } + init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var')); + this.nextToken(); + left = init; + right = this.parseExpression(); + init = null; + } + else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword('of')) { + init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var')); + this.nextToken(); + left = init; + right = this.parseAssignmentExpression(); + init = null; + forIn = false; + } + else { + init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var')); + this.expect(';'); + } + } + else if (this.matchKeyword('const') || this.matchKeyword('let')) { + init = this.createNode(); + var kind = this.nextToken().value; + if (!this.context.strict && this.lookahead.value === 'in') { + init = this.finalize(init, new Node.Identifier(kind)); + this.nextToken(); + left = init; + right = this.parseExpression(); + init = null; + } + else { + var previousAllowIn = this.context.allowIn; + this.context.allowIn = false; + var declarations = this.parseBindingList(kind, { inFor: true }); + this.context.allowIn = previousAllowIn; + if (declarations.length === 1 && declarations[0].init === null && this.matchKeyword('in')) { + init = this.finalize(init, new Node.VariableDeclaration(declarations, kind)); + this.nextToken(); + left = init; + right = this.parseExpression(); + init = null; + } + else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword('of')) { + init = this.finalize(init, new Node.VariableDeclaration(declarations, kind)); + this.nextToken(); + left = init; + right = this.parseAssignmentExpression(); + init = null; + forIn = false; + } + else { + this.consumeSemicolon(); + init = this.finalize(init, new Node.VariableDeclaration(declarations, kind)); + } + } + } + else { + var initStartToken = this.lookahead; + var previousAllowIn = this.context.allowIn; + this.context.allowIn = false; + init = this.inheritCoverGrammar(this.parseAssignmentExpression); + this.context.allowIn = previousAllowIn; + if (this.matchKeyword('in')) { + if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) { + this.tolerateError(messages_1.Messages.InvalidLHSInForIn); + } + this.nextToken(); + this.reinterpretExpressionAsPattern(init); + left = init; + right = this.parseExpression(); + init = null; + } + else if (this.matchContextualKeyword('of')) { + if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) { + this.tolerateError(messages_1.Messages.InvalidLHSInForLoop); + } + this.nextToken(); + this.reinterpretExpressionAsPattern(init); + left = init; + right = this.parseAssignmentExpression(); + init = null; + forIn = false; + } + else { + if (this.match(',')) { + var initSeq = [init]; + while (this.match(',')) { + this.nextToken(); + initSeq.push(this.isolateCoverGrammar(this.parseAssignmentExpression)); + } + init = this.finalize(this.startNode(initStartToken), new Node.SequenceExpression(initSeq)); + } + this.expect(';'); + } + } + } + if (typeof left === 'undefined') { + if (!this.match(';')) { + test = this.parseExpression(); + } + this.expect(';'); + if (!this.match(')')) { + update = this.parseExpression(); + } + } + var body; + if (!this.match(')') && this.config.tolerant) { + this.tolerateUnexpectedToken(this.nextToken()); + body = this.finalize(this.createNode(), new Node.EmptyStatement()); + } + else { + this.expect(')'); + var previousInIteration = this.context.inIteration; + this.context.inIteration = true; + body = this.isolateCoverGrammar(this.parseStatement); + this.context.inIteration = previousInIteration; + } + return (typeof left === 'undefined') ? + this.finalize(node, new Node.ForStatement(init, test, update, body)) : + forIn ? this.finalize(node, new Node.ForInStatement(left, right, body)) : + this.finalize(node, new Node.ForOfStatement(left, right, body)); + }; + // https://tc39.github.io/ecma262/#sec-continue-statement + Parser.prototype.parseContinueStatement = function () { + var node = this.createNode(); + this.expectKeyword('continue'); + var label = null; + if (this.lookahead.type === 3 /* Identifier */ && !this.hasLineTerminator) { + var id = this.parseVariableIdentifier(); + label = id; + var key = '$' + id.name; + if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) { + this.throwError(messages_1.Messages.UnknownLabel, id.name); + } + } + this.consumeSemicolon(); + if (label === null && !this.context.inIteration) { + this.throwError(messages_1.Messages.IllegalContinue); + } + return this.finalize(node, new Node.ContinueStatement(label)); + }; + // https://tc39.github.io/ecma262/#sec-break-statement + Parser.prototype.parseBreakStatement = function () { + var node = this.createNode(); + this.expectKeyword('break'); + var label = null; + if (this.lookahead.type === 3 /* Identifier */ && !this.hasLineTerminator) { + var id = this.parseVariableIdentifier(); + var key = '$' + id.name; + if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) { + this.throwError(messages_1.Messages.UnknownLabel, id.name); + } + label = id; + } + this.consumeSemicolon(); + if (label === null && !this.context.inIteration && !this.context.inSwitch) { + this.throwError(messages_1.Messages.IllegalBreak); + } + return this.finalize(node, new Node.BreakStatement(label)); + }; + // https://tc39.github.io/ecma262/#sec-return-statement + Parser.prototype.parseReturnStatement = function () { + if (!this.context.inFunctionBody) { + this.tolerateError(messages_1.Messages.IllegalReturn); + } + var node = this.createNode(); + this.expectKeyword('return'); + var hasArgument = (!this.match(';') && !this.match('}') && + !this.hasLineTerminator && this.lookahead.type !== 2 /* EOF */) || + this.lookahead.type === 8 /* StringLiteral */ || + this.lookahead.type === 10 /* Template */; + var argument = hasArgument ? this.parseExpression() : null; + this.consumeSemicolon(); + return this.finalize(node, new Node.ReturnStatement(argument)); + }; + // https://tc39.github.io/ecma262/#sec-with-statement + Parser.prototype.parseWithStatement = function () { + if (this.context.strict) { + this.tolerateError(messages_1.Messages.StrictModeWith); + } + var node = this.createNode(); + var body; + this.expectKeyword('with'); + this.expect('('); + var object = this.parseExpression(); + if (!this.match(')') && this.config.tolerant) { + this.tolerateUnexpectedToken(this.nextToken()); + body = this.finalize(this.createNode(), new Node.EmptyStatement()); + } + else { + this.expect(')'); + body = this.parseStatement(); + } + return this.finalize(node, new Node.WithStatement(object, body)); + }; + // https://tc39.github.io/ecma262/#sec-switch-statement + Parser.prototype.parseSwitchCase = function () { + var node = this.createNode(); + var test; + if (this.matchKeyword('default')) { + this.nextToken(); + test = null; + } + else { + this.expectKeyword('case'); + test = this.parseExpression(); + } + this.expect(':'); + var consequent = []; + while (true) { + if (this.match('}') || this.matchKeyword('default') || this.matchKeyword('case')) { + break; + } + consequent.push(this.parseStatementListItem()); + } + return this.finalize(node, new Node.SwitchCase(test, consequent)); + }; + Parser.prototype.parseSwitchStatement = function () { + var node = this.createNode(); + this.expectKeyword('switch'); + this.expect('('); + var discriminant = this.parseExpression(); + this.expect(')'); + var previousInSwitch = this.context.inSwitch; + this.context.inSwitch = true; + var cases = []; + var defaultFound = false; + this.expect('{'); + while (true) { + if (this.match('}')) { + break; + } + var clause = this.parseSwitchCase(); + if (clause.test === null) { + if (defaultFound) { + this.throwError(messages_1.Messages.MultipleDefaultsInSwitch); + } + defaultFound = true; + } + cases.push(clause); + } + this.expect('}'); + this.context.inSwitch = previousInSwitch; + return this.finalize(node, new Node.SwitchStatement(discriminant, cases)); + }; + // https://tc39.github.io/ecma262/#sec-labelled-statements + Parser.prototype.parseLabelledStatement = function () { + var node = this.createNode(); + var expr = this.parseExpression(); + var statement; + if ((expr.type === syntax_1.Syntax.Identifier) && this.match(':')) { + this.nextToken(); + var id = expr; + var key = '$' + id.name; + if (Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) { + this.throwError(messages_1.Messages.Redeclaration, 'Label', id.name); + } + this.context.labelSet[key] = true; + var body = void 0; + if (this.matchKeyword('class')) { + this.tolerateUnexpectedToken(this.lookahead); + body = this.parseClassDeclaration(); + } + else if (this.matchKeyword('function')) { + var token = this.lookahead; + var declaration = this.parseFunctionDeclaration(); + if (this.context.strict) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunction); + } + else if (declaration.generator) { + this.tolerateUnexpectedToken(token, messages_1.Messages.GeneratorInLegacyContext); + } + body = declaration; + } + else { + body = this.parseStatement(); + } + delete this.context.labelSet[key]; + statement = new Node.LabeledStatement(id, body); + } + else { + this.consumeSemicolon(); + statement = new Node.ExpressionStatement(expr); + } + return this.finalize(node, statement); + }; + // https://tc39.github.io/ecma262/#sec-throw-statement + Parser.prototype.parseThrowStatement = function () { + var node = this.createNode(); + this.expectKeyword('throw'); + if (this.hasLineTerminator) { + this.throwError(messages_1.Messages.NewlineAfterThrow); + } + var argument = this.parseExpression(); + this.consumeSemicolon(); + return this.finalize(node, new Node.ThrowStatement(argument)); + }; + // https://tc39.github.io/ecma262/#sec-try-statement + Parser.prototype.parseCatchClause = function () { + var node = this.createNode(); + this.expectKeyword('catch'); + this.expect('('); + if (this.match(')')) { + this.throwUnexpectedToken(this.lookahead); + } + var params = []; + var param = this.parsePattern(params); + var paramMap = {}; + for (var i = 0; i < params.length; i++) { + var key = '$' + params[i].value; + if (Object.prototype.hasOwnProperty.call(paramMap, key)) { + this.tolerateError(messages_1.Messages.DuplicateBinding, params[i].value); + } + paramMap[key] = true; + } + if (this.context.strict && param.type === syntax_1.Syntax.Identifier) { + if (this.scanner.isRestrictedWord(param.name)) { + this.tolerateError(messages_1.Messages.StrictCatchVariable); + } + } + this.expect(')'); + var body = this.parseBlock(); + return this.finalize(node, new Node.CatchClause(param, body)); + }; + Parser.prototype.parseFinallyClause = function () { + this.expectKeyword('finally'); + return this.parseBlock(); + }; + Parser.prototype.parseTryStatement = function () { + var node = this.createNode(); + this.expectKeyword('try'); + var block = this.parseBlock(); + var handler = this.matchKeyword('catch') ? this.parseCatchClause() : null; + var finalizer = this.matchKeyword('finally') ? this.parseFinallyClause() : null; + if (!handler && !finalizer) { + this.throwError(messages_1.Messages.NoCatchOrFinally); + } + return this.finalize(node, new Node.TryStatement(block, handler, finalizer)); + }; + // https://tc39.github.io/ecma262/#sec-debugger-statement + Parser.prototype.parseDebuggerStatement = function () { + var node = this.createNode(); + this.expectKeyword('debugger'); + this.consumeSemicolon(); + return this.finalize(node, new Node.DebuggerStatement()); + }; + // https://tc39.github.io/ecma262/#sec-ecmascript-language-statements-and-declarations + Parser.prototype.parseStatement = function () { + var statement; + switch (this.lookahead.type) { + case 1 /* BooleanLiteral */: + case 5 /* NullLiteral */: + case 6 /* NumericLiteral */: + case 8 /* StringLiteral */: + case 10 /* Template */: + case 9 /* RegularExpression */: + statement = this.parseExpressionStatement(); + break; + case 7 /* Punctuator */: + var value = this.lookahead.value; + if (value === '{') { + statement = this.parseBlock(); + } + else if (value === '(') { + statement = this.parseExpressionStatement(); + } + else if (value === ';') { + statement = this.parseEmptyStatement(); + } + else { + statement = this.parseExpressionStatement(); + } + break; + case 3 /* Identifier */: + statement = this.matchAsyncFunction() ? this.parseFunctionDeclaration() : this.parseLabelledStatement(); + break; + case 4 /* Keyword */: + switch (this.lookahead.value) { + case 'break': + statement = this.parseBreakStatement(); + break; + case 'continue': + statement = this.parseContinueStatement(); + break; + case 'debugger': + statement = this.parseDebuggerStatement(); + break; + case 'do': + statement = this.parseDoWhileStatement(); + break; + case 'for': + statement = this.parseForStatement(); + break; + case 'function': + statement = this.parseFunctionDeclaration(); + break; + case 'if': + statement = this.parseIfStatement(); + break; + case 'return': + statement = this.parseReturnStatement(); + break; + case 'switch': + statement = this.parseSwitchStatement(); + break; + case 'throw': + statement = this.parseThrowStatement(); + break; + case 'try': + statement = this.parseTryStatement(); + break; + case 'var': + statement = this.parseVariableStatement(); + break; + case 'while': + statement = this.parseWhileStatement(); + break; + case 'with': + statement = this.parseWithStatement(); + break; + default: + statement = this.parseExpressionStatement(); + break; + } + break; + default: + statement = this.throwUnexpectedToken(this.lookahead); + } + return statement; + }; + // https://tc39.github.io/ecma262/#sec-function-definitions + Parser.prototype.parseFunctionSourceElements = function () { + var node = this.createNode(); + this.expect('{'); + var body = this.parseDirectivePrologues(); + var previousLabelSet = this.context.labelSet; + var previousInIteration = this.context.inIteration; + var previousInSwitch = this.context.inSwitch; + var previousInFunctionBody = this.context.inFunctionBody; + this.context.labelSet = {}; + this.context.inIteration = false; + this.context.inSwitch = false; + this.context.inFunctionBody = true; + while (this.lookahead.type !== 2 /* EOF */) { + if (this.match('}')) { + break; + } + body.push(this.parseStatementListItem()); + } + this.expect('}'); + this.context.labelSet = previousLabelSet; + this.context.inIteration = previousInIteration; + this.context.inSwitch = previousInSwitch; + this.context.inFunctionBody = previousInFunctionBody; + return this.finalize(node, new Node.BlockStatement(body)); + }; + Parser.prototype.validateParam = function (options, param, name) { + var key = '$' + name; + if (this.context.strict) { + if (this.scanner.isRestrictedWord(name)) { + options.stricted = param; + options.message = messages_1.Messages.StrictParamName; + } + if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { + options.stricted = param; + options.message = messages_1.Messages.StrictParamDupe; + } + } + else if (!options.firstRestricted) { + if (this.scanner.isRestrictedWord(name)) { + options.firstRestricted = param; + options.message = messages_1.Messages.StrictParamName; + } + else if (this.scanner.isStrictModeReservedWord(name)) { + options.firstRestricted = param; + options.message = messages_1.Messages.StrictReservedWord; + } + else if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { + options.stricted = param; + options.message = messages_1.Messages.StrictParamDupe; + } + } + /* istanbul ignore next */ + if (typeof Object.defineProperty === 'function') { + Object.defineProperty(options.paramSet, key, { value: true, enumerable: true, writable: true, configurable: true }); + } + else { + options.paramSet[key] = true; + } + }; + Parser.prototype.parseRestElement = function (params) { + var node = this.createNode(); + this.expect('...'); + var arg = this.parsePattern(params); + if (this.match('=')) { + this.throwError(messages_1.Messages.DefaultRestParameter); + } + if (!this.match(')')) { + this.throwError(messages_1.Messages.ParameterAfterRestParameter); + } + return this.finalize(node, new Node.RestElement(arg)); + }; + Parser.prototype.parseFormalParameter = function (options) { + var params = []; + var param = this.match('...') ? this.parseRestElement(params) : this.parsePatternWithDefault(params); + for (var i = 0; i < params.length; i++) { + this.validateParam(options, params[i], params[i].value); + } + options.simple = options.simple && (param instanceof Node.Identifier); + options.params.push(param); + }; + Parser.prototype.parseFormalParameters = function (firstRestricted) { + var options; + options = { + simple: true, + params: [], + firstRestricted: firstRestricted + }; + this.expect('('); + if (!this.match(')')) { + options.paramSet = {}; + while (this.lookahead.type !== 2 /* EOF */) { + this.parseFormalParameter(options); + if (this.match(')')) { + break; + } + this.expect(','); + if (this.match(')')) { + break; + } + } + } + this.expect(')'); + return { + simple: options.simple, + params: options.params, + stricted: options.stricted, + firstRestricted: options.firstRestricted, + message: options.message + }; + }; + Parser.prototype.matchAsyncFunction = function () { + var match = this.matchContextualKeyword('async'); + if (match) { + var state = this.scanner.saveState(); + this.scanner.scanComments(); + var next = this.scanner.lex(); + this.scanner.restoreState(state); + match = (state.lineNumber === next.lineNumber) && (next.type === 4 /* Keyword */) && (next.value === 'function'); + } + return match; + }; + Parser.prototype.parseFunctionDeclaration = function (identifierIsOptional) { + var node = this.createNode(); + var isAsync = this.matchContextualKeyword('async'); + if (isAsync) { + this.nextToken(); + } + this.expectKeyword('function'); + var isGenerator = isAsync ? false : this.match('*'); + if (isGenerator) { + this.nextToken(); + } + var message; + var id = null; + var firstRestricted = null; + if (!identifierIsOptional || !this.match('(')) { + var token = this.lookahead; + id = this.parseVariableIdentifier(); + if (this.context.strict) { + if (this.scanner.isRestrictedWord(token.value)) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName); + } + } + else { + if (this.scanner.isRestrictedWord(token.value)) { + firstRestricted = token; + message = messages_1.Messages.StrictFunctionName; + } + else if (this.scanner.isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = messages_1.Messages.StrictReservedWord; + } + } + } + var previousAllowAwait = this.context.await; + var previousAllowYield = this.context.allowYield; + this.context.await = isAsync; + this.context.allowYield = !isGenerator; + var formalParameters = this.parseFormalParameters(firstRestricted); + var params = formalParameters.params; + var stricted = formalParameters.stricted; + firstRestricted = formalParameters.firstRestricted; + if (formalParameters.message) { + message = formalParameters.message; + } + var previousStrict = this.context.strict; + var previousAllowStrictDirective = this.context.allowStrictDirective; + this.context.allowStrictDirective = formalParameters.simple; + var body = this.parseFunctionSourceElements(); + if (this.context.strict && firstRestricted) { + this.throwUnexpectedToken(firstRestricted, message); + } + if (this.context.strict && stricted) { + this.tolerateUnexpectedToken(stricted, message); + } + this.context.strict = previousStrict; + this.context.allowStrictDirective = previousAllowStrictDirective; + this.context.await = previousAllowAwait; + this.context.allowYield = previousAllowYield; + return isAsync ? this.finalize(node, new Node.AsyncFunctionDeclaration(id, params, body)) : + this.finalize(node, new Node.FunctionDeclaration(id, params, body, isGenerator)); + }; + Parser.prototype.parseFunctionExpression = function () { + var node = this.createNode(); + var isAsync = this.matchContextualKeyword('async'); + if (isAsync) { + this.nextToken(); + } + this.expectKeyword('function'); + var isGenerator = isAsync ? false : this.match('*'); + if (isGenerator) { + this.nextToken(); + } + var message; + var id = null; + var firstRestricted; + var previousAllowAwait = this.context.await; + var previousAllowYield = this.context.allowYield; + this.context.await = isAsync; + this.context.allowYield = !isGenerator; + if (!this.match('(')) { + var token = this.lookahead; + id = (!this.context.strict && !isGenerator && this.matchKeyword('yield')) ? this.parseIdentifierName() : this.parseVariableIdentifier(); + if (this.context.strict) { + if (this.scanner.isRestrictedWord(token.value)) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName); + } + } + else { + if (this.scanner.isRestrictedWord(token.value)) { + firstRestricted = token; + message = messages_1.Messages.StrictFunctionName; + } + else if (this.scanner.isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = messages_1.Messages.StrictReservedWord; + } + } + } + var formalParameters = this.parseFormalParameters(firstRestricted); + var params = formalParameters.params; + var stricted = formalParameters.stricted; + firstRestricted = formalParameters.firstRestricted; + if (formalParameters.message) { + message = formalParameters.message; + } + var previousStrict = this.context.strict; + var previousAllowStrictDirective = this.context.allowStrictDirective; + this.context.allowStrictDirective = formalParameters.simple; + var body = this.parseFunctionSourceElements(); + if (this.context.strict && firstRestricted) { + this.throwUnexpectedToken(firstRestricted, message); + } + if (this.context.strict && stricted) { + this.tolerateUnexpectedToken(stricted, message); + } + this.context.strict = previousStrict; + this.context.allowStrictDirective = previousAllowStrictDirective; + this.context.await = previousAllowAwait; + this.context.allowYield = previousAllowYield; + return isAsync ? this.finalize(node, new Node.AsyncFunctionExpression(id, params, body)) : + this.finalize(node, new Node.FunctionExpression(id, params, body, isGenerator)); + }; + // https://tc39.github.io/ecma262/#sec-directive-prologues-and-the-use-strict-directive + Parser.prototype.parseDirective = function () { + var token = this.lookahead; + var node = this.createNode(); + var expr = this.parseExpression(); + var directive = (expr.type === syntax_1.Syntax.Literal) ? this.getTokenRaw(token).slice(1, -1) : null; + this.consumeSemicolon(); + return this.finalize(node, directive ? new Node.Directive(expr, directive) : new Node.ExpressionStatement(expr)); + }; + Parser.prototype.parseDirectivePrologues = function () { + var firstRestricted = null; + var body = []; + while (true) { + var token = this.lookahead; + if (token.type !== 8 /* StringLiteral */) { + break; + } + var statement = this.parseDirective(); + body.push(statement); + var directive = statement.directive; + if (typeof directive !== 'string') { + break; + } + if (directive === 'use strict') { + this.context.strict = true; + if (firstRestricted) { + this.tolerateUnexpectedToken(firstRestricted, messages_1.Messages.StrictOctalLiteral); + } + if (!this.context.allowStrictDirective) { + this.tolerateUnexpectedToken(token, messages_1.Messages.IllegalLanguageModeDirective); + } + } + else { + if (!firstRestricted && token.octal) { + firstRestricted = token; + } + } + } + return body; + }; + // https://tc39.github.io/ecma262/#sec-method-definitions + Parser.prototype.qualifiedPropertyName = function (token) { + switch (token.type) { + case 3 /* Identifier */: + case 8 /* StringLiteral */: + case 1 /* BooleanLiteral */: + case 5 /* NullLiteral */: + case 6 /* NumericLiteral */: + case 4 /* Keyword */: + return true; + case 7 /* Punctuator */: + return token.value === '['; + default: + break; + } + return false; + }; + Parser.prototype.parseGetterMethod = function () { + var node = this.createNode(); + var isGenerator = false; + var previousAllowYield = this.context.allowYield; + this.context.allowYield = !isGenerator; + var formalParameters = this.parseFormalParameters(); + if (formalParameters.params.length > 0) { + this.tolerateError(messages_1.Messages.BadGetterArity); + } + var method = this.parsePropertyMethod(formalParameters); + this.context.allowYield = previousAllowYield; + return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator)); + }; + Parser.prototype.parseSetterMethod = function () { + var node = this.createNode(); + var isGenerator = false; + var previousAllowYield = this.context.allowYield; + this.context.allowYield = !isGenerator; + var formalParameters = this.parseFormalParameters(); + if (formalParameters.params.length !== 1) { + this.tolerateError(messages_1.Messages.BadSetterArity); + } + else if (formalParameters.params[0] instanceof Node.RestElement) { + this.tolerateError(messages_1.Messages.BadSetterRestParameter); + } + var method = this.parsePropertyMethod(formalParameters); + this.context.allowYield = previousAllowYield; + return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator)); + }; + Parser.prototype.parseGeneratorMethod = function () { + var node = this.createNode(); + var isGenerator = true; + var previousAllowYield = this.context.allowYield; + this.context.allowYield = true; + var params = this.parseFormalParameters(); + this.context.allowYield = false; + var method = this.parsePropertyMethod(params); + this.context.allowYield = previousAllowYield; + return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator)); + }; + // https://tc39.github.io/ecma262/#sec-generator-function-definitions + Parser.prototype.isStartOfExpression = function () { + var start = true; + var value = this.lookahead.value; + switch (this.lookahead.type) { + case 7 /* Punctuator */: + start = (value === '[') || (value === '(') || (value === '{') || + (value === '+') || (value === '-') || + (value === '!') || (value === '~') || + (value === '++') || (value === '--') || + (value === '/') || (value === '/='); // regular expression literal + break; + case 4 /* Keyword */: + start = (value === 'class') || (value === 'delete') || + (value === 'function') || (value === 'let') || (value === 'new') || + (value === 'super') || (value === 'this') || (value === 'typeof') || + (value === 'void') || (value === 'yield'); + break; + default: + break; + } + return start; + }; + Parser.prototype.parseYieldExpression = function () { + var node = this.createNode(); + this.expectKeyword('yield'); + var argument = null; + var delegate = false; + if (!this.hasLineTerminator) { + var previousAllowYield = this.context.allowYield; + this.context.allowYield = false; + delegate = this.match('*'); + if (delegate) { + this.nextToken(); + argument = this.parseAssignmentExpression(); + } + else if (this.isStartOfExpression()) { + argument = this.parseAssignmentExpression(); + } + this.context.allowYield = previousAllowYield; + } + return this.finalize(node, new Node.YieldExpression(argument, delegate)); + }; + // https://tc39.github.io/ecma262/#sec-class-definitions + Parser.prototype.parseClassElement = function (hasConstructor) { + var token = this.lookahead; + var node = this.createNode(); + var kind = ''; + var key = null; + var value = null; + var computed = false; + var method = false; + var isStatic = false; + var isAsync = false; + if (this.match('*')) { + this.nextToken(); + } + else { + computed = this.match('['); + key = this.parseObjectPropertyKey(); + var id = key; + if (id.name === 'static' && (this.qualifiedPropertyName(this.lookahead) || this.match('*'))) { + token = this.lookahead; + isStatic = true; + computed = this.match('['); + if (this.match('*')) { + this.nextToken(); + } + else { + key = this.parseObjectPropertyKey(); + } + } + if ((token.type === 3 /* Identifier */) && !this.hasLineTerminator && (token.value === 'async')) { + var punctuator = this.lookahead.value; + if (punctuator !== ':' && punctuator !== '(' && punctuator !== '*') { + isAsync = true; + token = this.lookahead; + key = this.parseObjectPropertyKey(); + if (token.type === 3 /* Identifier */ && token.value === 'constructor') { + this.tolerateUnexpectedToken(token, messages_1.Messages.ConstructorIsAsync); + } + } + } + } + var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead); + if (token.type === 3 /* Identifier */) { + if (token.value === 'get' && lookaheadPropertyKey) { + kind = 'get'; + computed = this.match('['); + key = this.parseObjectPropertyKey(); + this.context.allowYield = false; + value = this.parseGetterMethod(); + } + else if (token.value === 'set' && lookaheadPropertyKey) { + kind = 'set'; + computed = this.match('['); + key = this.parseObjectPropertyKey(); + value = this.parseSetterMethod(); + } + } + else if (token.type === 7 /* Punctuator */ && token.value === '*' && lookaheadPropertyKey) { + kind = 'init'; + computed = this.match('['); + key = this.parseObjectPropertyKey(); + value = this.parseGeneratorMethod(); + method = true; + } + if (!kind && key && this.match('(')) { + kind = 'init'; + value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction(); + method = true; + } + if (!kind) { + this.throwUnexpectedToken(this.lookahead); + } + if (kind === 'init') { + kind = 'method'; + } + if (!computed) { + if (isStatic && this.isPropertyKey(key, 'prototype')) { + this.throwUnexpectedToken(token, messages_1.Messages.StaticPrototype); + } + if (!isStatic && this.isPropertyKey(key, 'constructor')) { + if (kind !== 'method' || !method || (value && value.generator)) { + this.throwUnexpectedToken(token, messages_1.Messages.ConstructorSpecialMethod); + } + if (hasConstructor.value) { + this.throwUnexpectedToken(token, messages_1.Messages.DuplicateConstructor); + } + else { + hasConstructor.value = true; + } + kind = 'constructor'; + } + } + return this.finalize(node, new Node.MethodDefinition(key, computed, value, kind, isStatic)); + }; + Parser.prototype.parseClassElementList = function () { + var body = []; + var hasConstructor = { value: false }; + this.expect('{'); + while (!this.match('}')) { + if (this.match(';')) { + this.nextToken(); + } + else { + body.push(this.parseClassElement(hasConstructor)); + } + } + this.expect('}'); + return body; + }; + Parser.prototype.parseClassBody = function () { + var node = this.createNode(); + var elementList = this.parseClassElementList(); + return this.finalize(node, new Node.ClassBody(elementList)); + }; + Parser.prototype.parseClassDeclaration = function (identifierIsOptional) { + var node = this.createNode(); + var previousStrict = this.context.strict; + this.context.strict = true; + this.expectKeyword('class'); + var id = (identifierIsOptional && (this.lookahead.type !== 3 /* Identifier */)) ? null : this.parseVariableIdentifier(); + var superClass = null; + if (this.matchKeyword('extends')) { + this.nextToken(); + superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall); + } + var classBody = this.parseClassBody(); + this.context.strict = previousStrict; + return this.finalize(node, new Node.ClassDeclaration(id, superClass, classBody)); + }; + Parser.prototype.parseClassExpression = function () { + var node = this.createNode(); + var previousStrict = this.context.strict; + this.context.strict = true; + this.expectKeyword('class'); + var id = (this.lookahead.type === 3 /* Identifier */) ? this.parseVariableIdentifier() : null; + var superClass = null; + if (this.matchKeyword('extends')) { + this.nextToken(); + superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall); + } + var classBody = this.parseClassBody(); + this.context.strict = previousStrict; + return this.finalize(node, new Node.ClassExpression(id, superClass, classBody)); + }; + // https://tc39.github.io/ecma262/#sec-scripts + // https://tc39.github.io/ecma262/#sec-modules + Parser.prototype.parseModule = function () { + this.context.strict = true; + this.context.isModule = true; + this.scanner.isModule = true; + var node = this.createNode(); + var body = this.parseDirectivePrologues(); + while (this.lookahead.type !== 2 /* EOF */) { + body.push(this.parseStatementListItem()); + } + return this.finalize(node, new Node.Module(body)); + }; + Parser.prototype.parseScript = function () { + var node = this.createNode(); + var body = this.parseDirectivePrologues(); + while (this.lookahead.type !== 2 /* EOF */) { + body.push(this.parseStatementListItem()); + } + return this.finalize(node, new Node.Script(body)); + }; + // https://tc39.github.io/ecma262/#sec-imports + Parser.prototype.parseModuleSpecifier = function () { + var node = this.createNode(); + if (this.lookahead.type !== 8 /* StringLiteral */) { + this.throwError(messages_1.Messages.InvalidModuleSpecifier); + } + var token = this.nextToken(); + var raw = this.getTokenRaw(token); + return this.finalize(node, new Node.Literal(token.value, raw)); + }; + // import {} ...; + Parser.prototype.parseImportSpecifier = function () { + var node = this.createNode(); + var imported; + var local; + if (this.lookahead.type === 3 /* Identifier */) { + imported = this.parseVariableIdentifier(); + local = imported; + if (this.matchContextualKeyword('as')) { + this.nextToken(); + local = this.parseVariableIdentifier(); + } + } + else { + imported = this.parseIdentifierName(); + local = imported; + if (this.matchContextualKeyword('as')) { + this.nextToken(); + local = this.parseVariableIdentifier(); + } + else { + this.throwUnexpectedToken(this.nextToken()); + } + } + return this.finalize(node, new Node.ImportSpecifier(local, imported)); + }; + // {foo, bar as bas} + Parser.prototype.parseNamedImports = function () { + this.expect('{'); + var specifiers = []; + while (!this.match('}')) { + specifiers.push(this.parseImportSpecifier()); + if (!this.match('}')) { + this.expect(','); + } + } + this.expect('}'); + return specifiers; + }; + // import ...; + Parser.prototype.parseImportDefaultSpecifier = function () { + var node = this.createNode(); + var local = this.parseIdentifierName(); + return this.finalize(node, new Node.ImportDefaultSpecifier(local)); + }; + // import <* as foo> ...; + Parser.prototype.parseImportNamespaceSpecifier = function () { + var node = this.createNode(); + this.expect('*'); + if (!this.matchContextualKeyword('as')) { + this.throwError(messages_1.Messages.NoAsAfterImportNamespace); + } + this.nextToken(); + var local = this.parseIdentifierName(); + return this.finalize(node, new Node.ImportNamespaceSpecifier(local)); + }; + Parser.prototype.parseImportDeclaration = function () { + if (this.context.inFunctionBody) { + this.throwError(messages_1.Messages.IllegalImportDeclaration); + } + var node = this.createNode(); + this.expectKeyword('import'); + var src; + var specifiers = []; + if (this.lookahead.type === 8 /* StringLiteral */) { + // import 'foo'; + src = this.parseModuleSpecifier(); + } + else { + if (this.match('{')) { + // import {bar} + specifiers = specifiers.concat(this.parseNamedImports()); + } + else if (this.match('*')) { + // import * as foo + specifiers.push(this.parseImportNamespaceSpecifier()); + } + else if (this.isIdentifierName(this.lookahead) && !this.matchKeyword('default')) { + // import foo + specifiers.push(this.parseImportDefaultSpecifier()); + if (this.match(',')) { + this.nextToken(); + if (this.match('*')) { + // import foo, * as foo + specifiers.push(this.parseImportNamespaceSpecifier()); + } + else if (this.match('{')) { + // import foo, {bar} + specifiers = specifiers.concat(this.parseNamedImports()); + } + else { + this.throwUnexpectedToken(this.lookahead); + } + } + } + else { + this.throwUnexpectedToken(this.nextToken()); + } + if (!this.matchContextualKeyword('from')) { + var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause; + this.throwError(message, this.lookahead.value); + } + this.nextToken(); + src = this.parseModuleSpecifier(); + } + this.consumeSemicolon(); + return this.finalize(node, new Node.ImportDeclaration(specifiers, src)); + }; + // https://tc39.github.io/ecma262/#sec-exports + Parser.prototype.parseExportSpecifier = function () { + var node = this.createNode(); + var local = this.parseIdentifierName(); + var exported = local; + if (this.matchContextualKeyword('as')) { + this.nextToken(); + exported = this.parseIdentifierName(); + } + return this.finalize(node, new Node.ExportSpecifier(local, exported)); + }; + Parser.prototype.parseExportDeclaration = function () { + if (this.context.inFunctionBody) { + this.throwError(messages_1.Messages.IllegalExportDeclaration); + } + var node = this.createNode(); + this.expectKeyword('export'); + var exportDeclaration; + if (this.matchKeyword('default')) { + // export default ... + this.nextToken(); + if (this.matchKeyword('function')) { + // export default function foo () {} + // export default function () {} + var declaration = this.parseFunctionDeclaration(true); + exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); + } + else if (this.matchKeyword('class')) { + // export default class foo {} + var declaration = this.parseClassDeclaration(true); + exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); + } + else if (this.matchContextualKeyword('async')) { + // export default async function f () {} + // export default async function () {} + // export default async x => x + var declaration = this.matchAsyncFunction() ? this.parseFunctionDeclaration(true) : this.parseAssignmentExpression(); + exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); + } + else { + if (this.matchContextualKeyword('from')) { + this.throwError(messages_1.Messages.UnexpectedToken, this.lookahead.value); + } + // export default {}; + // export default []; + // export default (1 + 2); + var declaration = this.match('{') ? this.parseObjectInitializer() : + this.match('[') ? this.parseArrayInitializer() : this.parseAssignmentExpression(); + this.consumeSemicolon(); + exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); + } + } + else if (this.match('*')) { + // export * from 'foo'; + this.nextToken(); + if (!this.matchContextualKeyword('from')) { + var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause; + this.throwError(message, this.lookahead.value); + } + this.nextToken(); + var src = this.parseModuleSpecifier(); + this.consumeSemicolon(); + exportDeclaration = this.finalize(node, new Node.ExportAllDeclaration(src)); + } + else if (this.lookahead.type === 4 /* Keyword */) { + // export var f = 1; + var declaration = void 0; + switch (this.lookahead.value) { + case 'let': + case 'const': + declaration = this.parseLexicalDeclaration({ inFor: false }); + break; + case 'var': + case 'class': + case 'function': + declaration = this.parseStatementListItem(); + break; + default: + this.throwUnexpectedToken(this.lookahead); + } + exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null)); + } + else if (this.matchAsyncFunction()) { + var declaration = this.parseFunctionDeclaration(); + exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null)); + } + else { + var specifiers = []; + var source = null; + var isExportFromIdentifier = false; + this.expect('{'); + while (!this.match('}')) { + isExportFromIdentifier = isExportFromIdentifier || this.matchKeyword('default'); + specifiers.push(this.parseExportSpecifier()); + if (!this.match('}')) { + this.expect(','); + } + } + this.expect('}'); + if (this.matchContextualKeyword('from')) { + // export {default} from 'foo'; + // export {foo} from 'foo'; + this.nextToken(); + source = this.parseModuleSpecifier(); + this.consumeSemicolon(); + } + else if (isExportFromIdentifier) { + // export {default}; // missing fromClause + var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause; + this.throwError(message, this.lookahead.value); + } + else { + // export {foo}; + this.consumeSemicolon(); + } + exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(null, specifiers, source)); + } + return exportDeclaration; + }; + return Parser; + }()); + exports.Parser = Parser; + + +/***/ }, +/* 9 */ +/***/ function(module, exports) { + + "use strict"; + // Ensure the condition is true, otherwise throw an error. + // This is only to have a better contract semantic, i.e. another safety net + // to catch a logic error. The condition shall be fulfilled in normal case. + // Do NOT use this to enforce a certain condition on any user input. + Object.defineProperty(exports, "__esModule", { value: true }); + function assert(condition, message) { + /* istanbul ignore if */ + if (!condition) { + throw new Error('ASSERT: ' + message); + } + } + exports.assert = assert; + + +/***/ }, +/* 10 */ +/***/ function(module, exports) { + + "use strict"; + /* tslint:disable:max-classes-per-file */ + Object.defineProperty(exports, "__esModule", { value: true }); + var ErrorHandler = (function () { + function ErrorHandler() { + this.errors = []; + this.tolerant = false; + } + ErrorHandler.prototype.recordError = function (error) { + this.errors.push(error); + }; + ErrorHandler.prototype.tolerate = function (error) { + if (this.tolerant) { + this.recordError(error); + } + else { + throw error; + } + }; + ErrorHandler.prototype.constructError = function (msg, column) { + var error = new Error(msg); + try { + throw error; + } + catch (base) { + /* istanbul ignore else */ + if (Object.create && Object.defineProperty) { + error = Object.create(base); + Object.defineProperty(error, 'column', { value: column }); + } + } + /* istanbul ignore next */ + return error; + }; + ErrorHandler.prototype.createError = function (index, line, col, description) { + var msg = 'Line ' + line + ': ' + description; + var error = this.constructError(msg, col); + error.index = index; + error.lineNumber = line; + error.description = description; + return error; + }; + ErrorHandler.prototype.throwError = function (index, line, col, description) { + throw this.createError(index, line, col, description); + }; + ErrorHandler.prototype.tolerateError = function (index, line, col, description) { + var error = this.createError(index, line, col, description); + if (this.tolerant) { + this.recordError(error); + } + else { + throw error; + } + }; + return ErrorHandler; + }()); + exports.ErrorHandler = ErrorHandler; + + +/***/ }, +/* 11 */ +/***/ function(module, exports) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + // Error messages should be identical to V8. + exports.Messages = { + BadGetterArity: 'Getter must not have any formal parameters', + BadSetterArity: 'Setter must have exactly one formal parameter', + BadSetterRestParameter: 'Setter function argument must not be a rest parameter', + ConstructorIsAsync: 'Class constructor may not be an async method', + ConstructorSpecialMethod: 'Class constructor may not be an accessor', + DeclarationMissingInitializer: 'Missing initializer in %0 declaration', + DefaultRestParameter: 'Unexpected token =', + DuplicateBinding: 'Duplicate binding %0', + DuplicateConstructor: 'A class may only have one constructor', + DuplicateProtoProperty: 'Duplicate __proto__ fields are not allowed in object literals', + ForInOfLoopInitializer: '%0 loop variable declaration may not have an initializer', + GeneratorInLegacyContext: 'Generator declarations are not allowed in legacy contexts', + IllegalBreak: 'Illegal break statement', + IllegalContinue: 'Illegal continue statement', + IllegalExportDeclaration: 'Unexpected token', + IllegalImportDeclaration: 'Unexpected token', + IllegalLanguageModeDirective: 'Illegal \'use strict\' directive in function with non-simple parameter list', + IllegalReturn: 'Illegal return statement', + InvalidEscapedReservedWord: 'Keyword must not contain escaped characters', + InvalidHexEscapeSequence: 'Invalid hexadecimal escape sequence', + InvalidLHSInAssignment: 'Invalid left-hand side in assignment', + InvalidLHSInForIn: 'Invalid left-hand side in for-in', + InvalidLHSInForLoop: 'Invalid left-hand side in for-loop', + InvalidModuleSpecifier: 'Unexpected token', + InvalidRegExp: 'Invalid regular expression', + LetInLexicalBinding: 'let is disallowed as a lexically bound name', + MissingFromClause: 'Unexpected token', + MultipleDefaultsInSwitch: 'More than one default clause in switch statement', + NewlineAfterThrow: 'Illegal newline after throw', + NoAsAfterImportNamespace: 'Unexpected token', + NoCatchOrFinally: 'Missing catch or finally after try', + ParameterAfterRestParameter: 'Rest parameter must be last formal parameter', + Redeclaration: '%0 \'%1\' has already been declared', + StaticPrototype: 'Classes may not have static property named prototype', + StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode', + StrictDelete: 'Delete of an unqualified identifier in strict mode.', + StrictFunction: 'In strict mode code, functions can only be declared at top level or inside a block', + StrictFunctionName: 'Function name may not be eval or arguments in strict mode', + StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode', + StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode', + StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode', + StrictModeWith: 'Strict mode code may not include a with statement', + StrictOctalLiteral: 'Octal literals are not allowed in strict mode.', + StrictParamDupe: 'Strict mode function may not have duplicate parameter names', + StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode', + StrictReservedWord: 'Use of future reserved word in strict mode', + StrictVarName: 'Variable name may not be eval or arguments in strict mode', + TemplateOctalLiteral: 'Octal literals are not allowed in template strings.', + UnexpectedEOS: 'Unexpected end of input', + UnexpectedIdentifier: 'Unexpected identifier', + UnexpectedNumber: 'Unexpected number', + UnexpectedReserved: 'Unexpected reserved word', + UnexpectedString: 'Unexpected string', + UnexpectedTemplate: 'Unexpected quasi %0', + UnexpectedToken: 'Unexpected token %0', + UnexpectedTokenIllegal: 'Unexpected token ILLEGAL', + UnknownLabel: 'Undefined label \'%0\'', + UnterminatedRegExp: 'Invalid regular expression: missing /' + }; + + +/***/ }, +/* 12 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var assert_1 = __webpack_require__(9); + var character_1 = __webpack_require__(4); + var messages_1 = __webpack_require__(11); + function hexValue(ch) { + return '0123456789abcdef'.indexOf(ch.toLowerCase()); + } + function octalValue(ch) { + return '01234567'.indexOf(ch); + } + var Scanner = (function () { + function Scanner(code, handler) { + this.source = code; + this.errorHandler = handler; + this.trackComment = false; + this.isModule = false; + this.length = code.length; + this.index = 0; + this.lineNumber = (code.length > 0) ? 1 : 0; + this.lineStart = 0; + this.curlyStack = []; + } + Scanner.prototype.saveState = function () { + return { + index: this.index, + lineNumber: this.lineNumber, + lineStart: this.lineStart + }; + }; + Scanner.prototype.restoreState = function (state) { + this.index = state.index; + this.lineNumber = state.lineNumber; + this.lineStart = state.lineStart; + }; + Scanner.prototype.eof = function () { + return this.index >= this.length; + }; + Scanner.prototype.throwUnexpectedToken = function (message) { + if (message === void 0) { message = messages_1.Messages.UnexpectedTokenIllegal; } + return this.errorHandler.throwError(this.index, this.lineNumber, this.index - this.lineStart + 1, message); + }; + Scanner.prototype.tolerateUnexpectedToken = function (message) { + if (message === void 0) { message = messages_1.Messages.UnexpectedTokenIllegal; } + this.errorHandler.tolerateError(this.index, this.lineNumber, this.index - this.lineStart + 1, message); + }; + // https://tc39.github.io/ecma262/#sec-comments + Scanner.prototype.skipSingleLineComment = function (offset) { + var comments = []; + var start, loc; + if (this.trackComment) { + comments = []; + start = this.index - offset; + loc = { + start: { + line: this.lineNumber, + column: this.index - this.lineStart - offset + }, + end: {} + }; + } + while (!this.eof()) { + var ch = this.source.charCodeAt(this.index); + ++this.index; + if (character_1.Character.isLineTerminator(ch)) { + if (this.trackComment) { + loc.end = { + line: this.lineNumber, + column: this.index - this.lineStart - 1 + }; + var entry = { + multiLine: false, + slice: [start + offset, this.index - 1], + range: [start, this.index - 1], + loc: loc + }; + comments.push(entry); + } + if (ch === 13 && this.source.charCodeAt(this.index) === 10) { + ++this.index; + } + ++this.lineNumber; + this.lineStart = this.index; + return comments; + } + } + if (this.trackComment) { + loc.end = { + line: this.lineNumber, + column: this.index - this.lineStart + }; + var entry = { + multiLine: false, + slice: [start + offset, this.index], + range: [start, this.index], + loc: loc + }; + comments.push(entry); + } + return comments; + }; + Scanner.prototype.skipMultiLineComment = function () { + var comments = []; + var start, loc; + if (this.trackComment) { + comments = []; + start = this.index - 2; + loc = { + start: { + line: this.lineNumber, + column: this.index - this.lineStart - 2 + }, + end: {} + }; + } + while (!this.eof()) { + var ch = this.source.charCodeAt(this.index); + if (character_1.Character.isLineTerminator(ch)) { + if (ch === 0x0D && this.source.charCodeAt(this.index + 1) === 0x0A) { + ++this.index; + } + ++this.lineNumber; + ++this.index; + this.lineStart = this.index; + } + else if (ch === 0x2A) { + // Block comment ends with '*/'. + if (this.source.charCodeAt(this.index + 1) === 0x2F) { + this.index += 2; + if (this.trackComment) { + loc.end = { + line: this.lineNumber, + column: this.index - this.lineStart + }; + var entry = { + multiLine: true, + slice: [start + 2, this.index - 2], + range: [start, this.index], + loc: loc + }; + comments.push(entry); + } + return comments; + } + ++this.index; + } + else { + ++this.index; + } + } + // Ran off the end of the file - the whole thing is a comment + if (this.trackComment) { + loc.end = { + line: this.lineNumber, + column: this.index - this.lineStart + }; + var entry = { + multiLine: true, + slice: [start + 2, this.index], + range: [start, this.index], + loc: loc + }; + comments.push(entry); + } + this.tolerateUnexpectedToken(); + return comments; + }; + Scanner.prototype.scanComments = function () { + var comments; + if (this.trackComment) { + comments = []; + } + var start = (this.index === 0); + while (!this.eof()) { + var ch = this.source.charCodeAt(this.index); + if (character_1.Character.isWhiteSpace(ch)) { + ++this.index; + } + else if (character_1.Character.isLineTerminator(ch)) { + ++this.index; + if (ch === 0x0D && this.source.charCodeAt(this.index) === 0x0A) { + ++this.index; + } + ++this.lineNumber; + this.lineStart = this.index; + start = true; + } + else if (ch === 0x2F) { + ch = this.source.charCodeAt(this.index + 1); + if (ch === 0x2F) { + this.index += 2; + var comment = this.skipSingleLineComment(2); + if (this.trackComment) { + comments = comments.concat(comment); + } + start = true; + } + else if (ch === 0x2A) { + this.index += 2; + var comment = this.skipMultiLineComment(); + if (this.trackComment) { + comments = comments.concat(comment); + } + } + else { + break; + } + } + else if (start && ch === 0x2D) { + // U+003E is '>' + if ((this.source.charCodeAt(this.index + 1) === 0x2D) && (this.source.charCodeAt(this.index + 2) === 0x3E)) { + // '-->' is a single-line comment + this.index += 3; + var comment = this.skipSingleLineComment(3); + if (this.trackComment) { + comments = comments.concat(comment); + } + } + else { + break; + } + } + else if (ch === 0x3C && !this.isModule) { + if (this.source.slice(this.index + 1, this.index + 4) === '!--') { + this.index += 4; // ` (comment end) + if (c === 0x3E && cMinus1 === 0x2D && cMinus2 === 0x2D) { + break; + } + } + } else if ((c1 === 0x4D || c1 === 0x6D) && + (c2 === 0x45 || c2 === 0x65) && + (c3 === 0x54 || c3 === 0x74) && + (c4 === 0x41 || c4 === 0x61) && + (isSpaceCharacter(c5) || c5 === 0x2F)) { + // "meta" + space or / + i += 6; + const attributeList = new Set(); + let gotPragma = false; + let needPragma = null; + let charset = null; + + let attrRes; + do { + attrRes = getAttribute(buffer, i, l); + if (attrRes.attr && !attributeList.has(attrRes.attr.name)) { + attributeList.add(attrRes.attr.name); + if (attrRes.attr.name === "http-equiv") { + gotPragma = attrRes.attr.value === "content-type"; + } else if (attrRes.attr.name === "content" && !charset) { + charset = extractCharacterEncodingFromMeta(attrRes.attr.value); + if (charset !== null) { + needPragma = true; + } + } else if (attrRes.attr.name === "charset") { + charset = whatwgEncoding.labelToName(attrRes.attr.value); + needPragma = false; + } + } + i = attrRes.i; + } while (attrRes.attr); + + if (needPragma === null) { + continue; + } + if (needPragma === true && gotPragma === false) { + continue; + } + if (charset === null) { + continue; + } + + if (charset === "UTF-16LE" || charset === "UTF-16BE") { + charset = "UTF-8"; + } + if (charset === "x-user-defined") { + charset = "windows-1252"; + } + + return charset; + } else if ((c1 >= 0x41 && c1 <= 0x5A) || (c1 >= 0x61 && c1 <= 0x7A)) { + // a-z or A-Z + for (i += 2; i < l; i++) { + c = buffer[i]; + // space or > + if (isSpaceCharacter(c) || c === 0x3E) { + break; + } + } + let attrRes; + do { + attrRes = getAttribute(buffer, i, l); + i = attrRes.i; + } while (attrRes.attr); + } else if (c1 === 0x21 || c1 === 0x2F || c1 === 0x3F) { + // ! or / or ? + for (i += 2; i < l; i++) { + c = buffer[i]; + // > + if (c === 0x3E) { + break; + } + } + } + } + } + return null; +} + +// https://html.spec.whatwg.org/multipage/syntax.html#concept-get-attributes-when-sniffing +function getAttribute(buffer, i, l) { + for (; i < l; i++) { + let c = buffer[i]; + // space or / + if (isSpaceCharacter(c) || c === 0x2F) { + continue; + } + // ">" + if (c === 0x3E) { + break; + } + let name = ""; + let value = ""; + nameLoop:for (; i < l; i++) { + c = buffer[i]; + // "=" + if (c === 0x3D && name !== "") { + i++; + break; + } + // space + if (isSpaceCharacter(c)) { + for (i++; i < l; i++) { + c = buffer[i]; + // space + if (isSpaceCharacter(c)) { + continue; + } + // not "=" + if (c !== 0x3D) { + return { attr: { name, value }, i }; + } + + i++; + break nameLoop; + } + break; + } + // / or > + if (c === 0x2F || c === 0x3E) { + return { attr: { name, value }, i }; + } + // A-Z + if (c >= 0x41 && c <= 0x5A) { + name += String.fromCharCode(c + 0x20); // lowercase + } else { + name += String.fromCharCode(c); + } + } + c = buffer[i]; + // space + if (isSpaceCharacter(c)) { + for (i++; i < l; i++) { + c = buffer[i]; + // space + if (isSpaceCharacter(c)) { + continue; + } else { + break; + } + } + } + // " or ' + if (c === 0x22 || c === 0x27) { + const quote = c; + for (i++; i < l; i++) { + c = buffer[i]; + + if (c === quote) { + i++; + return { attr: { name, value }, i }; + } + + // A-Z + if (c >= 0x41 && c <= 0x5A) { + value += String.fromCharCode(c + 0x20); // lowercase + } else { + value += String.fromCharCode(c); + } + } + } + + // > + if (c === 0x3E) { + return { attr: { name, value }, i }; + } + + // A-Z + if (c >= 0x41 && c <= 0x5A) { + value += String.fromCharCode(c + 0x20); // lowercase + } else { + value += String.fromCharCode(c); + } + + for (i++; i < l; i++) { + c = buffer[i]; + + // space or > + if (isSpaceCharacter(c) || c === 0x3E) { + return { attr: { name, value }, i }; + } + + // A-Z + if (c >= 0x41 && c <= 0x5A) { + value += String.fromCharCode(c + 0x20); // lowercase + } else { + value += String.fromCharCode(c); + } + } + } + return { i }; +} + +function extractCharacterEncodingFromMeta(string) { + let position = 0; + + while (true) { + const indexOfCharset = string.substring(position).search(/charset/i); + + if (indexOfCharset === -1) { + return null; + } + let subPosition = position + indexOfCharset + "charset".length; + + while (isSpaceCharacter(string[subPosition].charCodeAt(0))) { + ++subPosition; + } + + if (string[subPosition] !== "=") { + position = subPosition - 1; + continue; + } + + ++subPosition; + + while (isSpaceCharacter(string[subPosition].charCodeAt(0))) { + ++subPosition; + } + + position = subPosition; + break; + } + + if (string[position] === "\"" || string[position] === "'") { + const nextIndex = string.indexOf(string[position], position + 1); + + if (nextIndex !== -1) { + return whatwgEncoding.labelToName(string.substring(position + 1, nextIndex)); + } + + // It is an unmatched quotation mark + return null; + } + + if (string.length === position + 1) { + return null; + } + + const indexOfASCIIWhitespaceOrSemicolon = string.substring(position + 1).search(/\x09|\x0A|\x0C|\x0D|\x20|;/); + const end = indexOfASCIIWhitespaceOrSemicolon === -1 ? + string.length : + position + indexOfASCIIWhitespaceOrSemicolon + 1; + + return whatwgEncoding.labelToName(string.substring(position, end)); +} + +function isSpaceCharacter(c) { + return c === 0x09 || c === 0x0A || c === 0x0C || c === 0x0D || c === 0x20; +} diff --git a/node_modules/html-encoding-sniffer/package.json b/node_modules/html-encoding-sniffer/package.json new file mode 100644 index 0000000..6a343d7 --- /dev/null +++ b/node_modules/html-encoding-sniffer/package.json @@ -0,0 +1,30 @@ +{ + "name": "html-encoding-sniffer", + "description": "Sniff the encoding from a HTML byte stream", + "keywords": [ + "encoding", + "html" + ], + "version": "2.0.1", + "author": "Domenic Denicola (https://domenic.me/)", + "license": "MIT", + "repository": "jsdom/html-encoding-sniffer", + "main": "lib/html-encoding-sniffer.js", + "files": [ + "lib/" + ], + "scripts": { + "test": "mocha", + "lint": "eslint ." + }, + "dependencies": { + "whatwg-encoding": "^1.0.5" + }, + "devDependencies": { + "eslint": "^6.8.0", + "mocha": "^7.0.0" + }, + "engines": { + "node": ">=10" + } +} diff --git a/node_modules/http-proxy-agent/README.md b/node_modules/http-proxy-agent/README.md new file mode 100644 index 0000000..d60e206 --- /dev/null +++ b/node_modules/http-proxy-agent/README.md @@ -0,0 +1,74 @@ +http-proxy-agent +================ +### An HTTP(s) proxy `http.Agent` implementation for HTTP +[![Build Status](https://github.com/TooTallNate/node-http-proxy-agent/workflows/Node%20CI/badge.svg)](https://github.com/TooTallNate/node-http-proxy-agent/actions?workflow=Node+CI) + +This module provides an `http.Agent` implementation that connects to a specified +HTTP or HTTPS proxy server, and can be used with the built-in `http` module. + +__Note:__ For HTTP proxy usage with the `https` module, check out +[`node-https-proxy-agent`](https://github.com/TooTallNate/node-https-proxy-agent). + +Installation +------------ + +Install with `npm`: + +``` bash +$ npm install http-proxy-agent +``` + + +Example +------- + +``` js +var url = require('url'); +var http = require('http'); +var HttpProxyAgent = require('http-proxy-agent'); + +// HTTP/HTTPS proxy to connect to +var proxy = process.env.http_proxy || 'http://168.63.76.32:3128'; +console.log('using proxy server %j', proxy); + +// HTTP endpoint for the proxy to connect to +var endpoint = process.argv[2] || 'http://nodejs.org/api/'; +console.log('attempting to GET %j', endpoint); +var opts = url.parse(endpoint); + +// create an instance of the `HttpProxyAgent` class with the proxy server information +var agent = new HttpProxyAgent(proxy); +opts.agent = agent; + +http.get(opts, function (res) { + console.log('"response" event!', res.headers); + res.pipe(process.stdout); +}); +``` + + +License +------- + +(The MIT License) + +Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/http-proxy-agent/dist/agent.d.ts b/node_modules/http-proxy-agent/dist/agent.d.ts new file mode 100644 index 0000000..3f043f7 --- /dev/null +++ b/node_modules/http-proxy-agent/dist/agent.d.ts @@ -0,0 +1,32 @@ +/// +import net from 'net'; +import { Agent, ClientRequest, RequestOptions } from 'agent-base'; +import { HttpProxyAgentOptions } from '.'; +interface HttpProxyAgentClientRequest extends ClientRequest { + path: string; + output?: string[]; + outputData?: { + data: string; + }[]; + _header?: string | null; + _implicitHeader(): void; +} +/** + * The `HttpProxyAgent` implements an HTTP Agent subclass that connects + * to the specified "HTTP proxy server" in order to proxy HTTP requests. + * + * @api public + */ +export default class HttpProxyAgent extends Agent { + private secureProxy; + private proxy; + constructor(_opts: string | HttpProxyAgentOptions); + /** + * Called when the node-core HTTP client library is creating a + * new HTTP request. + * + * @api protected + */ + callback(req: HttpProxyAgentClientRequest, opts: RequestOptions): Promise; +} +export {}; diff --git a/node_modules/http-proxy-agent/dist/agent.js b/node_modules/http-proxy-agent/dist/agent.js new file mode 100644 index 0000000..0252850 --- /dev/null +++ b/node_modules/http-proxy-agent/dist/agent.js @@ -0,0 +1,145 @@ +"use strict"; +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()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const net_1 = __importDefault(require("net")); +const tls_1 = __importDefault(require("tls")); +const url_1 = __importDefault(require("url")); +const debug_1 = __importDefault(require("debug")); +const once_1 = __importDefault(require("@tootallnate/once")); +const agent_base_1 = require("agent-base"); +const debug = debug_1.default('http-proxy-agent'); +function isHTTPS(protocol) { + return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false; +} +/** + * The `HttpProxyAgent` implements an HTTP Agent subclass that connects + * to the specified "HTTP proxy server" in order to proxy HTTP requests. + * + * @api public + */ +class HttpProxyAgent extends agent_base_1.Agent { + constructor(_opts) { + let opts; + if (typeof _opts === 'string') { + opts = url_1.default.parse(_opts); + } + else { + opts = _opts; + } + if (!opts) { + throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!'); + } + debug('Creating new HttpProxyAgent instance: %o', opts); + super(opts); + const proxy = Object.assign({}, opts); + // If `true`, then connect to the proxy server over TLS. + // Defaults to `false`. + this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol); + // Prefer `hostname` over `host`, and set the `port` if needed. + proxy.host = proxy.hostname || proxy.host; + if (typeof proxy.port === 'string') { + proxy.port = parseInt(proxy.port, 10); + } + if (!proxy.port && proxy.host) { + proxy.port = this.secureProxy ? 443 : 80; + } + if (proxy.host && proxy.path) { + // If both a `host` and `path` are specified then it's most likely + // the result of a `url.parse()` call... we need to remove the + // `path` portion so that `net.connect()` doesn't attempt to open + // that as a Unix socket file. + delete proxy.path; + delete proxy.pathname; + } + this.proxy = proxy; + } + /** + * Called when the node-core HTTP client library is creating a + * new HTTP request. + * + * @api protected + */ + callback(req, opts) { + return __awaiter(this, void 0, void 0, function* () { + const { proxy, secureProxy } = this; + const parsed = url_1.default.parse(req.path); + if (!parsed.protocol) { + parsed.protocol = 'http:'; + } + if (!parsed.hostname) { + parsed.hostname = opts.hostname || opts.host || null; + } + if (parsed.port == null && typeof opts.port) { + parsed.port = String(opts.port); + } + if (parsed.port === '80') { + // if port is 80, then we can remove the port so that the + // ":80" portion is not on the produced URL + delete parsed.port; + } + // Change the `http.ClientRequest` instance's "path" field + // to the absolute path of the URL that will be requested. + req.path = url_1.default.format(parsed); + // Inject the `Proxy-Authorization` header if necessary. + if (proxy.auth) { + req.setHeader('Proxy-Authorization', `Basic ${Buffer.from(proxy.auth).toString('base64')}`); + } + // Create a socket connection to the proxy server. + let socket; + if (secureProxy) { + debug('Creating `tls.Socket`: %o', proxy); + socket = tls_1.default.connect(proxy); + } + else { + debug('Creating `net.Socket`: %o', proxy); + socket = net_1.default.connect(proxy); + } + // At this point, the http ClientRequest's internal `_header` field + // might have already been set. If this is the case then we'll need + // to re-generate the string since we just changed the `req.path`. + if (req._header) { + let first; + let endOfHeaders; + debug('Regenerating stored HTTP header string for request'); + req._header = null; + req._implicitHeader(); + if (req.output && req.output.length > 0) { + // Node < 12 + debug('Patching connection write() output buffer with updated header'); + first = req.output[0]; + endOfHeaders = first.indexOf('\r\n\r\n') + 4; + req.output[0] = req._header + first.substring(endOfHeaders); + debug('Output buffer: %o', req.output); + } + else if (req.outputData && req.outputData.length > 0) { + // Node >= 12 + debug('Patching connection write() output buffer with updated header'); + first = req.outputData[0].data; + endOfHeaders = first.indexOf('\r\n\r\n') + 4; + req.outputData[0].data = + req._header + first.substring(endOfHeaders); + debug('Output buffer: %o', req.outputData[0].data); + } + } + // Wait for the socket's `connect` event, so that this `callback()` + // function throws instead of the `http` request machinery. This is + // important for i.e. `PacProxyAgent` which determines a failed proxy + // connection via the `callback()` function throwing. + yield once_1.default(socket, 'connect'); + return socket; + }); + } +} +exports.default = HttpProxyAgent; +//# sourceMappingURL=agent.js.map \ No newline at end of file diff --git a/node_modules/http-proxy-agent/dist/agent.js.map b/node_modules/http-proxy-agent/dist/agent.js.map new file mode 100644 index 0000000..7a40762 --- /dev/null +++ b/node_modules/http-proxy-agent/dist/agent.js.map @@ -0,0 +1 @@ +{"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,8CAAsB;AACtB,8CAAsB;AACtB,8CAAsB;AACtB,kDAAgC;AAChC,6DAAqC;AACrC,2CAAkE;AAGlE,MAAM,KAAK,GAAG,eAAW,CAAC,kBAAkB,CAAC,CAAC;AAY9C,SAAS,OAAO,CAAC,QAAwB;IACxC,OAAO,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAC3E,CAAC;AAED;;;;;GAKG;AACH,MAAqB,cAAe,SAAQ,kBAAK;IAIhD,YAAY,KAAqC;QAChD,IAAI,IAA2B,CAAC;QAChC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC9B,IAAI,GAAG,aAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACxB;aAAM;YACN,IAAI,GAAG,KAAK,CAAC;SACb;QACD,IAAI,CAAC,IAAI,EAAE;YACV,MAAM,IAAI,KAAK,CACd,8DAA8D,CAC9D,CAAC;SACF;QACD,KAAK,CAAC,0CAA0C,EAAE,IAAI,CAAC,CAAC;QACxD,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,MAAM,KAAK,qBAA+B,IAAI,CAAE,CAAC;QAEjD,wDAAwD;QACxD,uBAAuB;QACvB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,IAAI,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAE/D,+DAA+D;QAC/D,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,IAAI,CAAC;QAC1C,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;YACnC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;SACtC;QACD,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,EAAE;YAC9B,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;SACzC;QAED,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,EAAE;YAC7B,kEAAkE;YAClE,8DAA8D;YAC9D,iEAAiE;YACjE,8BAA8B;YAC9B,OAAO,KAAK,CAAC,IAAI,CAAC;YAClB,OAAO,KAAK,CAAC,QAAQ,CAAC;SACtB;QAED,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACpB,CAAC;IAED;;;;;OAKG;IACG,QAAQ,CACb,GAAgC,EAChC,IAAoB;;YAEpB,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;YACpC,MAAM,MAAM,GAAG,aAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAEnC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;gBACrB,MAAM,CAAC,QAAQ,GAAG,OAAO,CAAC;aAC1B;YAED,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;gBACrB,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC;aACrD;YAED,IAAI,MAAM,CAAC,IAAI,IAAI,IAAI,IAAI,OAAO,IAAI,CAAC,IAAI,EAAE;gBAC5C,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAChC;YAED,IAAI,MAAM,CAAC,IAAI,KAAK,IAAI,EAAE;gBACzB,yDAAyD;gBACzD,2CAA2C;gBAC3C,OAAO,MAAM,CAAC,IAAI,CAAC;aACnB;YAED,0DAA0D;YAC1D,0DAA0D;YAC1D,GAAG,CAAC,IAAI,GAAG,aAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAE9B,wDAAwD;YACxD,IAAI,KAAK,CAAC,IAAI,EAAE;gBACf,GAAG,CAAC,SAAS,CACZ,qBAAqB,EACrB,SAAS,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CACrD,CAAC;aACF;YAED,kDAAkD;YAClD,IAAI,MAAkB,CAAC;YACvB,IAAI,WAAW,EAAE;gBAChB,KAAK,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;gBAC1C,MAAM,GAAG,aAAG,CAAC,OAAO,CAAC,KAA8B,CAAC,CAAC;aACrD;iBAAM;gBACN,KAAK,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;gBAC1C,MAAM,GAAG,aAAG,CAAC,OAAO,CAAC,KAA2B,CAAC,CAAC;aAClD;YAED,mEAAmE;YACnE,mEAAmE;YACnE,kEAAkE;YAClE,IAAI,GAAG,CAAC,OAAO,EAAE;gBAChB,IAAI,KAAa,CAAC;gBAClB,IAAI,YAAoB,CAAC;gBACzB,KAAK,CAAC,oDAAoD,CAAC,CAAC;gBAC5D,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;gBACnB,GAAG,CAAC,eAAe,EAAE,CAAC;gBACtB,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;oBACxC,YAAY;oBACZ,KAAK,CACJ,+DAA+D,CAC/D,CAAC;oBACF,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;oBACtB,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;oBAC7C,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;oBAC5D,KAAK,CAAC,mBAAmB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;iBACvC;qBAAM,IAAI,GAAG,CAAC,UAAU,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;oBACvD,aAAa;oBACb,KAAK,CACJ,+DAA+D,CAC/D,CAAC;oBACF,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;oBAC/B,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;oBAC7C,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI;wBACrB,GAAG,CAAC,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;oBAC7C,KAAK,CAAC,mBAAmB,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;iBACnD;aACD;YAED,mEAAmE;YACnE,mEAAmE;YACnE,qEAAqE;YACrE,qDAAqD;YACrD,MAAM,cAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;YAE9B,OAAO,MAAM,CAAC;QACf,CAAC;KAAA;CACD;AA1ID,iCA0IC"} \ No newline at end of file diff --git a/node_modules/http-proxy-agent/dist/index.d.ts b/node_modules/http-proxy-agent/dist/index.d.ts new file mode 100644 index 0000000..24bdb52 --- /dev/null +++ b/node_modules/http-proxy-agent/dist/index.d.ts @@ -0,0 +1,21 @@ +/// +import net from 'net'; +import tls from 'tls'; +import { Url } from 'url'; +import { AgentOptions } from 'agent-base'; +import _HttpProxyAgent from './agent'; +declare function createHttpProxyAgent(opts: string | createHttpProxyAgent.HttpProxyAgentOptions): _HttpProxyAgent; +declare namespace createHttpProxyAgent { + interface BaseHttpProxyAgentOptions { + secureProxy?: boolean; + host?: string | null; + path?: string | null; + port?: string | number | null; + } + export interface HttpProxyAgentOptions extends AgentOptions, BaseHttpProxyAgentOptions, Partial> { + } + export type HttpProxyAgent = _HttpProxyAgent; + export const HttpProxyAgent: typeof _HttpProxyAgent; + export {}; +} +export = createHttpProxyAgent; diff --git a/node_modules/http-proxy-agent/dist/index.js b/node_modules/http-proxy-agent/dist/index.js new file mode 100644 index 0000000..0a71180 --- /dev/null +++ b/node_modules/http-proxy-agent/dist/index.js @@ -0,0 +1,14 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +const agent_1 = __importDefault(require("./agent")); +function createHttpProxyAgent(opts) { + return new agent_1.default(opts); +} +(function (createHttpProxyAgent) { + createHttpProxyAgent.HttpProxyAgent = agent_1.default; + createHttpProxyAgent.prototype = agent_1.default.prototype; +})(createHttpProxyAgent || (createHttpProxyAgent = {})); +module.exports = createHttpProxyAgent; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/http-proxy-agent/dist/index.js.map b/node_modules/http-proxy-agent/dist/index.js.map new file mode 100644 index 0000000..e07dae5 --- /dev/null +++ b/node_modules/http-proxy-agent/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAIA,oDAAsC;AAEtC,SAAS,oBAAoB,CAC5B,IAAyD;IAEzD,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED,WAAU,oBAAoB;IAmBhB,mCAAc,GAAG,eAAe,CAAC;IAE9C,oBAAoB,CAAC,SAAS,GAAG,eAAe,CAAC,SAAS,CAAC;AAC5D,CAAC,EAtBS,oBAAoB,KAApB,oBAAoB,QAsB7B;AAED,iBAAS,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/http-proxy-agent/package.json b/node_modules/http-proxy-agent/package.json new file mode 100644 index 0000000..870dd5d --- /dev/null +++ b/node_modules/http-proxy-agent/package.json @@ -0,0 +1,57 @@ +{ + "name": "http-proxy-agent", + "version": "4.0.1", + "description": "An HTTP(s) proxy `http.Agent` implementation for HTTP", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist" + ], + "scripts": { + "prebuild": "rimraf dist", + "build": "tsc", + "test": "mocha", + "test-lint": "eslint src --ext .js,.ts", + "prepublishOnly": "npm run build" + }, + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/node-http-proxy-agent.git" + }, + "keywords": [ + "http", + "proxy", + "endpoint", + "agent" + ], + "author": "Nathan Rajlich (http://n8.io/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/TooTallNate/node-http-proxy-agent/issues" + }, + "dependencies": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + }, + "devDependencies": { + "@types/debug": "4", + "@types/node": "^12.12.11", + "@typescript-eslint/eslint-plugin": "1.6.0", + "@typescript-eslint/parser": "1.1.0", + "eslint": "5.16.0", + "eslint-config-airbnb": "17.1.0", + "eslint-config-prettier": "4.1.0", + "eslint-import-resolver-typescript": "1.1.1", + "eslint-plugin-import": "2.16.0", + "eslint-plugin-jsx-a11y": "6.2.1", + "eslint-plugin-react": "7.12.4", + "mocha": "^6.2.2", + "proxy": "1", + "rimraf": "^3.0.0", + "typescript": "^3.5.3" + }, + "engines": { + "node": ">= 6" + } +} diff --git a/node_modules/https-proxy-agent/README.md b/node_modules/https-proxy-agent/README.md new file mode 100644 index 0000000..328656a --- /dev/null +++ b/node_modules/https-proxy-agent/README.md @@ -0,0 +1,137 @@ +https-proxy-agent +================ +### An HTTP(s) proxy `http.Agent` implementation for HTTPS +[![Build Status](https://github.com/TooTallNate/node-https-proxy-agent/workflows/Node%20CI/badge.svg)](https://github.com/TooTallNate/node-https-proxy-agent/actions?workflow=Node+CI) + +This module provides an `http.Agent` implementation that connects to a specified +HTTP or HTTPS proxy server, and can be used with the built-in `https` module. + +Specifically, this `Agent` implementation connects to an intermediary "proxy" +server and issues the [CONNECT HTTP method][CONNECT], which tells the proxy to +open a direct TCP connection to the destination server. + +Since this agent implements the CONNECT HTTP method, it also works with other +protocols that use this method when connecting over proxies (i.e. WebSockets). +See the "Examples" section below for more. + + +Installation +------------ + +Install with `npm`: + +``` bash +$ npm install https-proxy-agent +``` + + +Examples +-------- + +#### `https` module example + +``` js +var url = require('url'); +var https = require('https'); +var HttpsProxyAgent = require('https-proxy-agent'); + +// HTTP/HTTPS proxy to connect to +var proxy = process.env.http_proxy || 'http://168.63.76.32:3128'; +console.log('using proxy server %j', proxy); + +// HTTPS endpoint for the proxy to connect to +var endpoint = process.argv[2] || 'https://graph.facebook.com/tootallnate'; +console.log('attempting to GET %j', endpoint); +var options = url.parse(endpoint); + +// create an instance of the `HttpsProxyAgent` class with the proxy server information +var agent = new HttpsProxyAgent(proxy); +options.agent = agent; + +https.get(options, function (res) { + console.log('"response" event!', res.headers); + res.pipe(process.stdout); +}); +``` + +#### `ws` WebSocket connection example + +``` js +var url = require('url'); +var WebSocket = require('ws'); +var HttpsProxyAgent = require('https-proxy-agent'); + +// HTTP/HTTPS proxy to connect to +var proxy = process.env.http_proxy || 'http://168.63.76.32:3128'; +console.log('using proxy server %j', proxy); + +// WebSocket endpoint for the proxy to connect to +var endpoint = process.argv[2] || 'ws://echo.websocket.org'; +var parsed = url.parse(endpoint); +console.log('attempting to connect to WebSocket %j', endpoint); + +// create an instance of the `HttpsProxyAgent` class with the proxy server information +var options = url.parse(proxy); + +var agent = new HttpsProxyAgent(options); + +// finally, initiate the WebSocket connection +var socket = new WebSocket(endpoint, { agent: agent }); + +socket.on('open', function () { + console.log('"open" event!'); + socket.send('hello world'); +}); + +socket.on('message', function (data, flags) { + console.log('"message" event! %j %j', data, flags); + socket.close(); +}); +``` + +API +--- + +### new HttpsProxyAgent(Object options) + +The `HttpsProxyAgent` class implements an `http.Agent` subclass that connects +to the specified "HTTP(s) proxy server" in order to proxy HTTPS and/or WebSocket +requests. This is achieved by using the [HTTP `CONNECT` method][CONNECT]. + +The `options` argument may either be a string URI of the proxy server to use, or an +"options" object with more specific properties: + + * `host` - String - Proxy host to connect to (may use `hostname` as well). Required. + * `port` - Number - Proxy port to connect to. Required. + * `protocol` - String - If `https:`, then use TLS to connect to the proxy. + * `headers` - Object - Additional HTTP headers to be sent on the HTTP CONNECT method. + * Any other options given are passed to the `net.connect()`/`tls.connect()` functions. + + +License +------- + +(The MIT License) + +Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +[CONNECT]: http://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_Tunneling diff --git a/node_modules/https-proxy-agent/dist/agent.d.ts b/node_modules/https-proxy-agent/dist/agent.d.ts new file mode 100644 index 0000000..4f1c636 --- /dev/null +++ b/node_modules/https-proxy-agent/dist/agent.d.ts @@ -0,0 +1,30 @@ +/// +import net from 'net'; +import { Agent, ClientRequest, RequestOptions } from 'agent-base'; +import { HttpsProxyAgentOptions } from '.'; +/** + * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to + * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests. + * + * Outgoing HTTP requests are first tunneled through the proxy server using the + * `CONNECT` HTTP request method to establish a connection to the proxy server, + * and then the proxy server connects to the destination target and issues the + * HTTP request from the proxy server. + * + * `https:` requests have their socket connection upgraded to TLS once + * the connection to the proxy server has been established. + * + * @api public + */ +export default class HttpsProxyAgent extends Agent { + private secureProxy; + private proxy; + constructor(_opts: string | HttpsProxyAgentOptions); + /** + * Called when the node-core HTTP client library is creating a + * new HTTP request. + * + * @api protected + */ + callback(req: ClientRequest, opts: RequestOptions): Promise; +} diff --git a/node_modules/https-proxy-agent/dist/agent.js b/node_modules/https-proxy-agent/dist/agent.js new file mode 100644 index 0000000..d666525 --- /dev/null +++ b/node_modules/https-proxy-agent/dist/agent.js @@ -0,0 +1,180 @@ +"use strict"; +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()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const net_1 = __importDefault(require("net")); +const tls_1 = __importDefault(require("tls")); +const url_1 = __importDefault(require("url")); +const assert_1 = __importDefault(require("assert")); +const debug_1 = __importDefault(require("debug")); +const agent_base_1 = require("agent-base"); +const parse_proxy_response_1 = __importDefault(require("./parse-proxy-response")); +const debug = debug_1.default('https-proxy-agent:agent'); +/** + * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to + * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests. + * + * Outgoing HTTP requests are first tunneled through the proxy server using the + * `CONNECT` HTTP request method to establish a connection to the proxy server, + * and then the proxy server connects to the destination target and issues the + * HTTP request from the proxy server. + * + * `https:` requests have their socket connection upgraded to TLS once + * the connection to the proxy server has been established. + * + * @api public + */ +class HttpsProxyAgent extends agent_base_1.Agent { + constructor(_opts) { + let opts; + if (typeof _opts === 'string') { + opts = url_1.default.parse(_opts); + } + else { + opts = _opts; + } + if (!opts) { + throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!'); + } + debug('creating new HttpsProxyAgent instance: %o', opts); + super(opts); + const proxy = Object.assign({}, opts); + // If `true`, then connect to the proxy server over TLS. + // Defaults to `false`. + this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol); + // Prefer `hostname` over `host`, and set the `port` if needed. + proxy.host = proxy.hostname || proxy.host; + if (typeof proxy.port === 'string') { + proxy.port = parseInt(proxy.port, 10); + } + if (!proxy.port && proxy.host) { + proxy.port = this.secureProxy ? 443 : 80; + } + // ALPN is supported by Node.js >= v5. + // attempt to negotiate http/1.1 for proxy servers that support http/2 + if (this.secureProxy && !('ALPNProtocols' in proxy)) { + proxy.ALPNProtocols = ['http 1.1']; + } + if (proxy.host && proxy.path) { + // If both a `host` and `path` are specified then it's most likely + // the result of a `url.parse()` call... we need to remove the + // `path` portion so that `net.connect()` doesn't attempt to open + // that as a Unix socket file. + delete proxy.path; + delete proxy.pathname; + } + this.proxy = proxy; + } + /** + * Called when the node-core HTTP client library is creating a + * new HTTP request. + * + * @api protected + */ + callback(req, opts) { + return __awaiter(this, void 0, void 0, function* () { + const { proxy, secureProxy } = this; + // Create a socket connection to the proxy server. + let socket; + if (secureProxy) { + debug('Creating `tls.Socket`: %o', proxy); + socket = tls_1.default.connect(proxy); + } + else { + debug('Creating `net.Socket`: %o', proxy); + socket = net_1.default.connect(proxy); + } + const headers = Object.assign({}, proxy.headers); + const hostname = `${opts.host}:${opts.port}`; + let payload = `CONNECT ${hostname} HTTP/1.1\r\n`; + // Inject the `Proxy-Authorization` header if necessary. + if (proxy.auth) { + headers['Proxy-Authorization'] = `Basic ${Buffer.from(proxy.auth).toString('base64')}`; + } + // The `Host` header should only include the port + // number when it is not the default port. + let { host, port, secureEndpoint } = opts; + if (!isDefaultPort(port, secureEndpoint)) { + host += `:${port}`; + } + headers.Host = host; + headers.Connection = 'close'; + for (const name of Object.keys(headers)) { + payload += `${name}: ${headers[name]}\r\n`; + } + const proxyResponsePromise = parse_proxy_response_1.default(socket); + socket.write(`${payload}\r\n`); + const { statusCode, buffered } = yield proxyResponsePromise; + if (statusCode === 200) { + req.once('socket', resume); + if (opts.secureEndpoint) { + const servername = opts.servername || opts.host; + if (!servername) { + throw new Error('Could not determine "servername"'); + } + // The proxy is connecting to a TLS server, so upgrade + // this socket connection to a TLS connection. + debug('Upgrading socket connection to TLS'); + return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket, + servername })); + } + return socket; + } + // Some other status code that's not 200... need to re-play the HTTP + // header "data" events onto the socket once the HTTP machinery is + // attached so that the node core `http` can parse and handle the + // error status code. + // Close the original socket, and a new "fake" socket is returned + // instead, so that the proxy doesn't get the HTTP request + // written to it (which may contain `Authorization` headers or other + // sensitive data). + // + // See: https://hackerone.com/reports/541502 + socket.destroy(); + const fakeSocket = new net_1.default.Socket(); + fakeSocket.readable = true; + // Need to wait for the "socket" event to re-play the "data" events. + req.once('socket', (s) => { + debug('replaying proxy buffer for failed request'); + assert_1.default(s.listenerCount('data') > 0); + // Replay the "buffered" Buffer onto the fake `socket`, since at + // this point the HTTP module machinery has been hooked up for + // the user. + s.push(buffered); + s.push(null); + }); + return fakeSocket; + }); + } +} +exports.default = HttpsProxyAgent; +function resume(socket) { + socket.resume(); +} +function isDefaultPort(port, secure) { + return Boolean((!secure && port === 80) || (secure && port === 443)); +} +function isHTTPS(protocol) { + return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false; +} +function omit(obj, ...keys) { + const ret = {}; + let key; + for (key in obj) { + if (!keys.includes(key)) { + ret[key] = obj[key]; + } + } + return ret; +} +//# sourceMappingURL=agent.js.map \ No newline at end of file diff --git a/node_modules/https-proxy-agent/dist/agent.js.map b/node_modules/https-proxy-agent/dist/agent.js.map new file mode 100644 index 0000000..d1307cd --- /dev/null +++ b/node_modules/https-proxy-agent/dist/agent.js.map @@ -0,0 +1 @@ +{"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,8CAAsB;AACtB,8CAAsB;AACtB,8CAAsB;AACtB,oDAA4B;AAC5B,kDAAgC;AAEhC,2CAAkE;AAElE,kFAAwD;AAExD,MAAM,KAAK,GAAG,eAAW,CAAC,yBAAyB,CAAC,CAAC;AAErD;;;;;;;;;;;;;GAaG;AACH,MAAqB,eAAgB,SAAQ,kBAAK;IAIjD,YAAY,KAAsC;QACjD,IAAI,IAA4B,CAAC;QACjC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC9B,IAAI,GAAG,aAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACxB;aAAM;YACN,IAAI,GAAG,KAAK,CAAC;SACb;QACD,IAAI,CAAC,IAAI,EAAE;YACV,MAAM,IAAI,KAAK,CACd,8DAA8D,CAC9D,CAAC;SACF;QACD,KAAK,CAAC,2CAA2C,EAAE,IAAI,CAAC,CAAC;QACzD,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,MAAM,KAAK,qBAAgC,IAAI,CAAE,CAAC;QAElD,wDAAwD;QACxD,uBAAuB;QACvB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,IAAI,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAE/D,+DAA+D;QAC/D,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,IAAI,CAAC;QAC1C,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;YACnC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;SACtC;QACD,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,EAAE;YAC9B,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;SACzC;QAED,sCAAsC;QACtC,sEAAsE;QACtE,IAAI,IAAI,CAAC,WAAW,IAAI,CAAC,CAAC,eAAe,IAAI,KAAK,CAAC,EAAE;YACpD,KAAK,CAAC,aAAa,GAAG,CAAC,UAAU,CAAC,CAAC;SACnC;QAED,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,EAAE;YAC7B,kEAAkE;YAClE,8DAA8D;YAC9D,iEAAiE;YACjE,8BAA8B;YAC9B,OAAO,KAAK,CAAC,IAAI,CAAC;YAClB,OAAO,KAAK,CAAC,QAAQ,CAAC;SACtB;QAED,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACpB,CAAC;IAED;;;;;OAKG;IACG,QAAQ,CACb,GAAkB,EAClB,IAAoB;;YAEpB,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;YAEpC,kDAAkD;YAClD,IAAI,MAAkB,CAAC;YACvB,IAAI,WAAW,EAAE;gBAChB,KAAK,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;gBAC1C,MAAM,GAAG,aAAG,CAAC,OAAO,CAAC,KAA8B,CAAC,CAAC;aACrD;iBAAM;gBACN,KAAK,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;gBAC1C,MAAM,GAAG,aAAG,CAAC,OAAO,CAAC,KAA2B,CAAC,CAAC;aAClD;YAED,MAAM,OAAO,qBAA6B,KAAK,CAAC,OAAO,CAAE,CAAC;YAC1D,MAAM,QAAQ,GAAG,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YAC7C,IAAI,OAAO,GAAG,WAAW,QAAQ,eAAe,CAAC;YAEjD,wDAAwD;YACxD,IAAI,KAAK,CAAC,IAAI,EAAE;gBACf,OAAO,CAAC,qBAAqB,CAAC,GAAG,SAAS,MAAM,CAAC,IAAI,CACpD,KAAK,CAAC,IAAI,CACV,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;aACvB;YAED,iDAAiD;YACjD,0CAA0C;YAC1C,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC;YAC1C,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,cAAc,CAAC,EAAE;gBACzC,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;aACnB;YACD,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;YAEpB,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC;YAC7B,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;gBACxC,OAAO,IAAI,GAAG,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC;aAC3C;YAED,MAAM,oBAAoB,GAAG,8BAAkB,CAAC,MAAM,CAAC,CAAC;YAExD,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,MAAM,CAAC,CAAC;YAE/B,MAAM,EACL,UAAU,EACV,QAAQ,EACR,GAAG,MAAM,oBAAoB,CAAC;YAE/B,IAAI,UAAU,KAAK,GAAG,EAAE;gBACvB,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;gBAE3B,IAAI,IAAI,CAAC,cAAc,EAAE;oBACxB,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,IAAI,CAAC;oBAChD,IAAI,CAAC,UAAU,EAAE;wBAChB,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;qBACpD;oBACD,sDAAsD;oBACtD,8CAA8C;oBAC9C,KAAK,CAAC,oCAAoC,CAAC,CAAC;oBAC5C,OAAO,aAAG,CAAC,OAAO,iCACd,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,KACjD,MAAM;wBACN,UAAU,IACT,CAAC;iBACH;gBAED,OAAO,MAAM,CAAC;aACd;YAED,oEAAoE;YACpE,kEAAkE;YAClE,iEAAiE;YACjE,qBAAqB;YAErB,iEAAiE;YACjE,0DAA0D;YAC1D,oEAAoE;YACpE,mBAAmB;YACnB,EAAE;YACF,4CAA4C;YAC5C,MAAM,CAAC,OAAO,EAAE,CAAC;YAEjB,MAAM,UAAU,GAAG,IAAI,aAAG,CAAC,MAAM,EAAE,CAAC;YACpC,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC;YAE3B,oEAAoE;YACpE,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAa,EAAE,EAAE;gBACpC,KAAK,CAAC,2CAA2C,CAAC,CAAC;gBACnD,gBAAM,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;gBAEpC,gEAAgE;gBAChE,8DAA8D;gBAC9D,YAAY;gBACZ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACjB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACd,CAAC,CAAC,CAAC;YAEH,OAAO,UAAU,CAAC;QACnB,CAAC;KAAA;CACD;AA9JD,kCA8JC;AAED,SAAS,MAAM,CAAC,MAAkC;IACjD,MAAM,CAAC,MAAM,EAAE,CAAC;AACjB,CAAC;AAED,SAAS,aAAa,CAAC,IAAY,EAAE,MAAe;IACnD,OAAO,OAAO,CAAC,CAAC,CAAC,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC;AACtE,CAAC;AAED,SAAS,OAAO,CAAC,QAAwB;IACxC,OAAO,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAC3E,CAAC;AAED,SAAS,IAAI,CACZ,GAAM,EACN,GAAG,IAAO;IAIV,MAAM,GAAG,GAAG,EAEX,CAAC;IACF,IAAI,GAAqB,CAAC;IAC1B,KAAK,GAAG,IAAI,GAAG,EAAE;QAChB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACxB,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;SACpB;KACD;IACD,OAAO,GAAG,CAAC;AACZ,CAAC"} \ No newline at end of file diff --git a/node_modules/https-proxy-agent/dist/index.d.ts b/node_modules/https-proxy-agent/dist/index.d.ts new file mode 100644 index 0000000..0d60062 --- /dev/null +++ b/node_modules/https-proxy-agent/dist/index.d.ts @@ -0,0 +1,23 @@ +/// +import net from 'net'; +import tls from 'tls'; +import { Url } from 'url'; +import { AgentOptions } from 'agent-base'; +import { OutgoingHttpHeaders } from 'http'; +import _HttpsProxyAgent from './agent'; +declare function createHttpsProxyAgent(opts: string | createHttpsProxyAgent.HttpsProxyAgentOptions): _HttpsProxyAgent; +declare namespace createHttpsProxyAgent { + interface BaseHttpsProxyAgentOptions { + headers?: OutgoingHttpHeaders; + secureProxy?: boolean; + host?: string | null; + path?: string | null; + port?: string | number | null; + } + export interface HttpsProxyAgentOptions extends AgentOptions, BaseHttpsProxyAgentOptions, Partial> { + } + export type HttpsProxyAgent = _HttpsProxyAgent; + export const HttpsProxyAgent: typeof _HttpsProxyAgent; + export {}; +} +export = createHttpsProxyAgent; diff --git a/node_modules/https-proxy-agent/dist/index.js b/node_modules/https-proxy-agent/dist/index.js new file mode 100644 index 0000000..b03e763 --- /dev/null +++ b/node_modules/https-proxy-agent/dist/index.js @@ -0,0 +1,14 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +const agent_1 = __importDefault(require("./agent")); +function createHttpsProxyAgent(opts) { + return new agent_1.default(opts); +} +(function (createHttpsProxyAgent) { + createHttpsProxyAgent.HttpsProxyAgent = agent_1.default; + createHttpsProxyAgent.prototype = agent_1.default.prototype; +})(createHttpsProxyAgent || (createHttpsProxyAgent = {})); +module.exports = createHttpsProxyAgent; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/https-proxy-agent/dist/index.js.map b/node_modules/https-proxy-agent/dist/index.js.map new file mode 100644 index 0000000..f3ce559 --- /dev/null +++ b/node_modules/https-proxy-agent/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAKA,oDAAuC;AAEvC,SAAS,qBAAqB,CAC7B,IAA2D;IAE3D,OAAO,IAAI,eAAgB,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC;AAED,WAAU,qBAAqB;IAoBjB,qCAAe,GAAG,eAAgB,CAAC;IAEhD,qBAAqB,CAAC,SAAS,GAAG,eAAgB,CAAC,SAAS,CAAC;AAC9D,CAAC,EAvBS,qBAAqB,KAArB,qBAAqB,QAuB9B;AAED,iBAAS,qBAAqB,CAAC"} \ No newline at end of file diff --git a/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts b/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts new file mode 100644 index 0000000..7565674 --- /dev/null +++ b/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts @@ -0,0 +1,7 @@ +/// +import { Readable } from 'stream'; +export interface ProxyResponse { + statusCode: number; + buffered: Buffer; +} +export default function parseProxyResponse(socket: Readable): Promise; diff --git a/node_modules/https-proxy-agent/dist/parse-proxy-response.js b/node_modules/https-proxy-agent/dist/parse-proxy-response.js new file mode 100644 index 0000000..aa5ce3c --- /dev/null +++ b/node_modules/https-proxy-agent/dist/parse-proxy-response.js @@ -0,0 +1,66 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const debug_1 = __importDefault(require("debug")); +const debug = debug_1.default('https-proxy-agent:parse-proxy-response'); +function parseProxyResponse(socket) { + return new Promise((resolve, reject) => { + // we need to buffer any HTTP traffic that happens with the proxy before we get + // the CONNECT response, so that if the response is anything other than an "200" + // response code, then we can re-play the "data" events on the socket once the + // HTTP parser is hooked up... + let buffersLength = 0; + const buffers = []; + function read() { + const b = socket.read(); + if (b) + ondata(b); + else + socket.once('readable', read); + } + function cleanup() { + socket.removeListener('end', onend); + socket.removeListener('error', onerror); + socket.removeListener('close', onclose); + socket.removeListener('readable', read); + } + function onclose(err) { + debug('onclose had error %o', err); + } + function onend() { + debug('onend'); + } + function onerror(err) { + cleanup(); + debug('onerror %o', err); + reject(err); + } + function ondata(b) { + buffers.push(b); + buffersLength += b.length; + const buffered = Buffer.concat(buffers, buffersLength); + const endOfHeaders = buffered.indexOf('\r\n\r\n'); + if (endOfHeaders === -1) { + // keep buffering + debug('have not received end of HTTP headers yet...'); + read(); + return; + } + const firstLine = buffered.toString('ascii', 0, buffered.indexOf('\r\n')); + const statusCode = +firstLine.split(' ')[1]; + debug('got proxy server response: %o', firstLine); + resolve({ + statusCode, + buffered + }); + } + socket.on('error', onerror); + socket.on('close', onclose); + socket.on('end', onend); + read(); + }); +} +exports.default = parseProxyResponse; +//# sourceMappingURL=parse-proxy-response.js.map \ No newline at end of file diff --git a/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map b/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map new file mode 100644 index 0000000..bacdb84 --- /dev/null +++ b/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parse-proxy-response.js","sourceRoot":"","sources":["../src/parse-proxy-response.ts"],"names":[],"mappings":";;;;;AAAA,kDAAgC;AAGhC,MAAM,KAAK,GAAG,eAAW,CAAC,wCAAwC,CAAC,CAAC;AAOpE,SAAwB,kBAAkB,CACzC,MAAgB;IAEhB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACtC,+EAA+E;QAC/E,gFAAgF;QAChF,8EAA8E;QAC9E,8BAA8B;QAC9B,IAAI,aAAa,GAAG,CAAC,CAAC;QACtB,MAAM,OAAO,GAAa,EAAE,CAAC;QAE7B,SAAS,IAAI;YACZ,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;YACxB,IAAI,CAAC;gBAAE,MAAM,CAAC,CAAC,CAAC,CAAC;;gBACZ,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QACpC,CAAC;QAED,SAAS,OAAO;YACf,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YACpC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACxC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACxC,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QACzC,CAAC;QAED,SAAS,OAAO,CAAC,GAAW;YAC3B,KAAK,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC;QACpC,CAAC;QAED,SAAS,KAAK;YACb,KAAK,CAAC,OAAO,CAAC,CAAC;QAChB,CAAC;QAED,SAAS,OAAO,CAAC,GAAU;YAC1B,OAAO,EAAE,CAAC;YACV,KAAK,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;YACzB,MAAM,CAAC,GAAG,CAAC,CAAC;QACb,CAAC;QAED,SAAS,MAAM,CAAC,CAAS;YACxB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAChB,aAAa,IAAI,CAAC,CAAC,MAAM,CAAC;YAE1B,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;YACvD,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YAElD,IAAI,YAAY,KAAK,CAAC,CAAC,EAAE;gBACxB,iBAAiB;gBACjB,KAAK,CAAC,8CAA8C,CAAC,CAAC;gBACtD,IAAI,EAAE,CAAC;gBACP,OAAO;aACP;YAED,MAAM,SAAS,GAAG,QAAQ,CAAC,QAAQ,CAClC,OAAO,EACP,CAAC,EACD,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CACxB,CAAC;YACF,MAAM,UAAU,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5C,KAAK,CAAC,+BAA+B,EAAE,SAAS,CAAC,CAAC;YAClD,OAAO,CAAC;gBACP,UAAU;gBACV,QAAQ;aACR,CAAC,CAAC;QACJ,CAAC;QAED,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC5B,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC5B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAExB,IAAI,EAAE,CAAC;IACR,CAAC,CAAC,CAAC;AACJ,CAAC;AAvED,qCAuEC"} \ No newline at end of file diff --git a/node_modules/https-proxy-agent/package.json b/node_modules/https-proxy-agent/package.json new file mode 100644 index 0000000..7872bdf --- /dev/null +++ b/node_modules/https-proxy-agent/package.json @@ -0,0 +1,56 @@ +{ + "name": "https-proxy-agent", + "version": "5.0.0", + "description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS", + "main": "dist/index", + "types": "dist/index", + "files": [ + "dist" + ], + "scripts": { + "prebuild": "rimraf dist", + "build": "tsc", + "test": "mocha --reporter spec", + "test-lint": "eslint src --ext .js,.ts", + "prepublishOnly": "npm run build" + }, + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/node-https-proxy-agent.git" + }, + "keywords": [ + "https", + "proxy", + "endpoint", + "agent" + ], + "author": "Nathan Rajlich (http://n8.io/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/TooTallNate/node-https-proxy-agent/issues" + }, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "devDependencies": { + "@types/debug": "4", + "@types/node": "^12.12.11", + "@typescript-eslint/eslint-plugin": "1.6.0", + "@typescript-eslint/parser": "1.1.0", + "eslint": "5.16.0", + "eslint-config-airbnb": "17.1.0", + "eslint-config-prettier": "4.1.0", + "eslint-import-resolver-typescript": "1.1.1", + "eslint-plugin-import": "2.16.0", + "eslint-plugin-jsx-a11y": "6.2.1", + "eslint-plugin-react": "7.12.4", + "mocha": "^6.2.2", + "proxy": "1", + "rimraf": "^3.0.0", + "typescript": "^3.5.3" + }, + "engines": { + "node": ">= 6" + } +} diff --git a/node_modules/iconv-lite/Changelog.md b/node_modules/iconv-lite/Changelog.md new file mode 100644 index 0000000..f252313 --- /dev/null +++ b/node_modules/iconv-lite/Changelog.md @@ -0,0 +1,162 @@ +# 0.4.24 / 2018-08-22 + + * Added MIK encoding (#196, by @Ivan-Kalatchev) + + +# 0.4.23 / 2018-05-07 + + * Fix deprecation warning in Node v10 due to the last usage of `new Buffer` (#185, by @felixbuenemann) + * Switched from NodeBuffer to Buffer in typings (#155 by @felixfbecker, #186 by @larssn) + + +# 0.4.22 / 2018-05-05 + + * Use older semver style for dependencies to be compatible with Node version 0.10 (#182, by @dougwilson) + * Fix tests to accomodate fixes in Node v10 (#182, by @dougwilson) + + +# 0.4.21 / 2018-04-06 + + * Fix encoding canonicalization (#156) + * Fix the paths in the "browser" field in package.json (#174 by @LMLB) + * Removed "contributors" section in package.json - see Git history instead. + + +# 0.4.20 / 2018-04-06 + + * Updated `new Buffer()` usages with recommended replacements as it's being deprecated in Node v10 (#176, #178 by @ChALkeR) + + +# 0.4.19 / 2017-09-09 + + * Fixed iso8859-1 codec regression in handling untranslatable characters (#162, caused by #147) + * Re-generated windows1255 codec, because it was updated in iconv project + * Fixed grammar in error message when iconv-lite is loaded with encoding other than utf8 + + +# 0.4.18 / 2017-06-13 + + * Fixed CESU-8 regression in Node v8. + + +# 0.4.17 / 2017-04-22 + + * Updated typescript definition file to support Angular 2 AoT mode (#153 by @larssn) + + +# 0.4.16 / 2017-04-22 + + * Added support for React Native (#150) + * Changed iso8859-1 encoding to usine internal 'binary' encoding, as it's the same thing (#147 by @mscdex) + * Fixed typo in Readme (#138 by @jiangzhuo) + * Fixed build for Node v6.10+ by making correct version comparison + * Added a warning if iconv-lite is loaded not as utf-8 (see #142) + + +# 0.4.15 / 2016-11-21 + + * Fixed typescript type definition (#137) + + +# 0.4.14 / 2016-11-20 + + * Preparation for v1.0 + * Added Node v6 and latest Node versions to Travis CI test rig + * Deprecated Node v0.8 support + * Typescript typings (@larssn) + * Fix encoding of Euro character in GB 18030 (inspired by @lygstate) + * Add ms prefix to dbcs windows encodings (@rokoroku) + + +# 0.4.13 / 2015-10-01 + + * Fix silly mistake in deprecation notice. + + +# 0.4.12 / 2015-09-26 + + * Node v4 support: + * Added CESU-8 decoding (#106) + * Added deprecation notice for `extendNodeEncodings` + * Added Travis tests for Node v4 and io.js latest (#105 by @Mithgol) + + +# 0.4.11 / 2015-07-03 + + * Added CESU-8 encoding. + + +# 0.4.10 / 2015-05-26 + + * Changed UTF-16 endianness heuristic to take into account any ASCII chars, not + just spaces. This should minimize the importance of "default" endianness. + + +# 0.4.9 / 2015-05-24 + + * Streamlined BOM handling: strip BOM by default, add BOM when encoding if + addBOM: true. Added docs to Readme. + * UTF16 now uses UTF16-LE by default. + * Fixed minor issue with big5 encoding. + * Added io.js testing on Travis; updated node-iconv version to test against. + Now we just skip testing SBCS encodings that node-iconv doesn't support. + * (internal refactoring) Updated codec interface to use classes. + * Use strict mode in all files. + + +# 0.4.8 / 2015-04-14 + + * added alias UNICODE-1-1-UTF-7 for UTF-7 encoding (#94) + + +# 0.4.7 / 2015-02-05 + + * stop official support of Node.js v0.8. Should still work, but no guarantees. + reason: Packages needed for testing are hard to get on Travis CI. + * work in environment where Object.prototype is monkey patched with enumerable + props (#89). + + +# 0.4.6 / 2015-01-12 + + * fix rare aliases of single-byte encodings (thanks @mscdex) + * double the timeout for dbcs tests to make them less flaky on travis + + +# 0.4.5 / 2014-11-20 + + * fix windows-31j and x-sjis encoding support (@nleush) + * minor fix: undefined variable reference when internal error happens + + +# 0.4.4 / 2014-07-16 + + * added encodings UTF-7 (RFC2152) and UTF-7-IMAP (RFC3501 Section 5.1.3) + * fixed streaming base64 encoding + + +# 0.4.3 / 2014-06-14 + + * added encodings UTF-16BE and UTF-16 with BOM + + +# 0.4.2 / 2014-06-12 + + * don't throw exception if `extendNodeEncodings()` is called more than once + + +# 0.4.1 / 2014-06-11 + + * codepage 808 added + + +# 0.4.0 / 2014-06-10 + + * code is rewritten from scratch + * all widespread encodings are supported + * streaming interface added + * browserify compatibility added + * (optional) extend core primitive encodings to make usage even simpler + * moved from vows to mocha as the testing framework + + diff --git a/node_modules/iconv-lite/LICENSE b/node_modules/iconv-lite/LICENSE new file mode 100644 index 0000000..d518d83 --- /dev/null +++ b/node_modules/iconv-lite/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) 2011 Alexander Shtuchkin + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/node_modules/iconv-lite/README.md b/node_modules/iconv-lite/README.md new file mode 100644 index 0000000..c981c37 --- /dev/null +++ b/node_modules/iconv-lite/README.md @@ -0,0 +1,156 @@ +## Pure JS character encoding conversion [![Build Status](https://travis-ci.org/ashtuchkin/iconv-lite.svg?branch=master)](https://travis-ci.org/ashtuchkin/iconv-lite) + + * Doesn't need native code compilation. Works on Windows and in sandboxed environments like [Cloud9](http://c9.io). + * Used in popular projects like [Express.js (body_parser)](https://github.com/expressjs/body-parser), + [Grunt](http://gruntjs.com/), [Nodemailer](http://www.nodemailer.com/), [Yeoman](http://yeoman.io/) and others. + * Faster than [node-iconv](https://github.com/bnoordhuis/node-iconv) (see below for performance comparison). + * Intuitive encode/decode API + * Streaming support for Node v0.10+ + * [Deprecated] Can extend Node.js primitives (buffers, streams) to support all iconv-lite encodings. + * In-browser usage via [Browserify](https://github.com/substack/node-browserify) (~180k gzip compressed with Buffer shim included). + * Typescript [type definition file](https://github.com/ashtuchkin/iconv-lite/blob/master/lib/index.d.ts) included. + * React Native is supported (need to explicitly `npm install` two more modules: `buffer` and `stream`). + * License: MIT. + +[![NPM Stats](https://nodei.co/npm/iconv-lite.png?downloads=true&downloadRank=true)](https://npmjs.org/packages/iconv-lite/) + +## Usage +### Basic API +```javascript +var iconv = require('iconv-lite'); + +// Convert from an encoded buffer to js string. +str = iconv.decode(Buffer.from([0x68, 0x65, 0x6c, 0x6c, 0x6f]), 'win1251'); + +// Convert from js string to an encoded buffer. +buf = iconv.encode("Sample input string", 'win1251'); + +// Check if encoding is supported +iconv.encodingExists("us-ascii") +``` + +### Streaming API (Node v0.10+) +```javascript + +// Decode stream (from binary stream to js strings) +http.createServer(function(req, res) { + var converterStream = iconv.decodeStream('win1251'); + req.pipe(converterStream); + + converterStream.on('data', function(str) { + console.log(str); // Do something with decoded strings, chunk-by-chunk. + }); +}); + +// Convert encoding streaming example +fs.createReadStream('file-in-win1251.txt') + .pipe(iconv.decodeStream('win1251')) + .pipe(iconv.encodeStream('ucs2')) + .pipe(fs.createWriteStream('file-in-ucs2.txt')); + +// Sugar: all encode/decode streams have .collect(cb) method to accumulate data. +http.createServer(function(req, res) { + req.pipe(iconv.decodeStream('win1251')).collect(function(err, body) { + assert(typeof body == 'string'); + console.log(body); // full request body string + }); +}); +``` + +### [Deprecated] Extend Node.js own encodings +> NOTE: This doesn't work on latest Node versions. See [details](https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility). + +```javascript +// After this call all Node basic primitives will understand iconv-lite encodings. +iconv.extendNodeEncodings(); + +// Examples: +buf = new Buffer(str, 'win1251'); +buf.write(str, 'gbk'); +str = buf.toString('latin1'); +assert(Buffer.isEncoding('iso-8859-15')); +Buffer.byteLength(str, 'us-ascii'); + +http.createServer(function(req, res) { + req.setEncoding('big5'); + req.collect(function(err, body) { + console.log(body); + }); +}); + +fs.createReadStream("file.txt", "shift_jis"); + +// External modules are also supported (if they use Node primitives, which they probably do). +request = require('request'); +request({ + url: "http://github.com/", + encoding: "cp932" +}); + +// To remove extensions +iconv.undoExtendNodeEncodings(); +``` + +## Supported encodings + + * All node.js native encodings: utf8, ucs2 / utf16-le, ascii, binary, base64, hex. + * Additional unicode encodings: utf16, utf16-be, utf-7, utf-7-imap. + * All widespread singlebyte encodings: Windows 125x family, ISO-8859 family, + IBM/DOS codepages, Macintosh family, KOI8 family, all others supported by iconv library. + Aliases like 'latin1', 'us-ascii' also supported. + * All widespread multibyte encodings: CP932, CP936, CP949, CP950, GB2312, GBK, GB18030, Big5, Shift_JIS, EUC-JP. + +See [all supported encodings on wiki](https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings). + +Most singlebyte encodings are generated automatically from [node-iconv](https://github.com/bnoordhuis/node-iconv). Thank you Ben Noordhuis and libiconv authors! + +Multibyte encodings are generated from [Unicode.org mappings](http://www.unicode.org/Public/MAPPINGS/) and [WHATWG Encoding Standard mappings](http://encoding.spec.whatwg.org/). Thank you, respective authors! + + +## Encoding/decoding speed + +Comparison with node-iconv module (1000x256kb, on MacBook Pro, Core i5/2.6 GHz, Node v0.12.0). +Note: your results may vary, so please always check on your hardware. + + operation iconv@2.1.4 iconv-lite@0.4.7 + ---------------------------------------------------------- + encode('win1251') ~96 Mb/s ~320 Mb/s + decode('win1251') ~95 Mb/s ~246 Mb/s + +## BOM handling + + * Decoding: BOM is stripped by default, unless overridden by passing `stripBOM: false` in options + (f.ex. `iconv.decode(buf, enc, {stripBOM: false})`). + A callback might also be given as a `stripBOM` parameter - it'll be called if BOM character was actually found. + * If you want to detect UTF-8 BOM when decoding other encodings, use [node-autodetect-decoder-stream](https://github.com/danielgindi/node-autodetect-decoder-stream) module. + * Encoding: No BOM added, unless overridden by `addBOM: true` option. + +## UTF-16 Encodings + +This library supports UTF-16LE, UTF-16BE and UTF-16 encodings. First two are straightforward, but UTF-16 is trying to be +smart about endianness in the following ways: + * Decoding: uses BOM and 'spaces heuristic' to determine input endianness. Default is UTF-16LE, but can be + overridden with `defaultEncoding: 'utf-16be'` option. Strips BOM unless `stripBOM: false`. + * Encoding: uses UTF-16LE and writes BOM by default. Use `addBOM: false` to override. + +## Other notes + +When decoding, be sure to supply a Buffer to decode() method, otherwise [bad things usually happen](https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding). +Untranslatable characters are set to � or ?. No transliteration is currently supported. +Node versions 0.10.31 and 0.11.13 are buggy, don't use them (see #65, #77). + +## Testing + +```bash +$ git clone git@github.com:ashtuchkin/iconv-lite.git +$ cd iconv-lite +$ npm install +$ npm test + +$ # To view performance: +$ node test/performance.js + +$ # To view test coverage: +$ npm run coverage +$ open coverage/lcov-report/index.html +``` diff --git a/node_modules/iconv-lite/encodings/dbcs-codec.js b/node_modules/iconv-lite/encodings/dbcs-codec.js new file mode 100644 index 0000000..1fe3e16 --- /dev/null +++ b/node_modules/iconv-lite/encodings/dbcs-codec.js @@ -0,0 +1,555 @@ +"use strict"; +var Buffer = require("safer-buffer").Buffer; + +// Multibyte codec. In this scheme, a character is represented by 1 or more bytes. +// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences. +// To save memory and loading time, we read table files only when requested. + +exports._dbcs = DBCSCodec; + +var UNASSIGNED = -1, + GB18030_CODE = -2, + SEQ_START = -10, + NODE_START = -1000, + UNASSIGNED_NODE = new Array(0x100), + DEF_CHAR = -1; + +for (var i = 0; i < 0x100; i++) + UNASSIGNED_NODE[i] = UNASSIGNED; + + +// Class DBCSCodec reads and initializes mapping tables. +function DBCSCodec(codecOptions, iconv) { + this.encodingName = codecOptions.encodingName; + if (!codecOptions) + throw new Error("DBCS codec is called without the data.") + if (!codecOptions.table) + throw new Error("Encoding '" + this.encodingName + "' has no data."); + + // Load tables. + var mappingTable = codecOptions.table(); + + + // Decode tables: MBCS -> Unicode. + + // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256. + // Trie root is decodeTables[0]. + // Values: >= 0 -> unicode character code. can be > 0xFFFF + // == UNASSIGNED -> unknown/unassigned sequence. + // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence. + // <= NODE_START -> index of the next node in our trie to process next byte. + // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq. + this.decodeTables = []; + this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node. + + // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here. + this.decodeTableSeq = []; + + // Actual mapping tables consist of chunks. Use them to fill up decode tables. + for (var i = 0; i < mappingTable.length; i++) + this._addDecodeChunk(mappingTable[i]); + + this.defaultCharUnicode = iconv.defaultCharUnicode; + + + // Encode tables: Unicode -> DBCS. + + // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance. + // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null. + // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.). + // == UNASSIGNED -> no conversion found. Output a default char. + // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence. + this.encodeTable = []; + + // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of + // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key + // means end of sequence (needed when one sequence is a strict subsequence of another). + // Objects are kept separately from encodeTable to increase performance. + this.encodeTableSeq = []; + + // Some chars can be decoded, but need not be encoded. + var skipEncodeChars = {}; + if (codecOptions.encodeSkipVals) + for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) { + var val = codecOptions.encodeSkipVals[i]; + if (typeof val === 'number') + skipEncodeChars[val] = true; + else + for (var j = val.from; j <= val.to; j++) + skipEncodeChars[j] = true; + } + + // Use decode trie to recursively fill out encode tables. + this._fillEncodeTable(0, 0, skipEncodeChars); + + // Add more encoding pairs when needed. + if (codecOptions.encodeAdd) { + for (var uChar in codecOptions.encodeAdd) + if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar)) + this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]); + } + + this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)]; + if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?']; + if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0); + + + // Load & create GB18030 tables when needed. + if (typeof codecOptions.gb18030 === 'function') { + this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges. + + // Add GB18030 decode tables. + var thirdByteNodeIdx = this.decodeTables.length; + var thirdByteNode = this.decodeTables[thirdByteNodeIdx] = UNASSIGNED_NODE.slice(0); + + var fourthByteNodeIdx = this.decodeTables.length; + var fourthByteNode = this.decodeTables[fourthByteNodeIdx] = UNASSIGNED_NODE.slice(0); + + for (var i = 0x81; i <= 0xFE; i++) { + var secondByteNodeIdx = NODE_START - this.decodeTables[0][i]; + var secondByteNode = this.decodeTables[secondByteNodeIdx]; + for (var j = 0x30; j <= 0x39; j++) + secondByteNode[j] = NODE_START - thirdByteNodeIdx; + } + for (var i = 0x81; i <= 0xFE; i++) + thirdByteNode[i] = NODE_START - fourthByteNodeIdx; + for (var i = 0x30; i <= 0x39; i++) + fourthByteNode[i] = GB18030_CODE + } +} + +DBCSCodec.prototype.encoder = DBCSEncoder; +DBCSCodec.prototype.decoder = DBCSDecoder; + +// Decoder helpers +DBCSCodec.prototype._getDecodeTrieNode = function(addr) { + var bytes = []; + for (; addr > 0; addr >>= 8) + bytes.push(addr & 0xFF); + if (bytes.length == 0) + bytes.push(0); + + var node = this.decodeTables[0]; + for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie. + var val = node[bytes[i]]; + + if (val == UNASSIGNED) { // Create new node. + node[bytes[i]] = NODE_START - this.decodeTables.length; + this.decodeTables.push(node = UNASSIGNED_NODE.slice(0)); + } + else if (val <= NODE_START) { // Existing node. + node = this.decodeTables[NODE_START - val]; + } + else + throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16)); + } + return node; +} + + +DBCSCodec.prototype._addDecodeChunk = function(chunk) { + // First element of chunk is the hex mbcs code where we start. + var curAddr = parseInt(chunk[0], 16); + + // Choose the decoding node where we'll write our chars. + var writeTable = this._getDecodeTrieNode(curAddr); + curAddr = curAddr & 0xFF; + + // Write all other elements of the chunk to the table. + for (var k = 1; k < chunk.length; k++) { + var part = chunk[k]; + if (typeof part === "string") { // String, write as-is. + for (var l = 0; l < part.length;) { + var code = part.charCodeAt(l++); + if (0xD800 <= code && code < 0xDC00) { // Decode surrogate + var codeTrail = part.charCodeAt(l++); + if (0xDC00 <= codeTrail && codeTrail < 0xE000) + writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00); + else + throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]); + } + else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used) + var len = 0xFFF - code + 2; + var seq = []; + for (var m = 0; m < len; m++) + seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq. + + writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length; + this.decodeTableSeq.push(seq); + } + else + writeTable[curAddr++] = code; // Basic char + } + } + else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character. + var charCode = writeTable[curAddr - 1] + 1; + for (var l = 0; l < part; l++) + writeTable[curAddr++] = charCode++; + } + else + throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]); + } + if (curAddr > 0xFF) + throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr); +} + +// Encoder helpers +DBCSCodec.prototype._getEncodeBucket = function(uCode) { + var high = uCode >> 8; // This could be > 0xFF because of astral characters. + if (this.encodeTable[high] === undefined) + this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand. + return this.encodeTable[high]; +} + +DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) { + var bucket = this._getEncodeBucket(uCode); + var low = uCode & 0xFF; + if (bucket[low] <= SEQ_START) + this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it. + else if (bucket[low] == UNASSIGNED) + bucket[low] = dbcsCode; +} + +DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) { + + // Get the root of character tree according to first character of the sequence. + var uCode = seq[0]; + var bucket = this._getEncodeBucket(uCode); + var low = uCode & 0xFF; + + var node; + if (bucket[low] <= SEQ_START) { + // There's already a sequence with - use it. + node = this.encodeTableSeq[SEQ_START-bucket[low]]; + } + else { + // There was no sequence object - allocate a new one. + node = {}; + if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence. + bucket[low] = SEQ_START - this.encodeTableSeq.length; + this.encodeTableSeq.push(node); + } + + // Traverse the character tree, allocating new nodes as needed. + for (var j = 1; j < seq.length-1; j++) { + var oldVal = node[uCode]; + if (typeof oldVal === 'object') + node = oldVal; + else { + node = node[uCode] = {} + if (oldVal !== undefined) + node[DEF_CHAR] = oldVal + } + } + + // Set the leaf to given dbcsCode. + uCode = seq[seq.length-1]; + node[uCode] = dbcsCode; +} + +DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) { + var node = this.decodeTables[nodeIdx]; + for (var i = 0; i < 0x100; i++) { + var uCode = node[i]; + var mbCode = prefix + i; + if (skipEncodeChars[mbCode]) + continue; + + if (uCode >= 0) + this._setEncodeChar(uCode, mbCode); + else if (uCode <= NODE_START) + this._fillEncodeTable(NODE_START - uCode, mbCode << 8, skipEncodeChars); + else if (uCode <= SEQ_START) + this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode); + } +} + + + +// == Encoder ================================================================== + +function DBCSEncoder(options, codec) { + // Encoder state + this.leadSurrogate = -1; + this.seqObj = undefined; + + // Static data + this.encodeTable = codec.encodeTable; + this.encodeTableSeq = codec.encodeTableSeq; + this.defaultCharSingleByte = codec.defCharSB; + this.gb18030 = codec.gb18030; +} + +DBCSEncoder.prototype.write = function(str) { + var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)), + leadSurrogate = this.leadSurrogate, + seqObj = this.seqObj, nextChar = -1, + i = 0, j = 0; + + while (true) { + // 0. Get next character. + if (nextChar === -1) { + if (i == str.length) break; + var uCode = str.charCodeAt(i++); + } + else { + var uCode = nextChar; + nextChar = -1; + } + + // 1. Handle surrogates. + if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates. + if (uCode < 0xDC00) { // We've got lead surrogate. + if (leadSurrogate === -1) { + leadSurrogate = uCode; + continue; + } else { + leadSurrogate = uCode; + // Double lead surrogate found. + uCode = UNASSIGNED; + } + } else { // We've got trail surrogate. + if (leadSurrogate !== -1) { + uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00); + leadSurrogate = -1; + } else { + // Incomplete surrogate pair - only trail surrogate found. + uCode = UNASSIGNED; + } + + } + } + else if (leadSurrogate !== -1) { + // Incomplete surrogate pair - only lead surrogate found. + nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char. + leadSurrogate = -1; + } + + // 2. Convert uCode character. + var dbcsCode = UNASSIGNED; + if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence + var resCode = seqObj[uCode]; + if (typeof resCode === 'object') { // Sequence continues. + seqObj = resCode; + continue; + + } else if (typeof resCode == 'number') { // Sequence finished. Write it. + dbcsCode = resCode; + + } else if (resCode == undefined) { // Current character is not part of the sequence. + + // Try default character for this sequence + resCode = seqObj[DEF_CHAR]; + if (resCode !== undefined) { + dbcsCode = resCode; // Found. Write it. + nextChar = uCode; // Current character will be written too in the next iteration. + + } else { + // TODO: What if we have no default? (resCode == undefined) + // Then, we should write first char of the sequence as-is and try the rest recursively. + // Didn't do it for now because no encoding has this situation yet. + // Currently, just skip the sequence and write current char. + } + } + seqObj = undefined; + } + else if (uCode >= 0) { // Regular character + var subtable = this.encodeTable[uCode >> 8]; + if (subtable !== undefined) + dbcsCode = subtable[uCode & 0xFF]; + + if (dbcsCode <= SEQ_START) { // Sequence start + seqObj = this.encodeTableSeq[SEQ_START-dbcsCode]; + continue; + } + + if (dbcsCode == UNASSIGNED && this.gb18030) { + // Use GB18030 algorithm to find character(s) to write. + var idx = findIdx(this.gb18030.uChars, uCode); + if (idx != -1) { + var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]); + newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600; + newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260; + newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10; + newBuf[j++] = 0x30 + dbcsCode; + continue; + } + } + } + + // 3. Write dbcsCode character. + if (dbcsCode === UNASSIGNED) + dbcsCode = this.defaultCharSingleByte; + + if (dbcsCode < 0x100) { + newBuf[j++] = dbcsCode; + } + else if (dbcsCode < 0x10000) { + newBuf[j++] = dbcsCode >> 8; // high byte + newBuf[j++] = dbcsCode & 0xFF; // low byte + } + else { + newBuf[j++] = dbcsCode >> 16; + newBuf[j++] = (dbcsCode >> 8) & 0xFF; + newBuf[j++] = dbcsCode & 0xFF; + } + } + + this.seqObj = seqObj; + this.leadSurrogate = leadSurrogate; + return newBuf.slice(0, j); +} + +DBCSEncoder.prototype.end = function() { + if (this.leadSurrogate === -1 && this.seqObj === undefined) + return; // All clean. Most often case. + + var newBuf = Buffer.alloc(10), j = 0; + + if (this.seqObj) { // We're in the sequence. + var dbcsCode = this.seqObj[DEF_CHAR]; + if (dbcsCode !== undefined) { // Write beginning of the sequence. + if (dbcsCode < 0x100) { + newBuf[j++] = dbcsCode; + } + else { + newBuf[j++] = dbcsCode >> 8; // high byte + newBuf[j++] = dbcsCode & 0xFF; // low byte + } + } else { + // See todo above. + } + this.seqObj = undefined; + } + + if (this.leadSurrogate !== -1) { + // Incomplete surrogate pair - only lead surrogate found. + newBuf[j++] = this.defaultCharSingleByte; + this.leadSurrogate = -1; + } + + return newBuf.slice(0, j); +} + +// Export for testing +DBCSEncoder.prototype.findIdx = findIdx; + + +// == Decoder ================================================================== + +function DBCSDecoder(options, codec) { + // Decoder state + this.nodeIdx = 0; + this.prevBuf = Buffer.alloc(0); + + // Static data + this.decodeTables = codec.decodeTables; + this.decodeTableSeq = codec.decodeTableSeq; + this.defaultCharUnicode = codec.defaultCharUnicode; + this.gb18030 = codec.gb18030; +} + +DBCSDecoder.prototype.write = function(buf) { + var newBuf = Buffer.alloc(buf.length*2), + nodeIdx = this.nodeIdx, + prevBuf = this.prevBuf, prevBufOffset = this.prevBuf.length, + seqStart = -this.prevBuf.length, // idx of the start of current parsed sequence. + uCode; + + if (prevBufOffset > 0) // Make prev buf overlap a little to make it easier to slice later. + prevBuf = Buffer.concat([prevBuf, buf.slice(0, 10)]); + + for (var i = 0, j = 0; i < buf.length; i++) { + var curByte = (i >= 0) ? buf[i] : prevBuf[i + prevBufOffset]; + + // Lookup in current trie node. + var uCode = this.decodeTables[nodeIdx][curByte]; + + if (uCode >= 0) { + // Normal character, just use it. + } + else if (uCode === UNASSIGNED) { // Unknown char. + // TODO: Callback with seq. + //var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset); + i = seqStart; // Try to parse again, after skipping first byte of the sequence ('i' will be incremented by 'for' cycle). + uCode = this.defaultCharUnicode.charCodeAt(0); + } + else if (uCode === GB18030_CODE) { + var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset); + var ptr = (curSeq[0]-0x81)*12600 + (curSeq[1]-0x30)*1260 + (curSeq[2]-0x81)*10 + (curSeq[3]-0x30); + var idx = findIdx(this.gb18030.gbChars, ptr); + uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx]; + } + else if (uCode <= NODE_START) { // Go to next trie node. + nodeIdx = NODE_START - uCode; + continue; + } + else if (uCode <= SEQ_START) { // Output a sequence of chars. + var seq = this.decodeTableSeq[SEQ_START - uCode]; + for (var k = 0; k < seq.length - 1; k++) { + uCode = seq[k]; + newBuf[j++] = uCode & 0xFF; + newBuf[j++] = uCode >> 8; + } + uCode = seq[seq.length-1]; + } + else + throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte); + + // Write the character to buffer, handling higher planes using surrogate pair. + if (uCode > 0xFFFF) { + uCode -= 0x10000; + var uCodeLead = 0xD800 + Math.floor(uCode / 0x400); + newBuf[j++] = uCodeLead & 0xFF; + newBuf[j++] = uCodeLead >> 8; + + uCode = 0xDC00 + uCode % 0x400; + } + newBuf[j++] = uCode & 0xFF; + newBuf[j++] = uCode >> 8; + + // Reset trie node. + nodeIdx = 0; seqStart = i+1; + } + + this.nodeIdx = nodeIdx; + this.prevBuf = (seqStart >= 0) ? buf.slice(seqStart) : prevBuf.slice(seqStart + prevBufOffset); + return newBuf.slice(0, j).toString('ucs2'); +} + +DBCSDecoder.prototype.end = function() { + var ret = ''; + + // Try to parse all remaining chars. + while (this.prevBuf.length > 0) { + // Skip 1 character in the buffer. + ret += this.defaultCharUnicode; + var buf = this.prevBuf.slice(1); + + // Parse remaining as usual. + this.prevBuf = Buffer.alloc(0); + this.nodeIdx = 0; + if (buf.length > 0) + ret += this.write(buf); + } + + this.nodeIdx = 0; + return ret; +} + +// Binary search for GB18030. Returns largest i such that table[i] <= val. +function findIdx(table, val) { + if (table[0] > val) + return -1; + + var l = 0, r = table.length; + while (l < r-1) { // always table[l] <= val < table[r] + var mid = l + Math.floor((r-l+1)/2); + if (table[mid] <= val) + l = mid; + else + r = mid; + } + return l; +} + diff --git a/node_modules/iconv-lite/encodings/dbcs-data.js b/node_modules/iconv-lite/encodings/dbcs-data.js new file mode 100644 index 0000000..4b61914 --- /dev/null +++ b/node_modules/iconv-lite/encodings/dbcs-data.js @@ -0,0 +1,176 @@ +"use strict"; + +// Description of supported double byte encodings and aliases. +// Tables are not require()-d until they are needed to speed up library load. +// require()-s are direct to support Browserify. + +module.exports = { + + // == Japanese/ShiftJIS ==================================================== + // All japanese encodings are based on JIS X set of standards: + // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF. + // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes. + // Has several variations in 1978, 1983, 1990 and 1997. + // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead. + // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233. + // 2 planes, first is superset of 0208, second - revised 0212. + // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx) + + // Byte encodings are: + // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte + // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC. + // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI. + // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes. + // 0x00-0x7F - lower part of 0201 + // 0x8E, 0xA1-0xDF - upper part of 0201 + // (0xA1-0xFE)x2 - 0208 plane (94x94). + // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94). + // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon. + // Used as-is in ISO2022 family. + // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII, + // 0201-1976 Roman, 0208-1978, 0208-1983. + // * ISO2022-JP-1: Adds esc seq for 0212-1990. + // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7. + // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2. + // * ISO2022-JP-2004: Adds 0213-2004 Plane 1. + // + // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes. + // + // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html + + 'shiftjis': { + type: '_dbcs', + table: function() { return require('./tables/shiftjis.json') }, + encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, + encodeSkipVals: [{from: 0xED40, to: 0xF940}], + }, + 'csshiftjis': 'shiftjis', + 'mskanji': 'shiftjis', + 'sjis': 'shiftjis', + 'windows31j': 'shiftjis', + 'ms31j': 'shiftjis', + 'xsjis': 'shiftjis', + 'windows932': 'shiftjis', + 'ms932': 'shiftjis', + '932': 'shiftjis', + 'cp932': 'shiftjis', + + 'eucjp': { + type: '_dbcs', + table: function() { return require('./tables/eucjp.json') }, + encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, + }, + + // TODO: KDDI extension to Shift_JIS + // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes. + // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars. + + + // == Chinese/GBK ========================================================== + // http://en.wikipedia.org/wiki/GBK + // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder + + // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936 + 'gb2312': 'cp936', + 'gb231280': 'cp936', + 'gb23121980': 'cp936', + 'csgb2312': 'cp936', + 'csiso58gb231280': 'cp936', + 'euccn': 'cp936', + + // Microsoft's CP936 is a subset and approximation of GBK. + 'windows936': 'cp936', + 'ms936': 'cp936', + '936': 'cp936', + 'cp936': { + type: '_dbcs', + table: function() { return require('./tables/cp936.json') }, + }, + + // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other. + 'gbk': { + type: '_dbcs', + table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) }, + }, + 'xgbk': 'gbk', + 'isoir58': 'gbk', + + // GB18030 is an algorithmic extension of GBK. + // Main source: https://www.w3.org/TR/encoding/#gbk-encoder + // http://icu-project.org/docs/papers/gb18030.html + // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml + // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0 + 'gb18030': { + type: '_dbcs', + table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) }, + gb18030: function() { return require('./tables/gb18030-ranges.json') }, + encodeSkipVals: [0x80], + encodeAdd: {'€': 0xA2E3}, + }, + + 'chinese': 'gb18030', + + + // == Korean =============================================================== + // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same. + 'windows949': 'cp949', + 'ms949': 'cp949', + '949': 'cp949', + 'cp949': { + type: '_dbcs', + table: function() { return require('./tables/cp949.json') }, + }, + + 'cseuckr': 'cp949', + 'csksc56011987': 'cp949', + 'euckr': 'cp949', + 'isoir149': 'cp949', + 'korean': 'cp949', + 'ksc56011987': 'cp949', + 'ksc56011989': 'cp949', + 'ksc5601': 'cp949', + + + // == Big5/Taiwan/Hong Kong ================================================ + // There are lots of tables for Big5 and cp950. Please see the following links for history: + // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html + // Variations, in roughly number of defined chars: + // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT + // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/ + // * Big5-2003 (Taiwan standard) almost superset of cp950. + // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers. + // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard. + // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years. + // Plus, it has 4 combining sequences. + // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299 + // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way. + // Implementations are not consistent within browsers; sometimes labeled as just big5. + // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied. + // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31 + // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s. + // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt + // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt + // + // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder + // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong. + + 'windows950': 'cp950', + 'ms950': 'cp950', + '950': 'cp950', + 'cp950': { + type: '_dbcs', + table: function() { return require('./tables/cp950.json') }, + }, + + // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus. + 'big5': 'big5hkscs', + 'big5hkscs': { + type: '_dbcs', + table: function() { return require('./tables/cp950.json').concat(require('./tables/big5-added.json')) }, + encodeSkipVals: [0xa2cc], + }, + + 'cnbig5': 'big5hkscs', + 'csbig5': 'big5hkscs', + 'xxbig5': 'big5hkscs', +}; diff --git a/node_modules/iconv-lite/encodings/index.js b/node_modules/iconv-lite/encodings/index.js new file mode 100644 index 0000000..e304003 --- /dev/null +++ b/node_modules/iconv-lite/encodings/index.js @@ -0,0 +1,22 @@ +"use strict"; + +// Update this array if you add/rename/remove files in this directory. +// We support Browserify by skipping automatic module discovery and requiring modules directly. +var modules = [ + require("./internal"), + require("./utf16"), + require("./utf7"), + require("./sbcs-codec"), + require("./sbcs-data"), + require("./sbcs-data-generated"), + require("./dbcs-codec"), + require("./dbcs-data"), +]; + +// Put all encoding/alias/codec definitions to single object and export it. +for (var i = 0; i < modules.length; i++) { + var module = modules[i]; + for (var enc in module) + if (Object.prototype.hasOwnProperty.call(module, enc)) + exports[enc] = module[enc]; +} diff --git a/node_modules/iconv-lite/encodings/internal.js b/node_modules/iconv-lite/encodings/internal.js new file mode 100644 index 0000000..05ce38b --- /dev/null +++ b/node_modules/iconv-lite/encodings/internal.js @@ -0,0 +1,188 @@ +"use strict"; +var Buffer = require("safer-buffer").Buffer; + +// Export Node.js internal encodings. + +module.exports = { + // Encodings + utf8: { type: "_internal", bomAware: true}, + cesu8: { type: "_internal", bomAware: true}, + unicode11utf8: "utf8", + + ucs2: { type: "_internal", bomAware: true}, + utf16le: "ucs2", + + binary: { type: "_internal" }, + base64: { type: "_internal" }, + hex: { type: "_internal" }, + + // Codec. + _internal: InternalCodec, +}; + +//------------------------------------------------------------------------------ + +function InternalCodec(codecOptions, iconv) { + this.enc = codecOptions.encodingName; + this.bomAware = codecOptions.bomAware; + + if (this.enc === "base64") + this.encoder = InternalEncoderBase64; + else if (this.enc === "cesu8") { + this.enc = "utf8"; // Use utf8 for decoding. + this.encoder = InternalEncoderCesu8; + + // Add decoder for versions of Node not supporting CESU-8 + if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') { + this.decoder = InternalDecoderCesu8; + this.defaultCharUnicode = iconv.defaultCharUnicode; + } + } +} + +InternalCodec.prototype.encoder = InternalEncoder; +InternalCodec.prototype.decoder = InternalDecoder; + +//------------------------------------------------------------------------------ + +// We use node.js internal decoder. Its signature is the same as ours. +var StringDecoder = require('string_decoder').StringDecoder; + +if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method. + StringDecoder.prototype.end = function() {}; + + +function InternalDecoder(options, codec) { + StringDecoder.call(this, codec.enc); +} + +InternalDecoder.prototype = StringDecoder.prototype; + + +//------------------------------------------------------------------------------ +// Encoder is mostly trivial + +function InternalEncoder(options, codec) { + this.enc = codec.enc; +} + +InternalEncoder.prototype.write = function(str) { + return Buffer.from(str, this.enc); +} + +InternalEncoder.prototype.end = function() { +} + + +//------------------------------------------------------------------------------ +// Except base64 encoder, which must keep its state. + +function InternalEncoderBase64(options, codec) { + this.prevStr = ''; +} + +InternalEncoderBase64.prototype.write = function(str) { + str = this.prevStr + str; + var completeQuads = str.length - (str.length % 4); + this.prevStr = str.slice(completeQuads); + str = str.slice(0, completeQuads); + + return Buffer.from(str, "base64"); +} + +InternalEncoderBase64.prototype.end = function() { + return Buffer.from(this.prevStr, "base64"); +} + + +//------------------------------------------------------------------------------ +// CESU-8 encoder is also special. + +function InternalEncoderCesu8(options, codec) { +} + +InternalEncoderCesu8.prototype.write = function(str) { + var buf = Buffer.alloc(str.length * 3), bufIdx = 0; + for (var i = 0; i < str.length; i++) { + var charCode = str.charCodeAt(i); + // Naive implementation, but it works because CESU-8 is especially easy + // to convert from UTF-16 (which all JS strings are encoded in). + if (charCode < 0x80) + buf[bufIdx++] = charCode; + else if (charCode < 0x800) { + buf[bufIdx++] = 0xC0 + (charCode >>> 6); + buf[bufIdx++] = 0x80 + (charCode & 0x3f); + } + else { // charCode will always be < 0x10000 in javascript. + buf[bufIdx++] = 0xE0 + (charCode >>> 12); + buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f); + buf[bufIdx++] = 0x80 + (charCode & 0x3f); + } + } + return buf.slice(0, bufIdx); +} + +InternalEncoderCesu8.prototype.end = function() { +} + +//------------------------------------------------------------------------------ +// CESU-8 decoder is not implemented in Node v4.0+ + +function InternalDecoderCesu8(options, codec) { + this.acc = 0; + this.contBytes = 0; + this.accBytes = 0; + this.defaultCharUnicode = codec.defaultCharUnicode; +} + +InternalDecoderCesu8.prototype.write = function(buf) { + var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, + res = ''; + for (var i = 0; i < buf.length; i++) { + var curByte = buf[i]; + if ((curByte & 0xC0) !== 0x80) { // Leading byte + if (contBytes > 0) { // Previous code is invalid + res += this.defaultCharUnicode; + contBytes = 0; + } + + if (curByte < 0x80) { // Single-byte code + res += String.fromCharCode(curByte); + } else if (curByte < 0xE0) { // Two-byte code + acc = curByte & 0x1F; + contBytes = 1; accBytes = 1; + } else if (curByte < 0xF0) { // Three-byte code + acc = curByte & 0x0F; + contBytes = 2; accBytes = 1; + } else { // Four or more are not supported for CESU-8. + res += this.defaultCharUnicode; + } + } else { // Continuation byte + if (contBytes > 0) { // We're waiting for it. + acc = (acc << 6) | (curByte & 0x3f); + contBytes--; accBytes++; + if (contBytes === 0) { + // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80) + if (accBytes === 2 && acc < 0x80 && acc > 0) + res += this.defaultCharUnicode; + else if (accBytes === 3 && acc < 0x800) + res += this.defaultCharUnicode; + else + // Actually add character. + res += String.fromCharCode(acc); + } + } else { // Unexpected continuation byte + res += this.defaultCharUnicode; + } + } + } + this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes; + return res; +} + +InternalDecoderCesu8.prototype.end = function() { + var res = 0; + if (this.contBytes > 0) + res += this.defaultCharUnicode; + return res; +} diff --git a/node_modules/iconv-lite/encodings/sbcs-codec.js b/node_modules/iconv-lite/encodings/sbcs-codec.js new file mode 100644 index 0000000..abac5ff --- /dev/null +++ b/node_modules/iconv-lite/encodings/sbcs-codec.js @@ -0,0 +1,72 @@ +"use strict"; +var Buffer = require("safer-buffer").Buffer; + +// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that +// correspond to encoded bytes (if 128 - then lower half is ASCII). + +exports._sbcs = SBCSCodec; +function SBCSCodec(codecOptions, iconv) { + if (!codecOptions) + throw new Error("SBCS codec is called without the data.") + + // Prepare char buffer for decoding. + if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256)) + throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)"); + + if (codecOptions.chars.length === 128) { + var asciiString = ""; + for (var i = 0; i < 128; i++) + asciiString += String.fromCharCode(i); + codecOptions.chars = asciiString + codecOptions.chars; + } + + this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2'); + + // Encoding buffer. + var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0)); + + for (var i = 0; i < codecOptions.chars.length; i++) + encodeBuf[codecOptions.chars.charCodeAt(i)] = i; + + this.encodeBuf = encodeBuf; +} + +SBCSCodec.prototype.encoder = SBCSEncoder; +SBCSCodec.prototype.decoder = SBCSDecoder; + + +function SBCSEncoder(options, codec) { + this.encodeBuf = codec.encodeBuf; +} + +SBCSEncoder.prototype.write = function(str) { + var buf = Buffer.alloc(str.length); + for (var i = 0; i < str.length; i++) + buf[i] = this.encodeBuf[str.charCodeAt(i)]; + + return buf; +} + +SBCSEncoder.prototype.end = function() { +} + + +function SBCSDecoder(options, codec) { + this.decodeBuf = codec.decodeBuf; +} + +SBCSDecoder.prototype.write = function(buf) { + // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. + var decodeBuf = this.decodeBuf; + var newBuf = Buffer.alloc(buf.length*2); + var idx1 = 0, idx2 = 0; + for (var i = 0; i < buf.length; i++) { + idx1 = buf[i]*2; idx2 = i*2; + newBuf[idx2] = decodeBuf[idx1]; + newBuf[idx2+1] = decodeBuf[idx1+1]; + } + return newBuf.toString('ucs2'); +} + +SBCSDecoder.prototype.end = function() { +} diff --git a/node_modules/iconv-lite/encodings/sbcs-data-generated.js b/node_modules/iconv-lite/encodings/sbcs-data-generated.js new file mode 100644 index 0000000..9b48236 --- /dev/null +++ b/node_modules/iconv-lite/encodings/sbcs-data-generated.js @@ -0,0 +1,451 @@ +"use strict"; + +// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script. +module.exports = { + "437": "cp437", + "737": "cp737", + "775": "cp775", + "850": "cp850", + "852": "cp852", + "855": "cp855", + "856": "cp856", + "857": "cp857", + "858": "cp858", + "860": "cp860", + "861": "cp861", + "862": "cp862", + "863": "cp863", + "864": "cp864", + "865": "cp865", + "866": "cp866", + "869": "cp869", + "874": "windows874", + "922": "cp922", + "1046": "cp1046", + "1124": "cp1124", + "1125": "cp1125", + "1129": "cp1129", + "1133": "cp1133", + "1161": "cp1161", + "1162": "cp1162", + "1163": "cp1163", + "1250": "windows1250", + "1251": "windows1251", + "1252": "windows1252", + "1253": "windows1253", + "1254": "windows1254", + "1255": "windows1255", + "1256": "windows1256", + "1257": "windows1257", + "1258": "windows1258", + "28591": "iso88591", + "28592": "iso88592", + "28593": "iso88593", + "28594": "iso88594", + "28595": "iso88595", + "28596": "iso88596", + "28597": "iso88597", + "28598": "iso88598", + "28599": "iso88599", + "28600": "iso885910", + "28601": "iso885911", + "28603": "iso885913", + "28604": "iso885914", + "28605": "iso885915", + "28606": "iso885916", + "windows874": { + "type": "_sbcs", + "chars": "€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + }, + "win874": "windows874", + "cp874": "windows874", + "windows1250": { + "type": "_sbcs", + "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" + }, + "win1250": "windows1250", + "cp1250": "windows1250", + "windows1251": { + "type": "_sbcs", + "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" + }, + "win1251": "windows1251", + "cp1251": "windows1251", + "windows1252": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "win1252": "windows1252", + "cp1252": "windows1252", + "windows1253": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" + }, + "win1253": "windows1253", + "cp1253": "windows1253", + "windows1254": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" + }, + "win1254": "windows1254", + "cp1254": "windows1254", + "windows1255": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" + }, + "win1255": "windows1255", + "cp1255": "windows1255", + "windows1256": { + "type": "_sbcs", + "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے" + }, + "win1256": "windows1256", + "cp1256": "windows1256", + "windows1257": { + "type": "_sbcs", + "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙" + }, + "win1257": "windows1257", + "cp1257": "windows1257", + "windows1258": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" + }, + "win1258": "windows1258", + "cp1258": "windows1258", + "iso88591": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "cp28591": "iso88591", + "iso88592": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" + }, + "cp28592": "iso88592", + "iso88593": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�Ż°ħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙" + }, + "cp28593": "iso88593", + "iso88594": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤ĨĻ§¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩļˇ¸šēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖ×ØŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙" + }, + "cp28594": "iso88594", + "iso88595": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ" + }, + "cp28595": "iso88595", + "iso88596": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������" + }, + "cp28596": "iso88596", + "iso88597": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" + }, + "cp28597": "iso88597", + "iso88598": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" + }, + "cp28598": "iso88598", + "iso88599": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" + }, + "cp28599": "iso88599", + "iso885910": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨĶ§ĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ" + }, + "cp28600": "iso885910", + "iso885911": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + }, + "cp28601": "iso885911", + "iso885913": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’" + }, + "cp28603": "iso885913", + "iso885914": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ" + }, + "cp28604": "iso885914", + "iso885915": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "cp28605": "iso885915", + "iso885916": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Š§š©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ" + }, + "cp28606": "iso885916", + "cp437": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm437": "cp437", + "csibm437": "cp437", + "cp737": { + "type": "_sbcs", + "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ " + }, + "ibm737": "cp737", + "csibm737": "cp737", + "cp775": { + "type": "_sbcs", + "chars": "ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£ØפĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ " + }, + "ibm775": "cp775", + "csibm775": "cp775", + "cp850": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " + }, + "ibm850": "cp850", + "csibm850": "cp850", + "cp852": { + "type": "_sbcs", + "chars": "ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ " + }, + "ibm852": "cp852", + "csibm852": "cp852", + "cp855": { + "type": "_sbcs", + "chars": "ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ " + }, + "ibm855": "cp855", + "csibm855": "cp855", + "cp856": { + "type": "_sbcs", + "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ " + }, + "ibm856": "cp856", + "csibm856": "cp856", + "cp857": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ " + }, + "ibm857": "cp857", + "csibm857": "cp857", + "cp858": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " + }, + "ibm858": "cp858", + "csibm858": "cp858", + "cp860": { + "type": "_sbcs", + "chars": "ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm860": "cp860", + "csibm860": "cp860", + "cp861": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm861": "cp861", + "csibm861": "cp861", + "cp862": { + "type": "_sbcs", + "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm862": "cp862", + "csibm862": "cp862", + "cp863": { + "type": "_sbcs", + "chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm863": "cp863", + "csibm863": "cp863", + "cp864": { + "type": "_sbcs", + "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�" + }, + "ibm864": "cp864", + "csibm864": "cp864", + "cp865": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm865": "cp865", + "csibm865": "cp865", + "cp866": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ " + }, + "ibm866": "cp866", + "csibm866": "cp866", + "cp869": { + "type": "_sbcs", + "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ " + }, + "ibm869": "cp869", + "csibm869": "cp869", + "cp922": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖ×ØÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ" + }, + "ibm922": "cp922", + "csibm922": "cp922", + "cp1046": { + "type": "_sbcs", + "chars": "ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�" + }, + "ibm1046": "cp1046", + "csibm1046": "cp1046", + "cp1124": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ" + }, + "ibm1124": "cp1124", + "csibm1124": "cp1124", + "cp1125": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ " + }, + "ibm1125": "cp1125", + "csibm1125": "cp1125", + "cp1129": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" + }, + "ibm1129": "cp1129", + "csibm1129": "cp1129", + "cp1133": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�" + }, + "ibm1133": "cp1133", + "csibm1133": "cp1133", + "cp1161": { + "type": "_sbcs", + "chars": "��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ " + }, + "ibm1161": "cp1161", + "csibm1161": "cp1161", + "cp1162": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + }, + "ibm1162": "cp1162", + "csibm1162": "cp1162", + "cp1163": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" + }, + "ibm1163": "cp1163", + "csibm1163": "cp1163", + "maccroatian": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ" + }, + "maccyrillic": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" + }, + "macgreek": { + "type": "_sbcs", + "chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�" + }, + "maciceland": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macroman": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macromania": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macthai": { + "type": "_sbcs", + "chars": "«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����" + }, + "macturkish": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macukraine": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" + }, + "koi8r": { + "type": "_sbcs", + "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "koi8u": { + "type": "_sbcs", + "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "koi8ru": { + "type": "_sbcs", + "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "koi8t": { + "type": "_sbcs", + "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "armscii8": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�" + }, + "rk1048": { + "type": "_sbcs", + "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" + }, + "tcvn": { + "type": "_sbcs", + "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ" + }, + "georgianacademy": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "georgianps": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "pt154": { + "type": "_sbcs", + "chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" + }, + "viscii": { + "type": "_sbcs", + "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ" + }, + "iso646cn": { + "type": "_sbcs", + "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" + }, + "iso646jp": { + "type": "_sbcs", + "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" + }, + "hproman8": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�" + }, + "macintosh": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "ascii": { + "type": "_sbcs", + "chars": "��������������������������������������������������������������������������������������������������������������������������������" + }, + "tis620": { + "type": "_sbcs", + "chars": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + } +} \ No newline at end of file diff --git a/node_modules/iconv-lite/encodings/sbcs-data.js b/node_modules/iconv-lite/encodings/sbcs-data.js new file mode 100644 index 0000000..fdb81a3 --- /dev/null +++ b/node_modules/iconv-lite/encodings/sbcs-data.js @@ -0,0 +1,174 @@ +"use strict"; + +// Manually added data to be used by sbcs codec in addition to generated one. + +module.exports = { + // Not supported by iconv, not sure why. + "10029": "maccenteuro", + "maccenteuro": { + "type": "_sbcs", + "chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ" + }, + + "808": "cp808", + "ibm808": "cp808", + "cp808": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ " + }, + + "mik": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + + // Aliases of generated encodings. + "ascii8bit": "ascii", + "usascii": "ascii", + "ansix34": "ascii", + "ansix341968": "ascii", + "ansix341986": "ascii", + "csascii": "ascii", + "cp367": "ascii", + "ibm367": "ascii", + "isoir6": "ascii", + "iso646us": "ascii", + "iso646irv": "ascii", + "us": "ascii", + + "latin1": "iso88591", + "latin2": "iso88592", + "latin3": "iso88593", + "latin4": "iso88594", + "latin5": "iso88599", + "latin6": "iso885910", + "latin7": "iso885913", + "latin8": "iso885914", + "latin9": "iso885915", + "latin10": "iso885916", + + "csisolatin1": "iso88591", + "csisolatin2": "iso88592", + "csisolatin3": "iso88593", + "csisolatin4": "iso88594", + "csisolatincyrillic": "iso88595", + "csisolatinarabic": "iso88596", + "csisolatingreek" : "iso88597", + "csisolatinhebrew": "iso88598", + "csisolatin5": "iso88599", + "csisolatin6": "iso885910", + + "l1": "iso88591", + "l2": "iso88592", + "l3": "iso88593", + "l4": "iso88594", + "l5": "iso88599", + "l6": "iso885910", + "l7": "iso885913", + "l8": "iso885914", + "l9": "iso885915", + "l10": "iso885916", + + "isoir14": "iso646jp", + "isoir57": "iso646cn", + "isoir100": "iso88591", + "isoir101": "iso88592", + "isoir109": "iso88593", + "isoir110": "iso88594", + "isoir144": "iso88595", + "isoir127": "iso88596", + "isoir126": "iso88597", + "isoir138": "iso88598", + "isoir148": "iso88599", + "isoir157": "iso885910", + "isoir166": "tis620", + "isoir179": "iso885913", + "isoir199": "iso885914", + "isoir203": "iso885915", + "isoir226": "iso885916", + + "cp819": "iso88591", + "ibm819": "iso88591", + + "cyrillic": "iso88595", + + "arabic": "iso88596", + "arabic8": "iso88596", + "ecma114": "iso88596", + "asmo708": "iso88596", + + "greek" : "iso88597", + "greek8" : "iso88597", + "ecma118" : "iso88597", + "elot928" : "iso88597", + + "hebrew": "iso88598", + "hebrew8": "iso88598", + + "turkish": "iso88599", + "turkish8": "iso88599", + + "thai": "iso885911", + "thai8": "iso885911", + + "celtic": "iso885914", + "celtic8": "iso885914", + "isoceltic": "iso885914", + + "tis6200": "tis620", + "tis62025291": "tis620", + "tis62025330": "tis620", + + "10000": "macroman", + "10006": "macgreek", + "10007": "maccyrillic", + "10079": "maciceland", + "10081": "macturkish", + + "cspc8codepage437": "cp437", + "cspc775baltic": "cp775", + "cspc850multilingual": "cp850", + "cspcp852": "cp852", + "cspc862latinhebrew": "cp862", + "cpgr": "cp869", + + "msee": "cp1250", + "mscyrl": "cp1251", + "msansi": "cp1252", + "msgreek": "cp1253", + "msturk": "cp1254", + "mshebr": "cp1255", + "msarab": "cp1256", + "winbaltrim": "cp1257", + + "cp20866": "koi8r", + "20866": "koi8r", + "ibm878": "koi8r", + "cskoi8r": "koi8r", + + "cp21866": "koi8u", + "21866": "koi8u", + "ibm1168": "koi8u", + + "strk10482002": "rk1048", + + "tcvn5712": "tcvn", + "tcvn57121": "tcvn", + + "gb198880": "iso646cn", + "cn": "iso646cn", + + "csiso14jisc6220ro": "iso646jp", + "jisc62201969ro": "iso646jp", + "jp": "iso646jp", + + "cshproman8": "hproman8", + "r8": "hproman8", + "roman8": "hproman8", + "xroman8": "hproman8", + "ibm1051": "hproman8", + + "mac": "macintosh", + "csmacintosh": "macintosh", +}; + diff --git a/node_modules/iconv-lite/encodings/tables/big5-added.json b/node_modules/iconv-lite/encodings/tables/big5-added.json new file mode 100644 index 0000000..3c3d3c2 --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/big5-added.json @@ -0,0 +1,122 @@ +[ +["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"], +["8767","綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬"], +["87a1","𥣞㫵竼龗𤅡𨤍𣇪𠪊𣉞䌊蒄龖鐯䤰蘓墖靊鈘秐稲晠権袝瑌篅枂稬剏遆㓦珄𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥讏䚮𦺈䆁𥶙箮𢒼鿈𢓁𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿拁灮鿋"], +["8840","㇀",4,"𠄌㇅𠃑𠃍㇆㇇𠃋𡿨㇈𠃊㇉㇊㇋㇌𠄎㇍㇎ĀÁǍÀĒÉĚÈŌÓǑÒ࿿Ê̄Ế࿿Ê̌ỀÊāáǎàɑēéěèīíǐìōóǒòūúǔùǖǘǚ"], +["88a1","ǜü࿿ê̄ế࿿ê̌ềêɡ⏚⏛"], +["8940","𪎩𡅅"], +["8943","攊"], +["8946","丽滝鵎釟"], +["894c","𧜵撑会伨侨兖兴农凤务动医华发变团声处备夲头学实実岚庆总斉柾栄桥济炼电纤纬纺织经统缆缷艺苏药视设询车轧轮"], +["89a1","琑糼緍楆竉刧"], +["89ab","醌碸酞肼"], +["89b0","贋胶𠧧"], +["89b5","肟黇䳍鷉鸌䰾𩷶𧀎鸊𪄳㗁"], +["89c1","溚舾甙"], +["89c5","䤑马骏龙禇𨑬𡷊𠗐𢫦两亁亀亇亿仫伷㑌侽㹈倃傈㑽㒓㒥円夅凛凼刅争剹劐匧㗇厩㕑厰㕓参吣㕭㕲㚁咓咣咴咹哐哯唘唣唨㖘唿㖥㖿嗗㗅"], +["8a40","𧶄唥"], +["8a43","𠱂𠴕𥄫喐𢳆㧬𠍁蹆𤶸𩓥䁓𨂾睺𢰸㨴䟕𨅝𦧲𤷪擝𠵼𠾴𠳕𡃴撍蹾𠺖𠰋𠽤𢲩𨉖𤓓"], +["8a64","𠵆𩩍𨃩䟴𤺧𢳂骲㩧𩗴㿭㔆𥋇𩟔𧣈𢵄鵮頕"], +["8a76","䏙𦂥撴哣𢵌𢯊𡁷㧻𡁯"], +["8aa1","𦛚𦜖𧦠擪𥁒𠱃蹨𢆡𨭌𠜱"], +["8aac","䠋𠆩㿺塳𢶍"], +["8ab2","𤗈𠓼𦂗𠽌𠶖啹䂻䎺"], +["8abb","䪴𢩦𡂝膪飵𠶜捹㧾𢝵跀嚡摼㹃"], +["8ac9","𪘁𠸉𢫏𢳉"], +["8ace","𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻"], +["8adf","𧕴𢺋𢈈𪙛𨳍𠹺𠰴𦠜羓𡃏𢠃𢤹㗻𥇣𠺌𠾍𠺪㾓𠼰𠵇𡅏𠹌"], +["8af6","𠺫𠮩𠵈𡃀𡄽㿹𢚖搲𠾭"], +["8b40","𣏴𧘹𢯎𠵾𠵿𢱑𢱕㨘𠺘𡃇𠼮𪘲𦭐𨳒𨶙𨳊閪哌苄喹"], +["8b55","𩻃鰦骶𧝞𢷮煀腭胬尜𦕲脴㞗卟𨂽醶𠻺𠸏𠹷𠻻㗝𤷫㘉𠳖嚯𢞵𡃉𠸐𠹸𡁸𡅈𨈇𡑕𠹹𤹐𢶤婔𡀝𡀞𡃵𡃶垜𠸑"], +["8ba1","𧚔𨋍𠾵𠹻𥅾㜃𠾶𡆀𥋘𪊽𤧚𡠺𤅷𨉼墙剨㘚𥜽箲孨䠀䬬鼧䧧鰟鮍𥭴𣄽嗻㗲嚉丨夂𡯁屮靑𠂆乛亻㔾尣彑忄㣺扌攵歺氵氺灬爫丬犭𤣩罒礻糹罓𦉪㓁"], +["8bde","𦍋耂肀𦘒𦥑卝衤见𧢲讠贝钅镸长门𨸏韦页风飞饣𩠐鱼鸟黄歯龜丷𠂇阝户钢"], +["8c40","倻淾𩱳龦㷉袏𤅎灷峵䬠𥇍㕙𥴰愢𨨲辧釶熑朙玺𣊁𪄇㲋𡦀䬐磤琂冮𨜏䀉橣𪊺䈣蘏𠩯稪𩥇𨫪靕灍匤𢁾鏴盙𨧣龧矝亣俰傼丯众龨吴綋墒壐𡶶庒庙忂𢜒斋"], +["8ca1","𣏹椙橃𣱣泿"], +["8ca7","爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩袐龪躹龫迏蕟駠鈡龬𨶹𡐿䁱䊢娚"], +["8cc9","顨杫䉶圽"], +["8cce","藖𤥻芿𧄍䲁𦵴嵻𦬕𦾾龭龮宖龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶"], +["8ce6","峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤𦱁諌侴𠈹妿腬顖𩣺弻"], +["8d40","𠮟"], +["8d42","𢇁𨥭䄂䚻𩁹㼇龳𪆵䃸㟖䛷𦱆䅼𨚲𧏿䕭㣔𥒚䕡䔛䶉䱻䵶䗪㿈𤬏㙡䓞䒽䇭崾嵈嵖㷼㠏嶤嶹㠠㠸幂庽弥徃㤈㤔㤿㥍惗愽峥㦉憷憹懏㦸戬抐拥挘㧸嚱"], +["8da1","㨃揢揻搇摚㩋擀崕嘡龟㪗斆㪽旿晓㫲暒㬢朖㭂枤栀㭘桊梄㭲㭱㭻椉楃牜楤榟榅㮼槖㯝橥橴橱檂㯬檙㯲檫檵櫔櫶殁毁毪汵沪㳋洂洆洦涁㳯涤涱渕渘温溆𨧀溻滢滚齿滨滩漤漴㵆𣽁澁澾㵪㵵熷岙㶊瀬㶑灐灔灯灿炉𠌥䏁㗱𠻘"], +["8e40","𣻗垾𦻓焾𥟠㙎榢𨯩孴穉𥣡𩓙穥穽𥦬窻窰竂竃燑𦒍䇊竚竝竪䇯咲𥰁笋筕笩𥌎𥳾箢筯莜𥮴𦱿篐萡箒箸𥴠㶭𥱥蒒篺簆簵𥳁籄粃𤢂粦晽𤕸糉糇糦籴糳糵糎"], +["8ea1","繧䔝𦹄絝𦻖璍綉綫焵綳緒𤁗𦀩緤㴓緵𡟹緥𨍭縝𦄡𦅚繮纒䌫鑬縧罀罁罇礶𦋐駡羗𦍑羣𡙡𠁨䕜𣝦䔃𨌺翺𦒉者耈耝耨耯𪂇𦳃耻耼聡𢜔䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩𠬍𦩒𣵾俹𡓽蓢荢𦬊𤦧𣔰𡝳𣷸芪椛芳䇛"], +["8f40","蕋苐茚𠸖𡞴㛁𣅽𣕚艻苢茘𣺋𦶣𦬅𦮗𣗎㶿茝嗬莅䔋𦶥莬菁菓㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞萏莑䒠蒓蓤𥲑䉀𥳀䕃蔴嫲𦺙䔧蕳䔖枿蘖"], +["8fa1","𨘥𨘻藁𧂈蘂𡖂𧃍䕫䕪蘨㙈𡢢号𧎚虾蝱𪃸蟮𢰧螱蟚蠏噡虬桖䘏衅衆𧗠𣶹𧗤衞袜䙛袴袵揁装睷𧜏覇覊覦覩覧覼𨨥觧𧤤𧪽誜瞓釾誐𧩙竩𧬺𣾏䜓𧬸煼謌謟𥐰𥕥謿譌譍誩𤩺讐讛誯𡛟䘕衏貛𧵔𧶏貫㜥𧵓賖𧶘𧶽贒贃𡤐賛灜贑𤳉㻐起"], +["9040","趩𨀂𡀔𤦊㭼𨆼𧄌竧躭躶軃鋔輙輭𨍥𨐒辥錃𪊟𠩐辳䤪𨧞𨔽𣶻廸𣉢迹𪀔𨚼𨔁𢌥㦀𦻗逷𨔼𧪾遡𨕬𨘋邨𨜓郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟鉁鉢𥖹銹𨫆𣲛𨬌𥗛"], +["90a1","𠴱錬鍫𨫡𨯫炏嫃𨫢𨫥䥥鉄𨯬𨰹𨯿鍳鑛躼閅閦鐦閠濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽双䦡𦲸𠉴𦐐𩂯𩃥𤫑𡤕𣌊霱虂霶䨏䔽䖅𤫩灵孁霛靜𩇕靗孊𩇫靟鐥僐𣂷𣂼鞉鞟鞱鞾韀韒韠𥑬韮琜𩐳響韵𩐝𧥺䫑頴頳顋顦㬎𧅵㵑𠘰𤅜"], +["9140","𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬鍸餹𤨩䭲𩡗𩤅駵騌騻騐驘𥜥㛄𩂱𩯕髠髢𩬅髴䰎鬔鬭𨘀倴鬴𦦨㣃𣁽魐魀𩴾婅𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈"], +["91a1","鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴麐麕麞麢䴴麪麯𤍤黁㭠㧥㴝伲㞾𨰫鼂鼈䮖鐤𦶢鼗鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸𤍈𤩑玞𨯚𡣺禟𨥾𨸶鍩鏳𨩄鋬鎁鏋𨥬𤒹爗㻫睲穃烐𤑳𤏸煾𡟯炣𡢾𣖙㻇𡢅𥐯𡟸㜢𡛻𡠹㛡𡝴𡣑𥽋㜣𡛀坛𤨥𡏾𡊨"], +["9240","𡏆𡒶蔃𣚦蔃葕𤦔𧅥𣸱𥕜𣻻𧁒䓴𣛮𩦝𦼦柹㜳㰕㷧塬𡤢栐䁗𣜿𤃡𤂋𤄏𦰡哋嚞𦚱嚒𠿟𠮨𠸍鏆𨬓鎜仸儫㠙𤐶亼𠑥𠍿佋侊𥙑婨𠆫𠏋㦙𠌊𠐔㐵伩𠋀𨺳𠉵諚𠈌亘"], +["92a1","働儍侢伃𤨎𣺊佂倮偬傁俌俥偘僼兙兛兝兞湶𣖕𣸹𣺿浲𡢄𣺉冨凃𠗠䓝𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡鍮䙺熌𤎌𠰠𤦬𡃤槑𠸝瑹㻞璙琔瑖玘䮎𤪼𤂍叐㖄爏𤃉喴𠍅响𠯆圝鉝雴鍦埝垍坿㘾壋媙𨩆𡛺𡝯𡜐娬妸銏婾嫏娒𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃"], +["9340","媁𨯗𠐓鏠璌𡌃焅䥲鐈𨧻鎽㞠尞岞幞幈𡦖𡥼𣫮廍孏𡤃𡤄㜁𡢠㛝𡛾㛓脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻孄蘔𧗽衠恾𢡠𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾𠁆𢘛憙憘恵𢲛𢴇𤛔𩅍"], +["93a1","摱𤙥𢭪㨩𢬢𣑐𩣪𢹸挷𪑛撶挱揑𤧣𢵧护𢲡搻敫楲㯴𣂎𣊭𤦉𣊫唍𣋠𡣙𩐿曎𣊉𣆳㫠䆐𥖄𨬢𥖏𡛼𥕛𥐥磮𣄃𡠪𣈴㑤𣈏𣆂𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢𣏾瓐㮖枏𤘪梶栞㯄檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺歗𣿀𣲚鎠鋲𨯪𨫋"], +["9440","銉𨀞𨧜鑧涥漋𤧬浧𣽿㶏渄𤀼娽渊塇洤硂焻𤌚𤉶烱牐犇犔𤞏𤜥兹𤪤𠗫瑺𣻸𣙟𤩊𤤗𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌琼鎇琷䒟𦷪䕑疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻"], +["94a1","㷍𤩎㻿𤧅𤣳釺圲鍂𨫣𡡤僟𥈡𥇧睸𣈲眎眏睻𤚗𣞁㩞𤣰琸璛㺿𤪺𤫇䃈𤪖𦆮錇𥖁砞碍碈磒珐祙𧝁𥛣䄎禛蒖禥樭𣻺稺秴䅮𡛦䄲鈵秱𠵌𤦌𠊙𣶺𡝮㖗啫㕰㚪𠇔𠰍竢婙𢛵𥪯𥪜娍𠉛磰娪𥯆竾䇹籝籭䈑𥮳𥺼𥺦糍𤧹𡞰粎籼粮檲緜縇緓罎𦉡"], +["9540","𦅜𧭈綗𥺂䉪𦭵𠤖柖𠁎𣗏埄𦐒𦏸𤥢翝笧𠠬𥫩𥵃笌𥸎駦虅驣樜𣐿㧢𤧷𦖭騟𦖠蒀𧄧𦳑䓪脷䐂胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧蘐𧈛媆䅿𡡀嬫𡢡嫤𡣘蚠蜨𣶏蠭𧐢娂"], +["95a1","衮佅袇袿裦襥襍𥚃襔𧞅𧞄𨯵𨯙𨮜𨧹㺭蒣䛵䛏㟲訽訜𩑈彍鈫𤊄旔焩烄𡡅鵭貟賩𧷜妚矃姰䍮㛔踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻鐄𨩋䁢𨫼鐧𨰝𨰻蓥訫閙閧閗閖𨴴瑅㻂𤣿𤩂𤏪㻧𣈥随𨻧𨹦𨹥㻌𤧭𤩸𣿮琒瑫㻼靁𩂰"], +["9640","桇䨝𩂓𥟟靝鍨𨦉𨰦𨬯𦎾銺嬑譩䤼珹𤈛鞛靱餸𠼦巁𨯅𤪲頟𩓚鋶𩗗釥䓀𨭐𤩧𨭤飜𨩅㼀鈪䤥萔餻饍𧬆㷽馛䭯馪驜𨭥𥣈檏騡嫾騯𩣱䮐𩥈馼䮽䮗鍽塲𡌂堢𤦸"], +["96a1","𡓨硄𢜟𣶸棅㵽鑘㤧慐𢞁𢥫愇鱏鱓鱻鰵鰐魿鯏𩸭鮟𪇵𪃾鴡䲮𤄄鸘䲰鴌𪆴𪃭𪃳𩤯鶥蒽𦸒𦿟𦮂藼䔳𦶤𦺄𦷰萠藮𦸀𣟗𦁤秢𣖜𣙀䤭𤧞㵢鏛銾鍈𠊿碹鉷鑍俤㑀遤𥕝砽硔碶硋𡝗𣇉𤥁㚚佲濚濙瀞瀞吔𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉"], +["9740","愌嫎娋䊼𤒈㜬䭻𨧼鎻鎸𡣖𠼝葲𦳀𡐓𤋺𢰦𤏁妔𣶷𦝁綨𦅛𦂤𤦹𤦋𨧺鋥珢㻩璴𨭣𡢟㻡𤪳櫘珳珻㻖𤨾𤪔𡟙𤩦𠎧𡐤𤧥瑈𤤖炥𤥶銄珦鍟𠓾錱𨫎𨨖鎆𨯧𥗕䤵𨪂煫"], +["97a1","𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂𤩐𡡒䔮鐁㜊𨫀𤦭妰𡢿𡢃𧒄媡㛢𣵛㚰鉟婹𨪁𡡢鍴㳍𠪴䪖㦊僴㵩㵌𡎜煵䋻𨈘渏𩃤䓫浗𧹏灧沯㳖𣿭𣸭渂漌㵯𠏵畑㚼㓈䚀㻚䡱姄鉮䤾轁𨰜𦯀堒埈㛖𡑒烾𤍢𤩱𢿣𡊰𢎽梹楧𡎘𣓥𧯴𣛟𨪃𣟖𣏺𤲟樚𣚭𦲷萾䓟䓎"], +["9840","𦴦𦵑𦲂𦿞漗𧄉茽𡜺菭𦲀𧁓𡟛妉媂𡞳婡婱𡤅𤇼㜭姯𡜼㛇熎鎐暚𤊥婮娫𤊓樫𣻹𧜶𤑛𤋊焝𤉙𨧡侰𦴨峂𤓎𧹍𤎽樌𤉖𡌄炦焳𤏩㶥泟勇𤩏繥姫崯㷳彜𤩝𡟟綤萦"], +["98a1","咅𣫺𣌀𠈔坾𠣕𠘙㿥𡾞𪊶瀃𩅛嵰玏糓𨩙𩐠俈翧狍猐𧫴猸猹𥛶獁獈㺩𧬘遬燵𤣲珡臶㻊県㻑沢国琙琞琟㻢㻰㻴㻺瓓㼎㽓畂畭畲疍㽼痈痜㿀癍㿗癴㿜発𤽜熈嘣覀塩䀝睃䀹条䁅㗛瞘䁪䁯属瞾矋売砘点砜䂨砹硇硑硦葈𥔵礳栃礲䄃"], +["9940","䄉禑禙辻稆込䅧窑䆲窼艹䇄竏竛䇏両筢筬筻簒簛䉠䉺类粜䊌粸䊔糭输烀𠳏総緔緐緽羮羴犟䎗耠耥笹耮耱联㷌垴炠肷胩䏭脌猪脎脒畠脔䐁㬹腖腙腚"], +["99a1","䐓堺腼膄䐥膓䐭膥埯臁臤艔䒏芦艶苊苘苿䒰荗险榊萅烵葤惣蒈䔄蒾蓡蓸蔐蔸蕒䔻蕯蕰藠䕷虲蚒蚲蛯际螋䘆䘗袮裿褤襇覑𧥧訩訸誔誴豑賔賲贜䞘塟跃䟭仮踺嗘坔蹱嗵躰䠷軎転軤軭軲辷迁迊迌逳駄䢭飠鈓䤞鈨鉘鉫銱銮銿"], +["9a40","鋣鋫鋳鋴鋽鍃鎄鎭䥅䥑麿鐗匁鐝鐭鐾䥪鑔鑹锭関䦧间阳䧥枠䨤靀䨵鞲韂噔䫤惨颹䬙飱塄餎餙冴餜餷饂饝饢䭰駅䮝騼鬏窃魩鮁鯝鯱鯴䱭鰠㝯𡯂鵉鰺"], +["9aa1","黾噐鶓鶽鷀鷼银辶鹻麬麱麽黆铜黢黱黸竈齄𠂔𠊷𠎠椚铃妬𠓗塀铁㞹𠗕𠘕𠙶𡚺块煳𠫂𠫍𠮿呪吆𠯋咞𠯻𠰻𠱓𠱥𠱼惧𠲍噺𠲵𠳝𠳭𠵯𠶲𠷈楕鰯螥𠸄𠸎𠻗𠾐𠼭𠹳尠𠾼帋𡁜𡁏𡁶朞𡁻𡂈𡂖㙇𡂿𡃓𡄯𡄻卤蒭𡋣𡍵𡌶讁𡕷𡘙𡟃𡟇乸炻𡠭𡥪"], +["9b40","𡨭𡩅𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕𢁅槩㛈𢉼𢏗𢏺𢜪𢡱𢥏苽𢥧𢦓𢫕覥𢫨辠𢬎鞸𢬿顇骽𢱌"], +["9b62","𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳𣁦𣌟𣏞徱晈暿𧩹𣕧𣗳爁𤦺矗𣘚𣜖纇𠍆墵朎"], +["9ba1","椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚䣐䪸𤄙𨪚𤋮𤌍𤀻𤌴𤎖𤩅𠗊凒𠘑妟𡺨㮾𣳿𤐄𤓖垈𤙴㦛𤜯𨗨𩧉㝢𢇃譞𨭎駖𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆𠝹軚𥀬劏圿煱𥊙𥐙𣽊𤪧喼𥑆𥑮𦭒釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿𥡝偦㓻𣏌惞𥤃䝼𨥈𥪮𥮉𥰆𡶐垡煑澶𦄂𧰒遖𦆲𤾚譢𦐂𦑊"], +["9c40","嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧晉侻嚹𤔡𦛼乪𤤴陖涏𦲽㘘襷𦞙𦡮𦐑𦡞營𦣇筂𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦𦨭㙟𦑩𠀡禃𦨴𦭛崬𣔙菏𦮝䛐𦲤画补𦶮墶"], +["9ca1","㜜𢖍𧁋𧇍㱔𧊀𧊅銁𢅺𧊋錰𧋦𤧐氹钟𧑐𠻸蠧裵𢤦𨑳𡞱溸𤨪𡠠㦤㚹尐秣䔿暶𩲭𩢤襃𧟌𧡘囖䃟𡘊㦡𣜯𨃨𡏅熭荦𧧝𩆨婧䲷𧂯𨦫𧧽𧨊𧬋𧵦𤅺筃祾𨀉澵𪋟樃𨌘厢𦸇鎿栶靝𨅯𨀣𦦵𡏭𣈯𨁈嶅𨰰𨂃圕頣𨥉嶫𤦈斾槕叒𤪥𣾁㰑朶𨂐𨃴𨄮𡾡𨅏"], +["9d40","𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺揦𨥖砈鉕𨦸䏲𨧧䏟𨧨𨭆𨯔姸𨰉輋𨿅𩃬筑𩄐𩄼㷷𩅞𤫊运犏嚋𩓧𩗩𩖰𩖸𩜲𩣑𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达嗁"], +["9da1","辺𢒰边𤪓䔉繿潖檱仪㓤𨬬𧢝㜺躀𡟵𨀤𨭬𨮙𧨾𦚯㷫𧙕𣲷𥘵𥥖亚𥺁𦉘嚿𠹭踎孭𣺈𤲞揞拐𡟶𡡻攰嘭𥱊吚𥌑㷆𩶘䱽嘢嘞罉𥻘奵𣵀蝰东𠿪𠵉𣚺脗鵞贘瘻鱅癎瞹鍅吲腈苷嘥脲萘肽嗪祢噃吖𠺝㗎嘅嗱曱𨋢㘭甴嗰喺咗啲𠱁𠲖廐𥅈𠹶𢱢"], +["9e40","𠺢麫絚嗞𡁵抝靭咔賍燶酶揼掹揾啩𢭃鱲𢺳冚㓟𠶧冧呍唞唓癦踭𦢊疱肶蠄螆裇膶萜𡃁䓬猄𤜆宐茋𦢓噻𢛴𧴯𤆣𧵳𦻐𧊶酰𡇙鈈𣳼𪚩𠺬𠻹牦𡲢䝎𤿂𧿹𠿫䃺"], +["9ea1","鱝攟𢶠䣳𤟠𩵼𠿬𠸊恢𧖣𠿭"], +["9ead","𦁈𡆇熣纎鵐业丄㕷嬍沲卧㚬㧜卽㚥𤘘墚𤭮舭呋垪𥪕𠥹"], +["9ec5","㩒𢑥獴𩺬䴉鯭𣳾𩼰䱛𤾩𩖞𩿞葜𣶶𧊲𦞳𣜠挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔𪐴麅䳡痹㟻愙𣃚𤏲"], +["9ef5","噝𡊩垧𤥣𩸆刴𧂮㖭汊鵼"], +["9f40","籖鬹埞𡝬屓擓𩓐𦌵𧅤蚭𠴨𦴢𤫢𠵱"], +["9f4f","凾𡼏嶎霃𡷑麁遌笟鬂峑箣扨挵髿篏鬪籾鬮籂粆鰕篼鬉鼗鰛𤤾齚啳寃俽麘俲剠㸆勑坧偖妷帒韈鶫轜呩鞴饀鞺匬愰"], +["9fa1","椬叚鰊鴂䰻陁榀傦畆𡝭駚剳"], +["9fae","酙隁酜"], +["9fb2","酑𨺗捿𦴣櫊嘑醎畺抅𠏼獏籰𥰡𣳽"], +["9fc1","𤤙盖鮝个𠳔莾衂"], +["9fc9","届槀僭坺刟巵从氱𠇲伹咜哚劚趂㗾弌㗳"], +["9fdb","歒酼龥鮗頮颴骺麨麄煺笔"], +["9fe7","毺蠘罸"], +["9feb","嘠𪙊蹷齓"], +["9ff0","跔蹏鸜踁抂𨍽踨蹵竓𤩷稾磘泪詧瘇"], +["a040","𨩚鼦泎蟖痃𪊲硓咢贌狢獱謭猂瓱賫𤪻蘯徺袠䒷"], +["a055","𡠻𦸅"], +["a058","詾𢔛"], +["a05b","惽癧髗鵄鍮鮏蟵"], +["a063","蠏賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽"], +["a073","坟慯抦戹拎㩜懢厪𣏵捤栂㗒"], +["a0a1","嵗𨯂迚𨸹"], +["a0a6","僙𡵆礆匲阸𠼻䁥"], +["a0ae","矾"], +["a0b0","糂𥼚糚稭聦聣絍甅瓲覔舚朌聢𧒆聛瓰脃眤覉𦟌畓𦻑螩蟎臈螌詉貭譃眫瓸蓚㘵榲趦"], +["a0d4","覩瑨涹蟁𤀑瓧㷛煶悤憜㳑煢恷"], +["a0e2","罱𨬭牐惩䭾删㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜𧂭峁𦆭𨨏𣙷𠃮𦡆𤼎䕢嬟𦍌齐麦𦉫"], +["a3c0","␀",31,"␡"], +["c6a1","①",9,"⑴",9,"ⅰ",9,"丶丿亅亠冂冖冫勹匸卩厶夊宀巛⼳广廴彐彡攴无疒癶辵隶¨ˆヽヾゝゞ〃仝々〆〇ー[]✽ぁ",23], +["c740","す",58,"ァアィイ"], +["c7a1","ゥ",81,"А",5,"ЁЖ",4], +["c840","Л",26,"ёж",25,"⇧↸↹㇏𠃌乚𠂊刂䒑"], +["c8a1","龰冈龱𧘇"], +["c8cd","¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌⺍⺕⺜⺝⺥⺧⺪⺬⺮⺶⺼⺾⻆⻊⻌⻍⻏⻖⻗⻞⻣"], +["c8f5","ʃɐɛɔɵœøŋʊɪ"], +["f9fe","■"], +["fa40","𠕇鋛𠗟𣿅蕌䊵珯况㙉𤥂𨧤鍄𡧛苮𣳈砼杄拟𤤳𨦪𠊠𦮳𡌅侫𢓭倈𦴩𧪄𣘀𤪱𢔓倩𠍾徤𠎀𠍇滛𠐟偽儁㑺儎顬㝃萖𤦤𠒇兠𣎴兪𠯿𢃼𠋥𢔰𠖎𣈳𡦃宂蝽𠖳𣲙冲冸"], +["faa1","鴴凉减凑㳜凓𤪦决凢卂凭菍椾𣜭彻刋刦刼劵剗劔効勅簕蕂勠蘍𦬓包𨫞啉滙𣾀𠥔𣿬匳卄𠯢泋𡜦栛珕恊㺪㣌𡛨燝䒢卭却𨚫卾卿𡖖𡘓矦厓𨪛厠厫厮玧𥝲㽙玜叁叅汉义埾叙㪫𠮏叠𣿫𢶣叶𠱷吓灹唫晗浛呭𦭓𠵴啝咏咤䞦𡜍𠻝㶴𠵍"], +["fb40","𨦼𢚘啇䳭启琗喆喩嘅𡣗𤀺䕒𤐵暳𡂴嘷曍𣊊暤暭噍噏磱囱鞇叾圀囯园𨭦㘣𡉏坆𤆥汮炋坂㚱𦱾埦𡐖堃𡑔𤍣堦𤯵塜墪㕡壠壜𡈼壻寿坃𪅐𤉸鏓㖡够梦㛃湙"], +["fba1","𡘾娤啓𡚒蔅姉𠵎𦲁𦴪𡟜姙𡟻𡞲𦶦浱𡠨𡛕姹𦹅媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広勐孶斈孼𧨎䀄䡝𠈄寕慠𡨴𥧌𠖥寳宝䴐尅𡭄尓珎尔𡲥𦬨屉䣝岅峩峯嶋𡷹𡸷崐崘嵆𡺤岺巗苼㠭𤤁𢁉𢅳芇㠶㯂帮檊幵幺𤒼𠳓厦亷廐厨𡝱帉廴𨒂"], +["fc40","廹廻㢠廼栾鐛弍𠇁弢㫞䢮𡌺强𦢈𢏐彘𢑱彣鞽𦹮彲鍀𨨶徧嶶㵟𥉐𡽪𧃸𢙨釖𠊞𨨩怱暅𡡷㥣㷇㘹垐𢞴祱㹀悞悤悳𤦂𤦏𧩓璤僡媠慤萤慂慈𦻒憁凴𠙖憇宪𣾷"], +["fca1","𢡟懓𨮝𩥝懐㤲𢦀𢣁怣慜攞掋𠄘担𡝰拕𢸍捬𤧟㨗搸揸𡎎𡟼撐澊𢸶頔𤂌𥜝擡擥鑻㩦携㩗敍漖𤨨𤨣斅敭敟𣁾斵𤥀䬷旑䃘𡠩无旣忟𣐀昘𣇷𣇸晄𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂杞杧杢𤇍𩃭柗䓩栢湐鈼栁𣏦𦶠桝"], +["fd40","𣑯槡樋𨫟楳棃𣗍椁椀㴲㨁𣘼㮀枬楡𨩊䋼椶榘㮡𠏉荣傐槹𣙙𢄪橅𣜃檝㯳枱櫈𩆜㰍欝𠤣惞欵歴𢟍溵𣫛𠎵𡥘㝀吡𣭚毡𣻼毜氷𢒋𤣱𦭑汚舦汹𣶼䓅𣶽𤆤𤤌𤤀"], +["fda1","𣳉㛥㳫𠴲鮃𣇹𢒑羏样𦴥𦶡𦷫涖浜湼漄𤥿𤂅𦹲蔳𦽴凇沜渝萮𨬡港𣸯瑓𣾂秌湏媑𣁋濸㜍澝𣸰滺𡒗𤀽䕕鏰潄潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀𦇝灋灾炧炁烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜𤍥煏鍢𤋁焬𤑚𤨧𤨢熺𨯨炽爎"], +["fe40","鑂爕夑鑃爤鍁𥘅爮牀𤥴梽牕牗㹕𣁄栍漽犂猪猫𤠣𨠫䣭𨠄猨献珏玪𠰺𦨮珉瑉𤇢𡛧𤨤昣㛅𤦷𤦍𤧻珷琕椃𤨦琹𠗃㻗瑜𢢭瑠𨺲瑇珤瑶莹瑬㜰瑴鏱樬璂䥓𤪌"], +["fea1","𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"] +] diff --git a/node_modules/iconv-lite/encodings/tables/cp936.json b/node_modules/iconv-lite/encodings/tables/cp936.json new file mode 100644 index 0000000..49ddb9a --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/cp936.json @@ -0,0 +1,264 @@ +[ +["0","\u0000",127,"€"], +["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"], +["8180","亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢"], +["8240","侤侫侭侰",4,"侶",8,"俀俁係俆俇俈俉俋俌俍俒",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11], +["8280","個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯",10,"倻倽倿偀偁偂偄偅偆偉偊偋偍偐",4,"偖偗偘偙偛偝",7,"偦",5,"偭",8,"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"], +["8340","傽",17,"僐",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"], +["8380","儉儊儌",5,"儓",13,"儢",28,"兂兇兊兌兎兏児兒兓兗兘兙兛兝",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦",4,"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒",5], +["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎剏剒剓剕剗剘"], +["8480","剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽匁匂匃匄匇匉匊匋匌匎"], +["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏"], +["8580","厐",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾叀參",4,"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝",4,"呣呥呧呩",7,"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡"], +["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜唝唞唟唡唥唦"], +["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"啝啞啟啠啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠",6,"喨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"], +["8740","嘆嘇嘊嘋嘍嘐",7,"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"噏",4,"噕噖噚噛噝",4], +["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"嚐嚑嚒嚔",14,"嚤",10,"嚰",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國",6], +["8840","園",9,"圝圞圠圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿坁坃坄坅坆坈坉坋坒",4,"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀"], +["8880","垁垇垈垉垊垍",4,"垔",6,"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹",8,"埄",6,"埌埍埐埑埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥",4,"堫",4,"報堲堳場堶",7], +["8940","堾",5,"塅",6,"塎塏塐塒塓塕塖塗塙",4,"塟",5,"塦",4,"塭",16,"塿墂墄墆墇墈墊墋墌"], +["8980","墍",4,"墔",4,"墛墜墝墠",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻"], +["8a40","夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦"], +["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌姍姎姏姕姖姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪",6,"娳娵娷",4,"娽娾娿婁",4,"婇婈婋",9,"婖婗婘婙婛",5], +["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"], +["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"嫊嫋嫍",4,"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"孁",6], +["8c40","孈",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏"], +["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧",6,"屰屲",6,"屻屼屽屾岀岃",4,"岉岊岋岎岏岒岓岕岝",4,"岤",4], +["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4], +["8d80","崁崄崅崈",5,"崏",4,"崕崗崘崙崚崜崝崟",4,"崥崨崪崫崬崯",4,"崵",7,"崿",7,"嵈嵉嵍",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"], +["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"], +["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋帍帎帒帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀幁幃幆",5,"幍",6,"幖",4,"幜幝幟幠幣",14,"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨",4,"庮",4,"庴庺庻庼庽庿",6], +["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤"], +["8f80","弨弫弬弮弰弲",6,"弻弽弾弿彁",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"], +["9040","怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾恀恄",6,"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀"], +["9080","悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌愐",4,"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬",18,"慀",6], +["9140","慇慉態慍慏慐慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌憍憏",4,"憕"], +["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀懁懃",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸",4,"扂扄扅扆扊"], +["9240","扏扐払扖扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋",5,"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁"], +["9280","拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖",7,"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿揀"], +["9340","揁揂揃揅揇揈揊揋揌揑揓揔揕揗",6,"揟揢揤",4,"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆",4,"損搎搑搒搕",5,"搝搟搢搣搤"], +["9380","搥搧搨搩搫搮",5,"搵",4,"搻搼搾摀摂摃摉摋",6,"摓摕摖摗摙",4,"摟",7,"摨摪摫摬摮",9,"摻",6,"撃撆撈",8,"撓撔撗撘撚撛撜撝撟",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆",6,"擏擑擓擔擕擖擙據"], +["9440","擛擜擝擟擠擡擣擥擧",24,"攁",7,"攊",7,"攓",4,"攙",8], +["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘",7,"旡旣旤旪旫"], +["9540","旲旳旴旵旸旹旻",4,"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"晍晎晐晑晘"], +["9580","晙晛晜晝晞晠晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘",4,"暞",8,"暩",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽朁朂會"], +["9640","朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗",4,"杝杢杣杤杦杧杫杬杮東杴杶"], +["9680","杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾栁栂栃栄栆栍栐栒栔栕栘",4,"栞栟栠栢",6,"栫",6,"栴栵栶栺栻栿桇桋桍桏桒桖",5], +["9740","桜桝桞桟桪桬",7,"桵桸",8,"梂梄梇",7,"梐梑梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"], +["9780","梹",6,"棁棃",5,"棊棌棎棏棐棑棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌椏椑椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃",16,"楕楖楘楙楛楜楟"], +["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿榁榃榅榊榋榌榎",5,"榖榗榙榚榝",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"], +["9880","榾榿槀槂",7,"構槍槏槑槒槓槕",5,"槜槝槞槡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"橑",6,"橚"], +["9940","橜",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿檁檂檃檅",8,"檏檒",4,"檘",7,"檡",5], +["9980","檧檨檪檭",114,"欥欦欨",6], +["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍",11,"歚",7,"歨歩歫",13,"歺歽歾歿殀殅殈"], +["9a80","殌殎殏殐殑殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎毐毑毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"氈",4,"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋",4,"汑汒汓汖汘"], +["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘"], +["9b80","泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽",4,"涃涄涆涇涊涋涍涏涐涒涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"淁淂淃淈淉淊"], +["9c40","淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"], +["9c80","渶渷渹渻",7,"湅",7,"湏湐湑湒湕湗湙湚湜湝湞湠",10,"湬湭湯",14,"満溁溂溄溇溈溊",4,"溑",6,"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪",5], +["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"漐漑漒漖",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀潁潂"], +["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛潝潟潠潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋澏",12,"澝澞澟澠澢",4,"澨",10,"澴澵澷澸澺",5,"濁濃",5,"濊",6,"濓",10,"濟濢濣濤濥"], +["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6], +["9e80","瀫",9,"瀶瀷瀸瀺",17,"灍灎灐",13,"灟",11,"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"], +["9f40","烜烝烞烠烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"焋",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"], +["9f80","焵焷",13,"煆煇煈煉煋煍煏",12,"煝煟",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌熍熎熐熑熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"燏",4], +["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19], +["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎犐犑犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛"], +["a1a1"," 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈",7,"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓"], +["a2a1","ⅰ",9], +["a2b1","⒈",19,"⑴",19,"①",9], +["a2e5","㈠",9], +["a2f1","Ⅰ",11], +["a3a1","!"#¥%",88," ̄"], +["a4a1","ぁ",82], +["a5a1","ァ",85], +["a6a1","Α",16,"Σ",6], +["a6c1","α",16,"σ",6], +["a6e0","︵︶︹︺︿﹀︽︾﹁﹂﹃﹄"], +["a6ee","︻︼︷︸︱"], +["a6f4","︳︴"], +["a7a1","А",5,"ЁЖ",25], +["a7d1","а",5,"ёж",25], +["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═",35,"▁",6], +["a880","█",7,"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞"], +["a8a1","āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ"], +["a8bd","ńň"], +["a8c0","ɡ"], +["a8c5","ㄅ",36], +["a940","〡",8,"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦"], +["a959","℡㈱"], +["a95c","‐"], +["a960","ー゛゜ヽヾ〆ゝゞ﹉",9,"﹔﹕﹖﹗﹙",8], +["a980","﹢",4,"﹨﹩﹪﹫"], +["a996","〇"], +["a9a4","─",75], +["aa40","狜狝狟狢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀",8], +["aa80","獉獊獋獌獎獏獑獓獔獕獖獘",7,"獡",10,"獮獰獱"], +["ab40","獲",11,"獿",4,"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃",4], +["ab80","珋珌珎珒",6,"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳",4], +["ac40","珸",10,"琄琇琈琋琌琍琎琑",8,"琜",5,"琣琤琧琩琫琭琯琱琲琷",4,"琽琾琿瑀瑂",11], +["ac80","瑎",6,"瑖瑘瑝瑠",12,"瑮瑯瑱",4,"瑸瑹瑺"], +["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑",10,"璝璟",7,"璪",15,"璻",12], +["ad80","瓈",9,"瓓",8,"瓝瓟瓡瓥瓧",6,"瓰瓱瓲"], +["ae40","瓳瓵瓸",6,"甀甁甂甃甅",7,"甎甐甒甔甕甖甗甛甝甞甠",4,"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘"], +["ae80","畝",7,"畧畨畩畫",6,"畳畵當畷畺",4,"疀疁疂疄疅疇"], +["af40","疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"], +["af80","瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄"], +["b040","癅",6,"癎",5,"癕癗",4,"癝癟癠癡癢癤",6,"癬癭癮癰",7,"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛"], +["b080","皜",7,"皥",8,"皯皰皳皵",9,"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥"], +["b140","盄盇盉盋盌盓盕盙盚盜盝盞盠",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜眝眞眡眣眤眥眧眪眫"], +["b180","眬眮眰",4,"眹眻眽眾眿睂睄睅睆睈",7,"睒",7,"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"], +["b240","睝睞睟睠睤睧睩睪睭",11,"睺睻睼瞁瞂瞃瞆",5,"瞏瞐瞓",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4], +["b280","瞼瞾矀",12,"矎",8,"矘矙矚矝",4,"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖"], +["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚"], +["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚"], +["b440","碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚",9], +["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮"], +["b540","礍",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"], +["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠"], +["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙",5,"秠秡秢秥秨秪"], +["b680","秬秮秱",6,"秹秺秼秾秿稁稄稅稇稈稉稊稌稏",4,"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二"], +["b740","稝稟稡稢稤",14,"稴稵稶稸稺稾穀",5,"穇",9,"穒",4,"穘",16], +["b780","穩",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服"], +["b840","窣窤窧窩窪窫窮",4,"窴",10,"竀",10,"竌",9,"竗竘竚竛竜竝竡竢竤竧",5,"竮竰竱竲竳"], +["b880","竴",4,"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹"], +["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊筍筎筓筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆",6,"箎箏"], +["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈"], +["ba40","篅篈築篊篋篍篎篏篐篒篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊簍簎簐",5,"簗簘簙"], +["ba80","簚",4,"簠",5,"簨簩簫",12,"簹",5,"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖"], +["bb40","籃",9,"籎",36,"籵",5,"籾",9], +["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕"], +["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛糝糞糡",6,"糩",5,"糰",7,"糹糺糼",13,"紋",5], +["bc80","紑",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件"], +["bd40","紷",54,"絯",7], +["bd80","絸",32,"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸"], +["be40","継",12,"綧",6,"綯",42], +["be80","線",32,"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻"], +["bf40","緻",62], +["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀"], +["c040","繞",35,"纃",23,"纜纝纞"], +["c080","纮纴纻纼绖绤绬绹缊缐缞缷缹缻",6,"罃罆",9,"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐"], +["c140","罖罙罛罜罝罞罠罣",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋羍羏",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"羱"], +["c180","羳",4,"羺羻羾翀翂翃翄翆翇翈翉翋翍翏",4,"翖翗翙",5,"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿"], +["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫",5,"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗"], +["c280","聙聛",13,"聫",5,"聲",11,"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫"], +["c340","聾肁肂肅肈肊肍",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"胏",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋"], +["c380","脌脕脗脙脛脜脝脟",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸"], +["c440","腀",5,"腇腉腍腎腏腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃",4,"膉膋膌膍膎膐膒",5,"膙膚膞",4,"膤膥"], +["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋臍",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁"], +["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎舏舑舓舕",5,"舝舠舤舥舦舧舩舮舲舺舼舽舿"], +["c580","艀艁艂艃艅艆艈艊艌艍艎艐",7,"艙艛艜艝艞艠",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗"], +["c640","艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸"], +["c680","苺苼",4,"茊茋茍茐茒茓茖茘茙茝",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐"], +["c740","茾茿荁荂荄荅荈荊",4,"荓荕",4,"荝荢荰",6,"荹荺荾",6,"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡",6,"莬莭莮"], +["c780","莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠"], +["c840","菮華菳",4,"菺菻菼菾菿萀萂萅萇萈萉萊萐萒",5,"萙萚萛萞",5,"萩",7,"萲",5,"萹萺萻萾",7,"葇葈葉"], +["c880","葊",6,"葒",4,"葘葝葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁"], +["c940","葽",4,"蒃蒄蒅蒆蒊蒍蒏",7,"蒘蒚蒛蒝蒞蒟蒠蒢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗"], +["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳"], +["ca40","蔃",8,"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢",8,"蔭",9,"蔾",4,"蕄蕅蕆蕇蕋",10], +["ca80","蕗蕘蕚蕛蕜蕝蕟",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱"], +["cb40","薂薃薆薈",6,"薐",10,"薝",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"藂",6,"藊",4,"藑藒"], +["cb80","藔藖",5,"藝",6,"藥藦藧藨藪",14,"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔"], +["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"], +["cc80","虁",11,"虒虓處",4,"虛虜虝號虠虡虣",7,"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃"], +["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"蚞",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜"], +["cd80","蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威"], +["ce40","蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀",6,"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚",5,"蝡蝢蝦",7,"蝯蝱蝲蝳蝵"], +["ce80","蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎",4,"螔螕螖螘",6,"螠",4,"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺"], +["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯",9], +["cf80","蟺蟻蟼蟽蟿蠀蠁蠂蠄",5,"蠋",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓"], +["d040","蠤",13,"蠳",5,"蠺蠻蠽蠾蠿衁衂衃衆",5,"衎",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"], +["d080","衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗",4,"袝",4,"袣袥",5,"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄"], +["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀褁褃",5], +["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶"], +["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"], +["d280","襽襾覀覂覄覅覇",26,"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐"], +["d340","覢",30,"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴",6], +["d380","觻",4,"訁",5,"計",21,"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉"], +["d440","訞",31,"訿",8,"詉",21], +["d480","詟",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧"], +["d540","誁",7,"誋",7,"誔",46], +["d580","諃",32,"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政"], +["d640","諤",34,"謈",27], +["d680","謤謥謧",30,"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑"], +["d740","譆",31,"譧",4,"譭",25], +["d780","讇",24,"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座"], +["d840","谸",8,"豂豃豄豅豈豊豋豍",7,"豖豗豘豙豛",5,"豣",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"], +["d880","貈貋貍",6,"貕貖貗貙",20,"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝"], +["d940","貮",62], +["d980","賭",32,"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"], +["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"], +["da80","趢趤",12,"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺"], +["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋踍踎踐踑踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"], +["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝"], +["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"躝躟",11,"躭躮躰躱躳",6,"躻",7], +["dc80","軃",10,"軏",21,"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥"], +["dd40","軥",62], +["dd80","輤",32,"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺"], +["de40","轅",32,"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆"], +["de80","迉",4,"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖"], +["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿遀遃遅遆遈",4,"過達違遖遙遚遜",5,"遤遦遧適遪遫遬遯",4,"遶",6,"遾邁"], +["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼"], +["e040","郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅",19,"鄚鄛鄜"], +["e080","鄝鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼"], +["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎醏醓",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"], +["e180","醼",10,"釈釋釐釒",9,"針",8,"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺"], +["e240","釦",62], +["e280","鈥",32,"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧",5,"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂"], +["e340","鉆",45,"鉵",16], +["e380","銆",7,"銏",24,"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"], +["e440","銨",5,"銯",24,"鋉",31], +["e480","鋩",32,"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑"], +["e540","錊",51,"錿",10], +["e580","鍊",31,"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣"], +["e640","鍬",34,"鎐",27], +["e680","鎬",29,"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩"], +["e740","鏎",7,"鏗",54], +["e780","鐎",32,"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬"], +["e840","鐯",14,"鐿",43,"鑬鑭鑮鑯"], +["e880","鑰",20,"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹"], +["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42], +["e980","閫",32,"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋"], +["ea40","闌",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗"], +["ea80","陘陙陚陜陝陞陠陣陥陦陫陭",4,"陳陸",12,"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰"], +["eb40","隌階隑隒隓隕隖隚際隝",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖",9,"雡",6,"雫"], +["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗",4,"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻"], +["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"靔靕靗靘靚靜靝靟靣靤靦靧靨靪",7], +["ec80","靲靵靷",4,"靽",7,"鞆",4,"鞌鞎鞏鞐鞓鞕鞖鞗鞙",4,"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐"], +["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46], +["ed80","韤韥韨韮",4,"韴韷",23,"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨"], +["ee40","頏",62], +["ee80","顎",32,"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"], +["ef40","顯",5,"颋颎颒颕颙颣風",37,"飏飐飔飖飗飛飜飝飠",4], +["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒",4,"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"], +["f040","餈",4,"餎餏餑",28,"餯",26], +["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙"], +["f140","馌馎馚",10,"馦馧馩",47], +["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃"], +["f240","駺",62], +["f280","騹",32,"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒"], +["f340","驚",17,"驲骃骉骍骎骔骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"髍髎髏髐髒體髕髖髗髙髚髛髜"], +["f380","髝髞髠髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋"], +["f440","鬇鬉",5,"鬐鬑鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕",5], +["f480","魛",32,"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤"], +["f540","魼",62], +["f580","鮻",32,"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜"], +["f640","鯜",62], +["f680","鰛",32,"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅",5,"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞",5,"鲥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"], +["f740","鰼",62], +["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"], +["f840","鳣",62], +["f880","鴢",32], +["f940","鵃",62], +["f980","鶂",32], +["fa40","鶣",62], +["fa80","鷢",32], +["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴",9,"麀"], +["fb80","麁麃麄麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"], +["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6], +["fc80","鼆",4,"鼌鼏鼑鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"], +["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38], +["fd80","齹",5,"龁龂龍",11,"龜龝龞龡",4,"郎凉秊裏隣"], +["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"] +] diff --git a/node_modules/iconv-lite/encodings/tables/cp949.json b/node_modules/iconv-lite/encodings/tables/cp949.json new file mode 100644 index 0000000..2022a00 --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/cp949.json @@ -0,0 +1,273 @@ +[ +["0","\u0000",127], +["8141","갂갃갅갆갋",4,"갘갞갟갡갢갣갥",6,"갮갲갳갴"], +["8161","갵갶갷갺갻갽갾갿걁",9,"걌걎",5,"걕"], +["8181","걖걗걙걚걛걝",18,"걲걳걵걶걹걻",4,"겂겇겈겍겎겏겑겒겓겕",6,"겞겢",5,"겫겭겮겱",6,"겺겾겿곀곂곃곅곆곇곉곊곋곍",7,"곖곘",7,"곢곣곥곦곩곫곭곮곲곴곷",4,"곾곿괁괂괃괅괇",4,"괎괐괒괓"], +["8241","괔괕괖괗괙괚괛괝괞괟괡",7,"괪괫괮",5], +["8261","괶괷괹괺괻괽",6,"굆굈굊",5,"굑굒굓굕굖굗"], +["8281","굙",7,"굢굤",7,"굮굯굱굲굷굸굹굺굾궀궃",4,"궊궋궍궎궏궑",10,"궞",5,"궥",17,"궸",7,"귂귃귅귆귇귉",6,"귒귔",7,"귝귞귟귡귢귣귥",18], +["8341","귺귻귽귾긂",5,"긊긌긎",5,"긕",7], +["8361","긝",18,"긲긳긵긶긹긻긼"], +["8381","긽긾긿깂깄깇깈깉깋깏깑깒깓깕깗",4,"깞깢깣깤깦깧깪깫깭깮깯깱",6,"깺깾",5,"꺆",5,"꺍",46,"꺿껁껂껃껅",6,"껎껒",5,"껚껛껝",8], +["8441","껦껧껩껪껬껮",5,"껵껶껷껹껺껻껽",8], +["8461","꼆꼉꼊꼋꼌꼎꼏꼑",18], +["8481","꼤",7,"꼮꼯꼱꼳꼵",6,"꼾꽀꽄꽅꽆꽇꽊",5,"꽑",10,"꽞",5,"꽦",18,"꽺",5,"꾁꾂꾃꾅꾆꾇꾉",6,"꾒꾓꾔꾖",5,"꾝",26,"꾺꾻꾽꾾"], +["8541","꾿꿁",5,"꿊꿌꿏",4,"꿕",6,"꿝",4], +["8561","꿢",5,"꿪",5,"꿲꿳꿵꿶꿷꿹",6,"뀂뀃"], +["8581","뀅",6,"뀍뀎뀏뀑뀒뀓뀕",6,"뀞",9,"뀩",26,"끆끇끉끋끍끏끐끑끒끖끘끚끛끜끞",29,"끾끿낁낂낃낅",6,"낎낐낒",5,"낛낝낞낣낤"], +["8641","낥낦낧낪낰낲낶낷낹낺낻낽",6,"냆냊",5,"냒"], +["8661","냓냕냖냗냙",6,"냡냢냣냤냦",10], +["8681","냱",22,"넊넍넎넏넑넔넕넖넗넚넞",4,"넦넧넩넪넫넭",6,"넶넺",5,"녂녃녅녆녇녉",6,"녒녓녖녗녙녚녛녝녞녟녡",22,"녺녻녽녾녿놁놃",4,"놊놌놎놏놐놑놕놖놗놙놚놛놝"], +["8741","놞",9,"놩",15], +["8761","놹",18,"뇍뇎뇏뇑뇒뇓뇕"], +["8781","뇖",5,"뇞뇠",7,"뇪뇫뇭뇮뇯뇱",7,"뇺뇼뇾",5,"눆눇눉눊눍",6,"눖눘눚",5,"눡",18,"눵",6,"눽",26,"뉙뉚뉛뉝뉞뉟뉡",6,"뉪",4], +["8841","뉯",4,"뉶",5,"뉽",6,"늆늇늈늊",4], +["8861","늏늒늓늕늖늗늛",4,"늢늤늧늨늩늫늭늮늯늱늲늳늵늶늷"], +["8881","늸",15,"닊닋닍닎닏닑닓",4,"닚닜닞닟닠닡닣닧닩닪닰닱닲닶닼닽닾댂댃댅댆댇댉",6,"댒댖",5,"댝",54,"덗덙덚덝덠덡덢덣"], +["8941","덦덨덪덬덭덯덲덳덵덶덷덹",6,"뎂뎆",5,"뎍"], +["8961","뎎뎏뎑뎒뎓뎕",10,"뎢",5,"뎩뎪뎫뎭"], +["8981","뎮",21,"돆돇돉돊돍돏돑돒돓돖돘돚돜돞돟돡돢돣돥돦돧돩",18,"돽",18,"됑",6,"됙됚됛됝됞됟됡",6,"됪됬",7,"됵",15], +["8a41","둅",10,"둒둓둕둖둗둙",6,"둢둤둦"], +["8a61","둧",4,"둭",18,"뒁뒂"], +["8a81","뒃",4,"뒉",19,"뒞",5,"뒥뒦뒧뒩뒪뒫뒭",7,"뒶뒸뒺",5,"듁듂듃듅듆듇듉",6,"듑듒듓듔듖",5,"듞듟듡듢듥듧",4,"듮듰듲",5,"듹",26,"딖딗딙딚딝"], +["8b41","딞",5,"딦딫",4,"딲딳딵딶딷딹",6,"땂땆"], +["8b61","땇땈땉땊땎땏땑땒땓땕",6,"땞땢",8], +["8b81","땫",52,"떢떣떥떦떧떩떬떭떮떯떲떶",4,"떾떿뗁뗂뗃뗅",6,"뗎뗒",5,"뗙",18,"뗭",18], +["8c41","똀",15,"똒똓똕똖똗똙",4], +["8c61","똞",6,"똦",5,"똭",6,"똵",5], +["8c81","똻",12,"뙉",26,"뙥뙦뙧뙩",50,"뚞뚟뚡뚢뚣뚥",5,"뚭뚮뚯뚰뚲",16], +["8d41","뛃",16,"뛕",8], +["8d61","뛞",17,"뛱뛲뛳뛵뛶뛷뛹뛺"], +["8d81","뛻",4,"뜂뜃뜄뜆",33,"뜪뜫뜭뜮뜱",6,"뜺뜼",7,"띅띆띇띉띊띋띍",6,"띖",9,"띡띢띣띥띦띧띩",6,"띲띴띶",5,"띾띿랁랂랃랅",6,"랎랓랔랕랚랛랝랞"], +["8e41","랟랡",6,"랪랮",5,"랶랷랹",8], +["8e61","럂",4,"럈럊",19], +["8e81","럞",13,"럮럯럱럲럳럵",6,"럾렂",4,"렊렋렍렎렏렑",6,"렚렜렞",5,"렦렧렩렪렫렭",6,"렶렺",5,"롁롂롃롅",11,"롒롔",7,"롞롟롡롢롣롥",6,"롮롰롲",5,"롹롺롻롽",7], +["8f41","뢅",7,"뢎",17], +["8f61","뢠",7,"뢩",6,"뢱뢲뢳뢵뢶뢷뢹",4], +["8f81","뢾뢿룂룄룆",5,"룍룎룏룑룒룓룕",7,"룞룠룢",5,"룪룫룭룮룯룱",6,"룺룼룾",5,"뤅",18,"뤙",6,"뤡",26,"뤾뤿륁륂륃륅",6,"륍륎륐륒",5], +["9041","륚륛륝륞륟륡",6,"륪륬륮",5,"륶륷륹륺륻륽"], +["9061","륾",5,"릆릈릋릌릏",15], +["9081","릟",12,"릮릯릱릲릳릵",6,"릾맀맂",5,"맊맋맍맓",4,"맚맜맟맠맢맦맧맩맪맫맭",6,"맶맻",4,"먂",5,"먉",11,"먖",33,"먺먻먽먾먿멁멃멄멅멆"], +["9141","멇멊멌멏멐멑멒멖멗멙멚멛멝",6,"멦멪",5], +["9161","멲멳멵멶멷멹",9,"몆몈몉몊몋몍",5], +["9181","몓",20,"몪몭몮몯몱몳",4,"몺몼몾",5,"뫅뫆뫇뫉",14,"뫚",33,"뫽뫾뫿묁묂묃묅",7,"묎묐묒",5,"묙묚묛묝묞묟묡",6], +["9241","묨묪묬",7,"묷묹묺묿",4,"뭆뭈뭊뭋뭌뭎뭑뭒"], +["9261","뭓뭕뭖뭗뭙",7,"뭢뭤",7,"뭭",4], +["9281","뭲",21,"뮉뮊뮋뮍뮎뮏뮑",18,"뮥뮦뮧뮩뮪뮫뮭",6,"뮵뮶뮸",7,"믁믂믃믅믆믇믉",6,"믑믒믔",35,"믺믻믽믾밁"], +["9341","밃",4,"밊밎밐밒밓밙밚밠밡밢밣밦밨밪밫밬밮밯밲밳밵"], +["9361","밶밷밹",6,"뱂뱆뱇뱈뱊뱋뱎뱏뱑",8], +["9381","뱚뱛뱜뱞",37,"벆벇벉벊벍벏",4,"벖벘벛",4,"벢벣벥벦벩",6,"벲벶",5,"벾벿볁볂볃볅",7,"볎볒볓볔볖볗볙볚볛볝",22,"볷볹볺볻볽"], +["9441","볾",5,"봆봈봊",5,"봑봒봓봕",8], +["9461","봞",5,"봥",6,"봭",12], +["9481","봺",5,"뵁",6,"뵊뵋뵍뵎뵏뵑",6,"뵚",9,"뵥뵦뵧뵩",22,"붂붃붅붆붋",4,"붒붔붖붗붘붛붝",6,"붥",10,"붱",6,"붹",24], +["9541","뷒뷓뷖뷗뷙뷚뷛뷝",11,"뷪",5,"뷱"], +["9561","뷲뷳뷵뷶뷷뷹",6,"븁븂븄븆",5,"븎븏븑븒븓"], +["9581","븕",6,"븞븠",35,"빆빇빉빊빋빍빏",4,"빖빘빜빝빞빟빢빣빥빦빧빩빫",4,"빲빶",4,"빾빿뺁뺂뺃뺅",6,"뺎뺒",5,"뺚",13,"뺩",14], +["9641","뺸",23,"뻒뻓"], +["9661","뻕뻖뻙",6,"뻡뻢뻦",5,"뻭",8], +["9681","뻶",10,"뼂",5,"뼊",13,"뼚뼞",33,"뽂뽃뽅뽆뽇뽉",6,"뽒뽓뽔뽖",44], +["9741","뾃",16,"뾕",8], +["9761","뾞",17,"뾱",7], +["9781","뾹",11,"뿆",5,"뿎뿏뿑뿒뿓뿕",6,"뿝뿞뿠뿢",89,"쀽쀾쀿"], +["9841","쁀",16,"쁒",5,"쁙쁚쁛"], +["9861","쁝쁞쁟쁡",6,"쁪",15], +["9881","쁺",21,"삒삓삕삖삗삙",6,"삢삤삦",5,"삮삱삲삷",4,"삾샂샃샄샆샇샊샋샍샎샏샑",6,"샚샞",5,"샦샧샩샪샫샭",6,"샶샸샺",5,"섁섂섃섅섆섇섉",6,"섑섒섓섔섖",5,"섡섢섥섨섩섪섫섮"], +["9941","섲섳섴섵섷섺섻섽섾섿셁",6,"셊셎",5,"셖셗"], +["9961","셙셚셛셝",6,"셦셪",5,"셱셲셳셵셶셷셹셺셻"], +["9981","셼",8,"솆",5,"솏솑솒솓솕솗",4,"솞솠솢솣솤솦솧솪솫솭솮솯솱",11,"솾",5,"쇅쇆쇇쇉쇊쇋쇍",6,"쇕쇖쇙",6,"쇡쇢쇣쇥쇦쇧쇩",6,"쇲쇴",7,"쇾쇿숁숂숃숅",6,"숎숐숒",5,"숚숛숝숞숡숢숣"], +["9a41","숤숥숦숧숪숬숮숰숳숵",16], +["9a61","쉆쉇쉉",6,"쉒쉓쉕쉖쉗쉙",6,"쉡쉢쉣쉤쉦"], +["9a81","쉧",4,"쉮쉯쉱쉲쉳쉵",6,"쉾슀슂",5,"슊",5,"슑",6,"슙슚슜슞",5,"슦슧슩슪슫슮",5,"슶슸슺",33,"싞싟싡싢싥",5,"싮싰싲싳싴싵싷싺싽싾싿쌁",6,"쌊쌋쌎쌏"], +["9b41","쌐쌑쌒쌖쌗쌙쌚쌛쌝",6,"쌦쌧쌪",8], +["9b61","쌳",17,"썆",7], +["9b81","썎",25,"썪썫썭썮썯썱썳",4,"썺썻썾",5,"쎅쎆쎇쎉쎊쎋쎍",50,"쏁",22,"쏚"], +["9c41","쏛쏝쏞쏡쏣",4,"쏪쏫쏬쏮",5,"쏶쏷쏹",5], +["9c61","쏿",8,"쐉",6,"쐑",9], +["9c81","쐛",8,"쐥",6,"쐭쐮쐯쐱쐲쐳쐵",6,"쐾",9,"쑉",26,"쑦쑧쑩쑪쑫쑭",6,"쑶쑷쑸쑺",5,"쒁",18,"쒕",6,"쒝",12], +["9d41","쒪",13,"쒹쒺쒻쒽",8], +["9d61","쓆",25], +["9d81","쓠",8,"쓪",5,"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂",9,"씍씎씏씑씒씓씕",6,"씝",10,"씪씫씭씮씯씱",6,"씺씼씾",5,"앆앇앋앏앐앑앒앖앚앛앜앟앢앣앥앦앧앩",6,"앲앶",5,"앾앿얁얂얃얅얆얈얉얊얋얎얐얒얓얔"], +["9e41","얖얙얚얛얝얞얟얡",7,"얪",9,"얶"], +["9e61","얷얺얿",4,"엋엍엏엒엓엕엖엗엙",6,"엢엤엦엧"], +["9e81","엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋옍옎옏옑",6,"옚옝",6,"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉",6,"왒왖",5,"왞왟왡",10,"왭왮왰왲",5,"왺왻왽왾왿욁",6,"욊욌욎",5,"욖욗욙욚욛욝",6,"욦"], +["9f41","욨욪",5,"욲욳욵욶욷욻",4,"웂웄웆",5,"웎"], +["9f61","웏웑웒웓웕",6,"웞웟웢",5,"웪웫웭웮웯웱웲"], +["9f81","웳",4,"웺웻웼웾",5,"윆윇윉윊윋윍",6,"윖윘윚",5,"윢윣윥윦윧윩",6,"윲윴윶윸윹윺윻윾윿읁읂읃읅",4,"읋읎읐읙읚읛읝읞읟읡",6,"읩읪읬",7,"읶읷읹읺읻읿잀잁잂잆잋잌잍잏잒잓잕잙잛",4,"잢잧",4,"잮잯잱잲잳잵잶잷"], +["a041","잸잹잺잻잾쟂",5,"쟊쟋쟍쟏쟑",6,"쟙쟚쟛쟜"], +["a061","쟞",5,"쟥쟦쟧쟩쟪쟫쟭",13], +["a081","쟻",4,"젂젃젅젆젇젉젋",4,"젒젔젗",4,"젞젟젡젢젣젥",6,"젮젰젲",5,"젹젺젻젽젾젿졁",6,"졊졋졎",5,"졕",26,"졲졳졵졶졷졹졻",4,"좂좄좈좉좊좎",5,"좕",7,"좞좠좢좣좤"], +["a141","좥좦좧좩",18,"좾좿죀죁"], +["a161","죂죃죅죆죇죉죊죋죍",6,"죖죘죚",5,"죢죣죥"], +["a181","죦",14,"죶",5,"죾죿줁줂줃줇",4,"줎 、。·‥…¨〃­―∥\∼‘’“”〔〕〈",9,"±×÷≠≤≥∞∴°′″℃Å¢£¥♂♀∠⊥⌒∂∇≡≒§※☆★○●◎◇◆□■△▲▽▼→←↑↓↔〓≪≫√∽∝∵∫∬∈∋⊆⊇⊂⊃∪∩∧∨¬"], +["a241","줐줒",5,"줙",18], +["a261","줭",6,"줵",18], +["a281","쥈",7,"쥒쥓쥕쥖쥗쥙",6,"쥢쥤",7,"쥭쥮쥯⇒⇔∀∃´~ˇ˘˝˚˙¸˛¡¿ː∮∑∏¤℉‰◁◀▷▶♤♠♡♥♧♣⊙◈▣◐◑▒▤▥▨▧▦▩♨☏☎☜☞¶†‡↕↗↙↖↘♭♩♪♬㉿㈜№㏇™㏂㏘℡€®"], +["a341","쥱쥲쥳쥵",6,"쥽",10,"즊즋즍즎즏"], +["a361","즑",6,"즚즜즞",16], +["a381","즯",16,"짂짃짅짆짉짋",4,"짒짔짗짘짛!",58,"₩]",32," ̄"], +["a441","짞짟짡짣짥짦짨짩짪짫짮짲",5,"짺짻짽짾짿쨁쨂쨃쨄"], +["a461","쨅쨆쨇쨊쨎",5,"쨕쨖쨗쨙",12], +["a481","쨦쨧쨨쨪",28,"ㄱ",93], +["a541","쩇",4,"쩎쩏쩑쩒쩓쩕",6,"쩞쩢",5,"쩩쩪"], +["a561","쩫",17,"쩾",5,"쪅쪆"], +["a581","쪇",16,"쪙",14,"ⅰ",9], +["a5b0","Ⅰ",9], +["a5c1","Α",16,"Σ",6], +["a5e1","α",16,"σ",6], +["a641","쪨",19,"쪾쪿쫁쫂쫃쫅"], +["a661","쫆",5,"쫎쫐쫒쫔쫕쫖쫗쫚",5,"쫡",6], +["a681","쫨쫩쫪쫫쫭",6,"쫵",18,"쬉쬊─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂┒┑┚┙┖┕┎┍┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃",7], +["a741","쬋",4,"쬑쬒쬓쬕쬖쬗쬙",6,"쬢",7], +["a761","쬪",22,"쭂쭃쭄"], +["a781","쭅쭆쭇쭊쭋쭍쭎쭏쭑",6,"쭚쭛쭜쭞",5,"쭥",7,"㎕㎖㎗ℓ㎘㏄㎣㎤㎥㎦㎙",9,"㏊㎍㎎㎏㏏㎈㎉㏈㎧㎨㎰",9,"㎀",4,"㎺",5,"㎐",4,"Ω㏀㏁㎊㎋㎌㏖㏅㎭㎮㎯㏛㎩㎪㎫㎬㏝㏐㏓㏃㏉㏜㏆"], +["a841","쭭",10,"쭺",14], +["a861","쮉",18,"쮝",6], +["a881","쮤",19,"쮹",11,"ÆЪĦ"], +["a8a6","IJ"], +["a8a8","ĿŁØŒºÞŦŊ"], +["a8b1","㉠",27,"ⓐ",25,"①",14,"½⅓⅔¼¾⅛⅜⅝⅞"], +["a941","쯅",14,"쯕",10], +["a961","쯠쯡쯢쯣쯥쯦쯨쯪",18], +["a981","쯽",14,"찎찏찑찒찓찕",6,"찞찟찠찣찤æđðħıijĸŀłøœßþŧŋʼn㈀",27,"⒜",25,"⑴",14,"¹²³⁴ⁿ₁₂₃₄"], +["aa41","찥찦찪찫찭찯찱",6,"찺찿",4,"챆챇챉챊챋챍챎"], +["aa61","챏",4,"챖챚",5,"챡챢챣챥챧챩",6,"챱챲"], +["aa81","챳챴챶",29,"ぁ",82], +["ab41","첔첕첖첗첚첛첝첞첟첡",6,"첪첮",5,"첶첷첹"], +["ab61","첺첻첽",6,"쳆쳈쳊",5,"쳑쳒쳓쳕",5], +["ab81","쳛",8,"쳥",6,"쳭쳮쳯쳱",12,"ァ",85], +["ac41","쳾쳿촀촂",5,"촊촋촍촎촏촑",6,"촚촜촞촟촠"], +["ac61","촡촢촣촥촦촧촩촪촫촭",11,"촺",4], +["ac81","촿",28,"쵝쵞쵟А",5,"ЁЖ",25], +["acd1","а",5,"ёж",25], +["ad41","쵡쵢쵣쵥",6,"쵮쵰쵲",5,"쵹",7], +["ad61","춁",6,"춉",10,"춖춗춙춚춛춝춞춟"], +["ad81","춠춡춢춣춦춨춪",5,"춱",18,"췅"], +["ae41","췆",5,"췍췎췏췑",16], +["ae61","췢",5,"췩췪췫췭췮췯췱",6,"췺췼췾",4], +["ae81","츃츅츆츇츉츊츋츍",6,"츕츖츗츘츚",5,"츢츣츥츦츧츩츪츫"], +["af41","츬츭츮츯츲츴츶",19], +["af61","칊",13,"칚칛칝칞칢",5,"칪칬"], +["af81","칮",5,"칶칷칹칺칻칽",6,"캆캈캊",5,"캒캓캕캖캗캙"], +["b041","캚",5,"캢캦",5,"캮",12], +["b061","캻",5,"컂",19], +["b081","컖",13,"컦컧컩컪컭",6,"컶컺",5,"가각간갇갈갉갊감",7,"같",4,"갠갤갬갭갯갰갱갸갹갼걀걋걍걔걘걜거걱건걷걸걺검겁것겄겅겆겉겊겋게겐겔겜겝겟겠겡겨격겪견겯결겸겹겻겼경곁계곈곌곕곗고곡곤곧골곪곬곯곰곱곳공곶과곽관괄괆"], +["b141","켂켃켅켆켇켉",6,"켒켔켖",5,"켝켞켟켡켢켣"], +["b161","켥",6,"켮켲",5,"켹",11], +["b181","콅",14,"콖콗콙콚콛콝",6,"콦콨콪콫콬괌괍괏광괘괜괠괩괬괭괴괵괸괼굄굅굇굉교굔굘굡굣구국군굳굴굵굶굻굼굽굿궁궂궈궉권궐궜궝궤궷귀귁귄귈귐귑귓규균귤그극근귿글긁금급긋긍긔기긱긴긷길긺김깁깃깅깆깊까깍깎깐깔깖깜깝깟깠깡깥깨깩깬깰깸"], +["b241","콭콮콯콲콳콵콶콷콹",6,"쾁쾂쾃쾄쾆",5,"쾍"], +["b261","쾎",18,"쾢",5,"쾩"], +["b281","쾪",5,"쾱",18,"쿅",6,"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌껍껏껐껑께껙껜껨껫껭껴껸껼꼇꼈꼍꼐꼬꼭꼰꼲꼴꼼꼽꼿꽁꽂꽃꽈꽉꽐꽜꽝꽤꽥꽹꾀꾄꾈꾐꾑꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋꿍꿎꿔꿜꿨꿩꿰꿱꿴꿸뀀뀁뀄뀌뀐뀔뀜뀝뀨끄끅끈끊끌끎끓끔끕끗끙"], +["b341","쿌",19,"쿢쿣쿥쿦쿧쿩"], +["b361","쿪",5,"쿲쿴쿶",5,"쿽쿾쿿퀁퀂퀃퀅",5], +["b381","퀋",5,"퀒",5,"퀙",19,"끝끼끽낀낄낌낍낏낑나낙낚난낟날낡낢남납낫",4,"낱낳내낵낸낼냄냅냇냈냉냐냑냔냘냠냥너넉넋넌널넒넓넘넙넛넜넝넣네넥넨넬넴넵넷넸넹녀녁년녈념녑녔녕녘녜녠노녹논놀놂놈놉놋농높놓놔놘놜놨뇌뇐뇔뇜뇝"], +["b441","퀮",5,"퀶퀷퀹퀺퀻퀽",6,"큆큈큊",5], +["b461","큑큒큓큕큖큗큙",6,"큡",10,"큮큯"], +["b481","큱큲큳큵",6,"큾큿킀킂",18,"뇟뇨뇩뇬뇰뇹뇻뇽누눅눈눋눌눔눕눗눙눠눴눼뉘뉜뉠뉨뉩뉴뉵뉼늄늅늉느늑는늘늙늚늠늡늣능늦늪늬늰늴니닉닌닐닒님닙닛닝닢다닥닦단닫",4,"닳담답닷",4,"닿대댁댄댈댐댑댓댔댕댜더덕덖던덛덜덞덟덤덥"], +["b541","킕",14,"킦킧킩킪킫킭",5], +["b561","킳킶킸킺",5,"탂탃탅탆탇탊",5,"탒탖",4], +["b581","탛탞탟탡탢탣탥",6,"탮탲",5,"탹",11,"덧덩덫덮데덱덴델뎀뎁뎃뎄뎅뎌뎐뎔뎠뎡뎨뎬도독돈돋돌돎돐돔돕돗동돛돝돠돤돨돼됐되된될됨됩됫됴두둑둔둘둠둡둣둥둬뒀뒈뒝뒤뒨뒬뒵뒷뒹듀듄듈듐듕드득든듣들듦듬듭듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸"], +["b641","턅",7,"턎",17], +["b661","턠",15,"턲턳턵턶턷턹턻턼턽턾"], +["b681","턿텂텆",5,"텎텏텑텒텓텕",6,"텞텠텢",5,"텩텪텫텭땀땁땃땄땅땋때땍땐땔땜땝땟땠땡떠떡떤떨떪떫떰떱떳떴떵떻떼떽뗀뗄뗌뗍뗏뗐뗑뗘뗬또똑똔똘똥똬똴뙈뙤뙨뚜뚝뚠뚤뚫뚬뚱뛔뛰뛴뛸뜀뜁뜅뜨뜩뜬뜯뜰뜸뜹뜻띄띈띌띔띕띠띤띨띰띱띳띵라락란랄람랍랏랐랑랒랖랗"], +["b741","텮",13,"텽",6,"톅톆톇톉톊"], +["b761","톋",20,"톢톣톥톦톧"], +["b781","톩",6,"톲톴톶톷톸톹톻톽톾톿퇁",14,"래랙랜랠램랩랫랬랭랴략랸럇량러럭런럴럼럽럿렀렁렇레렉렌렐렘렙렛렝려력련렬렴렵렷렸령례롄롑롓로록론롤롬롭롯롱롸롼뢍뢨뢰뢴뢸룀룁룃룅료룐룔룝룟룡루룩룬룰룸룹룻룽뤄뤘뤠뤼뤽륀륄륌륏륑류륙륜률륨륩"], +["b841","퇐",7,"퇙",17], +["b861","퇫",8,"퇵퇶퇷퇹",13], +["b881","툈툊",5,"툑",24,"륫륭르륵른를름릅릇릉릊릍릎리릭린릴림립릿링마막만많",4,"맘맙맛망맞맡맣매맥맨맬맴맵맷맸맹맺먀먁먈먕머먹먼멀멂멈멉멋멍멎멓메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼"], +["b941","툪툫툮툯툱툲툳툵",6,"툾퉀퉂",5,"퉉퉊퉋퉌"], +["b961","퉍",14,"퉝",6,"퉥퉦퉧퉨"], +["b981","퉩",22,"튂튃튅튆튇튉튊튋튌묀묄묍묏묑묘묜묠묩묫무묵묶문묻물묽묾뭄뭅뭇뭉뭍뭏뭐뭔뭘뭡뭣뭬뮈뮌뮐뮤뮨뮬뮴뮷므믄믈믐믓미믹민믿밀밂밈밉밋밌밍및밑바",4,"받",4,"밤밥밧방밭배백밴밸뱀뱁뱃뱄뱅뱉뱌뱍뱐뱝버벅번벋벌벎범법벗"], +["ba41","튍튎튏튒튓튔튖",5,"튝튞튟튡튢튣튥",6,"튭"], +["ba61","튮튯튰튲",5,"튺튻튽튾틁틃",4,"틊틌",5], +["ba81","틒틓틕틖틗틙틚틛틝",6,"틦",9,"틲틳틵틶틷틹틺벙벚베벡벤벧벨벰벱벳벴벵벼벽변별볍볏볐병볕볘볜보복볶본볼봄봅봇봉봐봔봤봬뵀뵈뵉뵌뵐뵘뵙뵤뵨부북분붇불붉붊붐붑붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브븍븐블븜븝븟비빅빈빌빎빔빕빗빙빚빛빠빡빤"], +["bb41","틻",4,"팂팄팆",5,"팏팑팒팓팕팗",4,"팞팢팣"], +["bb61","팤팦팧팪팫팭팮팯팱",6,"팺팾",5,"퍆퍇퍈퍉"], +["bb81","퍊",31,"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌뺍뺏뺐뺑뺘뺙뺨뻐뻑뻔뻗뻘뻠뻣뻤뻥뻬뼁뼈뼉뼘뼙뼛뼜뼝뽀뽁뽄뽈뽐뽑뽕뾔뾰뿅뿌뿍뿐뿔뿜뿟뿡쀼쁑쁘쁜쁠쁨쁩삐삑삔삘삠삡삣삥사삭삯산삳살삵삶삼삽삿샀상샅새색샌샐샘샙샛샜생샤"], +["bc41","퍪",17,"퍾퍿펁펂펃펅펆펇"], +["bc61","펈펉펊펋펎펒",5,"펚펛펝펞펟펡",6,"펪펬펮"], +["bc81","펯",4,"펵펶펷펹펺펻펽",6,"폆폇폊",5,"폑",5,"샥샨샬샴샵샷샹섀섄섈섐섕서",4,"섣설섦섧섬섭섯섰성섶세섹센셀셈셉셋셌셍셔셕션셜셤셥셧셨셩셰셴셸솅소속솎손솔솖솜솝솟송솥솨솩솬솰솽쇄쇈쇌쇔쇗쇘쇠쇤쇨쇰쇱쇳쇼쇽숀숄숌숍숏숑수숙순숟술숨숩숫숭"], +["bd41","폗폙",7,"폢폤",7,"폮폯폱폲폳폵폶폷"], +["bd61","폸폹폺폻폾퐀퐂",5,"퐉",13], +["bd81","퐗",5,"퐞",25,"숯숱숲숴쉈쉐쉑쉔쉘쉠쉥쉬쉭쉰쉴쉼쉽쉿슁슈슉슐슘슛슝스슥슨슬슭슴습슷승시식신싣실싫심십싯싱싶싸싹싻싼쌀쌈쌉쌌쌍쌓쌔쌕쌘쌜쌤쌥쌨쌩썅써썩썬썰썲썸썹썼썽쎄쎈쎌쏀쏘쏙쏜쏟쏠쏢쏨쏩쏭쏴쏵쏸쐈쐐쐤쐬쐰"], +["be41","퐸",7,"푁푂푃푅",14], +["be61","푔",7,"푝푞푟푡푢푣푥",7,"푮푰푱푲"], +["be81","푳",4,"푺푻푽푾풁풃",4,"풊풌풎",5,"풕",8,"쐴쐼쐽쑈쑤쑥쑨쑬쑴쑵쑹쒀쒔쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀씁씌씐씔씜씨씩씬씰씸씹씻씽아악안앉않알앍앎앓암압앗았앙앝앞애액앤앨앰앱앳앴앵야약얀얄얇얌얍얏양얕얗얘얜얠얩어억언얹얻얼얽얾엄",6,"엌엎"], +["bf41","풞",10,"풪",14], +["bf61","풹",18,"퓍퓎퓏퓑퓒퓓퓕"], +["bf81","퓖",5,"퓝퓞퓠",7,"퓩퓪퓫퓭퓮퓯퓱",6,"퓹퓺퓼에엑엔엘엠엡엣엥여역엮연열엶엷염",5,"옅옆옇예옌옐옘옙옛옜오옥온올옭옮옰옳옴옵옷옹옻와왁완왈왐왑왓왔왕왜왝왠왬왯왱외왹왼욀욈욉욋욍요욕욘욜욤욥욧용우욱운울욹욺움웁웃웅워웍원월웜웝웠웡웨"], +["c041","퓾",5,"픅픆픇픉픊픋픍",6,"픖픘",5], +["c061","픞",25], +["c081","픸픹픺픻픾픿핁핂핃핅",6,"핎핐핒",5,"핚핛핝핞핟핡핢핣웩웬웰웸웹웽위윅윈윌윔윕윗윙유육윤율윰윱윳융윷으윽은을읊음읍읏응",7,"읜읠읨읫이익인일읽읾잃임입잇있잉잊잎자작잔잖잗잘잚잠잡잣잤장잦재잭잰잴잼잽잿쟀쟁쟈쟉쟌쟎쟐쟘쟝쟤쟨쟬저적전절젊"], +["c141","핤핦핧핪핬핮",5,"핶핷핹핺핻핽",6,"햆햊햋"], +["c161","햌햍햎햏햑",19,"햦햧"], +["c181","햨",31,"점접젓정젖제젝젠젤젬젭젯젱져젼졀졈졉졌졍졔조족존졸졺좀좁좃종좆좇좋좌좍좔좝좟좡좨좼좽죄죈죌죔죕죗죙죠죡죤죵주죽준줄줅줆줌줍줏중줘줬줴쥐쥑쥔쥘쥠쥡쥣쥬쥰쥴쥼즈즉즌즐즘즙즛증지직진짇질짊짐집짓"], +["c241","헊헋헍헎헏헑헓",4,"헚헜헞",5,"헦헧헩헪헫헭헮"], +["c261","헯",4,"헶헸헺",5,"혂혃혅혆혇혉",6,"혒"], +["c281","혖",5,"혝혞혟혡혢혣혥",7,"혮",9,"혺혻징짖짙짚짜짝짠짢짤짧짬짭짯짰짱째짹짼쨀쨈쨉쨋쨌쨍쨔쨘쨩쩌쩍쩐쩔쩜쩝쩟쩠쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌쫍쫏쫑쫓쫘쫙쫠쫬쫴쬈쬐쬔쬘쬠쬡쭁쭈쭉쭌쭐쭘쭙쭝쭤쭸쭹쮜쮸쯔쯤쯧쯩찌찍찐찔찜찝찡찢찧차착찬찮찰참찹찻"], +["c341","혽혾혿홁홂홃홄홆홇홊홌홎홏홐홒홓홖홗홙홚홛홝",4], +["c361","홢",4,"홨홪",5,"홲홳홵",11], +["c381","횁횂횄횆",5,"횎횏횑횒횓횕",7,"횞횠횢",5,"횩횪찼창찾채책챈챌챔챕챗챘챙챠챤챦챨챰챵처척천철첨첩첫첬청체첵첸첼쳄쳅쳇쳉쳐쳔쳤쳬쳰촁초촉촌촐촘촙촛총촤촨촬촹최쵠쵤쵬쵭쵯쵱쵸춈추축춘출춤춥춧충춰췄췌췐취췬췰췸췹췻췽츄츈츌츔츙츠측츤츨츰츱츳층"], +["c441","횫횭횮횯횱",7,"횺횼",7,"훆훇훉훊훋"], +["c461","훍훎훏훐훒훓훕훖훘훚",5,"훡훢훣훥훦훧훩",4], +["c481","훮훯훱훲훳훴훶",5,"훾훿휁휂휃휅",11,"휒휓휔치칙친칟칠칡침칩칫칭카칵칸칼캄캅캇캉캐캑캔캘캠캡캣캤캥캬캭컁커컥컨컫컬컴컵컷컸컹케켁켄켈켐켑켓켕켜켠켤켬켭켯켰켱켸코콕콘콜콤콥콧콩콰콱콴콸쾀쾅쾌쾡쾨쾰쿄쿠쿡쿤쿨쿰쿱쿳쿵쿼퀀퀄퀑퀘퀭퀴퀵퀸퀼"], +["c541","휕휖휗휚휛휝휞휟휡",6,"휪휬휮",5,"휶휷휹"], +["c561","휺휻휽",6,"흅흆흈흊",5,"흒흓흕흚",4], +["c581","흟흢흤흦흧흨흪흫흭흮흯흱흲흳흵",6,"흾흿힀힂",5,"힊힋큄큅큇큉큐큔큘큠크큭큰클큼큽킁키킥킨킬킴킵킷킹타탁탄탈탉탐탑탓탔탕태택탠탤탬탭탯탰탱탸턍터턱턴털턺텀텁텃텄텅테텍텐텔템텝텟텡텨텬텼톄톈토톡톤톨톰톱톳통톺톼퇀퇘퇴퇸툇툉툐투툭툰툴툼툽툿퉁퉈퉜"], +["c641","힍힎힏힑",6,"힚힜힞",5], +["c6a1","퉤튀튁튄튈튐튑튕튜튠튤튬튱트특튼튿틀틂틈틉틋틔틘틜틤틥티틱틴틸팀팁팃팅파팍팎판팔팖팜팝팟팠팡팥패팩팬팰팸팹팻팼팽퍄퍅퍼퍽펀펄펌펍펏펐펑페펙펜펠펨펩펫펭펴편펼폄폅폈평폐폘폡폣포폭폰폴폼폽폿퐁"], +["c7a1","퐈퐝푀푄표푠푤푭푯푸푹푼푿풀풂품풉풋풍풔풩퓌퓐퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌핍핏핑하학한할핥함합핫항해핵핸핼햄햅햇했행햐향허헉헌헐헒험헙헛헝헤헥헨헬헴헵헷헹혀혁현혈혐협혓혔형혜혠"], +["c8a1","혤혭호혹혼홀홅홈홉홋홍홑화확환활홧황홰홱홴횃횅회획횐횔횝횟횡효횬횰횹횻후훅훈훌훑훔훗훙훠훤훨훰훵훼훽휀휄휑휘휙휜휠휨휩휫휭휴휵휸휼흄흇흉흐흑흔흖흗흘흙흠흡흣흥흩희흰흴흼흽힁히힉힌힐힘힙힛힝"], +["caa1","伽佳假價加可呵哥嘉嫁家暇架枷柯歌珂痂稼苛茄街袈訶賈跏軻迦駕刻却各恪慤殼珏脚覺角閣侃刊墾奸姦干幹懇揀杆柬桿澗癎看磵稈竿簡肝艮艱諫間乫喝曷渴碣竭葛褐蝎鞨勘坎堪嵌感憾戡敢柑橄減甘疳監瞰紺邯鑑鑒龕"], +["cba1","匣岬甲胛鉀閘剛堈姜岡崗康强彊慷江畺疆糠絳綱羌腔舡薑襁講鋼降鱇介价個凱塏愷愾慨改槪漑疥皆盖箇芥蓋豈鎧開喀客坑更粳羹醵倨去居巨拒据據擧渠炬祛距踞車遽鉅鋸乾件健巾建愆楗腱虔蹇鍵騫乞傑杰桀儉劍劒檢"], +["cca1","瞼鈐黔劫怯迲偈憩揭擊格檄激膈覡隔堅牽犬甄絹繭肩見譴遣鵑抉決潔結缺訣兼慊箝謙鉗鎌京俓倞傾儆勁勍卿坰境庚徑慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖警輕逕鏡頃頸驚鯨係啓堺契季屆悸戒桂械"], +["cda1","棨溪界癸磎稽系繫繼計誡谿階鷄古叩告呱固姑孤尻庫拷攷故敲暠枯槁沽痼皐睾稿羔考股膏苦苽菰藁蠱袴誥賈辜錮雇顧高鼓哭斛曲梏穀谷鵠困坤崑昆梱棍滾琨袞鯤汨滑骨供公共功孔工恐恭拱控攻珙空蚣貢鞏串寡戈果瓜"], +["cea1","科菓誇課跨過鍋顆廓槨藿郭串冠官寬慣棺款灌琯瓘管罐菅觀貫關館刮恝括适侊光匡壙廣曠洸炚狂珖筐胱鑛卦掛罫乖傀塊壞怪愧拐槐魁宏紘肱轟交僑咬喬嬌嶠巧攪敎校橋狡皎矯絞翹膠蕎蛟較轎郊餃驕鮫丘久九仇俱具勾"], +["cfa1","區口句咎嘔坵垢寇嶇廐懼拘救枸柩構歐毆毬求溝灸狗玖球瞿矩究絿耉臼舅舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局菊鞠鞫麴君窘群裙軍郡堀屈掘窟宮弓穹窮芎躬倦券勸卷圈拳捲權淃眷厥獗蕨蹶闕机櫃潰詭軌饋句晷歸貴"], +["d0a1","鬼龜叫圭奎揆槻珪硅窺竅糾葵規赳逵閨勻均畇筠菌鈞龜橘克剋劇戟棘極隙僅劤勤懃斤根槿瑾筋芹菫覲謹近饉契今妗擒昑檎琴禁禽芩衾衿襟金錦伋及急扱汲級給亘兢矜肯企伎其冀嗜器圻基埼夔奇妓寄岐崎己幾忌技旗旣"], +["d1a1","朞期杞棋棄機欺氣汽沂淇玘琦琪璂璣畸畿碁磯祁祇祈祺箕紀綺羈耆耭肌記譏豈起錡錤飢饑騎騏驥麒緊佶吉拮桔金喫儺喇奈娜懦懶拏拿癩",5,"那樂",4,"諾酪駱亂卵暖欄煖爛蘭難鸞捏捺南嵐枏楠湳濫男藍襤拉"], +["d2a1","納臘蠟衲囊娘廊",4,"乃來內奈柰耐冷女年撚秊念恬拈捻寧寗努勞奴弩怒擄櫓爐瑙盧",5,"駑魯",10,"濃籠聾膿農惱牢磊腦賂雷尿壘",7,"嫩訥杻紐勒",5,"能菱陵尼泥匿溺多茶"], +["d3a1","丹亶但單團壇彖斷旦檀段湍短端簞緞蛋袒鄲鍛撻澾獺疸達啖坍憺擔曇淡湛潭澹痰聃膽蕁覃談譚錟沓畓答踏遝唐堂塘幢戇撞棠當糖螳黨代垈坮大對岱帶待戴擡玳臺袋貸隊黛宅德悳倒刀到圖堵塗導屠島嶋度徒悼挑掉搗桃"], +["d4a1","棹櫂淘渡滔濤燾盜睹禱稻萄覩賭跳蹈逃途道都鍍陶韜毒瀆牘犢獨督禿篤纛讀墩惇敦旽暾沌焞燉豚頓乭突仝冬凍動同憧東桐棟洞潼疼瞳童胴董銅兜斗杜枓痘竇荳讀豆逗頭屯臀芚遁遯鈍得嶝橙燈登等藤謄鄧騰喇懶拏癩羅"], +["d5a1","蘿螺裸邏樂洛烙珞絡落諾酪駱丹亂卵欄欒瀾爛蘭鸞剌辣嵐擥攬欖濫籃纜藍襤覽拉臘蠟廊朗浪狼琅瑯螂郞來崍徠萊冷掠略亮倆兩凉梁樑粮粱糧良諒輛量侶儷勵呂廬慮戾旅櫚濾礪藜蠣閭驢驪麗黎力曆歷瀝礫轢靂憐戀攣漣"], +["d6a1","煉璉練聯蓮輦連鍊冽列劣洌烈裂廉斂殮濂簾獵令伶囹寧岺嶺怜玲笭羚翎聆逞鈴零靈領齡例澧禮醴隷勞怒撈擄櫓潞瀘爐盧老蘆虜路輅露魯鷺鹵碌祿綠菉錄鹿麓論壟弄朧瀧瓏籠聾儡瀨牢磊賂賚賴雷了僚寮廖料燎療瞭聊蓼"], +["d7a1","遼鬧龍壘婁屢樓淚漏瘻累縷蔞褸鏤陋劉旒柳榴流溜瀏琉瑠留瘤硫謬類六戮陸侖倫崙淪綸輪律慄栗率隆勒肋凜凌楞稜綾菱陵俚利厘吏唎履悧李梨浬犁狸理璃異痢籬罹羸莉裏裡里釐離鯉吝潾燐璘藺躪隣鱗麟林淋琳臨霖砬"], +["d8a1","立笠粒摩瑪痲碼磨馬魔麻寞幕漠膜莫邈万卍娩巒彎慢挽晩曼滿漫灣瞞萬蔓蠻輓饅鰻唜抹末沫茉襪靺亡妄忘忙望網罔芒茫莽輞邙埋妹媒寐昧枚梅每煤罵買賣邁魅脈貊陌驀麥孟氓猛盲盟萌冪覓免冕勉棉沔眄眠綿緬面麵滅"], +["d9a1","蔑冥名命明暝椧溟皿瞑茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮某模母毛牟牡瑁眸矛耗芼茅謀謨貌木沐牧目睦穆鶩歿沒夢朦蒙卯墓妙廟描昴杳渺猫竗苗錨務巫憮懋戊拇撫无楙武毋無珷畝繆舞茂蕪誣貿霧鵡墨默們刎吻問文"], +["daa1","汶紊紋聞蚊門雯勿沕物味媚尾嵋彌微未梶楣渼湄眉米美薇謎迷靡黴岷悶愍憫敏旻旼民泯玟珉緡閔密蜜謐剝博拍搏撲朴樸泊珀璞箔粕縛膊舶薄迫雹駁伴半反叛拌搬攀斑槃泮潘班畔瘢盤盼磐磻礬絆般蟠返頒飯勃拔撥渤潑"], +["dba1","發跋醱鉢髮魃倣傍坊妨尨幇彷房放方旁昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防龐倍俳北培徘拜排杯湃焙盃背胚裴裵褙賠輩配陪伯佰帛柏栢白百魄幡樊煩燔番磻繁蕃藩飜伐筏罰閥凡帆梵氾汎泛犯範范法琺僻劈壁擘檗璧癖"], +["dca1","碧蘗闢霹便卞弁變辨辯邊別瞥鱉鼈丙倂兵屛幷昞昺柄棅炳甁病秉竝輧餠騈保堡報寶普步洑湺潽珤甫菩補褓譜輔伏僕匐卜宓復服福腹茯蔔複覆輹輻馥鰒本乶俸奉封峯峰捧棒烽熢琫縫蓬蜂逢鋒鳳不付俯傅剖副否咐埠夫婦"], +["dda1","孚孵富府復扶敷斧浮溥父符簿缶腐腑膚艀芙莩訃負賦賻赴趺部釜阜附駙鳧北分吩噴墳奔奮忿憤扮昐汾焚盆粉糞紛芬賁雰不佛弗彿拂崩朋棚硼繃鵬丕備匕匪卑妃婢庇悲憊扉批斐枇榧比毖毗毘沸泌琵痺砒碑秕秘粃緋翡肥"], +["dea1","脾臂菲蜚裨誹譬費鄙非飛鼻嚬嬪彬斌檳殯浜濱瀕牝玭貧賓頻憑氷聘騁乍事些仕伺似使俟僿史司唆嗣四士奢娑寫寺射巳師徙思捨斜斯柶査梭死沙泗渣瀉獅砂社祀祠私篩紗絲肆舍莎蓑蛇裟詐詞謝賜赦辭邪飼駟麝削數朔索"], +["dfa1","傘刪山散汕珊産疝算蒜酸霰乷撒殺煞薩三參杉森渗芟蔘衫揷澁鈒颯上傷像償商喪嘗孀尙峠常床庠廂想桑橡湘爽牀狀相祥箱翔裳觴詳象賞霜塞璽賽嗇塞穡索色牲生甥省笙墅壻嶼序庶徐恕抒捿敍暑曙書栖棲犀瑞筮絮緖署"], +["e0a1","胥舒薯西誓逝鋤黍鼠夕奭席惜昔晳析汐淅潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽琁瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣選銑鐥饍鮮卨屑楔泄洩渫舌薛褻設說雪齧剡暹殲纖蟾贍閃陝攝涉燮葉城姓宬性惺成星晟猩珹盛省筬"], +["e1a1","聖聲腥誠醒世勢歲洗稅笹細說貰召嘯塑宵小少巢所掃搔昭梳沼消溯瀟炤燒甦疏疎瘙笑篠簫素紹蔬蕭蘇訴逍遡邵銷韶騷俗屬束涑粟續謖贖速孫巽損蓀遜飡率宋悚松淞訟誦送頌刷殺灑碎鎖衰釗修受嗽囚垂壽嫂守岫峀帥愁"], +["e2a1","戍手授搜收數樹殊水洙漱燧狩獸琇璲瘦睡秀穗竪粹綏綬繡羞脩茱蒐蓚藪袖誰讐輸遂邃酬銖銹隋隧隨雖需須首髓鬚叔塾夙孰宿淑潚熟琡璹肅菽巡徇循恂旬栒楯橓殉洵淳珣盾瞬筍純脣舜荀蓴蕣詢諄醇錞順馴戌術述鉥崇崧"], +["e3a1","嵩瑟膝蝨濕拾習褶襲丞乘僧勝升承昇繩蠅陞侍匙嘶始媤尸屎屍市弑恃施是時枾柴猜矢示翅蒔蓍視試詩諡豕豺埴寔式息拭植殖湜熄篒蝕識軾食飾伸侁信呻娠宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心沁"], +["e4a1","沈深瀋甚芯諶什十拾雙氏亞俄兒啞娥峨我牙芽莪蛾衙訝阿雅餓鴉鵝堊岳嶽幄惡愕握樂渥鄂鍔顎鰐齷安岸按晏案眼雁鞍顔鮟斡謁軋閼唵岩巖庵暗癌菴闇壓押狎鴨仰央怏昻殃秧鴦厓哀埃崖愛曖涯碍艾隘靄厄扼掖液縊腋額"], +["e5a1","櫻罌鶯鸚也倻冶夜惹揶椰爺耶若野弱掠略約若葯蒻藥躍亮佯兩凉壤孃恙揚攘敭暘梁楊樣洋瀁煬痒瘍禳穰糧羊良襄諒讓釀陽量養圄御於漁瘀禦語馭魚齬億憶抑檍臆偃堰彦焉言諺孼蘖俺儼嚴奄掩淹嶪業円予余勵呂女如廬"], +["e6a1","旅歟汝濾璵礖礪與艅茹輿轝閭餘驪麗黎亦力域役易曆歷疫繹譯轢逆驛嚥堧姸娟宴年延憐戀捐挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉硏硯秊筵緣練縯聯衍軟輦蓮連鉛鍊鳶列劣咽悅涅烈熱裂說閱厭廉念捻染殮炎焰琰艶苒"], +["e7a1","簾閻髥鹽曄獵燁葉令囹塋寧嶺嶸影怜映暎楹榮永泳渶潁濚瀛瀯煐營獰玲瑛瑩瓔盈穎纓羚聆英詠迎鈴鍈零霙靈領乂倪例刈叡曳汭濊猊睿穢芮藝蘂禮裔詣譽豫醴銳隸霓預五伍俉傲午吾吳嗚塢墺奧娛寤悟惡懊敖旿晤梧汚澳"], +["e8a1","烏熬獒筽蜈誤鰲鼇屋沃獄玉鈺溫瑥瘟穩縕蘊兀壅擁瓮甕癰翁邕雍饔渦瓦窩窪臥蛙蝸訛婉完宛梡椀浣玩琓琬碗緩翫脘腕莞豌阮頑曰往旺枉汪王倭娃歪矮外嵬巍猥畏了僚僥凹堯夭妖姚寥寮尿嶢拗搖撓擾料曜樂橈燎燿瑤療"], +["e9a1","窈窯繇繞耀腰蓼蟯要謠遙遼邀饒慾欲浴縟褥辱俑傭冗勇埇墉容庸慂榕涌湧溶熔瑢用甬聳茸蓉踊鎔鏞龍于佑偶優又友右宇寓尤愚憂旴牛玗瑀盂祐禑禹紆羽芋藕虞迂遇郵釪隅雨雩勖彧旭昱栯煜稶郁頊云暈橒殞澐熉耘芸蕓"], +["eaa1","運隕雲韻蔚鬱亐熊雄元原員圓園垣媛嫄寃怨愿援沅洹湲源爰猿瑗苑袁轅遠阮院願鴛月越鉞位偉僞危圍委威尉慰暐渭爲瑋緯胃萎葦蔿蝟衛褘謂違韋魏乳侑儒兪劉唯喩孺宥幼幽庾悠惟愈愉揄攸有杻柔柚柳楡楢油洧流游溜"], +["eba1","濡猶猷琉瑜由留癒硫紐維臾萸裕誘諛諭踰蹂遊逾遺酉釉鍮類六堉戮毓肉育陸倫允奫尹崙淪潤玧胤贇輪鈗閏律慄栗率聿戎瀜絨融隆垠恩慇殷誾銀隱乙吟淫蔭陰音飮揖泣邑凝應膺鷹依倚儀宜意懿擬椅毅疑矣義艤薏蟻衣誼"], +["eca1","議醫二以伊利吏夷姨履已弛彛怡易李梨泥爾珥理異痍痢移罹而耳肄苡荑裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人仁刃印吝咽因姻寅引忍湮燐璘絪茵藺蚓認隣靭靷鱗麟一佚佾壹日溢逸鎰馹任壬妊姙恁林淋稔臨荏賃入卄"], +["eda1","立笠粒仍剩孕芿仔刺咨姉姿子字孜恣慈滋炙煮玆瓷疵磁紫者自茨蔗藉諮資雌作勺嚼斫昨灼炸爵綽芍酌雀鵲孱棧殘潺盞岑暫潛箴簪蠶雜丈仗匠場墻壯奬將帳庄張掌暲杖樟檣欌漿牆狀獐璋章粧腸臟臧莊葬蔣薔藏裝贓醬長"], +["eea1","障再哉在宰才材栽梓渽滓災縡裁財載齋齎爭箏諍錚佇低儲咀姐底抵杵楮樗沮渚狙猪疽箸紵苧菹著藷詛貯躇這邸雎齟勣吊嫡寂摘敵滴狄炙的積笛籍績翟荻謫賊赤跡蹟迪迹適鏑佃佺傳全典前剪塡塼奠專展廛悛戰栓殿氈澱"], +["efa1","煎琠田甸畑癲筌箋箭篆纏詮輾轉鈿銓錢鐫電顚顫餞切截折浙癤竊節絶占岾店漸点粘霑鮎點接摺蝶丁井亭停偵呈姃定幀庭廷征情挺政整旌晶晸柾楨檉正汀淀淨渟湞瀞炡玎珽町睛碇禎程穽精綎艇訂諪貞鄭酊釘鉦鋌錠霆靖"], +["f0a1","靜頂鼎制劑啼堤帝弟悌提梯濟祭第臍薺製諸蹄醍除際霽題齊俎兆凋助嘲弔彫措操早晁曺曹朝條棗槽漕潮照燥爪璪眺祖祚租稠窕粗糟組繰肇藻蚤詔調趙躁造遭釣阻雕鳥族簇足鏃存尊卒拙猝倧宗從悰慫棕淙琮種終綜縱腫"], +["f1a1","踪踵鍾鐘佐坐左座挫罪主住侏做姝胄呪周嗾奏宙州廚晝朱柱株注洲湊澍炷珠疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄駐竹粥俊儁准埈寯峻晙樽浚準濬焌畯竣蠢逡遵雋駿茁中仲衆重卽櫛楫汁葺增憎曾拯烝甑症繒蒸證贈之只"], +["f2a1","咫地址志持指摯支旨智枝枳止池沚漬知砥祉祗紙肢脂至芝芷蜘誌識贄趾遲直稙稷織職唇嗔塵振搢晉晋桭榛殄津溱珍瑨璡畛疹盡眞瞋秦縉縝臻蔯袗診賑軫辰進鎭陣陳震侄叱姪嫉帙桎瓆疾秩窒膣蛭質跌迭斟朕什執潗緝輯"], +["f3a1","鏶集徵懲澄且侘借叉嗟嵯差次此磋箚茶蹉車遮捉搾着窄錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽餐饌刹察擦札紮僭參塹慘慙懺斬站讒讖倉倡創唱娼廠彰愴敞昌昶暢槍滄漲猖瘡窓脹艙菖蒼債埰寀寨彩採砦綵菜蔡采釵冊柵策"], +["f4a1","責凄妻悽處倜刺剔尺慽戚拓擲斥滌瘠脊蹠陟隻仟千喘天川擅泉淺玔穿舛薦賤踐遷釧闡阡韆凸哲喆徹撤澈綴輟轍鐵僉尖沾添甛瞻簽籤詹諂堞妾帖捷牒疊睫諜貼輒廳晴淸聽菁請靑鯖切剃替涕滯締諦逮遞體初剿哨憔抄招梢"], +["f5a1","椒楚樵炒焦硝礁礎秒稍肖艸苕草蕉貂超酢醋醮促囑燭矗蜀觸寸忖村邨叢塚寵悤憁摠總聰蔥銃撮催崔最墜抽推椎楸樞湫皺秋芻萩諏趨追鄒酋醜錐錘鎚雛騶鰍丑畜祝竺筑築縮蓄蹙蹴軸逐春椿瑃出朮黜充忠沖蟲衝衷悴膵萃"], +["f6a1","贅取吹嘴娶就炊翠聚脆臭趣醉驟鷲側仄厠惻測層侈値嗤峙幟恥梔治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅飭親七柒漆侵寢枕沈浸琛砧針鍼蟄秤稱快他咤唾墮妥惰打拖朶楕舵陀馱駝倬卓啄坼度托拓擢晫柝濁濯琢琸託"], +["f7a1","鐸呑嘆坦彈憚歎灘炭綻誕奪脫探眈耽貪塔搭榻宕帑湯糖蕩兌台太怠態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎吐土討慟桶洞痛筒統通堆槌腿褪退頹偸套妬投透鬪慝特闖坡婆巴把播擺杷波派爬琶破罷芭跛頗判坂板版瓣販辦鈑"], +["f8a1","阪八叭捌佩唄悖敗沛浿牌狽稗覇貝彭澎烹膨愎便偏扁片篇編翩遍鞭騙貶坪平枰萍評吠嬖幣廢弊斃肺蔽閉陛佈包匍匏咆哺圃布怖抛抱捕暴泡浦疱砲胞脯苞葡蒲袍褒逋鋪飽鮑幅暴曝瀑爆輻俵剽彪慓杓標漂瓢票表豹飇飄驃"], +["f9a1","品稟楓諷豊風馮彼披疲皮被避陂匹弼必泌珌畢疋筆苾馝乏逼下何厦夏廈昰河瑕荷蝦賀遐霞鰕壑學虐謔鶴寒恨悍旱汗漢澣瀚罕翰閑閒限韓割轄函含咸啣喊檻涵緘艦銜陷鹹合哈盒蛤閤闔陜亢伉姮嫦巷恒抗杭桁沆港缸肛航"], +["faa1","行降項亥偕咳垓奚孩害懈楷海瀣蟹解該諧邂駭骸劾核倖幸杏荇行享向嚮珦鄕響餉饗香噓墟虛許憲櫶獻軒歇險驗奕爀赫革俔峴弦懸晛泫炫玄玹現眩睍絃絢縣舷衒見賢鉉顯孑穴血頁嫌俠協夾峽挾浹狹脅脇莢鋏頰亨兄刑型"], +["fba1","形泂滎瀅灐炯熒珩瑩荊螢衡逈邢鎣馨兮彗惠慧暳蕙蹊醯鞋乎互呼壕壺好岵弧戶扈昊晧毫浩淏湖滸澔濠濩灝狐琥瑚瓠皓祜糊縞胡芦葫蒿虎號蝴護豪鎬頀顥惑或酷婚昏混渾琿魂忽惚笏哄弘汞泓洪烘紅虹訌鴻化和嬅樺火畵"], +["fca1","禍禾花華話譁貨靴廓擴攫確碻穫丸喚奐宦幻患換歡晥桓渙煥環紈還驩鰥活滑猾豁闊凰幌徨恍惶愰慌晃晄榥況湟滉潢煌璜皇篁簧荒蝗遑隍黃匯回廻徊恢悔懷晦會檜淮澮灰獪繪膾茴蛔誨賄劃獲宖橫鐄哮嚆孝效斅曉梟涍淆"], +["fda1","爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰"] +] diff --git a/node_modules/iconv-lite/encodings/tables/cp950.json b/node_modules/iconv-lite/encodings/tables/cp950.json new file mode 100644 index 0000000..d8bc871 --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/cp950.json @@ -0,0 +1,177 @@ +[ +["0","\u0000",127], +["a140"," ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚"], +["a1a1","﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢",4,"~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/"], +["a240","\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁",7,"▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭"], +["a2a1","╮╰╯═╞╪╡◢◣◥◤╱╲╳0",9,"Ⅰ",9,"〡",8,"十卄卅A",25,"a",21], +["a340","wxyzΑ",16,"Σ",6,"α",16,"σ",6,"ㄅ",10], +["a3a1","ㄐ",25,"˙ˉˊˇˋ"], +["a3e1","€"], +["a440","一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才"], +["a4a1","丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙"], +["a540","世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外"], +["a5a1","央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全"], +["a640","共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年"], +["a6a1","式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣"], +["a740","作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍"], +["a7a1","均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠"], +["a840","杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒"], +["a8a1","芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵"], +["a940","咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居"], +["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊"], +["aa40","昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠"], +["aaa1","炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附"], +["ab40","陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品"], +["aba1","哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷"], +["ac40","拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗"], +["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄"], +["ad40","耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥"], +["ada1","迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪"], +["ae40","哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙"], +["aea1","恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓"], +["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷"], +["afa1","砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃"], +["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡"], +["b0a1","陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀"], +["b140","娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽"], +["b1a1","情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺"], +["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶"], +["b2a1","瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼"], +["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途"], +["b3a1","部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠"], +["b440","婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍"], +["b4a1","插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋"], +["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘"], +["b5a1","窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁"], +["b640","詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑"], +["b6a1","間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼"], +["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業"], +["b7a1","楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督"], +["b840","睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫"], +["b8a1","腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"], +["b940","辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴"], +["b9a1","飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇"], +["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢"], +["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬"], +["bb40","罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤"], +["bba1","說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"], +["bc40","劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂"], +["bca1","慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃"], +["bd40","瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯"], +["bda1","翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞"], +["be40","輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉"], +["bea1","鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡"], +["bf40","濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊"], +["bfa1","縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚"], +["c040","錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇"], +["c0a1","嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬"], +["c140","瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪"], +["c1a1","薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁"], +["c240","駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘"], +["c2a1","癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦"], +["c340","鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸"], +["c3a1","獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類"], +["c440","願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼"], +["c4a1","纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴"], +["c540","護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬"], +["c5a1","禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒"], +["c640","讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"], +["c940","乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕"], +["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋"], +["ca40","汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘"], +["caa1","吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇"], +["cb40","杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓"], +["cba1","芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢"], +["cc40","坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋"], +["cca1","怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲"], +["cd40","泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"], +["cda1","矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏"], +["ce40","哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛"], +["cea1","峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺"], +["cf40","柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂"], +["cfa1","洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀"], +["d040","穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"], +["d0a1","苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱"], +["d140","唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧"], +["d1a1","恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤"], +["d240","毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸"], +["d2a1","牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐"], +["d340","笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢"], +["d3a1","荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐"], +["d440","酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅"], +["d4a1","唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏"], +["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟"], +["d5a1","捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉"], +["d640","淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏"], +["d6a1","痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟"], +["d740","耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷"], +["d7a1","蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪"], +["d840","釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷"], +["d8a1","堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔"], +["d940","惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒"], +["d9a1","晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞"], +["da40","湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖"], +["daa1","琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥"], +["db40","罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳"], +["dba1","菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺"], +["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈"], +["dca1","隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆"], +["dd40","媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤"], +["dda1","搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼"], +["de40","毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓"], +["dea1","煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"], +["df40","稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯"], +["dfa1","腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤"], +["e040","觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿"], +["e0a1","遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠"], +["e140","凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠"], +["e1a1","寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉"], +["e240","榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊"], +["e2a1","漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓"], +["e340","禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"], +["e3a1","耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"], +["e440","裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍"], +["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘"], +["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉"], +["e5a1","憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒"], +["e640","澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙"], +["e6a1","獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟"], +["e740","膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢"], +["e7a1","蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧"], +["e840","踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓"], +["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮"], +["e940","噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺"], +["e9a1","憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸"], +["ea40","澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙"], +["eaa1","瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘"], +["eb40","蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠"], +["eba1","諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌"], +["ec40","錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕"], +["eca1","魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎"], +["ed40","檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"], +["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞"], +["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞"], +["eea1","謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜"], +["ef40","鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰"], +["efa1","鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶"], +["f040","璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒"], +["f0a1","臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧"], +["f140","蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪"], +["f1a1","鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰"], +["f240","徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛"], +["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕"], +["f340","譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦"], +["f3a1","鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲"], +["f440","嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩"], +["f4a1","禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿"], +["f540","鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛"], +["f5a1","鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥"], +["f640","蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺"], +["f6a1","騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚"], +["f740","糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊"], +["f7a1","驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾"], +["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏"], +["f8a1","齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚"], +["f940","纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊"], +["f9a1","龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"] +] diff --git a/node_modules/iconv-lite/encodings/tables/eucjp.json b/node_modules/iconv-lite/encodings/tables/eucjp.json new file mode 100644 index 0000000..4fa61ca --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/eucjp.json @@ -0,0 +1,182 @@ +[ +["0","\u0000",127], +["8ea1","。",62], +["a1a1"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇"], +["a2a1","◆□■△▲▽▼※〒→←↑↓〓"], +["a2ba","∈∋⊆⊇⊂⊃∪∩"], +["a2ca","∧∨¬⇒⇔∀∃"], +["a2dc","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"], +["a2f2","ʼn♯♭♪†‡¶"], +["a2fe","◯"], +["a3b0","0",9], +["a3c1","A",25], +["a3e1","a",25], +["a4a1","ぁ",82], +["a5a1","ァ",85], +["a6a1","Α",16,"Σ",6], +["a6c1","α",16,"σ",6], +["a7a1","А",5,"ЁЖ",25], +["a7d1","а",5,"ёж",25], +["a8a1","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"], +["ada1","①",19,"Ⅰ",9], +["adc0","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"], +["addf","㍻〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"], +["b0a1","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"], +["b1a1","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応"], +["b2a1","押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"], +["b3a1","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱"], +["b4a1","粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"], +["b5a1","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京"], +["b6a1","供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"], +["b7a1","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲"], +["b8a1","検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"], +["b9a1","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込"], +["baa1","此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"], +["bba1","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時"], +["bca1","次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"], +["bda1","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償"], +["bea1","勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"], +["bfa1","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾"], +["c0a1","澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"], +["c1a1","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎"], +["c2a1","臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"], +["c3a1","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵"], +["c4a1","帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"], +["c5a1","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到"], +["c6a1","董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"], +["c7a1","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦"], +["c8a1","函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"], +["c9a1","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服"], +["caa1","福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"], +["cba1","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満"], +["cca1","漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"], +["cda1","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃"], +["cea1","痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"], +["cfa1","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"], +["d0a1","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"], +["d1a1","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨"], +["d2a1","辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"], +["d3a1","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉"], +["d4a1","圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"], +["d5a1","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓"], +["d6a1","屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"], +["d7a1","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚"], +["d8a1","悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"], +["d9a1","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼"], +["daa1","據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"], +["dba1","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍"], +["dca1","棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"], +["dda1","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾"], +["dea1","沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"], +["dfa1","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼"], +["e0a1","燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"], +["e1a1","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰"], +["e2a1","癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"], +["e3a1","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐"], +["e4a1","筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"], +["e5a1","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺"], +["e6a1","罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"], +["e7a1","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙"], +["e8a1","茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"], +["e9a1","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙"], +["eaa1","蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"], +["eba1","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫"], +["eca1","譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"], +["eda1","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸"], +["eea1","遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"], +["efa1","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞"], +["f0a1","陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"], +["f1a1","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷"], +["f2a1","髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"], +["f3a1","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠"], +["f4a1","堯槇遙瑤凜熙"], +["f9a1","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德"], +["faa1","忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"], +["fba1","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚"], +["fca1","釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"], +["fcf1","ⅰ",9,"¬¦'""], +["8fa2af","˘ˇ¸˙˝¯˛˚~΄΅"], +["8fa2c2","¡¦¿"], +["8fa2eb","ºª©®™¤№"], +["8fa6e1","ΆΈΉΊΪ"], +["8fa6e7","Ό"], +["8fa6e9","ΎΫ"], +["8fa6ec","Ώ"], +["8fa6f1","άέήίϊΐόςύϋΰώ"], +["8fa7c2","Ђ",10,"ЎЏ"], +["8fa7f2","ђ",10,"ўџ"], +["8fa9a1","ÆĐ"], +["8fa9a4","Ħ"], +["8fa9a6","IJ"], +["8fa9a8","ŁĿ"], +["8fa9ab","ŊØŒ"], +["8fa9af","ŦÞ"], +["8fa9c1","æđðħıijĸłŀʼnŋøœßŧþ"], +["8faaa1","ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ"], +["8faaba","ĜĞĢĠĤÍÌÏÎǏİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴÝŸŶŹŽŻ"], +["8faba1","áàäâăǎāąåãćĉčçċďéèëêěėēęǵĝğ"], +["8fabbd","ġĥíìïîǐ"], +["8fabc5","īįĩĵķĺľļńňņñóòöôǒőōõŕřŗśŝšşťţúùüûŭǔűūųůũǘǜǚǖŵýÿŷźžż"], +["8fb0a1","丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄"], +["8fb1a1","侅侉侊侌侎侐侒侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀俁俅俆俈俉俋俌俍俏俒俜俠俢俰俲俼俽俿倀倁倄倇倊倌倎倐倓倗倘倛倜倝倞倢倧倮倰倲倳倵偀偁偂偅偆偊偌偎偑偒偓偗偙偟偠偢偣偦偧偪偭偰偱倻傁傃傄傆傊傎傏傐"], +["8fb2a1","傒傓傔傖傛傜傞",4,"傪傯傰傹傺傽僀僃僄僇僌僎僐僓僔僘僜僝僟僢僤僦僨僩僯僱僶僺僾儃儆儇儈儋儌儍儎僲儐儗儙儛儜儝儞儣儧儨儬儭儯儱儳儴儵儸儹兂兊兏兓兕兗兘兟兤兦兾冃冄冋冎冘冝冡冣冭冸冺冼冾冿凂"], +["8fb3a1","凈减凑凒凓凕凘凞凢凥凮凲凳凴凷刁刂刅划刓刕刖刘刢刨刱刲刵刼剅剉剕剗剘剚剜剟剠剡剦剮剷剸剹劀劂劅劊劌劓劕劖劗劘劚劜劤劥劦劧劯劰劶劷劸劺劻劽勀勄勆勈勌勏勑勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋"], +["8fb4a1","匌匑匓匘匛匜匞匟匥匧匨匩匫匬匭匰匲匵匼匽匾卂卌卋卙卛卡卣卥卬卭卲卹卾厃厇厈厎厓厔厙厝厡厤厪厫厯厲厴厵厷厸厺厽叀叅叏叒叓叕叚叝叞叠另叧叵吂吓吚吡吧吨吪启吱吴吵呃呄呇呍呏呞呢呤呦呧呩呫呭呮呴呿"], +["8fb5a1","咁咃咅咈咉咍咑咕咖咜咟咡咦咧咩咪咭咮咱咷咹咺咻咿哆哊响哎哠哪哬哯哶哼哾哿唀唁唅唈唉唌唍唎唕唪唫唲唵唶唻唼唽啁啇啉啊啍啐啑啘啚啛啞啠啡啤啦啿喁喂喆喈喎喏喑喒喓喔喗喣喤喭喲喿嗁嗃嗆嗉嗋嗌嗎嗑嗒"], +["8fb6a1","嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊嘍",5,"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀噁噃噄噆噉噋噍噏噔噞噠噡噢噣噦噩噭噯噱噲噵嚄嚅嚈嚋嚌嚕嚙嚚嚝嚞嚟嚦嚧嚨嚩嚫嚬嚭嚱嚳嚷嚾囅囉囊囋囏囐囌囍囙囜囝囟囡囤",4,"囱囫园"], +["8fb7a1","囶囷圁圂圇圊圌圑圕圚圛圝圠圢圣圤圥圩圪圬圮圯圳圴圽圾圿坅坆坌坍坒坢坥坧坨坫坭",4,"坳坴坵坷坹坺坻坼坾垁垃垌垔垗垙垚垜垝垞垟垡垕垧垨垩垬垸垽埇埈埌埏埕埝埞埤埦埧埩埭埰埵埶埸埽埾埿堃堄堈堉埡"], +["8fb8a1","堌堍堛堞堟堠堦堧堭堲堹堿塉塌塍塏塐塕塟塡塤塧塨塸塼塿墀墁墇墈墉墊墌墍墏墐墔墖墝墠墡墢墦墩墱墲壄墼壂壈壍壎壐壒壔壖壚壝壡壢壩壳夅夆夋夌夒夓夔虁夝夡夣夤夨夯夰夳夵夶夿奃奆奒奓奙奛奝奞奟奡奣奫奭"], +["8fb9a1","奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧妭妮妯妰妳妷妺妼姁姃姄姈姊姍姒姝姞姟姣姤姧姮姯姱姲姴姷娀娄娌娍娎娒娓娞娣娤娧娨娪娭娰婄婅婇婈婌婐婕婞婣婥婧婭婷婺婻婾媋媐媓媖媙媜媞媟媠媢媧媬媱媲媳媵媸媺媻媿"], +["8fbaa1","嫄嫆嫈嫏嫚嫜嫠嫥嫪嫮嫵嫶嫽嬀嬁嬈嬗嬴嬙嬛嬝嬡嬥嬭嬸孁孋孌孒孖孞孨孮孯孼孽孾孿宁宄宆宊宎宐宑宓宔宖宨宩宬宭宯宱宲宷宺宼寀寁寍寏寖",4,"寠寯寱寴寽尌尗尞尟尣尦尩尫尬尮尰尲尵尶屙屚屜屢屣屧屨屩"], +["8fbba1","屭屰屴屵屺屻屼屽岇岈岊岏岒岝岟岠岢岣岦岪岲岴岵岺峉峋峒峝峗峮峱峲峴崁崆崍崒崫崣崤崦崧崱崴崹崽崿嵂嵃嵆嵈嵕嵑嵙嵊嵟嵠嵡嵢嵤嵪嵭嵰嵹嵺嵾嵿嶁嶃嶈嶊嶒嶓嶔嶕嶙嶛嶟嶠嶧嶫嶰嶴嶸嶹巃巇巋巐巎巘巙巠巤"], +["8fbca1","巩巸巹帀帇帍帒帔帕帘帟帠帮帨帲帵帾幋幐幉幑幖幘幛幜幞幨幪",4,"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜弝弡弢弣弤弨弫弬弮弰弴弶弻弽弿彀彄彅彇彍彐彔彘彛彠彣彤彧"], +["8fbda1","彯彲彴彵彸彺彽彾徉徍徏徖徜徝徢徧徫徤徬徯徰徱徸忄忇忈忉忋忐",4,"忞忡忢忨忩忪忬忭忮忯忲忳忶忺忼怇怊怍怓怔怗怘怚怟怤怭怳怵恀恇恈恉恌恑恔恖恗恝恡恧恱恾恿悂悆悈悊悎悑悓悕悘悝悞悢悤悥您悰悱悷"], +["8fbea1","悻悾惂惄惈惉惊惋惎惏惔惕惙惛惝惞惢惥惲惵惸惼惽愂愇愊愌愐",4,"愖愗愙愜愞愢愪愫愰愱愵愶愷愹慁慅慆慉慞慠慬慲慸慻慼慿憀憁憃憄憋憍憒憓憗憘憜憝憟憠憥憨憪憭憸憹憼懀懁懂懎懏懕懜懝懞懟懡懢懧懩懥"], +["8fbfa1","懬懭懯戁戃戄戇戓戕戜戠戢戣戧戩戫戹戽扂扃扄扆扌扐扑扒扔扖扚扜扤扭扯扳扺扽抍抎抏抐抦抨抳抶抷抺抾抿拄拎拕拖拚拪拲拴拼拽挃挄挊挋挍挐挓挖挘挩挪挭挵挶挹挼捁捂捃捄捆捊捋捎捒捓捔捘捛捥捦捬捭捱捴捵"], +["8fc0a1","捸捼捽捿掂掄掇掊掐掔掕掙掚掞掤掦掭掮掯掽揁揅揈揎揑揓揔揕揜揠揥揪揬揲揳揵揸揹搉搊搐搒搔搘搞搠搢搤搥搩搪搯搰搵搽搿摋摏摑摒摓摔摚摛摜摝摟摠摡摣摭摳摴摻摽撅撇撏撐撑撘撙撛撝撟撡撣撦撨撬撳撽撾撿"], +["8fc1a1","擄擉擊擋擌擎擐擑擕擗擤擥擩擪擭擰擵擷擻擿攁攄攈攉攊攏攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉敐敒敔敟敠敧敫敺敽斁斅斊斒斕斘斝斠斣斦斮斲斳斴斿旂旈旉旎旐旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉昍昑昒昕昖昝"], +["8fc2a1","昞昡昢昣昤昦昩昪昫昬昮昰昱昳昹昷晀晅晆晊晌晑晎晗晘晙晛晜晠晡曻晪晫晬晾晳晵晿晷晸晹晻暀晼暋暌暍暐暒暙暚暛暜暟暠暤暭暱暲暵暻暿曀曂曃曈曌曎曏曔曛曟曨曫曬曮曺朅朇朎朓朙朜朠朢朳朾杅杇杈杌杔杕杝"], +["8fc3a1","杦杬杮杴杶杻极构枎枏枑枓枖枘枙枛枰枱枲枵枻枼枽柹柀柂柃柅柈柉柒柗柙柜柡柦柰柲柶柷桒栔栙栝栟栨栧栬栭栯栰栱栳栻栿桄桅桊桌桕桗桘桛桫桮",4,"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌棏"], +["8fc4a1","棐棑棓棖棙棜棝棥棨棪棫棬棭棰棱棵棶棻棼棽椆椉椊椐椑椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀榍榒榖榘榡榥榦榨榫榭榯榷榸榺榼槅槈槑槖槗槢槥槮槯槱槳槵槾樀樁樃樏樑樕樚樝樠樤樨樰樲"], +["8fc5a1","樴樷樻樾樿橅橆橉橊橎橐橑橒橕橖橛橤橧橪橱橳橾檁檃檆檇檉檋檑檛檝檞檟檥檫檯檰檱檴檽檾檿櫆櫉櫈櫌櫐櫔櫕櫖櫜櫝櫤櫧櫬櫰櫱櫲櫼櫽欂欃欆欇欉欏欐欑欗欛欞欤欨欫欬欯欵欶欻欿歆歊歍歒歖歘歝歠歧歫歮歰歵歽"], +["8fc6a1","歾殂殅殗殛殟殠殢殣殨殩殬殭殮殰殸殹殽殾毃毄毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉氍氎氐氒氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋汍汏汒汔汙汛汜汫汭汯汴汶汸汹汻沅沆沇沉沔沕沗沘沜沟沰沲沴泂泆泍泏泐泑泒泔泖"], +["8fc7a1","泚泜泠泧泩泫泬泮泲泴洄洇洊洎洏洑洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎淏淖淛淝淟淠淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋湏湑湒湓湔湗湜湝湞"], +["8fc8a1","湢湣湨湳湻湽溍溓溙溠溧溭溮溱溳溻溿滀滁滃滇滈滊滍滎滏滫滭滮滹滻滽漄漈漊漌漍漖漘漚漛漦漩漪漯漰漳漶漻漼漭潏潑潒潓潗潙潚潝潞潡潢潨潬潽潾澃澇澈澋澌澍澐澒澓澔澖澚澟澠澥澦澧澨澮澯澰澵澶澼濅濇濈濊"], +["8fc9a1","濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇瀍瀗瀠瀣瀯瀴瀷瀹瀼灃灄灈灉灊灋灔灕灝灞灎灤灥灬灮灵灶灾炁炅炆炔",4,"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃",4,"焋焌焏焞焠焫焭焯焰焱焸煁煅煆煇煊煋煐煒煗煚煜煞煠"], +["8fcaa1","煨煹熀熅熇熌熒熚熛熠熢熯熰熲熳熺熿燀燁燄燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚爝爟爤爫爯爴爸爹牁牂牃牅牎牏牐牓牕牖牚牜牞牠牣牨牫牮牯牱牷牸牻牼牿犄犉犍犎犓犛犨犭犮犱犴犾狁狇狉狌狕狖狘狟狥狳狴狺狻"], +["8fcba1","狾猂猄猅猇猋猍猒猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽獃獍獐獒獖獘獝獞獟獠獦獧獩獫獬獮獯獱獷獹獼玀玁玃玅玆玎玐玓玕玗玘玜玞玟玠玢玥玦玪玫玭玵玷玹玼玽玿珅珆珉珋珌珏珒珓珖珙珝珡珣珦珧珩珴珵珷珹珺珻珽"], +["8fcca1","珿琀琁琄琇琊琑琚琛琤琦琨",9,"琹瑀瑃瑄瑆瑇瑋瑍瑑瑒瑗瑝瑢瑦瑧瑨瑫瑭瑮瑱瑲璀璁璅璆璇璉璏璐璑璒璘璙璚璜璟璠璡璣璦璨璩璪璫璮璯璱璲璵璹璻璿瓈瓉瓌瓐瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆"], +["8fcda1","甒甖甗甠甡甤甧甩甪甯甶甹甽甾甿畀畃畇畈畎畐畒畗畞畟畡畯畱畹",5,"疁疅疐疒疓疕疙疜疢疤疴疺疿痀痁痄痆痌痎痏痗痜痟痠痡痤痧痬痮痯痱痹瘀瘂瘃瘄瘇瘈瘊瘌瘏瘒瘓瘕瘖瘙瘛瘜瘝瘞瘣瘥瘦瘩瘭瘲瘳瘵瘸瘹"], +["8fcea1","瘺瘼癊癀癁癃癄癅癉癋癕癙癟癤癥癭癮癯癱癴皁皅皌皍皕皛皜皝皟皠皢",6,"皪皭皽盁盅盉盋盌盎盔盙盠盦盨盬盰盱盶盹盼眀眆眊眎眒眔眕眗眙眚眜眢眨眭眮眯眴眵眶眹眽眾睂睅睆睊睍睎睏睒睖睗睜睞睟睠睢"], +["8fcfa1","睤睧睪睬睰睲睳睴睺睽瞀瞄瞌瞍瞔瞕瞖瞚瞟瞢瞧瞪瞮瞯瞱瞵瞾矃矉矑矒矕矙矞矟矠矤矦矪矬矰矱矴矸矻砅砆砉砍砎砑砝砡砢砣砭砮砰砵砷硃硄硇硈硌硎硒硜硞硠硡硣硤硨硪确硺硾碊碏碔碘碡碝碞碟碤碨碬碭碰碱碲碳"], +["8fd0a1","碻碽碿磇磈磉磌磎磒磓磕磖磤磛磟磠磡磦磪磲磳礀磶磷磺磻磿礆礌礐礚礜礞礟礠礥礧礩礭礱礴礵礻礽礿祄祅祆祊祋祏祑祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊秏秔秖秚秝秞"], +["8fd1a1","秠秢秥秪秫秭秱秸秼稂稃稇稉稊稌稑稕稛稞稡稧稫稭稯稰稴稵稸稹稺穄穅穇穈穌穕穖穙穜穝穟穠穥穧穪穭穵穸穾窀窂窅窆窊窋窐窑窔窞窠窣窬窳窵窹窻窼竆竉竌竎竑竛竨竩竫竬竱竴竻竽竾笇笔笟笣笧笩笪笫笭笮笯笰"], +["8fd2a1","笱笴笽笿筀筁筇筎筕筠筤筦筩筪筭筯筲筳筷箄箉箎箐箑箖箛箞箠箥箬箯箰箲箵箶箺箻箼箽篂篅篈篊篔篖篗篙篚篛篨篪篲篴篵篸篹篺篼篾簁簂簃簄簆簉簋簌簎簏簙簛簠簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙",5], +["8fd3a1","籡籣籧籩籭籮籰籲籹籼籽粆粇粏粔粞粠粦粰粶粷粺粻粼粿糄糇糈糉糍糏糓糔糕糗糙糚糝糦糩糫糵紃紇紈紉紏紑紒紓紖紝紞紣紦紪紭紱紼紽紾絀絁絇絈絍絑絓絗絙絚絜絝絥絧絪絰絸絺絻絿綁綂綃綅綆綈綋綌綍綑綖綗綝"], +["8fd4a1","綞綦綧綪綳綶綷綹緂",4,"緌緍緎緗緙縀緢緥緦緪緫緭緱緵緶緹緺縈縐縑縕縗縜縝縠縧縨縬縭縯縳縶縿繄繅繇繎繐繒繘繟繡繢繥繫繮繯繳繸繾纁纆纇纊纍纑纕纘纚纝纞缼缻缽缾缿罃罄罇罏罒罓罛罜罝罡罣罤罥罦罭"], +["8fd5a1","罱罽罾罿羀羋羍羏羐羑羖羗羜羡羢羦羪羭羴羼羿翀翃翈翎翏翛翟翣翥翨翬翮翯翲翺翽翾翿耇耈耊耍耎耏耑耓耔耖耝耞耟耠耤耦耬耮耰耴耵耷耹耺耼耾聀聄聠聤聦聭聱聵肁肈肎肜肞肦肧肫肸肹胈胍胏胒胔胕胗胘胠胭胮"], +["8fd6a1","胰胲胳胶胹胺胾脃脋脖脗脘脜脞脠脤脧脬脰脵脺脼腅腇腊腌腒腗腠腡腧腨腩腭腯腷膁膐膄膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎臏臕臗臛臝臞臡臤臫臬臰臱臲臵臶臸臹臽臿舀舃舏舓舔舙舚舝舡舢舨舲舴舺艃艄艅艆"], +["8fd7a1","艋艎艏艑艖艜艠艣艧艭艴艻艽艿芀芁芃芄芇芉芊芎芑芔芖芘芚芛芠芡芣芤芧芨芩芪芮芰芲芴芷芺芼芾芿苆苐苕苚苠苢苤苨苪苭苯苶苷苽苾茀茁茇茈茊茋荔茛茝茞茟茡茢茬茭茮茰茳茷茺茼茽荂荃荄荇荍荎荑荕荖荗荰荸"], +["8fd8a1","荽荿莀莂莄莆莍莒莔莕莘莙莛莜莝莦莧莩莬莾莿菀菇菉菏菐菑菔菝荓菨菪菶菸菹菼萁萆萊萏萑萕萙莭萯萹葅葇葈葊葍葏葑葒葖葘葙葚葜葠葤葥葧葪葰葳葴葶葸葼葽蒁蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌蓏蓓"], +["8fd9a1","蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎蔐蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆蕏",4,"蕖蕙蕜",6,"蕤蕫蕯蕹蕺蕻蕽蕿薁薅薆薉薋薌薏薓薘薝薟薠薢薥薧薴薶薷薸薼薽薾薿藂藇藊藋藎薭藘藚藟藠藦藨藭藳藶藼"], +["8fdaa1","藿蘀蘄蘅蘍蘎蘐蘑蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙虝虠",4,"虩虬虯虵虶虷虺蚍蚑蚖蚘蚚蚜蚡蚦蚧蚨蚭蚱蚳蚴蚵蚷蚸蚹蚿蛀蛁蛃蛅蛑蛒蛕蛗蛚蛜蛠蛣蛥蛧蚈蛺蛼蛽蜄蜅蜇蜋蜎蜏蜐蜓蜔蜙蜞蜟蜡蜣"], +["8fdba1","蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾蝀蝃蝅蝍蝘蝝蝡蝤蝥蝯蝱蝲蝻螃",6,"螋螌螐螓螕螗螘螙螞螠螣螧螬螭螮螱螵螾螿蟁蟈蟉蟊蟎蟕蟖蟙蟚蟜蟟蟢蟣蟤蟪蟫蟭蟱蟳蟸蟺蟿蠁蠃蠆蠉蠊蠋蠐蠙蠒蠓蠔蠘蠚蠛蠜蠞蠟蠨蠭蠮蠰蠲蠵"], +["8fdca1","蠺蠼衁衃衅衈衉衊衋衎衑衕衖衘衚衜衟衠衤衩衱衹衻袀袘袚袛袜袟袠袨袪袺袽袾裀裊",4,"裑裒裓裛裞裧裯裰裱裵裷褁褆褍褎褏褕褖褘褙褚褜褠褦褧褨褰褱褲褵褹褺褾襀襂襅襆襉襏襒襗襚襛襜襡襢襣襫襮襰襳襵襺"], +["8fdda1","襻襼襽覉覍覐覔覕覛覜覟覠覥覰覴覵覶覷覼觔",4,"觥觩觫觭觱觳觶觹觽觿訄訅訇訏訑訒訔訕訞訠訢訤訦訫訬訯訵訷訽訾詀詃詅詇詉詍詎詓詖詗詘詜詝詡詥詧詵詶詷詹詺詻詾詿誀誃誆誋誏誐誒誖誗誙誟誧誩誮誯誳"], +["8fdea1","誶誷誻誾諃諆諈諉諊諑諓諔諕諗諝諟諬諰諴諵諶諼諿謅謆謋謑謜謞謟謊謭謰謷謼譂",4,"譈譒譓譔譙譍譞譣譭譶譸譹譼譾讁讄讅讋讍讏讔讕讜讞讟谸谹谽谾豅豇豉豋豏豑豓豔豗豘豛豝豙豣豤豦豨豩豭豳豵豶豻豾貆"], +["8fdfa1","貇貋貐貒貓貙貛貜貤貹貺賅賆賉賋賏賖賕賙賝賡賨賬賯賰賲賵賷賸賾賿贁贃贉贒贗贛赥赩赬赮赿趂趄趈趍趐趑趕趞趟趠趦趫趬趯趲趵趷趹趻跀跅跆跇跈跊跎跑跔跕跗跙跤跥跧跬跰趼跱跲跴跽踁踄踅踆踋踑踔踖踠踡踢"], +["8fe0a1","踣踦踧踱踳踶踷踸踹踽蹀蹁蹋蹍蹎蹏蹔蹛蹜蹝蹞蹡蹢蹩蹬蹭蹯蹰蹱蹹蹺蹻躂躃躉躐躒躕躚躛躝躞躢躧躩躭躮躳躵躺躻軀軁軃軄軇軏軑軔軜軨軮軰軱軷軹軺軭輀輂輇輈輏輐輖輗輘輞輠輡輣輥輧輨輬輭輮輴輵輶輷輺轀轁"], +["8fe1a1","轃轇轏轑",4,"轘轝轞轥辝辠辡辤辥辦辵辶辸达迀迁迆迊迋迍运迒迓迕迠迣迤迨迮迱迵迶迻迾适逄逈逌逘逛逨逩逯逪逬逭逳逴逷逿遃遄遌遛遝遢遦遧遬遰遴遹邅邈邋邌邎邐邕邗邘邙邛邠邡邢邥邰邲邳邴邶邽郌邾郃"], +["8fe2a1","郄郅郇郈郕郗郘郙郜郝郟郥郒郶郫郯郰郴郾郿鄀鄄鄅鄆鄈鄍鄐鄔鄖鄗鄘鄚鄜鄞鄠鄥鄢鄣鄧鄩鄮鄯鄱鄴鄶鄷鄹鄺鄼鄽酃酇酈酏酓酗酙酚酛酡酤酧酭酴酹酺酻醁醃醅醆醊醎醑醓醔醕醘醞醡醦醨醬醭醮醰醱醲醳醶醻醼醽醿"], +["8fe3a1","釂釃釅釓釔釗釙釚釞釤釥釩釪釬",5,"釷釹釻釽鈀鈁鈄鈅鈆鈇鈉鈊鈌鈐鈒鈓鈖鈘鈜鈝鈣鈤鈥鈦鈨鈮鈯鈰鈳鈵鈶鈸鈹鈺鈼鈾鉀鉂鉃鉆鉇鉊鉍鉎鉏鉑鉘鉙鉜鉝鉠鉡鉥鉧鉨鉩鉮鉯鉰鉵",4,"鉻鉼鉽鉿銈銉銊銍銎銒銗"], +["8fe4a1","銙銟銠銤銥銧銨銫銯銲銶銸銺銻銼銽銿",4,"鋅鋆鋇鋈鋋鋌鋍鋎鋐鋓鋕鋗鋘鋙鋜鋝鋟鋠鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈錍錑錔錕錜錝錞錟錡錤錥錧錩錪錳錴錶錷鍇鍈鍉鍐鍑鍒鍕鍗鍘鍚鍞鍤鍥鍧鍩鍪鍭鍯鍰鍱鍳鍴鍶"], +["8fe5a1","鍺鍽鍿鎀鎁鎂鎈鎊鎋鎍鎏鎒鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩鏁鏄鏅鏆鏇鏉",4,"鏓鏙鏜鏞鏟鏢鏦鏧鏹鏷鏸鏺鏻鏽鐁鐂鐄鐈鐉鐍鐎鐏鐕鐖鐗鐟鐮鐯鐱鐲鐳鐴鐻鐿鐽鑃鑅鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫鑭鑮鑯鑱鑲钄钃镸镹"], +["8fe6a1","镾閄閈閌閍閎閝閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋闐闑闒闓闙闚闝闞闟闠闤闦阝阞阢阤阥阦阬阱阳阷阸阹阺阼阽陁陒陔陖陗陘陡陮陴陻陼陾陿隁隂隃隄隉隑隖隚隝隟隤隥隦隩隮隯隳隺雊雒嶲雘雚雝雞雟雩雯雱雺霂"], +["8fe7a1","霃霅霉霚霛霝霡霢霣霨霱霳靁靃靊靎靏靕靗靘靚靛靣靧靪靮靳靶靷靸靻靽靿鞀鞉鞕鞖鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿韁韄韅韇韉韊韌韍韎韐韑韔韗韘韙韝韞韠韛韡韤韯韱韴韷韸韺頇頊頙頍頎頔頖頜頞頠頣頦"], +["8fe8a1","頫頮頯頰頲頳頵頥頾顄顇顊顑顒顓顖顗顙顚顢顣顥顦顪顬颫颭颮颰颴颷颸颺颻颿飂飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱",4,"餹餺餻餼饀饁饆饇饈饍饎饔饘饙饛饜饞饟饠馛馝馟馦馰馱馲馵"], +["8fe9a1","馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌騐騑騖騞騠騢騣騤騧騭騮騳騵騶騸驇驁驄驊驋驌驎驑驔驖驝骪骬骮骯骲骴骵骶骹骻骾骿髁髃髆髈髎髐髒髕髖髗髛髜髠髤髥髧髩髬髲髳髵髹髺髽髿",4], +["8feaa1","鬄鬅鬈鬉鬋鬌鬍鬎鬐鬒鬖鬙鬛鬜鬠鬦鬫鬭鬳鬴鬵鬷鬹鬺鬽魈魋魌魕魖魗魛魞魡魣魥魦魨魪",4,"魳魵魷魸魹魿鮀鮄鮅鮆鮇鮉鮊鮋鮍鮏鮐鮔鮚鮝鮞鮦鮧鮩鮬鮰鮱鮲鮷鮸鮻鮼鮾鮿鯁鯇鯈鯎鯐鯗鯘鯝鯟鯥鯧鯪鯫鯯鯳鯷鯸"], +["8feba1","鯹鯺鯽鯿鰀鰂鰋鰏鰑鰖鰘鰙鰚鰜鰞鰢鰣鰦",4,"鰱鰵鰶鰷鰽鱁鱃鱄鱅鱉鱊鱎鱏鱐鱓鱔鱖鱘鱛鱝鱞鱟鱣鱩鱪鱜鱫鱨鱮鱰鱲鱵鱷鱻鳦鳲鳷鳹鴋鴂鴑鴗鴘鴜鴝鴞鴯鴰鴲鴳鴴鴺鴼鵅鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻"], +["8feca1","鵼鵾鶃鶄鶆鶊鶍鶎鶒鶓鶕鶖鶗鶘鶡鶪鶬鶮鶱鶵鶹鶼鶿鷃鷇鷉鷊鷔鷕鷖鷗鷚鷞鷟鷠鷥鷧鷩鷫鷮鷰鷳鷴鷾鸊鸂鸇鸎鸐鸑鸒鸕鸖鸙鸜鸝鹺鹻鹼麀麂麃麄麅麇麎麏麖麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬黭黮黰黱黲黵"], +["8feda1","黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃",4,"齓齕齖齗齘齚齝齞齨齩齭",4,"齳齵齺齽龏龐龑龒龔龖龗龞龡龢龣龥"] +] diff --git a/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json b/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json new file mode 100644 index 0000000..85c6934 --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json @@ -0,0 +1 @@ +{"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]} \ No newline at end of file diff --git a/node_modules/iconv-lite/encodings/tables/gbk-added.json b/node_modules/iconv-lite/encodings/tables/gbk-added.json new file mode 100644 index 0000000..8abfa9f --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/gbk-added.json @@ -0,0 +1,55 @@ +[ +["a140","",62], +["a180","",32], +["a240","",62], +["a280","",32], +["a2ab","",5], +["a2e3","€"], +["a2ef",""], +["a2fd",""], +["a340","",62], +["a380","",31," "], +["a440","",62], +["a480","",32], +["a4f4","",10], +["a540","",62], +["a580","",32], +["a5f7","",7], +["a640","",62], +["a680","",32], +["a6b9","",7], +["a6d9","",6], +["a6ec",""], +["a6f3",""], +["a6f6","",8], +["a740","",62], +["a780","",32], +["a7c2","",14], +["a7f2","",12], +["a896","",10], +["a8bc",""], +["a8bf","ǹ"], +["a8c1",""], +["a8ea","",20], +["a958",""], +["a95b",""], +["a95d",""], +["a989","〾⿰",11], +["a997","",12], +["a9f0","",14], +["aaa1","",93], +["aba1","",93], +["aca1","",93], +["ada1","",93], +["aea1","",93], +["afa1","",93], +["d7fa","",4], +["f8a1","",93], +["f9a1","",93], +["faa1","",93], +["fba1","",93], +["fca1","",93], +["fda1","",93], +["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"], +["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93] +] diff --git a/node_modules/iconv-lite/encodings/tables/shiftjis.json b/node_modules/iconv-lite/encodings/tables/shiftjis.json new file mode 100644 index 0000000..5a3a43c --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/shiftjis.json @@ -0,0 +1,125 @@ +[ +["0","\u0000",128], +["a1","。",62], +["8140"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×"], +["8180","÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓"], +["81b8","∈∋⊆⊇⊂⊃∪∩"], +["81c8","∧∨¬⇒⇔∀∃"], +["81da","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"], +["81f0","ʼn♯♭♪†‡¶"], +["81fc","◯"], +["824f","0",9], +["8260","A",25], +["8281","a",25], +["829f","ぁ",82], +["8340","ァ",62], +["8380","ム",22], +["839f","Α",16,"Σ",6], +["83bf","α",16,"σ",6], +["8440","А",5,"ЁЖ",25], +["8470","а",5,"ёж",7], +["8480","о",17], +["849f","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"], +["8740","①",19,"Ⅰ",9], +["875f","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"], +["877e","㍻"], +["8780","〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"], +["889f","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"], +["8940","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円"], +["8980","園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"], +["8a40","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫"], +["8a80","橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"], +["8b40","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救"], +["8b80","朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"], +["8c40","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨"], +["8c80","劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"], +["8d40","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降"], +["8d80","項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"], +["8e40","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止"], +["8e80","死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"], +["8f40","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳"], +["8f80","準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"], +["9040","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨"], +["9080","逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"], +["9140","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻"], +["9180","操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"], +["9240","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄"], +["9280","逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"], +["9340","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬"], +["9380","凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"], +["9440","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅"], +["9480","楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"], +["9540","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷"], +["9580","斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"], +["9640","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆"], +["9680","摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"], +["9740","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲"], +["9780","沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"], +["9840","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"], +["989f","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"], +["9940","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭"], +["9980","凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"], +["9a40","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸"], +["9a80","噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"], +["9b40","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀"], +["9b80","它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"], +["9c40","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠"], +["9c80","怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"], +["9d40","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫"], +["9d80","捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"], +["9e40","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎"], +["9e80","梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"], +["9f40","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯"], +["9f80","麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"], +["e040","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝"], +["e080","烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"], +["e140","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿"], +["e180","痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"], +["e240","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰"], +["e280","窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"], +["e340","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷"], +["e380","縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"], +["e440","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤"], +["e480","艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"], +["e540","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬"], +["e580","蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"], +["e640","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧"], +["e680","諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"], +["e740","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜"], +["e780","轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"], +["e840","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙"], +["e880","閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"], +["e940","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃"], +["e980","騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"], +["ea40","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯"], +["ea80","黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙"], +["ed40","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏"], +["ed80","塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"], +["ee40","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙"], +["ee80","蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"], +["eeef","ⅰ",9,"¬¦'""], +["f040","",62], +["f080","",124], +["f140","",62], +["f180","",124], +["f240","",62], +["f280","",124], +["f340","",62], +["f380","",124], +["f440","",62], +["f480","",124], +["f540","",62], +["f580","",124], +["f640","",62], +["f680","",124], +["f740","",62], +["f780","",124], +["f840","",62], +["f880","",124], +["f940",""], +["fa40","ⅰ",9,"Ⅰ",9,"¬¦'"㈱№℡∵纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊"], +["fa80","兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯"], +["fb40","涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神"], +["fb80","祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙"], +["fc40","髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"] +] diff --git a/node_modules/iconv-lite/encodings/utf16.js b/node_modules/iconv-lite/encodings/utf16.js new file mode 100644 index 0000000..54765ae --- /dev/null +++ b/node_modules/iconv-lite/encodings/utf16.js @@ -0,0 +1,177 @@ +"use strict"; +var Buffer = require("safer-buffer").Buffer; + +// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js + +// == UTF16-BE codec. ========================================================== + +exports.utf16be = Utf16BECodec; +function Utf16BECodec() { +} + +Utf16BECodec.prototype.encoder = Utf16BEEncoder; +Utf16BECodec.prototype.decoder = Utf16BEDecoder; +Utf16BECodec.prototype.bomAware = true; + + +// -- Encoding + +function Utf16BEEncoder() { +} + +Utf16BEEncoder.prototype.write = function(str) { + var buf = Buffer.from(str, 'ucs2'); + for (var i = 0; i < buf.length; i += 2) { + var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp; + } + return buf; +} + +Utf16BEEncoder.prototype.end = function() { +} + + +// -- Decoding + +function Utf16BEDecoder() { + this.overflowByte = -1; +} + +Utf16BEDecoder.prototype.write = function(buf) { + if (buf.length == 0) + return ''; + + var buf2 = Buffer.alloc(buf.length + 1), + i = 0, j = 0; + + if (this.overflowByte !== -1) { + buf2[0] = buf[0]; + buf2[1] = this.overflowByte; + i = 1; j = 2; + } + + for (; i < buf.length-1; i += 2, j+= 2) { + buf2[j] = buf[i+1]; + buf2[j+1] = buf[i]; + } + + this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1; + + return buf2.slice(0, j).toString('ucs2'); +} + +Utf16BEDecoder.prototype.end = function() { +} + + +// == UTF-16 codec ============================================================= +// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic. +// Defaults to UTF-16LE, as it's prevalent and default in Node. +// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le +// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'}); + +// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false). + +exports.utf16 = Utf16Codec; +function Utf16Codec(codecOptions, iconv) { + this.iconv = iconv; +} + +Utf16Codec.prototype.encoder = Utf16Encoder; +Utf16Codec.prototype.decoder = Utf16Decoder; + + +// -- Encoding (pass-through) + +function Utf16Encoder(options, codec) { + options = options || {}; + if (options.addBOM === undefined) + options.addBOM = true; + this.encoder = codec.iconv.getEncoder('utf-16le', options); +} + +Utf16Encoder.prototype.write = function(str) { + return this.encoder.write(str); +} + +Utf16Encoder.prototype.end = function() { + return this.encoder.end(); +} + + +// -- Decoding + +function Utf16Decoder(options, codec) { + this.decoder = null; + this.initialBytes = []; + this.initialBytesLen = 0; + + this.options = options || {}; + this.iconv = codec.iconv; +} + +Utf16Decoder.prototype.write = function(buf) { + if (!this.decoder) { + // Codec is not chosen yet. Accumulate initial bytes. + this.initialBytes.push(buf); + this.initialBytesLen += buf.length; + + if (this.initialBytesLen < 16) // We need more bytes to use space heuristic (see below) + return ''; + + // We have enough bytes -> detect endianness. + var buf = Buffer.concat(this.initialBytes), + encoding = detectEncoding(buf, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + this.initialBytes.length = this.initialBytesLen = 0; + } + + return this.decoder.write(buf); +} + +Utf16Decoder.prototype.end = function() { + if (!this.decoder) { + var buf = Buffer.concat(this.initialBytes), + encoding = detectEncoding(buf, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + + var res = this.decoder.write(buf), + trail = this.decoder.end(); + + return trail ? (res + trail) : res; + } + return this.decoder.end(); +} + +function detectEncoding(buf, defaultEncoding) { + var enc = defaultEncoding || 'utf-16le'; + + if (buf.length >= 2) { + // Check BOM. + if (buf[0] == 0xFE && buf[1] == 0xFF) // UTF-16BE BOM + enc = 'utf-16be'; + else if (buf[0] == 0xFF && buf[1] == 0xFE) // UTF-16LE BOM + enc = 'utf-16le'; + else { + // No BOM found. Try to deduce encoding from initial content. + // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon. + // So, we count ASCII as if it was LE or BE, and decide from that. + var asciiCharsLE = 0, asciiCharsBE = 0, // Counts of chars in both positions + _len = Math.min(buf.length - (buf.length % 2), 64); // Len is always even. + + for (var i = 0; i < _len; i += 2) { + if (buf[i] === 0 && buf[i+1] !== 0) asciiCharsBE++; + if (buf[i] !== 0 && buf[i+1] === 0) asciiCharsLE++; + } + + if (asciiCharsBE > asciiCharsLE) + enc = 'utf-16be'; + else if (asciiCharsBE < asciiCharsLE) + enc = 'utf-16le'; + } + } + + return enc; +} + + diff --git a/node_modules/iconv-lite/encodings/utf7.js b/node_modules/iconv-lite/encodings/utf7.js new file mode 100644 index 0000000..b7631c2 --- /dev/null +++ b/node_modules/iconv-lite/encodings/utf7.js @@ -0,0 +1,290 @@ +"use strict"; +var Buffer = require("safer-buffer").Buffer; + +// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152 +// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3 + +exports.utf7 = Utf7Codec; +exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7 +function Utf7Codec(codecOptions, iconv) { + this.iconv = iconv; +}; + +Utf7Codec.prototype.encoder = Utf7Encoder; +Utf7Codec.prototype.decoder = Utf7Decoder; +Utf7Codec.prototype.bomAware = true; + + +// -- Encoding + +var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g; + +function Utf7Encoder(options, codec) { + this.iconv = codec.iconv; +} + +Utf7Encoder.prototype.write = function(str) { + // Naive implementation. + // Non-direct chars are encoded as "+-"; single "+" char is encoded as "+-". + return Buffer.from(str.replace(nonDirectChars, function(chunk) { + return "+" + (chunk === '+' ? '' : + this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, '')) + + "-"; + }.bind(this))); +} + +Utf7Encoder.prototype.end = function() { +} + + +// -- Decoding + +function Utf7Decoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = ''; +} + +var base64Regex = /[A-Za-z0-9\/+]/; +var base64Chars = []; +for (var i = 0; i < 256; i++) + base64Chars[i] = base64Regex.test(String.fromCharCode(i)); + +var plusChar = '+'.charCodeAt(0), + minusChar = '-'.charCodeAt(0), + andChar = '&'.charCodeAt(0); + +Utf7Decoder.prototype.write = function(buf) { + var res = "", lastI = 0, + inBase64 = this.inBase64, + base64Accum = this.base64Accum; + + // The decoder is more involved as we must handle chunks in stream. + + for (var i = 0; i < buf.length; i++) { + if (!inBase64) { // We're in direct mode. + // Write direct chars until '+' + if (buf[i] == plusChar) { + res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. + lastI = i+1; + inBase64 = true; + } + } else { // We decode base64. + if (!base64Chars[buf[i]]) { // Base64 ended. + if (i == lastI && buf[i] == minusChar) {// "+-" -> "+" + res += "+"; + } else { + var b64str = base64Accum + buf.slice(lastI, i).toString(); + res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); + } + + if (buf[i] != minusChar) // Minus is absorbed after base64. + i--; + + lastI = i+1; + inBase64 = false; + base64Accum = ''; + } + } + } + + if (!inBase64) { + res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. + } else { + var b64str = base64Accum + buf.slice(lastI).toString(); + + var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. + base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. + b64str = b64str.slice(0, canBeDecoded); + + res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); + } + + this.inBase64 = inBase64; + this.base64Accum = base64Accum; + + return res; +} + +Utf7Decoder.prototype.end = function() { + var res = ""; + if (this.inBase64 && this.base64Accum.length > 0) + res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); + + this.inBase64 = false; + this.base64Accum = ''; + return res; +} + + +// UTF-7-IMAP codec. +// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3) +// Differences: +// * Base64 part is started by "&" instead of "+" +// * Direct characters are 0x20-0x7E, except "&" (0x26) +// * In Base64, "," is used instead of "/" +// * Base64 must not be used to represent direct characters. +// * No implicit shift back from Base64 (should always end with '-') +// * String must end in non-shifted position. +// * "-&" while in base64 is not allowed. + + +exports.utf7imap = Utf7IMAPCodec; +function Utf7IMAPCodec(codecOptions, iconv) { + this.iconv = iconv; +}; + +Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder; +Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder; +Utf7IMAPCodec.prototype.bomAware = true; + + +// -- Encoding + +function Utf7IMAPEncoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = Buffer.alloc(6); + this.base64AccumIdx = 0; +} + +Utf7IMAPEncoder.prototype.write = function(str) { + var inBase64 = this.inBase64, + base64Accum = this.base64Accum, + base64AccumIdx = this.base64AccumIdx, + buf = Buffer.alloc(str.length*5 + 10), bufIdx = 0; + + for (var i = 0; i < str.length; i++) { + var uChar = str.charCodeAt(i); + if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'. + if (inBase64) { + if (base64AccumIdx > 0) { + bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); + base64AccumIdx = 0; + } + + buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. + inBase64 = false; + } + + if (!inBase64) { + buf[bufIdx++] = uChar; // Write direct character + + if (uChar === andChar) // Ampersand -> '&-' + buf[bufIdx++] = minusChar; + } + + } else { // Non-direct character + if (!inBase64) { + buf[bufIdx++] = andChar; // Write '&', then go to base64 mode. + inBase64 = true; + } + if (inBase64) { + base64Accum[base64AccumIdx++] = uChar >> 8; + base64Accum[base64AccumIdx++] = uChar & 0xFF; + + if (base64AccumIdx == base64Accum.length) { + bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx); + base64AccumIdx = 0; + } + } + } + } + + this.inBase64 = inBase64; + this.base64AccumIdx = base64AccumIdx; + + return buf.slice(0, bufIdx); +} + +Utf7IMAPEncoder.prototype.end = function() { + var buf = Buffer.alloc(10), bufIdx = 0; + if (this.inBase64) { + if (this.base64AccumIdx > 0) { + bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); + this.base64AccumIdx = 0; + } + + buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. + this.inBase64 = false; + } + + return buf.slice(0, bufIdx); +} + + +// -- Decoding + +function Utf7IMAPDecoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = ''; +} + +var base64IMAPChars = base64Chars.slice(); +base64IMAPChars[','.charCodeAt(0)] = true; + +Utf7IMAPDecoder.prototype.write = function(buf) { + var res = "", lastI = 0, + inBase64 = this.inBase64, + base64Accum = this.base64Accum; + + // The decoder is more involved as we must handle chunks in stream. + // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end). + + for (var i = 0; i < buf.length; i++) { + if (!inBase64) { // We're in direct mode. + // Write direct chars until '&' + if (buf[i] == andChar) { + res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. + lastI = i+1; + inBase64 = true; + } + } else { // We decode base64. + if (!base64IMAPChars[buf[i]]) { // Base64 ended. + if (i == lastI && buf[i] == minusChar) { // "&-" -> "&" + res += "&"; + } else { + var b64str = base64Accum + buf.slice(lastI, i).toString().replace(/,/g, '/'); + res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); + } + + if (buf[i] != minusChar) // Minus may be absorbed after base64. + i--; + + lastI = i+1; + inBase64 = false; + base64Accum = ''; + } + } + } + + if (!inBase64) { + res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. + } else { + var b64str = base64Accum + buf.slice(lastI).toString().replace(/,/g, '/'); + + var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. + base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. + b64str = b64str.slice(0, canBeDecoded); + + res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); + } + + this.inBase64 = inBase64; + this.base64Accum = base64Accum; + + return res; +} + +Utf7IMAPDecoder.prototype.end = function() { + var res = ""; + if (this.inBase64 && this.base64Accum.length > 0) + res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); + + this.inBase64 = false; + this.base64Accum = ''; + return res; +} + + diff --git a/node_modules/iconv-lite/lib/bom-handling.js b/node_modules/iconv-lite/lib/bom-handling.js new file mode 100644 index 0000000..1050872 --- /dev/null +++ b/node_modules/iconv-lite/lib/bom-handling.js @@ -0,0 +1,52 @@ +"use strict"; + +var BOMChar = '\uFEFF'; + +exports.PrependBOM = PrependBOMWrapper +function PrependBOMWrapper(encoder, options) { + this.encoder = encoder; + this.addBOM = true; +} + +PrependBOMWrapper.prototype.write = function(str) { + if (this.addBOM) { + str = BOMChar + str; + this.addBOM = false; + } + + return this.encoder.write(str); +} + +PrependBOMWrapper.prototype.end = function() { + return this.encoder.end(); +} + + +//------------------------------------------------------------------------------ + +exports.StripBOM = StripBOMWrapper; +function StripBOMWrapper(decoder, options) { + this.decoder = decoder; + this.pass = false; + this.options = options || {}; +} + +StripBOMWrapper.prototype.write = function(buf) { + var res = this.decoder.write(buf); + if (this.pass || !res) + return res; + + if (res[0] === BOMChar) { + res = res.slice(1); + if (typeof this.options.stripBOM === 'function') + this.options.stripBOM(); + } + + this.pass = true; + return res; +} + +StripBOMWrapper.prototype.end = function() { + return this.decoder.end(); +} + diff --git a/node_modules/iconv-lite/lib/extend-node.js b/node_modules/iconv-lite/lib/extend-node.js new file mode 100644 index 0000000..87f5394 --- /dev/null +++ b/node_modules/iconv-lite/lib/extend-node.js @@ -0,0 +1,217 @@ +"use strict"; +var Buffer = require("buffer").Buffer; +// Note: not polyfilled with safer-buffer on a purpose, as overrides Buffer + +// == Extend Node primitives to use iconv-lite ================================= + +module.exports = function (iconv) { + var original = undefined; // Place to keep original methods. + + // Node authors rewrote Buffer internals to make it compatible with + // Uint8Array and we cannot patch key functions since then. + // Note: this does use older Buffer API on a purpose + iconv.supportsNodeEncodingsExtension = !(Buffer.from || new Buffer(0) instanceof Uint8Array); + + iconv.extendNodeEncodings = function extendNodeEncodings() { + if (original) return; + original = {}; + + if (!iconv.supportsNodeEncodingsExtension) { + console.error("ACTION NEEDED: require('iconv-lite').extendNodeEncodings() is not supported in your version of Node"); + console.error("See more info at https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility"); + return; + } + + var nodeNativeEncodings = { + 'hex': true, 'utf8': true, 'utf-8': true, 'ascii': true, 'binary': true, + 'base64': true, 'ucs2': true, 'ucs-2': true, 'utf16le': true, 'utf-16le': true, + }; + + Buffer.isNativeEncoding = function(enc) { + return enc && nodeNativeEncodings[enc.toLowerCase()]; + } + + // -- SlowBuffer ----------------------------------------------------------- + var SlowBuffer = require('buffer').SlowBuffer; + + original.SlowBufferToString = SlowBuffer.prototype.toString; + SlowBuffer.prototype.toString = function(encoding, start, end) { + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.SlowBufferToString.call(this, encoding, start, end); + + // Otherwise, use our decoding method. + if (typeof start == 'undefined') start = 0; + if (typeof end == 'undefined') end = this.length; + return iconv.decode(this.slice(start, end), encoding); + } + + original.SlowBufferWrite = SlowBuffer.prototype.write; + SlowBuffer.prototype.write = function(string, offset, length, encoding) { + // Support both (string, offset, length, encoding) + // and the legacy (string, encoding, offset, length) + if (isFinite(offset)) { + if (!isFinite(length)) { + encoding = length; + length = undefined; + } + } else { // legacy + var swap = encoding; + encoding = offset; + offset = length; + length = swap; + } + + offset = +offset || 0; + var remaining = this.length - offset; + if (!length) { + length = remaining; + } else { + length = +length; + if (length > remaining) { + length = remaining; + } + } + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.SlowBufferWrite.call(this, string, offset, length, encoding); + + if (string.length > 0 && (length < 0 || offset < 0)) + throw new RangeError('attempt to write beyond buffer bounds'); + + // Otherwise, use our encoding method. + var buf = iconv.encode(string, encoding); + if (buf.length < length) length = buf.length; + buf.copy(this, offset, 0, length); + return length; + } + + // -- Buffer --------------------------------------------------------------- + + original.BufferIsEncoding = Buffer.isEncoding; + Buffer.isEncoding = function(encoding) { + return Buffer.isNativeEncoding(encoding) || iconv.encodingExists(encoding); + } + + original.BufferByteLength = Buffer.byteLength; + Buffer.byteLength = SlowBuffer.byteLength = function(str, encoding) { + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.BufferByteLength.call(this, str, encoding); + + // Slow, I know, but we don't have a better way yet. + return iconv.encode(str, encoding).length; + } + + original.BufferToString = Buffer.prototype.toString; + Buffer.prototype.toString = function(encoding, start, end) { + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.BufferToString.call(this, encoding, start, end); + + // Otherwise, use our decoding method. + if (typeof start == 'undefined') start = 0; + if (typeof end == 'undefined') end = this.length; + return iconv.decode(this.slice(start, end), encoding); + } + + original.BufferWrite = Buffer.prototype.write; + Buffer.prototype.write = function(string, offset, length, encoding) { + var _offset = offset, _length = length, _encoding = encoding; + // Support both (string, offset, length, encoding) + // and the legacy (string, encoding, offset, length) + if (isFinite(offset)) { + if (!isFinite(length)) { + encoding = length; + length = undefined; + } + } else { // legacy + var swap = encoding; + encoding = offset; + offset = length; + length = swap; + } + + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.BufferWrite.call(this, string, _offset, _length, _encoding); + + offset = +offset || 0; + var remaining = this.length - offset; + if (!length) { + length = remaining; + } else { + length = +length; + if (length > remaining) { + length = remaining; + } + } + + if (string.length > 0 && (length < 0 || offset < 0)) + throw new RangeError('attempt to write beyond buffer bounds'); + + // Otherwise, use our encoding method. + var buf = iconv.encode(string, encoding); + if (buf.length < length) length = buf.length; + buf.copy(this, offset, 0, length); + return length; + + // TODO: Set _charsWritten. + } + + + // -- Readable ------------------------------------------------------------- + if (iconv.supportsStreams) { + var Readable = require('stream').Readable; + + original.ReadableSetEncoding = Readable.prototype.setEncoding; + Readable.prototype.setEncoding = function setEncoding(enc, options) { + // Use our own decoder, it has the same interface. + // We cannot use original function as it doesn't handle BOM-s. + this._readableState.decoder = iconv.getDecoder(enc, options); + this._readableState.encoding = enc; + } + + Readable.prototype.collect = iconv._collect; + } + } + + // Remove iconv-lite Node primitive extensions. + iconv.undoExtendNodeEncodings = function undoExtendNodeEncodings() { + if (!iconv.supportsNodeEncodingsExtension) + return; + if (!original) + throw new Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.") + + delete Buffer.isNativeEncoding; + + var SlowBuffer = require('buffer').SlowBuffer; + + SlowBuffer.prototype.toString = original.SlowBufferToString; + SlowBuffer.prototype.write = original.SlowBufferWrite; + + Buffer.isEncoding = original.BufferIsEncoding; + Buffer.byteLength = original.BufferByteLength; + Buffer.prototype.toString = original.BufferToString; + Buffer.prototype.write = original.BufferWrite; + + if (iconv.supportsStreams) { + var Readable = require('stream').Readable; + + Readable.prototype.setEncoding = original.ReadableSetEncoding; + delete Readable.prototype.collect; + } + + original = undefined; + } +} diff --git a/node_modules/iconv-lite/lib/index.d.ts b/node_modules/iconv-lite/lib/index.d.ts new file mode 100644 index 0000000..0547eb3 --- /dev/null +++ b/node_modules/iconv-lite/lib/index.d.ts @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + * REQUIREMENT: This definition is dependent on the @types/node definition. + * Install with `npm install @types/node --save-dev` + *--------------------------------------------------------------------------------------------*/ + +declare module 'iconv-lite' { + export function decode(buffer: Buffer, encoding: string, options?: Options): string; + + export function encode(content: string, encoding: string, options?: Options): Buffer; + + export function encodingExists(encoding: string): boolean; + + export function decodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; + + export function encodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; +} + +export interface Options { + stripBOM?: boolean; + addBOM?: boolean; + defaultEncoding?: string; +} diff --git a/node_modules/iconv-lite/lib/index.js b/node_modules/iconv-lite/lib/index.js new file mode 100644 index 0000000..5391919 --- /dev/null +++ b/node_modules/iconv-lite/lib/index.js @@ -0,0 +1,153 @@ +"use strict"; + +// Some environments don't have global Buffer (e.g. React Native). +// Solution would be installing npm modules "buffer" and "stream" explicitly. +var Buffer = require("safer-buffer").Buffer; + +var bomHandling = require("./bom-handling"), + iconv = module.exports; + +// All codecs and aliases are kept here, keyed by encoding name/alias. +// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`. +iconv.encodings = null; + +// Characters emitted in case of error. +iconv.defaultCharUnicode = '�'; +iconv.defaultCharSingleByte = '?'; + +// Public API. +iconv.encode = function encode(str, encoding, options) { + str = "" + (str || ""); // Ensure string. + + var encoder = iconv.getEncoder(encoding, options); + + var res = encoder.write(str); + var trail = encoder.end(); + + return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res; +} + +iconv.decode = function decode(buf, encoding, options) { + if (typeof buf === 'string') { + if (!iconv.skipDecodeWarning) { + console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding'); + iconv.skipDecodeWarning = true; + } + + buf = Buffer.from("" + (buf || ""), "binary"); // Ensure buffer. + } + + var decoder = iconv.getDecoder(encoding, options); + + var res = decoder.write(buf); + var trail = decoder.end(); + + return trail ? (res + trail) : res; +} + +iconv.encodingExists = function encodingExists(enc) { + try { + iconv.getCodec(enc); + return true; + } catch (e) { + return false; + } +} + +// Legacy aliases to convert functions +iconv.toEncoding = iconv.encode; +iconv.fromEncoding = iconv.decode; + +// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache. +iconv._codecDataCache = {}; +iconv.getCodec = function getCodec(encoding) { + if (!iconv.encodings) + iconv.encodings = require("../encodings"); // Lazy load all encoding definitions. + + // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. + var enc = iconv._canonicalizeEncoding(encoding); + + // Traverse iconv.encodings to find actual codec. + var codecOptions = {}; + while (true) { + var codec = iconv._codecDataCache[enc]; + if (codec) + return codec; + + var codecDef = iconv.encodings[enc]; + + switch (typeof codecDef) { + case "string": // Direct alias to other encoding. + enc = codecDef; + break; + + case "object": // Alias with options. Can be layered. + for (var key in codecDef) + codecOptions[key] = codecDef[key]; + + if (!codecOptions.encodingName) + codecOptions.encodingName = enc; + + enc = codecDef.type; + break; + + case "function": // Codec itself. + if (!codecOptions.encodingName) + codecOptions.encodingName = enc; + + // The codec function must load all tables and return object with .encoder and .decoder methods. + // It'll be called only once (for each different options object). + codec = new codecDef(codecOptions, iconv); + + iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later. + return codec; + + default: + throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')"); + } + } +} + +iconv._canonicalizeEncoding = function(encoding) { + // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. + return (''+encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, ""); +} + +iconv.getEncoder = function getEncoder(encoding, options) { + var codec = iconv.getCodec(encoding), + encoder = new codec.encoder(options, codec); + + if (codec.bomAware && options && options.addBOM) + encoder = new bomHandling.PrependBOM(encoder, options); + + return encoder; +} + +iconv.getDecoder = function getDecoder(encoding, options) { + var codec = iconv.getCodec(encoding), + decoder = new codec.decoder(options, codec); + + if (codec.bomAware && !(options && options.stripBOM === false)) + decoder = new bomHandling.StripBOM(decoder, options); + + return decoder; +} + + +// Load extensions in Node. All of them are omitted in Browserify build via 'browser' field in package.json. +var nodeVer = typeof process !== 'undefined' && process.versions && process.versions.node; +if (nodeVer) { + + // Load streaming support in Node v0.10+ + var nodeVerArr = nodeVer.split(".").map(Number); + if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) { + require("./streams")(iconv); + } + + // Load Node primitive extensions. + require("./extend-node")(iconv); +} + +if ("Ā" != "\u0100") { + console.error("iconv-lite warning: javascript files use encoding different from utf-8. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info."); +} diff --git a/node_modules/iconv-lite/lib/streams.js b/node_modules/iconv-lite/lib/streams.js new file mode 100644 index 0000000..4409552 --- /dev/null +++ b/node_modules/iconv-lite/lib/streams.js @@ -0,0 +1,121 @@ +"use strict"; + +var Buffer = require("buffer").Buffer, + Transform = require("stream").Transform; + + +// == Exports ================================================================== +module.exports = function(iconv) { + + // Additional Public API. + iconv.encodeStream = function encodeStream(encoding, options) { + return new IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options); + } + + iconv.decodeStream = function decodeStream(encoding, options) { + return new IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options); + } + + iconv.supportsStreams = true; + + + // Not published yet. + iconv.IconvLiteEncoderStream = IconvLiteEncoderStream; + iconv.IconvLiteDecoderStream = IconvLiteDecoderStream; + iconv._collect = IconvLiteDecoderStream.prototype.collect; +}; + + +// == Encoder stream ======================================================= +function IconvLiteEncoderStream(conv, options) { + this.conv = conv; + options = options || {}; + options.decodeStrings = false; // We accept only strings, so we don't need to decode them. + Transform.call(this, options); +} + +IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { + constructor: { value: IconvLiteEncoderStream } +}); + +IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { + if (typeof chunk != 'string') + return done(new Error("Iconv encoding stream needs strings as its input.")); + try { + var res = this.conv.write(chunk); + if (res && res.length) this.push(res); + done(); + } + catch (e) { + done(e); + } +} + +IconvLiteEncoderStream.prototype._flush = function(done) { + try { + var res = this.conv.end(); + if (res && res.length) this.push(res); + done(); + } + catch (e) { + done(e); + } +} + +IconvLiteEncoderStream.prototype.collect = function(cb) { + var chunks = []; + this.on('error', cb); + this.on('data', function(chunk) { chunks.push(chunk); }); + this.on('end', function() { + cb(null, Buffer.concat(chunks)); + }); + return this; +} + + +// == Decoder stream ======================================================= +function IconvLiteDecoderStream(conv, options) { + this.conv = conv; + options = options || {}; + options.encoding = this.encoding = 'utf8'; // We output strings. + Transform.call(this, options); +} + +IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { + constructor: { value: IconvLiteDecoderStream } +}); + +IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { + if (!Buffer.isBuffer(chunk)) + return done(new Error("Iconv decoding stream needs buffers as its input.")); + try { + var res = this.conv.write(chunk); + if (res && res.length) this.push(res, this.encoding); + done(); + } + catch (e) { + done(e); + } +} + +IconvLiteDecoderStream.prototype._flush = function(done) { + try { + var res = this.conv.end(); + if (res && res.length) this.push(res, this.encoding); + done(); + } + catch (e) { + done(e); + } +} + +IconvLiteDecoderStream.prototype.collect = function(cb) { + var res = ''; + this.on('error', cb); + this.on('data', function(chunk) { res += chunk; }); + this.on('end', function() { + cb(null, res); + }); + return this; +} + diff --git a/node_modules/iconv-lite/package.json b/node_modules/iconv-lite/package.json new file mode 100644 index 0000000..a7c74fc --- /dev/null +++ b/node_modules/iconv-lite/package.json @@ -0,0 +1,46 @@ +{ + "name": "iconv-lite", + "description": "Convert character encodings in pure javascript.", + "version": "0.4.24", + "license": "MIT", + "keywords": [ + "iconv", + "convert", + "charset", + "icu" + ], + "author": "Alexander Shtuchkin ", + "main": "./lib/index.js", + "typings": "./lib/index.d.ts", + "homepage": "https://github.com/ashtuchkin/iconv-lite", + "bugs": "https://github.com/ashtuchkin/iconv-lite/issues", + "repository": { + "type": "git", + "url": "git://github.com/ashtuchkin/iconv-lite.git" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "coverage": "istanbul cover _mocha -- --grep .", + "coverage-open": "open coverage/lcov-report/index.html", + "test": "mocha --reporter spec --grep ." + }, + "browser": { + "./lib/extend-node": false, + "./lib/streams": false + }, + "devDependencies": { + "mocha": "^3.1.0", + "request": "~2.87.0", + "unorm": "*", + "errto": "*", + "async": "*", + "istanbul": "*", + "semver": "*", + "iconv": "*" + }, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + } +} diff --git a/node_modules/is-potential-custom-element-name/LICENSE-MIT.txt b/node_modules/is-potential-custom-element-name/LICENSE-MIT.txt new file mode 100644 index 0000000..a41e0a7 --- /dev/null +++ b/node_modules/is-potential-custom-element-name/LICENSE-MIT.txt @@ -0,0 +1,20 @@ +Copyright Mathias Bynens + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/is-potential-custom-element-name/README.md b/node_modules/is-potential-custom-element-name/README.md new file mode 100644 index 0000000..85a35a5 --- /dev/null +++ b/node_modules/is-potential-custom-element-name/README.md @@ -0,0 +1,40 @@ +# is-potential-custom-element-name [![Build status](https://travis-ci.org/mathiasbynens/is-potential-custom-element-name.svg?branch=master)](https://travis-ci.org/mathiasbynens/is-potential-custom-element-name) + +_is-potential-custom-element-name_ checks whether a given string matches [the `PotentialCustomElementName` production](https://html.spec.whatwg.org/multipage/scripting.html#prod-potentialcustomelementname) as defined in the HTML Standard. + +## Installation + +To use _is-potential-custom-element-name_ programmatically, install it as a dependency via [npm](https://www.npmjs.com/): + +```bash +$ npm install is-potential-custom-element-name +``` + +Then, `require` it: + +```js +const isPotentialCustomElementName = require('is-potential-custom-element-name'); +``` + +## Usage + +```js +isPotentialCustomElementName('foo-bar'); +// → true +isPotentialCustomElementName('Foo-bar'); +// → false +isPotentialCustomElementName('baz-©'); +// → false +isPotentialCustomElementName('annotation-xml'); +// → true +``` + +## Author + +| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | +|---| +| [Mathias Bynens](https://mathiasbynens.be/) | + +## License + +_is-potential-custom-element-name_ is available under the [MIT](https://mths.be/mit) license. diff --git a/node_modules/is-potential-custom-element-name/index.js b/node_modules/is-potential-custom-element-name/index.js new file mode 100644 index 0000000..71417c6 --- /dev/null +++ b/node_modules/is-potential-custom-element-name/index.js @@ -0,0 +1,9 @@ +// Generated using `npm run build`. Do not edit. + +var regex = /^[a-z](?:[\.0-9_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*-(?:[\x2D\.0-9_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/; + +var isPotentialCustomElementName = function(string) { + return regex.test(string); +}; + +module.exports = isPotentialCustomElementName; diff --git a/node_modules/is-potential-custom-element-name/package.json b/node_modules/is-potential-custom-element-name/package.json new file mode 100644 index 0000000..440a783 --- /dev/null +++ b/node_modules/is-potential-custom-element-name/package.json @@ -0,0 +1,35 @@ +{ + "name": "is-potential-custom-element-name", + "version": "1.0.1", + "description": "Check whether a given string matches the `PotentialCustomElementName` production as defined in the HTML Standard.", + "homepage": "https://github.com/mathiasbynens/is-potential-custom-element-name", + "main": "index.js", + "files": [ + "LICENSE-MIT.txt", + "index.js" + ], + "keywords": [ + "html", + "custom element", + "custom element name", + "web components" + ], + "license": "MIT", + "author": { + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + }, + "repository": { + "type": "git", + "url": "https://github.com/mathiasbynens/is-potential-custom-element-name.git" + }, + "bugs": "https://github.com/mathiasbynens/is-potential-custom-element-name/issues", + "devDependencies": { + "mocha": "^2.2.1", + "regenerate": "^1.4.2" + }, + "scripts": { + "build": "node build.js", + "test": "mocha" + } +} diff --git a/node_modules/jsdom/Changelog.md b/node_modules/jsdom/Changelog.md new file mode 100644 index 0000000..f1e74fd --- /dev/null +++ b/node_modules/jsdom/Changelog.md @@ -0,0 +1,1879 @@ +# jsdom Changelog + + + +## 16.6.0 + +* Added `parentNode.replaceChildren()`. (ninevra) +* Fixed jsdom's handling of when code running inside the jsdom throws `null` or `undefined` as an exception. (mbest) +* Removed the dependency on the deprecated [`request`](https://www.npmjs.com/package/request) package, in the process fixing several issues with the `XMLHttpRequest` implementation around header processing. Special thanks to vegardbb for completing this months-long effort! + +## 16.5.3 + +* Fixed infinite recursion when using `MutationObserver`s to observe elements inside a `MutationObserver` callback. + +## 16.5.2 + +* Fixed `Access-Control-Allow-Headers: *` to work with `XMLHttpRequest`. (silviot) +* Fixed `xhr.response` to strip any leading BOM when `xhr.responseType` is `"json"`. +* Fixed `new Text()` and `new Comment()` constructors to properly set the resulting node's `ownerDocument`. +* Fixed `customElements.whenDefined()` to resolve its returned promise with the custom element constructor, per recent spec updates. (ExE-Boss) +* Fixed parsing to ensure that `` does not throw an exception, but instead correctly produces a SVG-namespace `