attractor-javascript 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +16 -0
- data/Gemfile +4 -0
- data/README.md +138 -0
- data/Rakefile +16 -0
- data/attractor-javascript.gemspec +47 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/dist/calculator.bundle.js +1 -0
- data/lib/attractor/calculators/js_calculator.rb +18 -0
- data/lib/attractor/detectors/js_detector.rb +11 -0
- data/lib/attractor/javascript.rb +16 -0
- data/lib/attractor/javascript/version.rb +5 -0
- metadata +185 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1528992ae2575fb6886bd6b3549b22582f4153db2cb0bde884155ddb5157dd53
|
4
|
+
data.tar.gz: c11800ee9e42402f991d1f682207056dda08d004bfb090dc087b3f45aa7897b6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ea085c7e4a9b7c635740bd5901c733c0eaa7c222e629d3837a264459d71997e3607779d99c71a0cb18747cbe167d67fcaba0340f8bd00bfbc29b0e131ae4b2cc
|
7
|
+
data.tar.gz: 70b458860642e18ffe7bf8b93ae12839c518465f54f100ec95c60cbe2dd8fd040a7ff03a92e36d240dc26bae87532102ec852368d20355a7dcc13e27c2dae904
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,138 @@
|
|
1
|
+
<!-- MARKDOWN LINKS & IMAGES -->
|
2
|
+
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
3
|
+
[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)
|
4
|
+
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
5
|
+
[attractor]: https://github.com/julianrubisch/attractor-javascript
|
6
|
+
[forks-shield]: https://img.shields.io/github/forks/julianrubisch/attractor-javascript.svg?style=flat-square
|
7
|
+
[forks-url]: https://github.com/julianrubisch/attractor-javascript/network/members
|
8
|
+
[stars-shield]: https://img.shields.io/github/stars/julianrubisch/attractor-javascript.svg?style=flat-square
|
9
|
+
[stars-url]: https://github.com/julianrubisch/attractor-javascript/stargazers
|
10
|
+
[issues-shield]: https://img.shields.io/github/issues/julianrubisch/attractor-javascript.svg?style=flat-square
|
11
|
+
[issues-url]: https://github.com/julianrubisch/attractor-javascript/issues
|
12
|
+
<!-- [license-shield]: https://img.shields.io/github/license/julianrubisch/attractor-javascript.svg?style=flat-square -->
|
13
|
+
<!-- [license-url]: https://github.com/julianrubisch/attractor-javascript/blob/master/LICENSE.txt -->
|
14
|
+
|
15
|
+
<!-- PROJECT SHIELDS -->
|
16
|
+
|
17
|
+
[![Forks][forks-shield]][forks-url]
|
18
|
+
[![Stargazers][stars-shield]][stars-url]
|
19
|
+
[![Issues][issues-shield]][issues-url]
|
20
|
+
<!--[![MIT License][license-shield]][license-url]-->
|
21
|
+
|
22
|
+
|
23
|
+
<!-- PROJECT LOGO -->
|
24
|
+
<br />
|
25
|
+
<p align="center">
|
26
|
+
<a href="https://github.com/julianrubisch/attractor">
|
27
|
+
<img src="https://user-images.githubusercontent.com/4352208/65411858-3dc84200-ddee-11e9-99b6-c9cdbeb533c5.png" alt="Logo" width="80" height="80">
|
28
|
+
</a>
|
29
|
+
|
30
|
+
<h2 align="center">Attractor Javascript Plugin</h2>
|
31
|
+
</p>
|
32
|
+
|
33
|
+
[Attractor][attractor] plugin for the Javascript programming language and its ecosystem
|
34
|
+
|
35
|
+
|
36
|
+
<!-- TABLE OF CONTENTS -->
|
37
|
+
## Table of Contents
|
38
|
+
|
39
|
+
- [Table of Contents](#table-of-contents)
|
40
|
+
- [Getting Started](#getting-started)
|
41
|
+
- [Installation](#installation)
|
42
|
+
- [Usage](#usage)
|
43
|
+
- [Contributing](#contributing)
|
44
|
+
|
45
|
+
<!-- GETTING STARTED -->
|
46
|
+
## Getting Started
|
47
|
+
|
48
|
+
This is a plugin to help you visualize code complexity metrics for your Javascript code. If you are not familiar with [Attractor][attractor], take a look at the main repo first.
|
49
|
+
|
50
|
+
### Installation
|
51
|
+
|
52
|
+
Add this to your application's Gemfile:
|
53
|
+
|
54
|
+
```javascript
|
55
|
+
gem 'attractor'
|
56
|
+
gem 'attractor-javascript'
|
57
|
+
```
|
58
|
+
|
59
|
+
And then execute:
|
60
|
+
|
61
|
+
```sh
|
62
|
+
bundle install
|
63
|
+
```
|
64
|
+
|
65
|
+
<!-- USAGE EXAMPLES -->
|
66
|
+
## Usage
|
67
|
+
|
68
|
+
To create a HTML report in `attractor_output/index.html`, try
|
69
|
+
|
70
|
+
```sh
|
71
|
+
bundle exec attractor report
|
72
|
+
```
|
73
|
+
|
74
|
+
If you'd like to specify a directory, use the file prefix option:
|
75
|
+
|
76
|
+
```sh
|
77
|
+
bundle exec attractor report --file_prefix app/models
|
78
|
+
```
|
79
|
+
|
80
|
+
Or shorter:
|
81
|
+
|
82
|
+
```sh
|
83
|
+
bundle exec attractor report -p app/models
|
84
|
+
```
|
85
|
+
|
86
|
+
Watch for file changes:
|
87
|
+
|
88
|
+
```sh
|
89
|
+
bundle exec attractor report -p app/models --watch
|
90
|
+
```
|
91
|
+
|
92
|
+
Serve at http://localhost:7890:
|
93
|
+
|
94
|
+
```sh
|
95
|
+
bundle exec attractor serve -p app/models
|
96
|
+
```
|
97
|
+
|
98
|
+
Enable rack-livereload:
|
99
|
+
|
100
|
+
```sh
|
101
|
+
bundle exec attractor serve -p app/models --watch
|
102
|
+
```
|
103
|
+
|
104
|
+
<!-- CONTRIBUTING -->
|
105
|
+
## Contributing
|
106
|
+
|
107
|
+
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.
|
108
|
+
|
109
|
+
1. Fork the Project
|
110
|
+
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
|
111
|
+
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
|
112
|
+
4. Push to the Branch (`git push origin feature/AmazingFeature`)
|
113
|
+
5. Open a Pull Request
|
114
|
+
|
115
|
+
<!-- LICENSE -->
|
116
|
+
<!--## License -->
|
117
|
+
|
118
|
+
<!-- Distributed under the MIT License. See `LICENSE` for more information. -->
|
119
|
+
|
120
|
+
## Contributors ✨
|
121
|
+
|
122
|
+
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
123
|
+
|
124
|
+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
125
|
+
<!-- prettier-ignore-start -->
|
126
|
+
<!-- markdownlint-disable -->
|
127
|
+
<table>
|
128
|
+
<tr>
|
129
|
+
<td align="center"><a href="https://www.andrewmason.me/"><img src="https://avatars1.githubusercontent.com/u/18423853?v=4" width="100px;" alt=""/><br /><sub><b>Andrew Mason</b></sub></a><br /><a href="https://github.com/julianrubisch/attractor-javascript/commits?author=andrewmcodes" title="Documentation">📖</a> <a href="https://github.com/julianrubisch/attractor-javascript/commits?author=andrewmcodes" title="Code">💻</a></td>
|
130
|
+
<td align="center"><a href="http://www.julianrubisch.at"><img src="https://avatars0.githubusercontent.com/u/4352208?v=4" width="100px;" alt=""/><br /><sub><b>Julian Rubisch</b></sub></a><br /><a href="https://github.com/julianrubisch/attractor-javascript/commits?author=julianrubisch" title="Code">💻</a></td>
|
131
|
+
</tr>
|
132
|
+
</table>
|
133
|
+
|
134
|
+
<!-- markdownlint-enable -->
|
135
|
+
<!-- prettier-ignore-end -->
|
136
|
+
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
137
|
+
|
138
|
+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
data/Rakefile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'bundler/gem_tasks'
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
|
6
|
+
RSpec::Core::RakeTask.new(:spec)
|
7
|
+
|
8
|
+
task default: :spec
|
9
|
+
|
10
|
+
task build: :assets
|
11
|
+
|
12
|
+
desc 'Preprocess assets'
|
13
|
+
task :assets do
|
14
|
+
npm_output = `cd src/javascript/calculator && npm run build`
|
15
|
+
puts npm_output
|
16
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'attractor/javascript/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'attractor-javascript'
|
9
|
+
spec.version = Attractor::Javascript::VERSION
|
10
|
+
spec.authors = ['Julian Rubisch']
|
11
|
+
spec.email = ['julian@julianrubisch.at']
|
12
|
+
|
13
|
+
spec.summary = 'Attractor plugin for the Ruby programming language and its ecosystem'
|
14
|
+
spec.description = <<-DESCRIPTION
|
15
|
+
Attractor plugin for the Ruby programming language and its ecosystem
|
16
|
+
DESCRIPTION
|
17
|
+
spec.homepage = 'https://github.com/julianrubisch/attractor-javascript'
|
18
|
+
spec.licenses = ['MIT']
|
19
|
+
|
20
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
21
|
+
spec.metadata['source_code_uri'] = 'https://github.com/julianrubisch/attractor-javascript'
|
22
|
+
spec.metadata['bug_tracker_uri'] = "#{spec.homepage}/issues"
|
23
|
+
spec.metadata['changelog_uri'] = 'https://github.com/julianrubisch/attractor-javascript/CHANGELOG.md'
|
24
|
+
|
25
|
+
# Specify which files should be added to the gem when it is released.
|
26
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
27
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
28
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
29
|
+
f.match(%r{^(src|tmp|test|spec|features|\.github)/}) ||
|
30
|
+
%w[.all-contributorsrc .rspec .rspec_status .travis.yml].include?(f)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
spec.bindir = 'exe'
|
34
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
35
|
+
spec.require_paths = ['lib']
|
36
|
+
|
37
|
+
spec.add_dependency 'attractor', '~> 2.0'
|
38
|
+
|
39
|
+
spec.add_development_dependency 'aruba'
|
40
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
41
|
+
spec.add_development_dependency 'cucumber'
|
42
|
+
spec.add_development_dependency 'pry'
|
43
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
44
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
45
|
+
spec.add_development_dependency 'standard'
|
46
|
+
spec.add_development_dependency 'structured_changelog'
|
47
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "attractor/javascript"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
!function(t){var e={};function s(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,s),n.l=!0,n.exports}s.m=t,s.c=e,s.d=function(t,e,r){s.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},s.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="",s.w={},s(s.s=247)}([function(t,e,s){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,s){"use strict";e.__esModule=!0;var r,n=s(110),i=(r=n)&&r.__esModule?r:{default:r};e.default=function(){function t(t,e){for(var s=0;s<e.length;s++){var r=e[s];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,i.default)(t,r.key,r)}}return function(e,s,r){return s&&t(e.prototype,s),r&&t(e,r),e}}()},function(t,e,s){"use strict";e.__esModule=!0;var r=a(s(66)),n=a(s(114)),i="function"==typeof n.default&&"symbol"==typeof r.default?function(t){return typeof t}:function(t){return t&&"function"==typeof n.default&&t.constructor===n.default&&t!==n.default.prototype?"symbol":typeof t};function a(t){return t&&t.__esModule?t:{default:t}}e.default="function"==typeof n.default&&"symbol"===i(r.default)?function(t){return void 0===t?"undefined":i(t)}:function(t){return t&&"function"==typeof n.default&&t.constructor===n.default&&t!==n.default.prototype?"symbol":void 0===t?"undefined":i(t)}},function(t,e){var s=t.exports={version:"2.6.10"};"number"==typeof __e&&(__e=s)},function(t,e,s){t.exports={default:s(207),__esModule:!0}},function(t,e,s){t.exports={default:s(213),__esModule:!0}},function(t,e,s){"use strict";e.__esModule=!0;var r=a(s(205)),n=a(s(201)),i=a(s(2));function a(t){return t&&t.__esModule?t:{default:t}}e.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":(0,i.default)(e)));t.prototype=(0,n.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(r.default?(0,r.default)(t,e):t.__proto__=e)}},function(t,e,s){"use strict";e.__esModule=!0;var r,n=s(2),i=(r=n)&&r.__esModule?r:{default:r};e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,i.default)(e))&&"function"!=typeof e?t:e}},function(t,e,s){var r=s(10),n=s(3),i=s(20),a=s(24),o=s(28),u=function(t,e,s){var l,h,c,p=t&u.F,d=t&u.G,f=t&u.S,y=t&u.P,v=t&u.B,m=t&u.W,g=d?n:n[e]||(n[e]={}),x=g.prototype,b=d?r:f?r[e]:(r[e]||{}).prototype;for(l in d&&(s=e),s)(h=!p&&b&&void 0!==b[l])&&o(g,l)||(c=h?b[l]:s[l],g[l]=d&&"function"!=typeof b[l]?s[l]:v&&h?i(c,r):m&&b[l]==c?function(t){var e=function(e,s,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,s)}return new t(e,s,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(c):y&&"function"==typeof c?i(Function.call,c):c,y&&((g.virtual||(g.virtual={}))[l]=c,t&u.R&&x&&!x[l]&&a(x,l,c)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(s(4)),n=o(s(0)),i=o(s(7)),a=o(s(6));function o(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(){return(0,n.default)(this,e),(0,i.default)(this,(e.__proto__||(0,r.default)(e)).apply(this,arguments))}return(0,a.default)(e,t),e}(o(s(178)).default);e.default=u,u.initEnum({CLASS:{description:"Class"},CLASS_METHOD:{description:"Class Method"},MODULE_METHOD:{description:"Module Method"},MODULE:{description:"Module"},NESTED_METHOD:{description:"Nested Method"},PROJECT:{description:"Project"}}),t.exports=e.default},function(t,e){var s=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=s)},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(s(100)),n=c(s(16)),i=c(s(22)),a=c(s(23)),o=c(s(15)),u=c(s(2)),l=c(s(0)),h=c(s(1));function c(t){return t&&t.__esModule?t:{default:t}}e.onPluginLoad=function(t){var e=t.eventbus;e.on("typhonjs:object:util:depth:traverse",p.depthTraverse,p),e.on("typhonjs:object:util:get:accessor:list",p.getAccessorList,p),e.on("typhonjs:object:util:safe:access",p.safeAccess,p),e.on("typhonjs:object:util:safe:equal",p.safeEqual,p),e.on("typhonjs:object:util:safe:set",p.safeSet,p),e.on("typhonjs:object:util:safe:set:all",p.safeSetAll,p),e.on("typhonjs:object:util:validate",p.validate,p),e.on("typhonjs:object:util:validate:array",p.validateArray,p),e.on("typhonjs:object:util:validate:entry",p.validateEntry,p),e.on("typhonjs:object:util:validate:entry|array",p.validateEntryOrArray,p)};var p=function(){function t(){(0,l.default)(this,t)}return(0,h.default)(t,null,[{key:"depthTraverse",value:function(t,e){var s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("object"!==(void 0===t?"undefined":(0,u.default)(t)))throw new TypeError("depthTraverse error: 'data' is not an 'object'.");if("function"!=typeof e)throw new TypeError("depthTraverse error: 'func' is not a 'function'.");return function t(e,s,r){if(r)if(Array.isArray(e))for(var n=0;n<e.length;n++)e[n]=t(e[n],s,r);else if("object"===(void 0===e?"undefined":(0,u.default)(e)))for(var i in e)e.hasOwnProperty(i)&&(e[i]=t(e[i],s,r));else e=s(e);else if(Array.isArray(e))for(var a=0;a<e.length;a++)t(e[a],s,r);else if("object"===(void 0===e?"undefined":(0,u.default)(e)))for(var o in e)e.hasOwnProperty(o)&&t(e[o],s,r);else s(e);return e}(t,e,s)}},{key:"getAccessorList",value:function(t){if("object"!==(void 0===t?"undefined":(0,u.default)(t)))throw new TypeError("getAccessorList error: 'data' is not an 'object'.");return function t(e){var s=[];var r=function(r){if(e.hasOwnProperty(r))if("object"===(0,u.default)(e[r])){var n=t(e[r]);n.forEach(function(t){s.push(Array.isArray(t)?r+"."+t.join("."):r+"."+t)})}else s.push(r)};for(var n in e)r(n);return s}(t)}},{key:"safeAccess",value:function(t,e){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if("object"!==(void 0===t?"undefined":(0,u.default)(t)))return s;if("string"!=typeof e)return s;for(var r=e.split("."),n=0;n<r.length;n++){if(void 0===t[r[n]]||null===t[r[n]])return s;t=t[r[n]]}return t}},{key:"safeBatchSet",value:function(e,s,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"set",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if("object"!==(void 0===e?"undefined":(0,u.default)(e)))throw new TypeError("safeBatchSet Error: 'data' is not an 'object'.");if(!Array.isArray(s))throw new TypeError("safeBatchSet Error: 'accessors' is not an 'array'.");"object"===(void 0===r?"undefined":(0,u.default)(r))?s.forEach(function(s){var o=t.safeAccess(r,s,i);t.safeSet(e,s,o,n,a)}):s.forEach(function(s){t.safeSet(e,s,r,n,a)})}},{key:"safeEqual",value:function(e,s){if(void 0===e||null===e||void 0===s||null===s)return!1;for(var r=t.getAccessorList(e),n=0;n<r.length;n++){var i=r[n];if(t.safeAccess(e,i)!==t.safeAccess(s,i))return!1}return!0}},{key:"safeSet",value:function(t,e,s){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"set",n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if("object"!==(void 0===t?"undefined":(0,u.default)(t)))throw new TypeError("safeSet Error: 'data' is not an 'object'.");if("string"!=typeof e)throw new TypeError("safeSet Error: 'accessor' is not a 'string'.");for(var i=e.split("."),a=0;a<i.length;a++){if(Array.isArray(t)){var l=+i[a];if(!(0,o.default)(l)||l<0)return!1}if(a===i.length-1)switch(r){case"add":t[i[a]]+=s;break;case"div":t[i[a]]/=s;break;case"mult":t[i[a]]*=s;break;case"set":t[i[a]]=s;break;case"set-undefined":void 0===t[i[a]]&&(t[i[a]]=s);break;case"sub":t[i[a]]-=s}else{if(n&&void 0===t[i[a]]&&(t[i[a]]={}),null===t[i[a]]||"object"!==(0,u.default)(t[i[a]]))return!1;t=t[i[a]]}}return!0}},{key:"safeSetAll",value:function(e,s){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"set",n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if("object"!==(void 0===e?"undefined":(0,u.default)(e)))throw new TypeError("'data' is not an 'object'.");if("object"!==(void 0===s?"undefined":(0,u.default)(s)))throw new TypeError("'accessorValues' is not an 'object'.");var o=!0,l=!1,h=void 0;try{for(var c,p=(0,a.default)((0,i.default)(s));!(o=(c=p.next()).done);o=!0){var d=c.value;s.hasOwnProperty(d)&&t.safeSet(e,d,s[d],r,n)}}catch(t){l=!0,h=t}finally{try{!o&&p.return&&p.return()}finally{if(l)throw h}}}},{key:"validate",value:function(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"data";if("object"!==(void 0===e?"undefined":(0,u.default)(e)))throw new TypeError("'"+r+"' is not an 'object'.");if("object"!==(void 0===s?"undefined":(0,u.default)(s)))throw new TypeError("'validationData' is not an 'object'.");var n=void 0,o=!0,l=!1,h=void 0;try{for(var c,p=(0,a.default)((0,i.default)(s));!(o=(c=p.next()).done);o=!0){var d=c.value;if(s.hasOwnProperty(d)){var f=s[d];switch(f.test){case"array":n=t.validateArray(e,d,f,r);break;case"entry":n=t.validateEntry(e,d,f,r);break;case"entry|array":n=t.validateEntryOrArray(e,d,f,r)}}}}catch(t){l=!0,h=t}finally{try{!o&&p.return&&p.return()}finally{if(l)throw h}}return n}},{key:"validateArray",value:function(e,s){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=i.type,o=void 0===a?void 0:a,l=i.expected,h=void 0===l?void 0:l,c=i.message,p=void 0===c?void 0:c,f=i.required,y=void 0===f||f,v=i.error,m=void 0===v||v,g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"data",x=t.safeAccess(e,s);if(!y&&void 0===x)return!0;if(!Array.isArray(x)){if(m)throw d(TypeError,"'"+g+"."+s+"' is not an 'array'.");return!1}if("string"==typeof o)for(var b=0;b<x.length;b++)if((0,u.default)(x[b])!==o){if(m){var w="object"===(0,u.default)(x[b])?(0,n.default)(x[b]):x[b];throw d(TypeError,"'"+g+"."+s+"["+b+"]': '"+w+"' is not a '"+o+"'.")}return!1}if(Array.isArray(h)){for(var P=0;P<x.length;P++)if(h.indexOf(x[P])<0){if(m){var E="object"===(0,u.default)(x[P])?(0,n.default)(x[P]):x[P];throw d(Error,"'"+g+"."+s+"["+P+"]': '"+E+"' is not an expected value: "+(0,n.default)(h)+".")}return!1}}else if(h instanceof r.default){for(var _=0;_<x.length;_++)if(!h.has(x[_])){if(m){var k="object"===(0,u.default)(x[_])?(0,n.default)(x[_]):x[_];throw d(Error,"'"+g+"."+s+"["+_+"]': '"+k+"' is not an expected value: "+(0,n.default)(h)+".")}return!1}}else if("function"==typeof h)for(var A=0;A<x.length;A++)try{var T=h(x[A]);if(void 0===T||!T)throw new Error(p)}catch(t){if(m){var S="object"===(0,u.default)(x[A])?(0,n.default)(x[A]):x[A];throw d(Error,"'"+g+"."+s+"["+A+"]': '"+S+"' failed validation: "+t.message+".")}return!1}return!0}},{key:"validateEntry",value:function(e,s){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=i.type,o=void 0===a?void 0:a,l=i.expected,h=void 0===l?void 0:l,c=i.message,p=void 0===c?void 0:c,f=i.required,y=void 0===f||f,v=i.error,m=void 0===v||v,g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"data",x=t.safeAccess(e,s);if(!y&&void 0===x)return!0;if(o&&(void 0===x?"undefined":(0,u.default)(x))!==o){if(m)throw d(TypeError,"'"+g+"."+s+"' is not a '"+o+"'.");return!1}if(h instanceof r.default&&!h.has(x)||Array.isArray(h)&&h.indexOf(x)<0){if(m){var b="object"===(void 0===x?"undefined":(0,u.default)(x))?(0,n.default)(x):x;throw d(Error,"'"+g+"."+s+"': '"+b+"' is not an expected value: "+(0,n.default)(h)+".")}return!1}if("function"==typeof h)try{var w=h(x);if(void 0===w||!w)throw new Error(p)}catch(t){if(m){var P="object"===(void 0===x?"undefined":(0,u.default)(x))?(0,n.default)(x):x;throw d(Error,"'"+g+"."+s+"': '"+P+"' failed to validate: "+t.message+".")}return!1}return!0}},{key:"validateEntryOrArray",value:function(e,s,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"data",i=t.safeAccess(e,s);return Array.isArray(i)?t.validateArray(e,s,r,n):t.validateEntry(e,s,r,n)}}]),t}();function d(t){var e=new t(arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0);return e._objectValidateError=!0,e}e.default=p},function(t,e,s){var r=s(73)("wks"),n=s(47),i=s(10).Symbol,a="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:n)("Symbol."+t))}).store=r},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,s){t.exports=!s(29)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,s){t.exports={default:s(216),__esModule:!0}},function(t,e,s){t.exports={default:s(220),__esModule:!0}},function(t,e,s){var r=s(18),n=s(129),i=s(76),a=Object.defineProperty;e.f=s(14)?Object.defineProperty:function(t,e,s){if(r(t),e=i(e,!0),r(s),n)try{return a(t,e,s)}catch(t){}if("get"in s||"set"in s)throw TypeError("Accessors not supported!");return"value"in s&&(t[e]=s.value),t}},function(t,e,s){var r=s(13);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,s){"use strict";e.__esModule=!0;var r,n=s(61),i=(r=n)&&r.__esModule?r:{default:r};e.default=function(t){if(Array.isArray(t)){for(var e=0,s=Array(t.length);e<t.length;e++)s[e]=t[e];return s}return(0,i.default)(t)}},function(t,e,s){var r=s(40);t.exports=function(t,e,s){if(r(t),void 0===e)return t;switch(s){case 1:return function(s){return t.call(e,s)};case 2:return function(s,r){return t.call(e,s,r)};case 3:return function(s,r,n){return t.call(e,s,r,n)}}return function(){return t.apply(e,arguments)}}},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=h(s(15)),n=h(s(2)),i=h(s(96)),a=h(s(0)),o=h(s(1)),u=(0,i.default)(["","","","",""],["","","","",""]),l=h(s(11));function h(t){return t&&t.__esModule?t:{default:t}}var c=function(){function t(){(0,a.default)(this,t)}return(0,o.default)(t,null,[{key:"compare",value:function(t,e){return t.toLowerCase().localeCompare(e.toLowerCase())}},{key:"incrementIndent",value:function(t){return t+(arguments.length>1&&void 0!==arguments[1]?arguments[1]:3)}},{key:"indent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new Array(t+1).join(" ")+e}},{key:"safeStringObject",value:function(t,e,s){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,a=l.default.safeAccess(e,s);if(void 0===a||Array.isArray(a)&&0===a.length)return"";var o="\n";return(0===r||r>1)&&(o=new Array(r+1).join("\n")),"function"==typeof i?i(u,t,a,n,o):""+t+a+n+o}},{key:"safeStringsObject",value:function(e){for(var s=arguments.length,r=Array(s>1?s-1:0),n=1;n<s;n++)r[n-1]=arguments[n];return t.safeStringsPrependObject.apply(t,["",e].concat(r))}},{key:"safeStringsPrependObject",value:function(e,s){if("object"!==(void 0===s?"undefined":(0,n.default)(s)))return"";for(var r=[],i=!1,a=arguments.length,o=Array(a>2?a-2:0),u=2;u<a;u++)o[u-2]=arguments[u];for(var l=0;l<o.length;l++){var h=o[l],c=i?"":e;if(h instanceof p)i=0===h.newLine,r.push(t.safeStringObject(""+c+h.prependString,s,h.accessor,h.newLine,h.appendString,h.tagFunction));else if("string"==typeof h&&""!==h)r.push(""+c+h);else if("function"==typeof h.toString){var d=h.toString();""!==d&&r.push(""+c+d)}}return r.join("")}},{key:"tagEscapeHTML",value:function(t){for(var e=arguments.length,s=Array(e>1?e-1:0),r=1;r<e;r++)s[r-1]=arguments[r];return s.reduce(function(e,s,r){return e+String(s).replace(/</g,"<").replace(/>/g,">")+t[r+1]},t[0])}},{key:"SafeEntry",get:function(){return p}}]),t}();e.default=c;var p=function(){function t(e,s){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;if((0,a.default)(this,t),"string"!=typeof e)throw new TypeError("ctor error: 'prependString' is not a 'string'.");if("string"!=typeof s)throw new TypeError("ctor error: 'accessor' is not a 'string'.");if("string"!=typeof i)throw new TypeError("ctor error: 'appendString' is not a 'string'.");if("function"!=typeof o&&void 0!==o)throw new TypeError("ctor error: 'tagFunction' is not a 'function' or 'undefined'.");if((0,r.default)(n)&&n<0)throw new TypeError("ctor error: 'newLine' is not a positive 'integer' ("+n+").");this._prependString=e,this._accessor=s,this._newLine=n,this._appendString=i,this._tagFunction=o}return(0,o.default)(t,[{key:"accessor",get:function(){return this._accessor}},{key:"appendString",get:function(){return this._appendString}},{key:"newLine",get:function(){return this._newLine}},{key:"prependString",get:function(){return this._prependString}},{key:"tagFunction",get:function(){return this._tagFunction}}]),t}();t.exports=e.default},function(t,e,s){t.exports={default:s(180),__esModule:!0}},function(t,e,s){t.exports={default:s(198),__esModule:!0}},function(t,e,s){var r=s(17),n=s(39);t.exports=s(14)?function(t,e,s){return r.f(t,e,n(1,s))}:function(t,e,s){return t[e]=s,t}},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=_(s(61)),n=_(s(23)),i=_(s(2)),a=_(s(0)),o=_(s(1)),u=_(s(106)),l=_(s(187)),h=_(s(186)),c=_(s(171)),p=_(s(170)),d=_(s(169)),f=_(s(165)),y=_(s(164)),v=_(s(163)),m=_(s(162)),g=_(s(98)),x=_(s(95)),b=_(s(93)),w=_(s(92)),P=_(s(91)),E=_(s(9));function _(t){return t&&t.__esModule?t:{default:t}}var k=new u.default,A=function(){function t(){(0,a.default)(this,t)}return(0,o.default)(t,null,[{key:"addFormat",value:function(t){if("object"!==(void 0===t?"undefined":(0,i.default)(t)))throw new TypeError("addFormat error: 'format' is not an 'object'.");if("string"!=typeof t.name)throw new TypeError("addFormat error: 'format.name' is not a 'string'.");if("string"!=typeof t.extension)throw new TypeError("addFormat error: 'format.extension' is not a 'string' for '"+t.name+"'.");if("string"!=typeof t.type)throw new TypeError("addFormat error: 'format.type' is not a 'string' for '"+t.name+"'.");if("function"!=typeof t.formatReport)throw new TypeError("addFormat error: 'format.formatReport' is not a 'function' for '"+t.name+"'.");if("function"!=typeof t.isSupported)throw new TypeError("addFormat error: 'format.isSupported' is not a 'function' for '"+t.name+"'.");k.set(t.name,t)}},{key:"forEach",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;k.forEach(t,e)}},{key:"forEachExt",value:function(t,e){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=!0,i=!1,a=void 0;try{for(var o,u=(0,n.default)(k.values());!(r=(o=u.next()).done);r=!0){var l=o.value;l.extension===t&&e.call(s,l,l.name)}}catch(t){i=!0,a=t}finally{try{!r&&u.return&&u.return()}finally{if(i)throw a}}}},{key:"forEachType",value:function(t,e){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=!0,i=!1,a=void 0;try{for(var o,u=(0,n.default)(k.values());!(r=(o=u.next()).done);r=!0){var l=o.value;l.type===t&&e.call(s,l,l.name)}}catch(t){i=!0,a=t}finally{try{!r&&u.return&&u.return()}finally{if(i)throw a}}}},{key:"format",value:function(t,e){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=k.get(e);if(void 0===r)throw new Error("format error: unknown formatter name '"+e+"'.");switch(t.type){case E.default.CLASS:case E.default.CLASS_METHOD:case E.default.MODULE_METHOD:case E.default.MODULE:case E.default.NESTED_METHOD:case E.default.PROJECT:return r.formatReport(t,s);default:throw new TypeError("format error: unknown report type '"+t.type+"'.")}}},{key:"getFormats",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(void 0===t)return(0,r.default)(k.values());if(!(t instanceof E.default))throw new TypeError("getFormats error: 'reportType' is not an instance of 'ReportType'.");return(0,r.default)(k.values()).filter(function(e){return e.isSupported(t)})}},{key:"isFormat",value:function(t){return k.has(t)}},{key:"isSupported",value:function(t,e){return!!k.has(t)&&k.get(t).isSupported(e)}},{key:"removeFormat",value:function(t){k.delete(t)}}]),t}();e.default=A,A.addFormat(new l.default),A.addFormat(new h.default),A.addFormat(new c.default),A.addFormat(new p.default),A.addFormat(new d.default),A.addFormat(new f.default),A.addFormat(new y.default),A.addFormat(new v.default),A.addFormat(new m.default),A.addFormat(new g.default),A.addFormat(new x.default),A.addFormat(new b.default),A.addFormat(new w.default),A.addFormat(new P.default),t.exports=e.default},function(t,e,s){var r=s(79);t.exports=function(t){return Object(r(t))}},function(t,e,s){var r=s(75),n=s(79);t.exports=function(t){return r(n(t))}},function(t,e){var s={}.hasOwnProperty;t.exports=function(t,e){return s.call(t,e)}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,s){"use strict";var r=s(241)(!0);s(78)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,s=this._i;return s>=e.length?{value:void 0,done:!0}:(t=r(e,s),this._i+=t.length,{value:t,done:!1})})},function(t,e,s){t.exports={default:s(242),__esModule:!0}},function(t,e,s){var r=s(8),n=s(3),i=s(29);t.exports=function(t,e){var s=(n.Object||{})[t]||Object[t],a={};a[t]=e(s),r(r.S+r.F*i(function(){s(1)}),"Object",a)}},function(t,e,s){var r=s(20),n=s(122),i=s(121),a=s(18),o=s(48),u=s(69),l={},h={};(e=t.exports=function(t,e,s,c,p){var d,f,y,v,m=p?function(){return t}:u(t),g=r(s,c,e?2:1),x=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(i(m)){for(d=o(t.length);d>x;x++)if((v=e?g(a(f=t[x])[0],f[1]):g(t[x]))===l||v===h)return v}else for(y=m.call(t);!(f=y.next()).done;)if((v=n(y,g,f.value,e))===l||v===h)return v}).BREAK=l,e.RETURN=h},function(t,e,s){s(237);for(var r=s(10),n=s(24),i=s(38),a=s(12)("toStringTag"),o="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<o.length;u++){var l=o[u],h=r[l],c=h&&h.prototype;c&&!c[a]&&n(c,a,l),i[l]=i.Array}},function(t,e,s){var r=s(17).f,n=s(28),i=s(12)("toStringTag");t.exports=function(t,e,s){t&&!n(t=s?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e){var s={}.toString;t.exports=function(t){return s.call(t).slice(8,-1)}},function(t,e,s){var r=s(126),n=s(72);t.exports=Object.keys||function(t){return r(t,n)}},function(t,e){t.exports={}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=!0},function(t,e){function s(t){var e=new Error('Cannot find module "'+t+'".');throw e.code="MODULE_NOT_FOUND",e}s.keys=function(){return[]},s.resolve=s,t.exports=s,s.id=42},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=l(s(2)),n=l(s(16)),i=l(s(19)),a=l(s(0)),o=l(s(1)),u=l(s(153));function l(t){return t&&t.__esModule?t:{default:t}}var h=function(){function t(e,s){if((0,a.default)(this,t),"string"!=typeof e)throw new TypeError("ctor error: metric is not a `string`.");if(!Array.isArray(s))throw new TypeError("ctor error: data is not an `Array`.");this._data=s.map(function(t){return t&&void 0!==t.identifier?new u.default(e,t):new u.default(e,{identifier:t})}),this._metric=e}return(0,o.default)(t,[{key:"forEach",value:function(t,e){this._data.forEach(t,e)}},{key:"get",value:function(t){return this._data[t]}},{key:"valueOf",value:function(){for(var t,e=arguments.length,s=Array(e),r=0;r<e;r++)s[r]=arguments[r];var a=this._data.filter(function(t){return void 0!==t.valueOf.apply(t,s)&&t.filter.apply(t,s)});return(t=[]).concat.apply(t,(0,i.default)(a.map(function(t){return t.valueOf.apply(t,s)}))).map(function(t){return void 0===t&&(console.warn("HalsteadArray valueOf warning: undefined TraitHalstead item entry converted to a 'string'."),t="undefined"),"string"!=typeof t?(0,n.default)(t):t})}},{key:"length",get:function(){return this._data.length}},{key:"metric",get:function(){return this._metric}},{key:"type",get:function(){return(0,r.default)(this._data)}}]),t}();e.default=h,t.exports=e.default},function(t,e,s){t.exports={default:s(173),__esModule:!0}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,s){var r=s(47)("meta"),n=s(13),i=s(28),a=s(17).f,o=0,u=Object.isExtensible||function(){return!0},l=!s(29)(function(){return u(Object.preventExtensions({}))}),h=function(t){a(t,r,{value:{i:"O"+ ++o,w:{}}})},c=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!n(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!u(t))return"F";if(!e)return"E";h(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!u(t))return!0;if(!e)return!1;h(t)}return t[r].w},onFreeze:function(t){return l&&c.NEED&&u(t)&&!i(t,r)&&h(t),t}}},function(t,e){var s=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++s+r).toString(36))}},function(t,e,s){var r=s(80),n=Math.min;t.exports=function(t){return t>0?n(r(t),9007199254740991):0}},function(t,e,s){var r=s(18),n=s(127),i=s(72),a=s(74)("IE_PROTO"),o=function(){},u=function(){var t,e=s(77)("iframe"),r=i.length;for(e.style.display="none",s(125).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u.prototype[i[r]];return u()};t.exports=Object.create||function(t,e){var s;return null!==t?(o.prototype=r(t),s=new o,o.prototype=null,s[a]=t):s=u(),void 0===e?s:n(s,e)}},function(t,e){},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(s(15)),n=o(s(0)),i=o(s(1)),a=o(s(11));function o(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(){(0,n.default)(this,t)}return(0,i.default)(t,null,[{key:"compactMatrix",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,s=[];return t.forEach(function(t,r){var n=[];t.forEach(function(t,s){t===e&&n.push(s)}),n.length>0&&s.push({row:r,cols:n})}),s}},{key:"create2DArray",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=new Array(t),r=0;r<t;r++)s[r]=new Array(t);for(var n=0;n<t;n++)for(var i=0;i<t;i++)s[n][i]=e;return s}},{key:"getMedian",value:function(t){return t.sort(function(t,e){return t-e}),t.length%2?t[(t.length-1)/2]:(t[(t.length-2)/2]+t[t.length/2])/2}},{key:"getPercent",value:function(t,e){return 0===e?0:t/e*100}},{key:"toFixedTraverse",value:function(e){return a.default.depthTraverse(e,t.toFixed,!0)}},{key:"toFixed",value:function(t){return"number"!=typeof t||(0,r.default)(t)?t:Math.round(1e3*t)/1e3}}]),t}();e.default=u,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=w(s(19)),n=w(s(5)),i=w(s(2)),a=w(s(4)),o=w(s(0)),u=w(s(7)),l=w(s(1)),h=w(s(6)),c=w(s(60)),p=w(s(56)),d=w(s(107)),f=w(s(54)),y=w(s(88)),v=w(s(55)),m=w(s(51)),g=w(s(11)),x=w(s(9)),b=w(s(25));function w(t){return t&&t.__esModule?t:{default:t}}var P=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,o.default)(this,e);var l=(0,u.default)(this,(e.__proto__||(0,a.default)(e)).call(this,new p.default(t,s)));return l.settings="object"===(void 0===r?"undefined":(0,i.default)(r))?(0,n.default)({},r):{},l.classes=[],l.dependencies=[],l.errors=[],l.filePath=void 0,l.lineEnd=s,l.lineStart=t,l.maintainability=0,l.methods=[],l.aggregateAverage=new f.default,l.methodAverage=new f.default,l.srcPath=void 0,l.srcPathAlias=void 0,l}return(0,h.default)(e,t),(0,l.default)(e,[{key:"type",get:function(){return x.default.MODULE}}]),(0,l.default)(e,[{key:"clearErrors",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.errors=[],t&&(this.classes.forEach(function(t){t.clearErrors()}),this.methods.forEach(function(t){t.clearErrors()}))}},{key:"finalize",value:function(){return m.default.toFixedTraverse(this)}},{key:"getErrors",value:function(){var t,e=this,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeChildren:!0,includeReports:!1};if("object"!==(void 0===s?"undefined":(0,i.default)(s)))throw new TypeError("getErrors error: 'options' is not an 'object'.");"boolean"!=typeof s.includeChildren&&(s.includeChildren=!0);var n=s.includeReports?this.errors.map(function(t){return{error:t,source:e}}):(t=[]).concat.apply(t,(0,r.default)(this.errors));if(s.includeChildren)if(s.includeReports){var a,o=[];this.methods.forEach(function(t){o.push.apply(o,(0,r.default)(t.getErrors(s)))}),this.classes.forEach(function(t){o.push.apply(o,(0,r.default)(t.getErrors(s)))}),o.forEach(function(t){t.module=e}),(a=n).push.apply(a,o)}else this.methods.forEach(function(t){var e;(e=n).push.apply(e,(0,r.default)(t.getErrors(s)))}),this.classes.forEach(function(t){var e;(e=n).push.apply(e,(0,r.default)(t.getErrors(s)))});return"object"===(0,i.default)(s.query)&&(n=n.filter(function(t){return g.default.safeEqual(s.query,t)})),n}},{key:"getName",value:function(){return"string"==typeof this.srcPath?this.srcPath:""}},{key:"getSetting",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if("string"!=typeof t||""===t)throw new TypeError("getSetting error: 'key' is not a 'string' or is empty.");return"object"===(0,i.default)(this.settings)&&void 0!==this.settings[t]?this.settings[t]:e}},{key:"setSetting",value:function(t,e){if("string"!=typeof t||""===t)throw new TypeError("setSetting error: 'key' is not a 'string' or is empty.");return"object"===this.settings&&(this.settings[t]=e,!0)}}],[{key:"getFormats",value:function(){return b.default.getFormats(x.default.MODULE)}},{key:"parse",value:function(t){if("object"!==(void 0===t?"undefined":(0,i.default)(t)))throw new TypeError("parse error: 'object' is not an 'object'.");var s=(0,n.default)(new e,t);return s.classes.length>0&&(s.classes=s.classes.map(function(t){return d.default.parse(t)})),s.errors.length>0&&(s.errors=s.errors.map(function(t){return v.default.parse(t)})),s.methods.length>0&&(s.methods=s.methods.map(function(t){return y.default.parse(t)})),s}}]),e}(c.default);e.default=P,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(s(2)),n=a(s(0)),i=a(s(1));function a(t){return t&&t.__esModule?t:{default:t}}var o=function(){function t(){(0,n.default)(this,t)}return(0,i.default)(t,null,[{key:"safeArray",value:function(t){return void 0===t||null===t?[]:Array.isArray(t)?t:[t]}},{key:"safeName",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==t&&"object"===(void 0===t?"undefined":(0,r.default)(t))&&"string"==typeof t.name&&""!==t.name?t.name:"string"==typeof e&&""!==e?e:"<anonymous>"}},{key:"safeValue",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==t&&"object"===(void 0===t?"undefined":(0,r.default)(t))&&"string"==typeof t.value&&""!==t.value?t.value:"string"==typeof e&&""!==e?e:"<anonymous>"}}]),t}();e.default=o,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(s(0)),n=o(s(1)),i=o(s(160)),a=o(s(11));function o(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(){(0,r.default)(this,t),this.cyclomatic=0,this.cyclomaticDensity=0,this.halstead=new i.default,this.paramCount=0,this.sloc={logical:0,physical:0}}return(0,n.default)(t,[{key:"keys",get:function(){return l}}]),t}();e.default=u;var l=a.default.getAccessorList(new u);t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=u(s(5)),n=u(s(2)),i=u(s(0)),a=u(s(1)),o=u(s(9));function u(t){return t&&t.__esModule?t:{default:t}}var l=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"<unknown>",s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;(0,i.default)(this,t),this.lineStart="object"===(void 0===r?"undefined":(0,n.default)(r))?r.lineStart:0,this.lineEnd="object"===(void 0===r?"undefined":(0,n.default)(r))?r.lineEnd:0,this.severity=e,this.message=s,this.name="object"===(void 0===r?"undefined":(0,n.default)(r))?r.getName():"",this.type="object"===(void 0===r?"undefined":(0,n.default)(r))?r.type:void 0}return(0,a.default)(t,[{key:"toString",value:function(){return"("+this.severity+") "+this.message+" @ "+this.type.description+" "+(""!==this.name?"- "+this.name+" ":"")+"("+this.lineStart+" - "+this.lineEnd+")"}}],[{key:"parse",value:function(e){if("object"!==(void 0===e?"undefined":(0,n.default)(e)))throw new TypeError("parse error: 'object' is not an 'object'.");var s=(0,r.default)(new t,e);return s.type=o.default.enumValueOf(e.type.name),s}}]),t}();e.default=l,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=l(s(4)),n=l(s(0)),i=l(s(7)),a=l(s(6)),o=l(s(60)),u=l(s(161));function l(t){return t&&t.__esModule?t:{default:t}}var h=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;(0,n.default)(this,e);var o=(0,i.default)(this,(e.__proto__||(0,r.default)(e)).call(this));return o.cyclomatic=a,o.cyclomaticDensity=0,o.halstead=new u.default,o.paramCount=0,o.sloc={logical:0,physical:s-t+1},o}return(0,a.default)(e,t),e}(o.default);e.default=h,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=p(s(96)),n=p(s(19)),i=p(s(5)),a=p(s(0)),o=p(s(1)),u=(0,r.default)(["",""],["",""]),l=p(s(11)),h=p(s(9)),c=p(s(21));function p(t){return t&&t.__esModule?t:{default:t}}var d=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,a.default)(this,t),this._headers=e,this._keys=s}return(0,o.default)(t,[{key:"formatReport",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=(0,i.default)({},this._keys,e),r=void 0;switch(t.type){case h.default.CLASS:r=this._formatClass(t,s).replace(/^[\n]/,"");break;case h.default.CLASS_METHOD:r=this._formatMethod(t,s,"",!1).replace(/^[\n]/,"");break;case h.default.MODULE_METHOD:r=this._formatMethod(t,s).replace(/^[\n]/,"");break;case h.default.MODULE:r=this._formatModule(t,s);break;case h.default.NESTED_METHOD:r=this._formatMethod(t,s,"",!1).replace(/^[\n]/,"");break;case h.default.PROJECT:r=this._formatProject(t,s);break;default:return console.warn("formatReport '"+this.name+"' warning: unsupported report type '"+t.type+"'."),""}return r}},{key:"_formatClass",value:function(t,e){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!Array.isArray(this._headers.classReport))return"";var r="boolean"!=typeof e.indent||e.indent?" ":"",i="boolean"!=typeof e.indent||e.indent?" ":"";return""+c.default.safeStringsPrependObject.apply(c.default,[s,t].concat((0,n.default)(this._headers.classReport),(0,n.default)(this._formatEntries(t,e.classReport,r))))+this._formatMethods(t.methods,e,i,!1)}},{key:"_formatClasses",value:function(t,e){var s=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return Array.isArray(t)?t.reduce(function(t,n){return""+t+s._formatClass(n,e,r)},""):""}},{key:"_formatEntries",value:function(t,e){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(!Array.isArray(e))return"";var n="string"==typeof this._headers.entryPrepend?this._headers.entryPrepend:"",i="function"==typeof this._headers.entryTemplateTag?this._headers.entryTemplateTag:void 0,a=[];return e.forEach(function(e){var o=e instanceof c.default.SafeEntry?e.accessor:e,h=l.default.safeAccess(t,o);if(void 0!==h){var p="";if((h=Array.isArray(h)?h:[h]).length>0){var d={};h.forEach(function(t,i){i>0&&(p+=r),"string"==typeof e?p+=""+s+n+e+": "+t+"\n":(l.default.safeSet(d,o,t),p+=c.default.safeStringsPrependObject(""+s+n,d,e))})}""!==(p=i?i(u,p):p)&&a.push(p)}}),a}},{key:"_formatMethod",value:function(t,e){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!Array.isArray(this._headers.classMethod)||!Array.isArray(this._headers.moduleMethod))return"";var i="boolean"!=typeof e.indent||e.indent?" ":"";return c.default.safeStringsPrependObject.apply(c.default,[s,t].concat((0,n.default)(r?this._headers.moduleMethod:this._headers.classMethod),(0,n.default)(this._formatEntries(t,e.methodReport,i,s))))}},{key:"_formatMethods",value:function(t,e){var s=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return Array.isArray(t)?t.reduce(function(t,i){return""+t+s._formatMethod(i,e,r,n)},""):""}},{key:"_formatModule",value:function(t,e){var s="";try{t.___modulecntr___=0,t.___modulecntrplus1___=1,s=this._formatModuleReport(t,!0,e)}finally{delete t.___modulecntr___,delete t.___modulecntrplus1___}return s.replace(/^[\n]/,"")}},{key:"_formatModuleReport",value:function(t,e,s){if(!Array.isArray(this._headers.moduleReport))return"";var r="boolean"!=typeof s.indent||s.indent?" ":"";return e?c.default.safeStringsObject.apply(c.default,[t].concat((0,n.default)(this._headers.moduleReport),(0,n.default)(this._formatEntries(t,s.moduleReport,r)),[this._formatMethods(t.methods,s,r,!0),this._formatClasses(t.classes,s,r)])):c.default.safeStringsObject.apply(c.default,[t].concat((0,n.default)(this._headers.moduleReport)))}},{key:"_formatProject",value:function(t,e){var s=this,r=t.getSetting("serializeModules",!1);return t.modules.reduce(function(t,n,i){var a="";try{n.___modulecntr___=i,n.___modulecntrplus1___=i+1,a=""+t+s._formatModuleReport(n,r,e)}finally{delete n.___modulecntr___,delete n.___modulecntrplus1___}return a},""+this._formatProjectReport(t,e))}},{key:"_formatProjectReport",value:function(t,e){if(!Array.isArray(this._headers.projectReport))return"";var s="boolean"!=typeof e.indent||e.indent?" ":"";return c.default.safeStringsObject.apply(c.default,[t].concat((0,n.default)(this._headers.projectReport),(0,n.default)(this._formatEntries(t,e.projectReport,s))))}}]),t}();e.default=d,t.exports=e.default},function(t,e,s){t.exports={default:s(175),__esModule:!0}},function(t,e,s){var r=s(13);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(s(0)),n=a(s(1)),i=a(s(25));function a(t){return t&&t.__esModule?t:{default:t}}var o=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;(0,r.default)(this,t),this.aggregate=e}return(0,n.default)(t,[{key:"toFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return i.default.format(this,t,e)}},{key:"aggregateReport",get:function(){return void 0!==this.aggregate?this.aggregate:this}}]),t}();e.default=o,t.exports=e.default},function(t,e,s){t.exports={default:s(210),__esModule:!0}},function(t,e,s){var r=s(45),n=s(39),i=s(27),a=s(76),o=s(28),u=s(129),l=Object.getOwnPropertyDescriptor;e.f=s(14)?l:function(t,e){if(t=i(t),e=a(e,!0),u)try{return l(t,e)}catch(t){}if(o(t,e))return n(!r.f.call(t,e),t[e])}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,s){var r=s(10),n=s(3),i=s(41),a=s(65),o=s(17).f;t.exports=function(t){var e=n.Symbol||(n.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||o(e,t,{value:a.f(t)})}},function(t,e,s){e.f=s(12)},function(t,e,s){t.exports={default:s(229),__esModule:!0}},function(t,e,s){var r=s(24);t.exports=function(t,e,s){for(var n in e)s&&t[n]?t[n]=e[n]:r(t,n,e[n]);return t}},function(t,e,s){"use strict";var r=s(40);t.exports.f=function(t){return new function(t){var e,s;this.promise=new t(function(t,r){if(void 0!==e||void 0!==s)throw TypeError("Bad Promise constructor");e=t,s=r}),this.resolve=r(e),this.reject=r(s)}(t)}},function(t,e,s){var r=s(71),n=s(12)("iterator"),i=s(38);t.exports=s(3).getIteratorMethod=function(t){if(void 0!=t)return t[n]||t["@@iterator"]||i[r(t)]}},function(t,e){t.exports=function(t,e,s,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(s+": incorrect invocation!");return t}},function(t,e,s){var r=s(36),n=s(12)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,s,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(s=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),n))?s:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,s){var r=s(3),n=s(10),i=n["__core-js_shared__"]||(n["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:s(41)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e,s){var r=s(73)("keys"),n=s(47);t.exports=function(t){return r[t]||(r[t]=n(t))}},function(t,e,s){var r=s(36);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,s){var r=s(13);t.exports=function(t,e){if(!r(t))return t;var s,n;if(e&&"function"==typeof(s=t.toString)&&!r(n=s.call(t)))return n;if("function"==typeof(s=t.valueOf)&&!r(n=s.call(t)))return n;if(!e&&"function"==typeof(s=t.toString)&&!r(n=s.call(t)))return n;throw TypeError("Can't convert object to primitive value")}},function(t,e,s){var r=s(13),n=s(10).document,i=r(n)&&r(n.createElement);t.exports=function(t){return i?n.createElement(t):{}}},function(t,e,s){"use strict";var r=s(41),n=s(8),i=s(128),a=s(24),o=s(38),u=s(240),l=s(35),h=s(124),c=s(12)("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,s,f,y,v,m){u(s,e,f);var g,x,b,w=function(t){if(!p&&t in k)return k[t];switch(t){case"keys":case"values":return function(){return new s(this,t)}}return function(){return new s(this,t)}},P=e+" Iterator",E="values"==y,_=!1,k=t.prototype,A=k[c]||k["@@iterator"]||y&&k[y],T=A||w(y),S=y?E?w("entries"):T:void 0,C="Array"==e&&k.entries||A;if(C&&(b=h(C.call(new t)))!==Object.prototype&&b.next&&(l(b,P,!0),r||"function"==typeof b[c]||a(b,c,d)),E&&A&&"values"!==A.name&&(_=!0,T=function(){return A.call(this)}),r&&!m||!p&&!_&&k[c]||a(k,c,T),o[e]=T,o[P]=d,y)if(g={values:E?T:w("values"),keys:v?T:w("keys"),entries:S},m)for(x in g)x in k||i(k,x,g[x]);else n(n.P+n.F*(p||_),e,g);return g}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var s=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:s)(t)}},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=u(s(22)),n=u(s(23)),i=u(s(0)),a=u(s(1)),o=u(s(140));function u(t){return t&&t.__esModule?t:{default:t}}var l=function(){function t(e){if((0,i.default)(this,t),!(e instanceof o.default))throw new TypeError("'eventbus' is not an instance of TyphonEvents.");this._eventbus=e,this._events=[]}return(0,a.default)(t,[{key:"createEventProxy",value:function(){return new t(this._eventbus)}},{key:"destroy",value:function(){if(null===this._eventbus)throw new ReferenceError("This EventProxy instance has been destroyed.");var t=!0,e=!1,s=void 0;try{for(var r,i=(0,n.default)(this._events);!(t=(r=i.next()).done);t=!0){var a=r.value;this._eventbus.off(a.name,a.callback,a.context)}}catch(t){e=!0,s=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw s}}this._events=[],this._eventbus=null}},{key:"getEventNames",value:function(){if(!this._events)return[];var t={},e=!0,s=!1,i=void 0;try{for(var a,o=(0,n.default)(this._events);!(e=(a=o.next()).done);e=!0){t[a.value.name]=!0}}catch(t){s=!0,i=t}finally{try{!e&&o.return&&o.return()}finally{if(s)throw i}}return(0,r.default)(t)}},{key:"forEachEvent",value:function(t){if("function"!=typeof t)throw new TypeError("'callback' is not a 'function'.");var e=!0,s=!1,r=void 0;try{for(var i,a=(0,n.default)(this._events);!(e=(i=a.next()).done);e=!0){var o=i.value;t(o.name,o.callback,o.context)}}catch(t){s=!0,r=t}finally{try{!e&&a.return&&a.return()}finally{if(s)throw r}}}},{key:"getEventbusName",value:function(){if(null===this._eventbus)throw new ReferenceError("This EventProxy instance has been destroyed.");return this._eventbus.getEventbusName()}},{key:"off",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(null===this._eventbus)throw new ReferenceError("This EventProxy instance has been destroyed.");var r=void 0!==t&&null!==t,i=void 0!==e&&null!==e,a=void 0!==s&&null!==s;if(r||i||a){var o={};r&&(o.name=t),i&&(o.callback=e),a&&(o.context=s);for(var u=this._events.length;--u>=0;){var l=this._events[u],h=!0;for(var c in o)if(l[c]!==o[c]){h=!1;break}h&&(this._eventbus.off(o.name,o.callback,o.context),this._events.splice(u,1))}}else{var p=!0,d=!1,f=void 0;try{for(var y,v=(0,n.default)(this._events);!(p=(y=v.next()).done);p=!0){var m=y.value;this._eventbus.off(m.name,m.callback,m.context)}}catch(t){d=!0,f=t}finally{try{!p&&v.return&&v.return()}finally{if(d)throw f}}this._events=[]}return this}},{key:"on",value:function(t,e){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(null===this._eventbus)throw new ReferenceError("This EventProxy instance has been destroyed.");return this._eventbus.on(t,e,s),this._events.push({name:t,callback:e,context:s}),this}},{key:"trigger",value:function(){var t;if(null===this._eventbus)throw new ReferenceError("This EventProxy instance has been destroyed.");return(t=this._eventbus).trigger.apply(t,arguments),this}},{key:"triggerAsync",value:function(){var t;if(null===this._eventbus)throw new ReferenceError("This EventProxy instance has been destroyed.");return(t=this._eventbus).triggerAsync.apply(t,arguments)}},{key:"triggerDefer",value:function(){var t;if(null===this._eventbus)throw new ReferenceError("This EventProxy instance has been destroyed.");return(t=this._eventbus).triggerDefer.apply(t,arguments),this}},{key:"triggerSync",value:function(){var t;if(null===this._eventbus)throw new ReferenceError("This EventProxy instance has been destroyed.");return(t=this._eventbus).triggerSync.apply(t,arguments)}},{key:"eventCount",get:function(){return this._events.length}}]),t}();e.default=l,t.exports=e.default},function(t,e,s){"use strict";e.__esModule=!0;var r,n=s(31),i=(r=n)&&r.__esModule?r:{default:r};e.default=function(t){return function(){var e=t.apply(this,arguments);return new i.default(function(t,s){return function r(n,a){try{var o=e[n](a),u=o.value}catch(t){return void s(t)}if(!o.done)return i.default.resolve(u).then(function(t){r("next",t)},function(t){r("throw",t)});t(u)}("next")})}}},function(t,e,s){t.exports=s(143)},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=_(s(4)),n=_(s(58)),i=_(s(5)),a=_(s(19)),o=_(s(66)),u=_(s(61)),l=_(s(22)),h=_(s(31)),c=_(s(23)),p=_(s(83)),d=_(s(82)),f=_(s(16)),y=_(s(106)),v=_(s(2)),m=_(s(0)),g=_(s(1)),x=_(s(109)),b=_(s(141)),w=_(s(81)),P=_(s(138)),E=_(s(137));function _(t){return t&&t.__esModule?t:{default:t}}var k=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if((0,m.default)(this,t),"object"!==(void 0===e?"undefined":(0,v.default)(e)))throw new TypeError("'options' is not an object.");this._pluginMap=new y.default,this._eventbus=null,this._extraEventData=s,this._options={pluginsEnabled:!0,noEventAdd:!1,noEventDestroy:!1,noEventOptions:!0,noEventRemoval:!1,throwNoMethod:!1,throwNoPlugin:!1},"object"===(0,v.default)(e.eventbus)&&this.setEventbus(e.eventbus,e.eventPrepend),this.setOptions(e)}return(0,g.default)(t,[{key:"add",value:function(t,e){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if("object"!==(void 0===t?"undefined":(0,v.default)(t)))throw new TypeError("'pluginConfig' is not an 'object'.");if("string"!=typeof t.name)throw new TypeError("'pluginConfig.name' is not a 'string' for entry: "+(0,f.default)(t)+".");if(void 0!==t.target&&"string"!=typeof t.target)throw new TypeError("'pluginConfig.target' is not a string for entry: "+(0,f.default)(t)+".");if(void 0!==t.options&&"object"!==(0,v.default)(t.options))throw new TypeError("'pluginConfig.options' is not an 'object' for entry: "+(0,f.default)(t)+".");if(void 0!==e&&"object"!==(void 0===e?"undefined":(0,v.default)(e)))throw new TypeError("'moduleData' is not an 'object' for entry: "+(0,f.default)(t)+".");if(!this._pluginMap.has(t.name)){var r=void 0,n=void 0,i=void 0;"object"===(0,v.default)(t.instance)||"function"==typeof t.instance?(r=t.instance,n=t.name,i="instance"):(n=t.target||t.name).match(/^[.\/\\]/)?(r=s(42)(x.default.resolve(n)),i="require-path"):(r=s(42)(n),i="require-module");var a=JSON.parse((0,f.default)({manager:{eventPrepend:this._eventPrepend},module:e||{},plugin:{name:t.name,scopedName:this._eventPrepend+":"+t.name,target:n,targetEscaped:P.default.escape(n),type:i,options:t.options||{}}}));b.default.deepFreeze(a,["eventPrepend","scopedName"]);var o=null!==this._eventbus&&void 0!==this._eventbus?new w.default(this._eventbus):void 0,u=new P.default(t.name,a,r,o);return this._pluginMap.set(t.name,u),S("onPluginLoad",{},{},this._extraEventData,t.name,this._pluginMap,this._options,!1),this._eventbus&&this._eventbus.trigger("typhonjs:plugin:manager:plugin:added",a),a}null!==this._eventbus&&void 0!==this._eventbus&&this._eventbus.trigger("log:warn","A plugin already exists with name: "+t.name+".")}},{key:"addAsync",value:function(){var t=(0,d.default)(p.default.mark(function t(e,r){var n,i,a,o,u,l;return p.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==this._pluginMap){t.next=2;break}throw new ReferenceError("This PluginManager instance has been destroyed.");case 2:if("object"===(void 0===e?"undefined":(0,v.default)(e))){t.next=4;break}throw new TypeError("'pluginConfig' is not an 'object'.");case 4:if("string"==typeof e.name){t.next=6;break}throw new TypeError("'pluginConfig.name' is not a 'string' for entry: "+(0,f.default)(e)+".");case 6:if(void 0===e.target||"string"==typeof e.target){t.next=8;break}throw new TypeError("'pluginConfig.target' is not a string for entry: "+(0,f.default)(e)+".");case 8:if(void 0===e.options||"object"===(0,v.default)(e.options)){t.next=10;break}throw new TypeError("'pluginConfig.options' is not an 'object' for entry: "+(0,f.default)(e)+".");case 10:if(void 0===r||"object"===(void 0===r?"undefined":(0,v.default)(r))){t.next=12;break}throw new TypeError("'moduleData' is not an 'object' for entry: "+(0,f.default)(e)+".");case 12:if(!this._pluginMap.has(e.name)){t.next=15;break}return null!==this._eventbus&&void 0!==this._eventbus&&this._eventbus.trigger("log:warn","A plugin already exists with name: "+e.name+"."),t.abrupt("return",void 0);case 15:return n=void 0,i=void 0,a=void 0,"object"===(0,v.default)(e.instance)||"function"==typeof e.instance?(n=e.instance,i=e.name,a="instance"):(i=e.target||e.name).match(/^[.\/\\]/)?(n=s(42)(x.default.resolve(i)),a="require-path"):(n=s(42)(i),a="require-module"),o=JSON.parse((0,f.default)({manager:{eventPrepend:this._eventPrepend},module:r||{},plugin:{name:e.name,scopedName:this._eventPrepend+":"+e.name,target:i,targetEscaped:P.default.escape(i),type:a,options:e.options||{}}})),b.default.deepFreeze(o,["eventPrepend","scopedName"]),u=null!==this._eventbus&&void 0!==this._eventbus?new w.default(this._eventbus):void 0,l=new P.default(e.name,o,n,u),this._pluginMap.set(e.name,l),t.next=24,T("onPluginLoad",{},{},this._extraEventData,e.name,this._pluginMap,this._options,!1);case 24:if(!this._eventbus){t.next=27;break}return t.next=27,this._eventbus.triggerAsync("typhonjs:plugin:manager:plugin:added",o);case 27:return t.abrupt("return",o);case 28:case"end":return t.stop()}},t,this)}));return function(e,s){return t.apply(this,arguments)}}()},{key:"addAll",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1];if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if(!Array.isArray(t))throw new TypeError("'plugins' is not an array.");var s=[],r=!0,n=!1,i=void 0;try{for(var a,o=(0,c.default)(t);!(r=(a=o.next()).done);r=!0){var u=a.value,l=this.add(u,e);l&&s.push(l)}}catch(t){n=!0,i=t}finally{try{!r&&o.return&&o.return()}finally{if(n)throw i}}return s}},{key:"addAllAsync",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1];if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if(!Array.isArray(t))throw new TypeError("'plugins' is not an array.");var s=[],r=!0,n=!1,i=void 0;try{for(var a,o=(0,c.default)(t);!(r=(a=o.next()).done);r=!0){var u=a.value,l=this.addAsync(u,e);l&&s.push(l)}}catch(t){n=!0,i=t}finally{try{!r&&o.return&&o.return()}finally{if(n)throw i}}return h.default.all(s)}},{key:"_addEventbus",value:function(t,e){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");return this._options.noEventAdd?void 0:this.add(t,e)}},{key:"_addEventbusAsync",value:function(t,e){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");return this._options.noEventAdd?h.default.resolve(void 0):this.addAsync(t,e)}},{key:"_addAllEventbus",value:function(t,e){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if(!this._options.noEventAdd)return this.addAll(t,e)}},{key:"_addAllEventbusAsync",value:function(t,e){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if(!this._options.noEventAdd)return this.addAllAsync(t,e)}},{key:"createEventProxy",value:function(){return null!==this._eventbus?new w.default(this._eventbus):void 0}},{key:"destroy",value:function(){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");this.removeAll(),null!==this._eventbus&&void 0!==this._eventbus&&(this._eventbus.off(this._eventPrepend+":add",this._addEventbus,this),this._eventbus.off(this._eventPrepend+":add:all",this._addAllEventbus,this),this._eventbus.off(this._eventPrepend+":async:add",this._addEventbusAsync,this),this._eventbus.off(this._eventPrepend+":async:add:all",this._addAllEventbusAsync,this),this._eventbus.off(this._eventPrepend+":async:destroy:manager",this._destroyEventbusAsync,this),this._eventbus.off(this._eventPrepend+":async:invoke",this.invokeAsync,this),this._eventbus.off(this._eventPrepend+":async:invoke:event",this.invokeAsyncEvent,this),this._eventbus.off(this._eventPrepend+":async:remove",this._removeEventbusAsync,this),this._eventbus.off(this._eventPrepend+":async:remove:all",this._removeAllEventbusAsync,this),this._eventbus.off(this._eventPrepend+":create:event:proxy",this.createEventProxy,this),this._eventbus.off(this._eventPrepend+":destroy:manager",this._destroyEventbus,this),this._eventbus.off(this._eventPrepend+":get:all:plugin:data",this.getAllPluginData,this),this._eventbus.off(this._eventPrepend+":get:extra:event:data",this.getExtraEventData,this),this._eventbus.off(this._eventPrepend+":get:method:names",this.getMethodNames,this),this._eventbus.off(this._eventPrepend+":get:options",this.getOptions,this),this._eventbus.off(this._eventPrepend+":get:plugin:enabled",this.getPluginEnabled,this),this._eventbus.off(this._eventPrepend+":get:plugin:data",this.getPluginData,this),this._eventbus.off(this._eventPrepend+":get:plugin:event:names",this.getPluginEventNames,this),this._eventbus.off(this._eventPrepend+":get:plugin:method:names",this.getPluginMethodNames,this),this._eventbus.off(this._eventPrepend+":get:plugin:names",this.getPluginNames,this),this._eventbus.off(this._eventPrepend+":get:plugin:options",this.getPluginOptions,this),this._eventbus.off(this._eventPrepend+":get:plugins:enabled",this.getPluginsEnabled,this),this._eventbus.off(this._eventPrepend+":get:plugins:by:event:name",this.getPluginsByEventName,this),this._eventbus.off(this._eventPrepend+":get:plugins:event:names",this.getPluginsEventNames,this),this._eventbus.off(this._eventPrepend+":has:method",this.hasMethod,this),this._eventbus.off(this._eventPrepend+":has:plugin",this.hasPlugin,this),this._eventbus.off(this._eventPrepend+":has:plugin:method",this.hasPluginMethod,this),this._eventbus.off(this._eventPrepend+":invoke",this.invoke,this),this._eventbus.off(this._eventPrepend+":is:valid:config",this.isValidConfig,this),this._eventbus.off(this._eventPrepend+":remove",this._removeEventbus,this),this._eventbus.off(this._eventPrepend+":remove:all",this._removeAllEventbus,this),this._eventbus.off(this._eventPrepend+":set:extra:event:data",this.setExtraEventData,this),this._eventbus.off(this._eventPrepend+":set:options",this._setOptionsEventbus,this),this._eventbus.off(this._eventPrepend+":set:plugin:enabled",this.setPluginEnabled,this),this._eventbus.off(this._eventPrepend+":set:plugins:enabled",this.setPluginsEnabled,this),this._eventbus.off(this._eventPrepend+":sync:invoke",this.invokeSync,this),this._eventbus.off(this._eventPrepend+":sync:invoke:event",this.invokeSyncEvent,this)),this._pluginMap=null,this._eventbus=null}},{key:"destroyAsync",value:function(){var t=(0,d.default)(p.default.mark(function t(){return p.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==this._pluginMap){t.next=2;break}throw new ReferenceError("This PluginManager instance has been destroyed.");case 2:return t.next=4,this.removeAll();case 4:null!==this._eventbus&&void 0!==this._eventbus&&(this._eventbus.off(this._eventPrepend+":add",this._addEventbus,this),this._eventbus.off(this._eventPrepend+":add:all",this._addAllEventbus,this),this._eventbus.off(this._eventPrepend+":async:add",this._addEventbusAsync,this),this._eventbus.off(this._eventPrepend+":async:add:all",this._addAllEventbusAsync,this),this._eventbus.off(this._eventPrepend+":async:destroy:manager",this._destroyEventbusAsync,this),this._eventbus.off(this._eventPrepend+":async:invoke",this.invokeAsync,this),this._eventbus.off(this._eventPrepend+":async:invoke:event",this.invokeAsyncEvent,this),this._eventbus.off(this._eventPrepend+":async:remove",this._removeEventbusAsync,this),this._eventbus.off(this._eventPrepend+":async:remove:all",this._removeAllEventbusAsync,this),this._eventbus.off(this._eventPrepend+":create:event:proxy",this.createEventProxy,this),this._eventbus.off(this._eventPrepend+":destroy:manager",this._destroyEventbus,this),this._eventbus.off(this._eventPrepend+":get:all:plugin:data",this.getAllPluginData,this),this._eventbus.off(this._eventPrepend+":get:extra:event:data",this.getExtraEventData,this),this._eventbus.off(this._eventPrepend+":get:method:names",this.getMethodNames,this),this._eventbus.off(this._eventPrepend+":get:options",this.getOptions,this),this._eventbus.off(this._eventPrepend+":get:plugin:enabled",this.getPluginEnabled,this),this._eventbus.off(this._eventPrepend+":get:plugin:data",this.getPluginData,this),this._eventbus.off(this._eventPrepend+":get:plugin:event:names",this.getPluginEventNames,this),this._eventbus.off(this._eventPrepend+":get:plugin:method:names",this.getPluginMethodNames,this),this._eventbus.off(this._eventPrepend+":get:plugin:names",this.getPluginNames,this),this._eventbus.off(this._eventPrepend+":get:plugin:options",this.getPluginOptions,this),this._eventbus.off(this._eventPrepend+":get:plugins:enabled",this.getPluginsEnabled,this),this._eventbus.off(this._eventPrepend+":get:plugins:by:event:name",this.getPluginsByEventName,this),this._eventbus.off(this._eventPrepend+":get:plugins:event:names",this.getPluginsEventNames,this),this._eventbus.off(this._eventPrepend+":has:method",this.hasMethod,this),this._eventbus.off(this._eventPrepend+":has:plugin",this.hasPlugin,this),this._eventbus.off(this._eventPrepend+":has:plugin:method",this.hasPluginMethod,this),this._eventbus.off(this._eventPrepend+":invoke",this.invoke,this),this._eventbus.off(this._eventPrepend+":is:valid:config",this.isValidConfig,this),this._eventbus.off(this._eventPrepend+":remove",this._removeEventbus,this),this._eventbus.off(this._eventPrepend+":remove:all",this._removeAllEventbus,this),this._eventbus.off(this._eventPrepend+":set:extra:event:data",this.setExtraEventData,this),this._eventbus.off(this._eventPrepend+":set:options",this._setOptionsEventbus,this),this._eventbus.off(this._eventPrepend+":set:plugin:enabled",this.setPluginEnabled,this),this._eventbus.off(this._eventPrepend+":set:plugins:enabled",this.setPluginsEnabled,this),this._eventbus.off(this._eventPrepend+":sync:invoke",this.invokeSync,this),this._eventbus.off(this._eventPrepend+":sync:invoke:event",this.invokeSyncEvent,this)),this._pluginMap=null,this._eventbus=null;case 7:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"_destroyEventbus",value:function(){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");this._options.noEventDestroy||this.destroy()}},{key:"_destroyEventbusAsync",value:function(){var t=(0,d.default)(p.default.mark(function t(){return p.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==this._pluginMap){t.next=2;break}throw new ReferenceError("This PluginManager instance has been destroyed.");case 2:if(this._options.noEventDestroy){t.next=5;break}return t.next=5,this.destroyAsync();case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"getPluginEnabled",value:function(t){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if("string"!=typeof t)throw new TypeError("'pluginName' is not a string.");var e=this._pluginMap.get(t);return e instanceof P.default&&e.enabled}},{key:"getPluginEventNames",value:function(t){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if("string"!=typeof t)throw new TypeError("'pluginName' is not a string.");var e=this._pluginMap.get(t);return e instanceof P.default&&e._eventProxy?e._eventProxy.getEventNames():[]}},{key:"getPluginsEnabled",value:function(t){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");var e=[],s=!0,r=!1,n=void 0;try{for(var i,a=(0,c.default)(t);!(s=(i=a.next()).done);s=!0){var o=i.value;e.push({pluginName:o,enabled:this.getPluginEnabled(o)})}}catch(t){r=!0,n=t}finally{try{!s&&a.return&&a.return()}finally{if(r)throw n}}return e}},{key:"getPluginsEventNames",value:function(t){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");void 0===t&&(t=this._pluginMap.keys()),"string"==typeof t&&(t=[t]);var e=[],s=!0,r=!1,n=void 0;try{for(var i,a=(0,c.default)(t);!(s=(i=a.next()).done);s=!0){var o=i.value;e.push({pluginName:o,events:this.getPluginEventNames(o)})}}catch(t){r=!0,n=t}finally{try{!s&&a.return&&a.return()}finally{if(r)throw n}}return e}},{key:"getPluginsByEventName",value:function(t){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if("string"!=typeof t)throw new TypeError("'eventName' is not a 'string'.");var e=[],s=this.getPluginsEventNames(),r=!0,n=!1,i=void 0;try{for(var a,o=(0,c.default)(s);!(r=(a=o.next()).done);r=!0){var u=a.value;u.events.indexOf(t)>=0&&e.push(u.pluginName)}}catch(t){n=!0,i=t}finally{try{!r&&o.return&&o.return()}finally{if(n)throw i}}return e}},{key:"getAllPluginData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if("boolean"!=typeof t&&void 0!==t)throw new TypeError("'enabled' is not a 'boolean' or 'undefined'.");var e=[],s=void 0===t,r=!0,n=!1,i=void 0;try{for(var a,o=(0,c.default)(this._pluginMap.values());!(r=(a=o.next()).done);r=!0){var u=a.value;(s||u.enabled===t)&&e.push(this.getPluginData(u.name))}}catch(t){n=!0,i=t}finally{try{!r&&o.return&&o.return()}finally{if(n)throw i}}return e}},{key:"getEventbus",value:function(){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");return this._eventbus}},{key:"getExtraEventData",value:function(){return this._extraEventData}},{key:"getMethodNames",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if("boolean"!=typeof t&&void 0!==t)throw new TypeError("'enabled' is not a 'boolean' or 'undefined'.");var s={},r=void 0===t,n=void 0===e,i=!0,a=!1,o=void 0;try{for(var u,h=(0,c.default)(this._pluginMap.values());!(i=(u=h.next()).done);i=!0){var p=u.value;if(p.instance&&(r||p.enabled===t)&&(n||p.name===e)){var d=!0,f=!1,y=void 0;try{for(var v,m=(0,c.default)(C(p.instance));!(d=(v=m.next()).done);d=!0){var g=v.value;p.instance[g]instanceof Function&&"constructor"!==g&&(s[g]=!0)}}catch(t){f=!0,y=t}finally{try{!d&&m.return&&m.return()}finally{if(f)throw y}}}}}catch(t){a=!0,o=t}finally{try{!i&&h.return&&h.return()}finally{if(a)throw o}}return(0,l.default)(s)}},{key:"getOptions",value:function(){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");return JSON.parse((0,f.default)(this._options))}},{key:"getPluginData",value:function(t){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if("string"!=typeof t)throw new TypeError("'pluginName' is not a string.");var e=this._pluginMap.get(t);if(e instanceof P.default)return JSON.parse((0,f.default)(e.data))}},{key:"getPluginMethodNames",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if("boolean"!=typeof t&&void 0!==t)throw new TypeError("'enabled' is not a 'boolean' or 'undefined'.");var e=[],s=void 0===t,r=!0,n=!1,i=void 0;try{for(var a,o=(0,c.default)(this._pluginMap.values());!(r=(a=o.next()).done);r=!0){var u=a.value;if(u.instance&&(s||u.enabled===t)){var l=!0,h=!1,p=void 0;try{for(var d,f=(0,c.default)(C(u.instance));!(l=(d=f.next()).done);l=!0){var y=d.value;u.instance[y]instanceof Function&&"constructor"!==y&&e.push({plugin:u.name,method:y})}}catch(t){h=!0,p=t}finally{try{!l&&f.return&&f.return()}finally{if(h)throw p}}}}}catch(t){n=!0,i=t}finally{try{!r&&o.return&&o.return()}finally{if(n)throw i}}return e}},{key:"getPluginNames",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if("boolean"!=typeof t&&void 0!==t)throw new TypeError("'enabled' is not a 'boolean' or 'undefined'.");if(void 0===t)return(0,u.default)(this._pluginMap.keys());var e=[],s=!0,r=!1,n=void 0;try{for(var i,a=(0,c.default)(this._pluginMap.values());!(s=(i=a.next()).done);s=!0){var o=i.value;o.enabled===t&&e.push(o.name)}}catch(t){r=!0,n=t}finally{try{!s&&a.return&&a.return()}finally{if(r)throw n}}return e}},{key:"getPluginOptions",value:function(t){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if("string"!=typeof t)throw new TypeError("'pluginName' is not a string.");var e=void 0,s=this._pluginMap.get(t);return s instanceof P.default&&(e=JSON.parse((0,f.default)(s.data.plugin.options))),e}},{key:"hasMethod",value:function(t){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if("string"!=typeof t)throw new TypeError("'methodName' is not a string.");var e=!0,s=!1,r=void 0;try{for(var n,i=(0,c.default)(this._pluginMap.values());!(e=(n=i.next()).done);e=!0){if("function"==typeof n.value.instance[t])return!0}}catch(t){s=!0,r=t}finally{try{!e&&i.return&&i.return()}finally{if(s)throw r}}return!1}},{key:"hasPlugin",value:function(t){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if("string"!=typeof t)throw new TypeError("'pluginName' is not a string.");return this._pluginMap.has(t)}},{key:"hasPluginMethod",value:function(t,e){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if("string"!=typeof t)throw new TypeError("'pluginName' is not a string.");if("string"!=typeof e)throw new TypeError("'methodName' is not a string.");var s=this._pluginMap.get(t);return s instanceof P.default&&"function"==typeof s[e]}},{key:"invoke",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if("string"!=typeof t)throw new TypeError("'methodName' is not a string.");if(void 0===s&&(s=this._pluginMap.keys()),"string"!=typeof s&&!Array.isArray(s)&&"function"!=typeof s[o.default])throw new TypeError("'nameOrList' is not a string, array, or iterator.");var r=!1,n=!1;if(this._options.pluginsEnabled){if("string"==typeof s){var i,u=this._pluginMap.get(s);if(u instanceof P.default&&u.enabled&&u.instance)if(n=!0,"function"==typeof u.instance[t])Array.isArray(e)?(i=u.instance)[t].apply(i,(0,a.default)(e)):u.instance[t](e),r=!0}else{var l=!0,h=!1,p=void 0;try{for(var d,f=(0,c.default)(s);!(l=(d=f.next()).done);l=!0){var y,v=d.value,m=this._pluginMap.get(v);if(m instanceof P.default&&m.enabled&&m.instance)if(n=!0,"function"==typeof m.instance[t])Array.isArray(e)?(y=m.instance)[t].apply(y,(0,a.default)(e)):m.instance[t](e),r=!0}}catch(t){h=!0,p=t}finally{try{!l&&f.return&&f.return()}finally{if(h)throw p}}}if(this._options.throwNoPlugin&&!n)throw new Error("PluginManager failed to find any target plugins.");if(this._options.throwNoMethod&&!r)throw new Error("PluginManager failed to invoke '"+t+"'.")}}},{key:"invokeAsync",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if("string"!=typeof t)throw new TypeError("'methodName' is not a string.");if(void 0===s&&(s=this._pluginMap.keys()),"string"!=typeof s&&!Array.isArray(s)&&"function"!=typeof s[o.default])throw new TypeError("'nameOrList' is not a string, array, or iterator.");var r=!1,n=!1,i=void 0,u=[];if(!this._options.pluginsEnabled)return i;try{if("string"==typeof s){var l,p=this._pluginMap.get(s);if(p instanceof P.default&&p.enabled&&p.instance)if(n=!0,"function"==typeof p.instance[t])null===(i=Array.isArray(e)?(l=p.instance)[t].apply(l,(0,a.default)(e)):p.instance[t](e))&&void 0===i||u.push(i),r=!0}else{var d=!0,f=!1,y=void 0;try{for(var v,m=(0,c.default)(s);!(d=(v=m.next()).done);d=!0){var g,x=v.value,b=this._pluginMap.get(x);if(b instanceof P.default&&b.enabled&&b.instance)if(n=!0,"function"==typeof b.instance[t])null===(i=Array.isArray(e)?(g=b.instance)[t].apply(g,(0,a.default)(e)):b.instance[t](e))&&void 0===i||u.push(i),r=!0}}catch(t){f=!0,y=t}finally{try{!d&&m.return&&m.return()}finally{if(f)throw y}}}if(this._options.throwNoPlugin&&!n)return h.default.reject(new Error("PluginManager failed to find any target plugins."));if(this._options.throwNoMethod&&!r)return h.default.reject(new Error("PluginManager failed to invoke '"+t+"'."))}catch(t){return h.default.reject(t)}return u.length>1?h.default.all(u):h.default.resolve(i)}},{key:"invokeAsyncEvent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");return void 0===r&&(r=this._pluginMap.keys()),this._options.pluginsEnabled?T(t,e,s,this._extraEventData,r,this._pluginMap,this._options):h.default.resolve()}},{key:"invokeSync",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if("string"!=typeof t)throw new TypeError("'methodName' is not a string.");if(void 0===s&&(s=this._pluginMap.keys()),"string"!=typeof s&&!Array.isArray(s)&&"function"!=typeof s[o.default])throw new TypeError("'nameOrList' is not a string, array, or iterator.");var r=!1,n=!1,i=void 0,u=[];if(!this._options.pluginsEnabled)return i;if("string"==typeof s){var l,h=this._pluginMap.get(s);if(h instanceof P.default&&h.enabled&&h.instance)if(n=!0,"function"==typeof h.instance[t])null===(i=Array.isArray(e)?(l=h.instance)[t].apply(l,(0,a.default)(e)):h.instance[t](e))&&void 0===i||u.push(i),r=!0}else{var p=!0,d=!1,f=void 0;try{for(var y,v=(0,c.default)(s);!(p=(y=v.next()).done);p=!0){var m,g=y.value,x=this._pluginMap.get(g);if(x instanceof P.default&&x.enabled&&x.instance)if(n=!0,"function"==typeof x.instance[t])null===(i=Array.isArray(e)?(m=x.instance)[t].apply(m,(0,a.default)(e)):x.instance[t](e))&&void 0===i||u.push(i),r=!0}}catch(t){d=!0,f=t}finally{try{!p&&v.return&&v.return()}finally{if(d)throw f}}}if(this._options.throwNoPlugin&&!n)throw new Error("PluginManager failed to find any target plugins.");if(this._options.throwNoMethod&&!r)throw new Error("PluginManager failed to invoke '"+t+"'.");return u.length>1?u:i}},{key:"invokeSyncEvent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if(void 0===r&&(r=this._pluginMap.keys()),this._options.pluginsEnabled)return S(t,e,s,this._extraEventData,r,this._pluginMap,this._options)}},{key:"isValidConfig",value:function(t){return"object"===(void 0===t?"undefined":(0,v.default)(t))&&("string"==typeof t.name&&((void 0===t.target||"string"==typeof t.target)&&(void 0===t.options||"object"===(0,v.default)(t.options))))}},{key:"setEventbus",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"plugins";if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if("object"!==(void 0===t?"undefined":(0,v.default)(t)))throw new TypeError("'targetEventbus' is not an 'object'.");if("string"!=typeof e)throw new TypeError("'eventPrepend' is not a 'string'.");if(t===this._eventbus)return this;var s=this._eventPrepend;if(this._eventPrepend=e,this._pluginMap.size>0){S("onPluginUnload",{},{},this._extraEventData,this._pluginMap.keys(),this._pluginMap,this._options,!1);var r=!0,n=!1,a=void 0;try{for(var o,u=(0,c.default)(this._pluginMap.values());!(r=(o=u.next()).done);r=!0){var l=o.value;try{l.instance._eventbus=void 0}catch(t){}l.data.manager.eventPrepend=e,l.data.plugin.scopedName=e+":"+l.name,l.eventProxy instanceof w.default&&l.eventProxy.destroy(),l.eventProxy=new w.default(t)}}catch(t){n=!0,a=t}finally{try{!r&&u.return&&u.return()}finally{if(n)throw a}}S("onPluginLoad",{},{},this._extraEventData,this._pluginMap.keys(),this._pluginMap,this._options,!1);var h=!0,p=!1,d=void 0;try{for(var y,m=(0,c.default)(this._pluginMap.values());!(h=(y=m.next()).done);h=!0){var g=y.value;this._eventbus&&this._eventbus.trigger("typhonjs:plugin:manager:eventbus:changed",(0,i.default)({oldEventbus:this._eventbus,oldManagerEventPrepend:s,oldScopedName:s+":"+g.name,newEventbus:t,newManagerEventPrepend:e,newScopedName:e+":"+g.name},JSON.parse((0,f.default)(g.data))))}}catch(t){p=!0,d=t}finally{try{!h&&m.return&&m.return()}finally{if(p)throw d}}}return null!==this._eventbus&&(this._eventbus.off(s+":add",this._addEventbus,this),this._eventbus.off(s+":add:all",this._addAllEventbus,this),this._eventbus.off(s+":async:add",this._addEventbusAsync,this),this._eventbus.off(s+":async:add:all",this._addAllEventbusAsync,this),this._eventbus.off(s+":async:destroy:manager",this._destroyEventbusAsync,this),this._eventbus.off(s+":async:invoke",this.invokeAsync,this),this._eventbus.off(s+":async:invoke:event",this.invokeAsyncEvent,this),this._eventbus.off(s+":async:remove",this._removeEventbusAsync,this),this._eventbus.off(s+":async:remove:all",this._removeAllEventbusAsync,this),this._eventbus.off(s+":create:event:proxy",this.createEventProxy,this),this._eventbus.off(s+":destroy:manager",this._destroyEventbus,this),this._eventbus.off(s+":get:all:plugin:data",this.getAllPluginData,this),this._eventbus.off(s+":get:extra:event:data",this.getExtraEventData,this),this._eventbus.off(s+":get:method:names",this.getMethodNames,this),this._eventbus.off(s+":get:options",this.getOptions,this),this._eventbus.off(s+":get:plugin:enabled",this.getPluginEnabled,this),this._eventbus.off(s+":get:plugin:data",this.getPluginData,this),this._eventbus.off(s+":get:plugin:event:names",this.getPluginEventNames,this),this._eventbus.off(s+":get:plugin:method:names",this.getPluginMethodNames,this),this._eventbus.off(s+":get:plugin:names",this.getPluginNames,this),this._eventbus.off(s+":get:plugin:options",this.getPluginOptions,this),this._eventbus.off(s+":get:plugins:enabled",this.getPluginsEnabled,this),this._eventbus.off(s+":get:plugins:by:event:name",this.getPluginsByEventName,this),this._eventbus.off(s+":get:plugins:event:names",this.getPluginsEventNames,this),this._eventbus.off(s+":has:method",this.hasMethod,this),this._eventbus.off(s+":has:plugin",this.hasPlugin,this),this._eventbus.off(s+":has:plugin:method",this.hasPluginMethod,this),this._eventbus.off(s+":invoke",this.invoke,this),this._eventbus.off(s+":is:valid:config",this.isValidConfig,this),this._eventbus.off(s+":remove",this._removeEventbus,this),this._eventbus.off(s+":remove:all",this._removeAllEventbus,this),this._eventbus.off(s+":set:extra:event:data",this.setExtraEventData,this),this._eventbus.off(s+":set:options",this._setOptionsEventbus,this),this._eventbus.off(s+":set:plugin:enabled",this.setPluginEnabled,this),this._eventbus.off(s+":set:plugins:enabled",this.setPluginsEnabled,this),this._eventbus.off(s+":sync:invoke",this.invokeSync,this),this._eventbus.off(s+":sync:invoke:event",this.invokeSyncEvent,this),this._eventbus.trigger("typhonjs:plugin:manager:eventbus:removed",{oldEventbus:this._eventbus,oldEventPrepend:s,newEventbus:t,newEventPrepend:e})),t.on(e+":add",this._addEventbus,this),t.on(e+":add:all",this._addAllEventbus,this),t.on(e+":async:add",this._addEventbusAsync,this),t.on(e+":async:add:all",this._addAllEventbusAsync,this),t.on(e+":async:destroy:manager",this._destroyEventbusAsync,this),t.on(e+":async:invoke",this.invokeAsync,this),t.on(e+":async:invoke:event",this.invokeAsyncEvent,this),t.on(e+":async:remove",this._removeEventbusAsync,this),t.on(e+":async:remove:all",this._removeAllEventbusAsync,this),t.on(e+":create:event:proxy",this.createEventProxy,this),t.on(e+":destroy:manager",this._destroyEventbus,this),t.on(e+":get:all:plugin:data",this.getAllPluginData,this),t.on(e+":get:extra:event:data",this.getExtraEventData,this),t.on(e+":get:method:names",this.getMethodNames,this),t.on(e+":get:options",this.getOptions,this),t.on(e+":get:plugin:data",this.getPluginData,this),t.on(e+":get:plugin:enabled",this.getPluginEnabled,this),t.on(e+":get:plugin:event:names",this.getPluginEventNames,this),t.on(e+":get:plugin:method:names",this.getPluginMethodNames,this),t.on(e+":get:plugin:names",this.getPluginNames,this),t.on(e+":get:plugin:options",this.getPluginOptions,this),t.on(e+":get:plugins:enabled",this.getPluginsEnabled,this),t.on(e+":get:plugins:by:event:name",this.getPluginsByEventName,this),t.on(e+":get:plugins:event:names",this.getPluginsEventNames,this),t.on(e+":has:method",this.hasMethod,this),t.on(e+":has:plugin",this.hasPlugin,this),t.on(e+":has:plugin:method",this.hasPluginMethod,this),t.on(e+":invoke",this.invoke,this),t.on(e+":is:valid:config",this.isValidConfig,this),t.on(e+":remove",this._removeEventbus,this),t.on(e+":remove:all",this._removeAllEventbus,this),t.on(e+":set:extra:event:data",this.setExtraEventData,this),t.on(e+":set:options",this._setOptionsEventbus,this),t.on(e+":set:plugin:enabled",this.setPluginEnabled,this),t.on(e+":set:plugins:enabled",this.setPluginsEnabled,this),t.on(e+":sync:invoke",this.invokeSync,this),t.on(e+":sync:invoke:event",this.invokeSyncEvent,this),t.trigger("typhonjs:plugin:manager:eventbus:set",{oldEventbus:this._eventbus,oldEventPrepend:s,newEventbus:t,newEventPrepend:e}),this._eventbus=t,this}},{key:"setEventbusAsync",value:function(){var t=(0,d.default)(p.default.mark(function t(e){var s,r,n,a,o,u,l,h,d,y,m,g,x,b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"plugins";return p.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==this._pluginMap){t.next=2;break}throw new ReferenceError("This PluginManager instance has been destroyed.");case 2:if("object"===(void 0===e?"undefined":(0,v.default)(e))){t.next=4;break}throw new TypeError("'targetEventbus' is not an 'object'.");case 4:if("string"==typeof b){t.next=6;break}throw new TypeError("'eventPrepend' is not a 'string'.");case 6:if(e!==this._eventbus){t.next=8;break}return t.abrupt("return",this);case 8:if(s=this._eventPrepend,this._eventPrepend=b,!(this._pluginMap.size>0)){t.next=53;break}return t.next=13,T("onPluginUnload",{},{},this._extraEventData,this._pluginMap.keys(),this._pluginMap,this._options,!1);case 13:for(r=!0,n=!1,a=void 0,t.prev=16,o=(0,c.default)(this._pluginMap.values());!(r=(u=o.next()).done);r=!0){l=u.value;try{l.instance._eventbus=void 0}catch(t){}l.data.manager.eventPrepend=b,l.data.plugin.scopedName=b+":"+l.name,l.eventProxy instanceof w.default&&l.eventProxy.destroy(),l.eventProxy=new w.default(e)}t.next=24;break;case 20:t.prev=20,t.t0=t.catch(16),n=!0,a=t.t0;case 24:t.prev=24,t.prev=25,!r&&o.return&&o.return();case 27:if(t.prev=27,!n){t.next=30;break}throw a;case 30:return t.finish(27);case 31:return t.finish(24);case 32:return t.next=34,T("onPluginLoad",{},{},this._extraEventData,this._pluginMap.keys(),this._pluginMap,this._options,!1);case 34:for(h=!0,d=!1,y=void 0,t.prev=37,m=(0,c.default)(this._pluginMap.values());!(h=(g=m.next()).done);h=!0)x=g.value,this._eventbus&&this._eventbus.trigger("typhonjs:plugin:manager:eventbus:changed",(0,i.default)({oldEventbus:this._eventbus,oldManagerEventPrepend:s,oldScopedName:s+":"+x.name,newEventbus:e,newManagerEventPrepend:b,newScopedName:b+":"+x.name},JSON.parse((0,f.default)(x.data))));t.next=45;break;case 41:t.prev=41,t.t1=t.catch(37),d=!0,y=t.t1;case 45:t.prev=45,t.prev=46,!h&&m.return&&m.return();case 48:if(t.prev=48,!d){t.next=51;break}throw y;case 51:return t.finish(48);case 52:return t.finish(45);case 53:return null!==this._eventbus&&(this._eventbus.off(s+":add",this._addEventbus,this),this._eventbus.off(s+":add:all",this._addAllEventbus,this),this._eventbus.off(s+":async:add",this._addEventbusAsync,this),this._eventbus.off(s+":async:add:all",this._addAllEventbusAsync,this),this._eventbus.off(s+":async:destroy:manager",this._destroyEventbusAsync,this),this._eventbus.off(s+":async:invoke",this.invokeAsync,this),this._eventbus.off(s+":async:invoke:event",this.invokeAsyncEvent,this),this._eventbus.off(s+":async:remove",this._removeEventbusAsync,this),this._eventbus.off(s+":async:remove:all",this._removeAllEventbusAsync,this),this._eventbus.off(s+":create:event:proxy",this.createEventProxy,this),this._eventbus.off(s+":destroy:manager",this._destroyEventbus,this),this._eventbus.off(s+":get:all:plugin:data",this.getAllPluginData,this),this._eventbus.off(s+":get:extra:event:data",this.getExtraEventData,this),this._eventbus.off(s+":get:method:names",this.getMethodNames,this),this._eventbus.off(s+":get:options",this.getOptions,this),this._eventbus.off(s+":get:plugin:enabled",this.getPluginEnabled,this),this._eventbus.off(s+":get:plugin:data",this.getPluginData,this),this._eventbus.off(s+":get:plugin:event:names",this.getPluginEventNames,this),this._eventbus.off(s+":get:plugin:method:names",this.getPluginMethodNames,this),this._eventbus.off(s+":get:plugin:names",this.getPluginNames,this),this._eventbus.off(s+":get:plugin:options",this.getPluginOptions,this),this._eventbus.off(s+":get:plugins:enabled",this.getPluginsEnabled,this),this._eventbus.off(s+":get:plugins:by:event:name",this.getPluginsByEventName,this),this._eventbus.off(s+":get:plugins:event:names",this.getPluginsEventNames,this),this._eventbus.off(s+":has:method",this.hasMethod,this),this._eventbus.off(s+":has:plugin",this.hasPlugin,this),this._eventbus.off(s+":has:plugin:method",this.hasPluginMethod,this),this._eventbus.off(s+":invoke",this.invoke,this),this._eventbus.off(s+":is:valid:config",this.isValidConfig,this),this._eventbus.off(s+":remove",this._removeEventbus,this),this._eventbus.off(s+":remove:all",this._removeAllEventbus,this),this._eventbus.off(s+":set:extra:event:data",this.setExtraEventData,this),this._eventbus.off(s+":set:options",this._setOptionsEventbus,this),this._eventbus.off(s+":set:plugin:enabled",this.setPluginEnabled,this),this._eventbus.off(s+":set:plugins:enabled",this.setPluginsEnabled,this),this._eventbus.off(s+":sync:invoke",this.invokeSync,this),this._eventbus.off(s+":sync:invoke:event",this.invokeSyncEvent,this),this._eventbus.trigger("typhonjs:plugin:manager:eventbus:removed",{oldEventbus:this._eventbus,oldEventPrepend:s,newEventbus:e,newEventPrepend:b})),e.on(b+":add",this._addEventbus,this),e.on(b+":add:all",this._addAllEventbus,this),e.on(b+":async:add",this._addEventbusAsync,this),e.on(b+":async:add:all",this._addAllEventbusAsync,this),e.on(b+":async:destroy:manager",this._destroyEventbusAsync,this),e.on(b+":async:invoke",this.invokeAsync,this),e.on(b+":async:invoke:event",this.invokeAsyncEvent,this),e.on(b+":async:remove",this._removeEventbusAsync,this),e.on(b+":async:remove:all",this._removeAllEventbusAsync,this),e.on(b+":create:event:proxy",this.createEventProxy,this),e.on(b+":destroy:manager",this._destroyEventbus,this),e.on(b+":get:all:plugin:data",this.getAllPluginData,this),e.on(b+":get:extra:event:data",this.getExtraEventData,this),e.on(b+":get:method:names",this.getMethodNames,this),e.on(b+":get:options",this.getOptions,this),e.on(b+":get:plugin:data",this.getPluginData,this),e.on(b+":get:plugin:enabled",this.getPluginEnabled,this),e.on(b+":get:plugin:event:names",this.getPluginEventNames,this),e.on(b+":get:plugin:method:names",this.getPluginMethodNames,this),e.on(b+":get:plugin:names",this.getPluginNames,this),e.on(b+":get:plugin:options",this.getPluginOptions,this),e.on(b+":get:plugins:enabled",this.getPluginsEnabled,this),e.on(b+":get:plugins:by:event:name",this.getPluginsByEventName,this),e.on(b+":get:plugins:event:names",this.getPluginsEventNames,this),e.on(b+":has:method",this.hasMethod,this),e.on(b+":has:plugin",this.hasPlugin,this),e.on(b+":has:plugin:method",this.hasPluginMethod,this),e.on(b+":invoke",this.invoke,this),e.on(b+":is:valid:config",this.isValidConfig,this),e.on(b+":remove",this._removeEventbus,this),e.on(b+":remove:all",this._removeAllEventbus,this),e.on(b+":set:extra:event:data",this.setExtraEventData,this),e.on(b+":set:options",this._setOptionsEventbus,this),e.on(b+":set:plugin:enabled",this.setPluginEnabled,this),e.on(b+":set:plugins:enabled",this.setPluginsEnabled,this),e.on(b+":sync:invoke",this.invokeSync,this),e.on(b+":sync:invoke:event",this.invokeSyncEvent,this),e.trigger("typhonjs:plugin:manager:eventbus:set",{oldEventbus:this._eventbus,oldEventPrepend:s,newEventbus:e,newEventPrepend:b}),this._eventbus=e,t.abrupt("return",this);case 94:case"end":return t.stop()}},t,this,[[16,20,24,32],[25,,27,31],[37,41,45,53],[46,,48,52]])}));return function(e){return t.apply(this,arguments)}}()},{key:"setExtraEventData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");this._extraEventData=t}},{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if("object"!==(void 0===t?"undefined":(0,v.default)(t)))throw new TypeError("'options' is not an object.");"boolean"==typeof t.pluginsEnabled&&(this._options.pluginsEnabled=t.pluginsEnabled),"boolean"==typeof t.noEventAdd&&(this._options.noEventAdd=t.noEventAdd),"boolean"==typeof t.noEventDestroy&&(this._options.noEventDestroy=t.noEventDestroy),"boolean"==typeof t.noEventOptions&&(this._options.noEventOptions=t.noEventOptions),"boolean"==typeof t.noEventRemoval&&(this._options.noEventRemoval=t.noEventRemoval),"boolean"==typeof t.throwNoMethod&&(this._options.throwNoMethod=t.throwNoMethod),"boolean"==typeof t.throwNoPlugin&&(this._options.throwNoPlugin=t.throwNoPlugin)}},{key:"_setOptionsEventbus",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");this._options.noEventOptions||this.setOptions(t)}},{key:"setPluginEnabled",value:function(t,e){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if("string"!=typeof t)throw new TypeError("'pluginName' is not a string.");if("boolean"!=typeof e)throw new TypeError("'enabled' is not a boolean.");var s=this._pluginMap.get(t);return s instanceof P.default&&(s.enabled=e,this._eventbus&&this._eventbus.trigger("typhonjs:plugin:manager:plugin:enabled",(0,i.default)({enabled:e},JSON.parse((0,f.default)(s.data)))),!0)}},{key:"setPluginsEnabled",value:function(t,e){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");if("boolean"!=typeof e)throw new TypeError("'enabled' is not a boolean.");var s=!0,r=!0,n=!1,i=void 0;try{for(var a,o=(0,c.default)(t);!(r=(a=o.next()).done);r=!0){var u=a.value;this.setPluginEnabled(u,e)||(s=!1)}}catch(t){n=!0,i=t}finally{try{!r&&o.return&&o.return()}finally{if(n)throw i}}return s}},{key:"remove",value:function(t){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");var e=this._pluginMap.get(t);if(e instanceof P.default){S("onPluginUnload",{},{},this._extraEventData,t,this._pluginMap,this._options,!1);try{e.instance._eventbus=void 0}catch(t){}e.eventProxy instanceof w.default&&e.eventProxy.destroy();var s=this.getPluginData(t);return this._pluginMap.delete(t),this._eventbus&&this._eventbus.trigger("typhonjs:plugin:manager:plugin:removed",s),!0}return!1}},{key:"removeAsync",value:function(){var t=(0,d.default)(p.default.mark(function t(e){var s,r;return p.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==this._pluginMap){t.next=2;break}throw new ReferenceError("This PluginManager instance has been destroyed.");case 2:if(!((s=this._pluginMap.get(e))instanceof P.default)){t.next=14;break}return t.next=6,T("onPluginUnload",{},{},this._extraEventData,e,this._pluginMap,this._options,!1);case 6:try{s.instance._eventbus=void 0}catch(t){}if(s.eventProxy instanceof w.default&&s.eventProxy.destroy(),r=this.getPluginData(e),this._pluginMap.delete(e),!this._eventbus){t.next=13;break}return t.next=13,this._eventbus.triggerAsync("typhonjs:plugin:manager:plugin:removed",r);case 13:return t.abrupt("return",!0);case 14:return t.abrupt("return",!1);case 15:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"removeAll",value:function(){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");var t=!0,e=!1,s=void 0;try{for(var r,n=(0,c.default)(this._pluginMap.keys());!(t=(r=n.next()).done);t=!0){var i=r.value;this.remove(i)}}catch(t){e=!0,s=t}finally{try{!t&&n.return&&n.return()}finally{if(e)throw s}}this._pluginMap.clear()}},{key:"removeAllAsync",value:function(){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");var t=[],e=!0,s=!1,r=void 0;try{for(var n,i=(0,c.default)(this._pluginMap.keys());!(e=(n=i.next()).done);e=!0){var a=n.value;t.push(this.remove(a))}}catch(t){s=!0,r=t}finally{try{!e&&i.return&&i.return()}finally{if(s)throw r}}return this._pluginMap.clear(),h.default.all(t)}},{key:"_removeEventbus",value:function(t){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");return!this._options.noEventRemoval&&this.remove(t)}},{key:"_removeEventbusAsync",value:function(){var t=(0,d.default)(p.default.mark(function t(e){return p.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==this._pluginMap){t.next=2;break}throw new ReferenceError("This PluginManager instance has been destroyed.");case 2:if(this._options.noEventRemoval){t.next=8;break}return t.next=5,this.removeAsync(e);case 5:t.t0=t.sent,t.next=9;break;case 8:t.t0=h.default.resolve(!1);case 9:return t.abrupt("return",t.t0);case 10:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"_removeAllEventbus",value:function(){if(null===this._pluginMap)throw new ReferenceError("This PluginManager instance has been destroyed.");this._options.noEventRemoval||this.removeAll()}},{key:"_removeAllEventbusAsync",value:function(){var t=(0,d.default)(p.default.mark(function t(){return p.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==this._pluginMap){t.next=2;break}throw new ReferenceError("This PluginManager instance has been destroyed.");case 2:if(this._options.noEventRemoval){t.next=5;break}return t.next=5,this.removeAll();case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}]),t}();e.default=k;var A,T=(A=(0,d.default)(p.default.mark(function t(e){var s,r,n,i,a,u,l,d,f,y,m,g,x,b,w,_,k=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},T=arguments[3],S=arguments[4],C=arguments[5],M=arguments[6],N=!(arguments.length>7&&void 0!==arguments[7])||arguments[7];return p.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if("string"==typeof e){t.next=2;break}throw new TypeError("'methodName' is not a string.");case 2:if("object"===(void 0===A?"undefined":(0,v.default)(A))){t.next=4;break}throw new TypeError("'passthruProps' is not an object.");case 4:if("object"===(void 0===k?"undefined":(0,v.default)(k))){t.next=6;break}throw new TypeError("'copyProps' is not an object.");case 6:if("string"==typeof S||Array.isArray(S)||"function"==typeof S[o.default]){t.next=8;break}throw new TypeError("'nameOrList' is not a string, array, or iterator.");case 8:if(s=0,r=[],n=!1,i=!1,a=new E.default(k,A,T),u=[],"string"!=typeof S){t.next=19;break}(l=C.get(S))instanceof P.default&&l.enabled&&l.instance&&(i=!0,"function"==typeof l.instance[e]&&(a.eventbus=l.eventProxy,a.pluginName=l.name,a.pluginOptions=l.data.plugin.options,void 0!==(d=l.instance[e](a))&&null!==d&&u.push(d),n=!0,s++,r.push(l.name))),t.next=38;break;case 19:for(f=!0,y=!1,m=void 0,t.prev=22,g=(0,c.default)(S);!(f=(x=g.next()).done);f=!0)b=x.value,(w=C.get(b))instanceof P.default&&w.enabled&&w.instance&&(i=!0,"function"==typeof w.instance[e]&&(a.eventbus=w.eventProxy,a.pluginName=w.name,a.pluginOptions=w.data.plugin.options,void 0!==(_=w.instance[e](a))&&null!==_&&u.push(_),n=!0,s++,r.push(w.name)));t.next=30;break;case 26:t.prev=26,t.t0=t.catch(22),y=!0,m=t.t0;case 30:t.prev=30,t.prev=31,!f&&g.return&&g.return();case 33:if(t.prev=33,!y){t.next=36;break}throw m;case 36:return t.finish(33);case 37:return t.finish(30);case 38:if(!N||!M.throwNoPlugin||i){t.next=40;break}throw new Error("PluginManager failed to find any target plugins.");case 40:if(!N||!M.throwNoMethod||n){t.next=42;break}throw new Error("PluginManager failed to invoke '"+e+"'.");case 42:return a.data.$$plugin_invoke_count=s,a.data.$$plugin_invoke_names=r,t.next=46,h.default.all(u);case 46:return t.abrupt("return",a.data);case 47:case"end":return t.stop()}},t,void 0,[[22,26,30,38],[31,,33,37]])})),function(t){return A.apply(this,arguments)}),S=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments[3],n=arguments[4],i=arguments[5],a=arguments[6],u=!(arguments.length>7&&void 0!==arguments[7])||arguments[7];if("string"!=typeof t)throw new TypeError("'methodName' is not a string.");if("object"!==(void 0===s?"undefined":(0,v.default)(s)))throw new TypeError("'passthruProps' is not an object.");if("object"!==(void 0===e?"undefined":(0,v.default)(e)))throw new TypeError("'copyProps' is not an object.");if("string"!=typeof n&&!Array.isArray(n)&&"function"!=typeof n[o.default])throw new TypeError("'nameOrList' is not a string, array, or iterator.");var l=0,h=[],p=!1,d=!1,f=new E.default(e,s,r);if("string"==typeof n){var y=i.get(n);y instanceof P.default&&y.enabled&&y.instance&&(d=!0,"function"==typeof y.instance[t]&&(f.eventbus=y.eventProxy,f.pluginName=y.name,f.pluginOptions=y.data.plugin.options,y.instance[t](f),p=!0,l++,h.push(y.name)))}else{var m=!0,g=!1,x=void 0;try{for(var b,w=(0,c.default)(n);!(m=(b=w.next()).done);m=!0){var _=b.value,k=i.get(_);k instanceof P.default&&k.enabled&&k.instance&&(d=!0,"function"==typeof k.instance[t]&&(f.eventbus=k.eventProxy,f.pluginName=k.name,f.pluginOptions=k.data.plugin.options,k.instance[t](f),p=!0,l++,h.push(k.name)))}}catch(t){g=!0,x=t}finally{try{!m&&w.return&&w.return()}finally{if(g)throw x}}}if(u&&a.throwNoPlugin&&!d)throw new Error("PluginManager failed to find any target plugins.");if(u&&a.throwNoMethod&&!p)throw new Error("PluginManager failed to invoke '"+t+"'.");return f.data.$$plugin_invoke_count=l,f.data.$$plugin_invoke_names=h,f.data},C=function(t){var e=[];do{(0,n.default)(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),t=(0,r.default)(t)}while(void 0!==t&&null!==t&&t!==Object.prototype);return e};t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:void 0,h=null===o||"function"==typeof o;return{lloc:new n.default("lloc",t),cyclomatic:new n.default("cyclomatic",e),operators:new r.default("operators",i.default.safeArray(s)),operands:new r.default("operands",i.default.safeArray(a)),ignoreKeys:new n.default("ignoreKeys",h?o:i.default.safeArray(o)),newScope:new n.default("newScope",u),dependencies:new n.default("dependencies",l)}};var r=a(s(43)),n=a(s(144)),i=a(s(53));function a(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={ArrayExpression:20,TaggedTemplateExpression:20,ThisExpression:20,Identifier:20,Literal:18,TemplateLiteral:20,Super:20,SequenceExpression:20,MemberExpression:19,CallExpression:19,NewExpression:19,ArrowFunctionExpression:18,ClassExpression:17,FunctionExpression:17,ObjectExpression:17,UpdateExpression:16,UnaryExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1,BooleanLiteral:18,DirectiveLiteral:18,NullLiteral:18,NumericLiteral:18,StringLiteral:18},t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(s(2)),n=o(s(0)),i=o(s(1)),a=o(s(149));function o(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(){(0,n.default)(this,t)}return(0,i.default)(t,null,[{key:"parse",value:function(t,e){var s=new a.default(e);if(Array.isArray(t))t.forEach(function(t){s.generator[t.type](t,s)});else{if("object"!==(void 0===t?"undefined":(0,r.default)(t)))throw new TypeError("parse error: 'node' is not an 'object' or an 'array'.");s.generator[t.type](t,s)}return s.output}},{key:"parseNodes",value:function(t,e){if(!Array.isArray(t))throw new TypeError("parseNodes error: 'nodes' is not an 'array'.");var s=new a.default(e);return t.forEach(function(t){if(Array.isArray(t))t.forEach(function(t){s.generator[t.type](t,s)});else{if("object"!==(void 0===t?"undefined":(0,r.default)(t)))throw new TypeError("parse error: 'node' is not an 'object' or an 'array'.");s.generator[t.type](t,s)}}),s.output}}]),t}();e.default=u,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(s(4)),n=c(s(0)),i=c(s(1)),a=c(s(7)),o=c(s(6)),u=c(s(89)),l=c(s(9)),h=c(s(25));function c(t){return t&&t.__esModule?t:{default:t}}var p=function(t){function e(t,s,i,o){(0,n.default)(this,e);var u=(0,a.default)(this,(e.__proto__||(0,r.default)(e)).call(this,t,s,i,o));return u.maxNestedMethodDepth=0,u.nestedMethods=[],u}return(0,o.default)(e,t),(0,i.default)(e,[{key:"type",get:function(){return l.default.MODULE_METHOD}}],[{key:"getFormats",value:function(){return h.default.getFormats(l.default.MODULE_METHOD)}},{key:"parse",value:function(t){return this._parse(new e,t)}}]),e}(u.default);e.default=p,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=f(s(5)),n=f(s(19)),i=f(s(2)),a=f(s(4)),o=f(s(0)),u=f(s(1)),l=f(s(7)),h=f(s(6)),c=f(s(56)),p=f(s(55)),d=f(s(11));function f(t){return t&&t.__esModule?t:{default:t}}var y=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;(0,o.default)(this,e);var i=(0,l.default)(this,(e.__proto__||(0,a.default)(e)).call(this,r,n));return i.errors=[],i.lineEnd=n,i.lineStart=r,i.name=t,i.paramNames=s,i.paramCount=s.length,i}return(0,h.default)(e,t),(0,u.default)(e,[{key:"clearErrors",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.errors=[],t&&Array.isArray(this.nestedMethods)&&this.nestedMethods.forEach(function(t){t.clearErrors()})}},{key:"getErrors",value:function(){var t,e=this,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeChildren:!0,includeReports:!1};if("object"!==(void 0===s?"undefined":(0,i.default)(s)))throw new TypeError("getErrors error: 'options' is not an 'object'.");"boolean"!=typeof s.includeChildren&&(s.includeChildren=!0);var r=s.includeReports?this.errors.map(function(t){return{error:t,source:e}}):(t=[]).concat.apply(t,(0,n.default)(this.errors));if(s.includeChildren&&Array.isArray(this.nestedMethods))if(s.includeReports){var a,o=[];this.nestedMethods.forEach(function(t){o.push.apply(o,(0,n.default)(t.getErrors(s)))}),o.forEach(function(t){t.method=e}),(a=r).push.apply(a,o)}else this.nestedMethods.forEach(function(t){var e;(e=r).push.apply(e,(0,n.default)(t.getErrors(s)))});return"object"===(0,i.default)(s.query)&&(r=r.filter(function(t){return d.default.safeEqual(s.query,t)})),r}},{key:"getName",value:function(){return this.name}}],[{key:"_parse",value:function(t,e){if("object"!==(void 0===e?"undefined":(0,i.default)(e)))throw new TypeError("parse error: 'jsonObject' is not an 'object'.");var s=(0,r.default)(t,e);return s.errors.length>0&&(s.errors=s.errors.map(function(t){return p.default.parse(t)})),s}}]),e}(c.default);e.default=y,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(s(4)),n=c(s(0)),i=c(s(1)),a=c(s(7)),o=c(s(6)),u=c(s(89)),l=c(s(9)),h=c(s(25));function c(t){return t&&t.__esModule?t:{default:t}}var p=function(t){function e(t,s,i,o){(0,n.default)(this,e);var u=(0,a.default)(this,(e.__proto__||(0,r.default)(e)).call(this,t,s,i,o));return u.maxNestedMethodDepth=0,u.nestedMethods=[],u}return(0,o.default)(e,t),(0,i.default)(e,[{key:"type",get:function(){return l.default.CLASS_METHOD}}],[{key:"getFormats",value:function(){return h.default.getFormats(l.default.CLASS_METHOD)}},{key:"parse",value:function(t){return this._parse(new e,t)}}]),e}(u.default);e.default=p,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=l(s(5)),n=l(s(4)),i=l(s(0)),a=l(s(1)),o=l(s(7)),u=l(s(6));function l(t){return t&&t.__esModule?t:{default:t}}var h=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.default)(this,e),(0,o.default)(this,(e.__proto__||(0,n.default)(e)).call(this,(0,r.default)({},p,t),(0,r.default)({},c,s)))}return(0,u.default)(e,t),(0,a.default)(e,[{key:"extension",get:function(){return"txt"}},{key:"name",get:function(){return"text-visibility"}},{key:"type",get:function(){return"visibility"}}]),e}(l(s(94)).default);e.default=h;var c={matrixList:"visibilityList"},p={entryPrepend:"",entryWrapper:"",textHeader:"Visibility (reverse dependents / numerical indices correspond to ProjectReport modules):\n"};t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=p(s(5)),n=p(s(4)),i=p(s(0)),a=p(s(1)),o=p(s(7)),u=p(s(6)),l=p(s(57)),h=p(s(9)),c=p(s(21));function p(t){return t&&t.__esModule?t:{default:t}}var d=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.default)(this,e),(0,o.default)(this,(e.__proto__||(0,n.default)(e)).call(this,(0,r.default)({},f,t),s))}return(0,u.default)(e,t),(0,a.default)(e,[{key:"isSupported",value:function(t){switch(t){case h.default.MODULE:case h.default.PROJECT:return!0;default:return!1}}},{key:"extension",get:function(){return"txt"}},{key:"name",get:function(){return"text-modules"}},{key:"type",get:function(){return"modules"}}]),e}(l.default);e.default=d;var f={moduleReport:[new c.default.SafeEntry("Module ","___modulecntrplus1___",1,":"),new c.default.SafeEntry("filePath: ","filePath"),new c.default.SafeEntry("srcPath: ","srcPath"),new c.default.SafeEntry("srcPathAlias: ","srcPathAlias"),"\n"]};t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=p(s(5)),n=p(s(4)),i=p(s(0)),a=p(s(1)),o=p(s(7)),u=p(s(6)),l=p(s(57)),h=p(s(9)),c=p(s(21));function p(t){return t&&t.__esModule?t:{default:t}}var d=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.default)(this,e),(0,o.default)(this,(e.__proto__||(0,n.default)(e)).call(this,(0,r.default)({},y,t),(0,r.default)({},f,s)))}return(0,u.default)(e,t),(0,a.default)(e,[{key:"isSupported",value:function(t){switch(t){case h.default.CLASS:case h.default.CLASS_METHOD:case h.default.MODULE_METHOD:case h.default.MODULE:case h.default.NESTED_METHOD:case h.default.PROJECT:return!0;default:return!1}}},{key:"extension",get:function(){return"txt"}},{key:"name",get:function(){return"text-minimal"}},{key:"type",get:function(){return"minimal"}}]),e}(l.default);e.default=d;var f={classReport:["maintainability","errors"],methodReport:["cyclomatic","halstead.difficulty","errors"],moduleReport:["maintainability","errors"],projectReport:["moduleAverage.maintainability","errors"]},y={classMethod:[new c.default.SafeEntry("Class method: ","name",0),new c.default.SafeEntry(" (","lineStart",1,")")],classReport:[new c.default.SafeEntry("Class: ","name",0),new c.default.SafeEntry(" (","lineStart",1,")")],entryPrepend:"",moduleMethod:[new c.default.SafeEntry("Module method: ","name",0),new c.default.SafeEntry(" (","lineStart",1,")")],moduleReport:["\n",new c.default.SafeEntry("Module ","___modulecntrplus1___",1,":"),new c.default.SafeEntry(" filePath: ","filePath",1),new c.default.SafeEntry(" srcPath: ","srcPath",1),new c.default.SafeEntry(" srcPathAlias: ","srcPathAlias",1)],projectReport:["Project:\n"]};t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=u(s(5)),n=u(s(0)),i=u(s(1)),a=u(s(11)),o=u(s(9));function u(t){return t&&t.__esModule?t:{default:t}}var l=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,n.default)(this,t),this._headers=e,this._keys=s}return(0,i.default)(t,[{key:"formatReport",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(t.type){case o.default.PROJECT:return this._formatProject(t,e);default:return console.warn("formatReport '"+this.name+"' warning: unsupported report type '"+t.type+"'."),""}}},{key:"isSupported",value:function(t){switch(t){case o.default.PROJECT:return!0;default:return!1}}},{key:"_formatProject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=(0,r.default)({},this._keys,e),n=a.default.safeAccess(t,s.matrixList);if(!Array.isArray(n))throw new TypeError("formatProject error: could not locate matrixList '"+s.matrixList+"'.");if(!Array.isArray(t.modules))throw new TypeError("formatProject error: could not locate 'projectReport.modules'.");if("string"!=typeof this._headers.entryPrepend)throw new TypeError("formatProject error: 'this._headers.entryPrepend' is not a 'string'.");if("string"!=typeof this._headers.entryWrapper)throw new TypeError("formatProject error: 'this._headers.entryWrapper' is not a 'string'.");var i="";return"string"==typeof this._headers.textHeader&&(i+=this._headers.textHeader),i+=this._formatMatrixList(t,n,s)}},{key:"_formatMatrixList",value:function(t,e,s){var r="",n="boolean"==typeof s.zeroIndex&&s.zeroIndex?0:1,i="boolean"==typeof s.matrixFilePath&&s.matrixFilePath?"filePath":"srcPath",o=this._headers.entryPrepend,u=this._headers.entryWrapper;return e.forEach(function(e){r+=""+o+(e.row+n)+":\t"+u+a.default.safeAccess(t.modules[e.row],i,"unknown")+u+"\n",e.cols.forEach(function(e){r+="\t"+o+(e+n)+":\t"+u+a.default.safeAccess(t.modules[e],i,"unknown")+u+"\n"}),r+="\n"}),r}}]),t}();e.default=l,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=l(s(5)),n=l(s(4)),i=l(s(0)),a=l(s(1)),o=l(s(7)),u=l(s(6));function l(t){return t&&t.__esModule?t:{default:t}}var h=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.default)(this,e),(0,o.default)(this,(e.__proto__||(0,n.default)(e)).call(this,(0,r.default)({},p,t),(0,r.default)({},c,s)))}return(0,u.default)(e,t),(0,a.default)(e,[{key:"extension",get:function(){return"txt"}},{key:"name",get:function(){return"text-adjacency"}},{key:"type",get:function(){return"adjacency"}}]),e}(l(s(94)).default);e.default=h;var c={matrixList:"adjacencyList"},p={entryPrepend:"",entryWrapper:"",textHeader:"Adjacency (dependencies / numerical indices correspond to ProjectReport modules / reports):\n"};t.exports=e.default},function(t,e,s){"use strict";e.__esModule=!0;var r=i(s(168)),n=i(s(44));function i(t){return t&&t.__esModule?t:{default:t}}e.default=function(t,e){return(0,n.default)((0,r.default)(t,{raw:{value:(0,n.default)(e)}}))}},function(t,e,s){"use strict";e.__esModule=!0;var r=i(s(4)),n=i(s(99));function i(t){return t&&t.__esModule?t:{default:t}}e.default=function t(e,s,i){null===e&&(e=Function.prototype);var a=(0,n.default)(e,s);if(void 0===a){var o=(0,r.default)(e);return null===o?void 0:t(o,s,i)}if("value"in a)return a.value;var u=a.get;return void 0!==u?u.call(i):void 0}},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=f(s(5)),n=f(s(4)),i=f(s(0)),a=f(s(1)),o=f(s(7)),u=f(s(97)),l=f(s(6)),h=f(s(57)),c=f(s(9)),p=f(s(21)),d=f(s(25));function f(t){return t&&t.__esModule?t:{default:t}}var y=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text-adjacency",u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"text-visibility";(0,i.default)(this,e);var l=(0,o.default)(this,(e.__proto__||(0,n.default)(e)).call(this,(0,r.default)({},x,t),(0,r.default)({},g,s)));return l._adjacencyFormatName=a,l._visibilityFormatName=u,l}return(0,l.default)(e,t),(0,a.default)(e,[{key:"isSupported",value:function(t){switch(t){case c.default.CLASS:case c.default.CLASS_METHOD:case c.default.MODULE_METHOD:case c.default.MODULE:case c.default.NESTED_METHOD:case c.default.PROJECT:return!0;default:return!1}}},{key:"_formatProject",value:function(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,u.default)(e.prototype.__proto__||(0,n.default)(e.prototype),"_formatProject",this).call(this,t,s),a=(0,r.default)({},this._keys,s),o="boolean"!=typeof a.adjacency||a.adjacency,l="boolean"!=typeof a.visibility||a.visibility;return o&&d.default.isFormat(this._adjacencyFormatName)&&(i+="\n\n"+d.default.format(t,this._adjacencyFormatName,s)),l&&d.default.isFormat(this._visibilityFormatName)&&(i+="\n\n"+d.default.format(t,this._visibilityFormatName,s)),i}},{key:"extension",get:function(){return"txt"}},{key:"name",get:function(){return"text"}},{key:"type",get:function(){return"full"}}]),e}(h.default);e.default=y;var v=[new p.default.SafeEntry("Line start: ","lineStart"),new p.default.SafeEntry("Line end: ","lineEnd"),new p.default.SafeEntry("Physical LOC: ","sloc.physical"),new p.default.SafeEntry("Logical LOC: ","sloc.logical"),new p.default.SafeEntry("Cyclomatic complexity: ","cyclomatic"),new p.default.SafeEntry("Cyclomatic complexity density: ","cyclomaticDensity",1,"%"),new p.default.SafeEntry("Halstead difficulty: ","halstead.difficulty"),new p.default.SafeEntry("Halstead volume: ","halstead.volume"),new p.default.SafeEntry("Halstead effort: ","halstead.effort"),new p.default.SafeEntry("Parameter count: ","params"),new p.default.SafeEntry("Error: ","errors")],m=[new p.default.SafeEntry("Average per-function physical LOC: ","methodAverage.sloc.physical"),new p.default.SafeEntry("Average per-function logical LOC: ","methodAverage.sloc.logical"),new p.default.SafeEntry("Average per-function cyclomatic complexity: ","methodAverage.cyclomatic"),new p.default.SafeEntry("Average per-function cyclomatic density: ","methodAverage.cyclomaticDensity",1,"%"),new p.default.SafeEntry("Average per-function halstead difficulty: ","methodAverage.halstead.difficulty"),new p.default.SafeEntry("Average per-function halstead volume: ","methodAverage.halstead.volume"),new p.default.SafeEntry("Average per-function halstead effort: ","methodAverage.halstead.effort")],g={classMethod:[].concat(v),classReport:[new p.default.SafeEntry("Line start: ","lineStart"),new p.default.SafeEntry("Line end: ","lineEnd")].concat(m,[new p.default.SafeEntry("Error: ","errors")]),methodReport:[].concat(v),moduleReport:[new p.default.SafeEntry("Total lines: ","lineEnd"),new p.default.SafeEntry("Maintainability index: ","maintainability"),new p.default.SafeEntry("Dependency count: ","dependencies.length")].concat(m,[new p.default.SafeEntry("Error: ","errors")]),projectReport:[new p.default.SafeEntry("First-order density: ","firstOrderDensity",1,"%"),new p.default.SafeEntry("Change cost: ","changeCost",1,"%"),new p.default.SafeEntry("Core size: ","coreSize",1,"%"),new p.default.SafeEntry("Average per-module maintainability index: ","moduleAverage.maintainability"),new p.default.SafeEntry("Average per-function physical LOC: ","moduleAverage.methodAverage.sloc.physical"),new p.default.SafeEntry("Average per-function logical LOC: ","moduleAverage.methodAverage.sloc.logical"),new p.default.SafeEntry("Average per-function parameter count: ","moduleAverage.methodAverage.params"),new p.default.SafeEntry("Average per-function cyclomatic complexity: ","moduleAverage.methodAverage.cyclomatic"),new p.default.SafeEntry("Average per-function halstead difficulty: ","moduleAverage.methodAverage.halstead.difficulty"),new p.default.SafeEntry("Average per-function halstead effort: ","moduleAverage.methodAverage.halstead.effort"),new p.default.SafeEntry("Error: ","errors")]},x={classMethod:["\n",new p.default.SafeEntry("Class method: ","name")],classReport:["\n",new p.default.SafeEntry("Class: ","name")],entryPrepend:"",moduleMethod:["\n",new p.default.SafeEntry("Module method: ","name")],moduleReport:["\n",new p.default.SafeEntry("Module ","___modulecntrplus1___",1,":"),new p.default.SafeEntry(" File path: ","filePath"),new p.default.SafeEntry(" Source path: ","srcPath"),new p.default.SafeEntry(" Source alias: ","srcPathAlias")],projectReport:["Project: \n"]};t.exports=e.default},function(t,e,s){t.exports={default:s(177),__esModule:!0}},function(t,e,s){t.exports={default:s(185),__esModule:!0}},function(t,e,s){"use strict";var r=s(8),n=s(40),i=s(20),a=s(33);t.exports=function(t){r(r.S,t,{from:function(t){var e,s,r,o,u=arguments[1];return n(this),(e=void 0!==u)&&n(u),void 0==t?new this:(s=[],e?(r=0,o=i(u,arguments[2],2),a(t,!1,function(t){s.push(o(t,r++))})):a(t,!1,s.push,s),new this(s))}})}},function(t,e,s){"use strict";var r=s(8);t.exports=function(t){r(r.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},function(t,e,s){var r=s(71),n=s(190);t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return n(this)}}},function(t,e,s){"use strict";var r=s(10),n=s(8),i=s(46),a=s(29),o=s(24),u=s(67),l=s(33),h=s(70),c=s(13),p=s(35),d=s(17).f,f=s(194)(0),y=s(14);t.exports=function(t,e,s,v,m,g){var x=r[t],b=x,w=m?"set":"add",P=b&&b.prototype,E={};return y&&"function"==typeof b&&(g||P.forEach&&!a(function(){(new b).entries().next()}))?(b=e(function(e,s){h(e,b,t,"_c"),e._c=new x,void 0!=s&&l(s,m,e[w],e)}),f("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(t){var e="add"==t||"set"==t;t in P&&(!g||"clear"!=t)&&o(b.prototype,t,function(s,r){if(h(this,b,t),!e&&g&&!c(s))return"get"==t&&void 0;var n=this._c[t](0===s?0:s,r);return e?this:n})}),g||d(b.prototype,"size",{get:function(){return this._c.size}})):(b=v.getConstructor(e,t,m,w),u(b.prototype,s),i.NEED=!0),p(b,t),E[t]=b,n(n.G+n.W+n.F,E),g||v.setStrong(b,t,m),b}},function(t,e,s){"use strict";var r=s(17).f,n=s(49),i=s(67),a=s(20),o=s(70),u=s(33),l=s(78),h=s(123),c=s(116),p=s(14),d=s(46).fastKey,f=s(59),y=p?"_s":"size",v=function(t,e){var s,r=d(e);if("F"!==r)return t._i[r];for(s=t._f;s;s=s.n)if(s.k==e)return s};t.exports={getConstructor:function(t,e,s,l){var h=t(function(t,r){o(t,h,e,"_i"),t._t=e,t._i=n(null),t._f=void 0,t._l=void 0,t[y]=0,void 0!=r&&u(r,s,t[l],t)});return i(h.prototype,{clear:function(){for(var t=f(this,e),s=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete s[r.i];t._f=t._l=void 0,t[y]=0},delete:function(t){var s=f(this,e),r=v(s,t);if(r){var n=r.n,i=r.p;delete s._i[r.i],r.r=!0,i&&(i.n=n),n&&(n.p=i),s._f==r&&(s._f=n),s._l==r&&(s._l=i),s[y]--}return!!r},forEach:function(t){f(this,e);for(var s,r=a(t,arguments.length>1?arguments[1]:void 0,3);s=s?s.n:this._f;)for(r(s.v,s.k,this);s&&s.r;)s=s.p},has:function(t){return!!v(f(this,e),t)}}),p&&r(h.prototype,"size",{get:function(){return f(this,e)[y]}}),h},def:function(t,e,s){var r,n,i=v(t,e);return i?i.v=s:(t._l=i={i:n=d(e,!0),k:e,v:s,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[y]++,"F"!==n&&(t._i[n]=i)),t},getEntry:v,setStrong:function(t,e,s){l(t,e,function(t,s){this._t=f(t,e),this._k=s,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?h(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,h(1))},s?"entries":"values",!s,!0),c(e)}}},function(t,e,s){t.exports={default:s(196),__esModule:!0}},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=x(s(5)),n=x(s(19)),i=x(s(2)),a=x(s(4)),o=x(s(0)),u=x(s(7)),l=x(s(1)),h=x(s(6)),c=x(s(60)),p=x(s(56)),d=x(s(90)),f=x(s(54)),y=x(s(55)),v=x(s(9)),m=x(s(11)),g=x(s(25));function x(t){return t&&t.__esModule?t:{default:t}}var b=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;(0,o.default)(this,e);var i=(0,u.default)(this,(e.__proto__||(0,a.default)(e)).call(this,new p.default(r,n,0)));return i.errors=[],i.lineEnd=n,i.lineStart=r,i.methods=[],i.aggregateAverage=new f.default,i.methodAverage=new f.default,i.name=t,i.superClassName=s,i}return(0,h.default)(e,t),(0,l.default)(e,[{key:"type",get:function(){return v.default.CLASS}}]),(0,l.default)(e,[{key:"clearErrors",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.errors=[],t&&this.methods.forEach(function(t){t.clearErrors()})}},{key:"getErrors",value:function(){var t,e=this,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeChildren:!0,includeReports:!1};if("object"!==(void 0===s?"undefined":(0,i.default)(s)))throw new TypeError("getErrors error: 'options' is not an 'object'.");"boolean"!=typeof s.includeChildren&&(s.includeChildren=!0);var r=s.includeReports?this.errors.map(function(t){return{error:t,source:e}}):(t=[]).concat.apply(t,(0,n.default)(this.errors));if(s.includeChildren)if(s.includeReports){var a,o=[];this.methods.forEach(function(t){o.push.apply(o,(0,n.default)(t.getErrors(s)))}),o.forEach(function(t){t.class=e}),(a=r).push.apply(a,o)}else this.methods.forEach(function(t){var e;(e=r).push.apply(e,(0,n.default)(t.getErrors(s)))});return"object"===(0,i.default)(s.query)&&(r=r.filter(function(t){return m.default.safeEqual(s.query,t)})),r}},{key:"getName",value:function(){return this.name}}],[{key:"getFormats",value:function(){return g.default.getFormats(v.default.CLASS)}},{key:"parse",value:function(t){if("object"!==(void 0===t?"undefined":(0,i.default)(t)))throw new TypeError("parse error: 'object' is not an 'object'.");var s=(0,r.default)(new e,t);return s.errors.length>0&&(s.errors=s.errors.map(function(t){return y.default.parse(t)})),s.methods.length>0&&(s.methods=s.methods.map(function(t){return d.default.parse(t)})),s}}]),e}(c.default);e.default=b,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=h(s(31)),n=h(s(2)),i=h(s(0)),a=h(s(1)),o=h(s(218)),u=h(s(217)),l=h(s(159));function h(t){return t&&t.__esModule?t:{default:t}}var c=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,i.default)(this,t),"object"!==(void 0===e?"undefined":(0,n.default)(e)))throw new TypeError("ctor error: `options` is not an `object`.");this._plugins=new l.default(e)}return(0,a.default)(t,[{key:"analyze",value:function(t){var e=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!==(void 0===t?"undefined":(0,n.default)(t))||Array.isArray(t))throw new TypeError("analyze error: `ast` is not an `object` or `array`.");if("object"!==(void 0===s?"undefined":(0,n.default)(s)))throw new TypeError("analyze error: `options` is not an `object`.");var r=this._plugins.onConfigure(s),i=this._plugins.onLoadSyntax(r),a=this._plugins.onModuleStart(t,i,r),l=new u.default(a);return(new o.default).traverse(t,{enterNode:function(t,s){var o=i[t.type],u="object"===(void 0===o?"undefined":(0,n.default)(o))&&o.ignoreKeys?o.ignoreKeys.valueOf(t,s):[];if(u=e._plugins.onEnterNode(a,l,u,i,r,t,s),"object"===(void 0===o?"undefined":(0,n.default)(o))&&o.newScope){var h=o.newScope.valueOf(t,s);h&&(e._plugins.onModulePreScopeCreated(a,l,h,r,t,s),l.createScope(h),e._plugins.onModulePostScopeCreated(a,l,h,r,t,s))}return u},exitNode:function(t,s){var o=i[t.type];if("object"===(void 0===o?"undefined":(0,n.default)(o))&&o.newScope){var u=o.newScope.valueOf(t,s);u&&(e._plugins.onModulePreScopePopped(a,l,u,r,t,s),l.popScope(u),e._plugins.onModulePostScopePopped(a,l,u,r,t,s))}return e._plugins.onExitNode(a,l,i,r,t,s)}}),this._plugins.onModuleCalculate(a,i,r),this._plugins.onModuleAverage(a,i,r),this._plugins.onModulePostAverage(a,i,r),this._plugins.onModuleEnd(a,i,r),a.finalize()}},{key:"analyzeAsync",value:function(t){var e=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new r.default(function(r,n){try{r(e.analyze(t,s))}catch(t){n(t)}})}}]),t}();e.default=c,t.exports=e.default},function(t,e){t.exports=require("path")},function(t,e,s){t.exports={default:s(223),__esModule:!0}},function(t,e,s){var r=s(126),n=s(72).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,n)}},function(t,e,s){var r=s(27),n=s(111).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return n(t)}catch(t){return a.slice()}}(t):n(r(t))}},function(t,e,s){var r=s(36);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,s){t.exports={default:s(228),__esModule:!0}},function(t,e,s){var r=s(12)("iterator"),n=!1;try{var i=[7][r]();i.return=function(){n=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!n)return!1;var s=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:s=!0}},i[r]=function(){return a},t(i)}catch(t){}return s}},function(t,e,s){"use strict";var r=s(10),n=s(3),i=s(17),a=s(14),o=s(12)("species");t.exports=function(t){var e="function"==typeof n[t]?n[t]:r[t];a&&e&&!e[o]&&i.f(e,o,{configurable:!0,get:function(){return this}})}},function(t,e,s){var r=s(18),n=s(13),i=s(68);t.exports=function(t,e){if(r(t),n(e)&&e.constructor===t)return e;var s=i.f(t);return(0,s.resolve)(e),s.promise}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,s){var r,n,i,a=s(20),o=s(234),u=s(125),l=s(77),h=s(10),c=h.process,p=h.setImmediate,d=h.clearImmediate,f=h.MessageChannel,y=h.Dispatch,v=0,m={},g=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},x=function(t){g.call(t.data)};p&&d||(p=function(t){for(var e=[],s=1;arguments.length>s;)e.push(arguments[s++]);return m[++v]=function(){o("function"==typeof t?t:Function(t),e)},r(v),v},d=function(t){delete m[t]},"process"==s(36)(c)?r=function(t){c.nextTick(a(g,t,1))}:y&&y.now?r=function(t){y.now(a(g,t,1))}:f?(i=(n=new f).port2,n.port1.onmessage=x,r=a(i.postMessage,i,1)):h.addEventListener&&"function"==typeof postMessage&&!h.importScripts?(r=function(t){h.postMessage(t+"","*")},h.addEventListener("message",x,!1)):r="onreadystatechange"in l("script")?function(t){u.appendChild(l("script")).onreadystatechange=function(){u.removeChild(this),g.call(t)}}:function(t){setTimeout(a(g,t,1),0)}),t.exports={set:p,clear:d}},function(t,e,s){var r=s(18),n=s(40),i=s(12)("species");t.exports=function(t,e){var s,a=r(t).constructor;return void 0===a||void 0==(s=r(a)[i])?e:n(s)}},function(t,e,s){var r=s(38),n=s(12)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[n]===t)}},function(t,e,s){var r=s(18);t.exports=function(t,e,s,n){try{return n?e(r(s)[0],s[1]):e(s)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,s){var r=s(28),n=s(26),i=s(74)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=n(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,s){var r=s(10).document;t.exports=r&&r.documentElement},function(t,e,s){var r=s(28),n=s(27),i=s(239)(!1),a=s(74)("IE_PROTO");t.exports=function(t,e){var s,o=n(t),u=0,l=[];for(s in o)s!=a&&r(o,s)&&l.push(s);for(;e.length>u;)r(o,s=e[u++])&&(~i(l,s)||l.push(s));return l}},function(t,e,s){var r=s(17),n=s(18),i=s(37);t.exports=s(14)?Object.defineProperties:function(t,e){n(t);for(var s,a=i(e),o=a.length,u=0;o>u;)r.f(t,s=a[u++],e[s]);return t}},function(t,e,s){t.exports=s(24)},function(t,e,s){t.exports=!s(14)&&!s(29)(function(){return 7!=Object.defineProperty(s(77)("div"),"a",{get:function(){return 7}}).a})},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(s(0)),n=a(s(1)),i=a(s(51));function a(t){return t&&t.__esModule?t:{default:t}}var o=function(){function t(){(0,r.default)(this,t)}return(0,n.default)(t,null,[{key:"calculate",value:function(e,s,r){var n=t.calculateAdjacencyMatrix(e,s);if(!r.noCoreSize){var i=t.calculateVisibilityMatrix(e,n);t.calculateCoreSize(e,i)}}},{key:"calculateAdjacencyMatrix",value:function(e,s){for(var r=e.modules,n=r.length,a=i.default.create2DArray(n,0),o=0,u=0;u<n;u++)for(var l=0;l<n;l++)a[u][l]=u!==l&&t.doesDependencyExist(s,r[u],r[l])?1:0,1===a[u][l]&&(o+=1);return e.adjacencyList=i.default.compactMatrix(a),e.firstOrderDensity=i.default.getPercent(o,n*n),a}},{key:"calculateCoreSize",value:function(t,e){if(0!==t.firstOrderDensity){for(var s=e.length,r=new Array(s),n=new Array(s),a=0,o=function(t){r[t]=e[t].reduce(function(e,s,r){return n[r]=0===t?s:n[r]+s,e+s},0)},u=0;u<s;u++)o(u);var l=i.default.getMedian(r.slice()),h=i.default.getMedian(n.slice());for(u=0;u<s;u++)r[u]>=l&&n[u]>=h&&(a+=1);t.coreSize=i.default.getPercent(a,s)}else t.coreSize=0}},{key:"calculateVisibilityMatrix",value:function(t,e){for(var s=0,r=e.length,n=i.default.create2DArray(r,0),a=0;a<r;a++)for(var o=0;o<r;o++)n[a][o]=a===o?1:e[a][o]||1/0;for(var u=0;u<r;u++)for(var l=0;l<r;l++)for(var h=0;h<r;h++)n[l][h]>n[l][u]+n[u][h]&&(n[l][h]=n[l][u]+n[u][h]);for(var c=0;c<r;c++)for(var p=0;p<r;p++)n[c][p]<1/0?(s++,c!==p&&(n[c][p]=1)):n[c][p]=0;return t.visibilityList=i.default.compactMatrix(n),t.changeCost=i.default.getPercent(s,r*r),n}},{key:"doesDependencyExist",value:function(t,e,s){for(var r=!1,n=t.dirname(e.srcPath),i=0;i<e.dependencies.length;i++){var a=e.dependencies[i].path;if("string"==typeof s.srcPathAlias&&a===s.srcPathAlias){r=!0;break}}if(r)return!0;for(var o=0;o<e.dependencies.length;o++){var u=e.dependencies[o].path;if(""===t.extname(u)&&(u+=t.extname(s.srcPath)),u===s.srcPath){r=!0;break}if(n.startsWith(t.sep)||(n=""+t.sep+n),t.resolve(n,u)===s.srcPath){r=!0;break}var l=s.srcPath;if(l.startsWith(".")&&(l=l.replace(/^\./,"")),l.startsWith(t.sep)||(l=""+t.sep+l),t.resolve(n,u)===l){r=!0;break}}return r}}]),t}();e.default=o,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(s(0)),n=a(s(1)),i=a(s(11));function a(t){return t&&t.__esModule?t:{default:t}}var o=function(){function t(){(0,r.default)(this,t)}return(0,n.default)(t,null,[{key:"calculate",value:function(t){var e=0===t.modules.length?1:t.modules.length,s=t.moduleAverage,r=i.default.getAccessorList(s);t.modules.forEach(function(t){r.forEach(function(e){var r=i.default.safeAccess(t,e,0);i.default.safeSet(s,e,r,"add")})}),r.forEach(function(t){i.default.safeSet(s,t,e,"div")})}}]),t}();e.default=o,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(s(0)),n=o(s(1)),i=o(s(131)),a=o(s(130));function o(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(){(0,r.default)(this,t)}return(0,n.default)(t,[{key:"onConfigure",value:function(t){t.data.settings.noCoreSize="boolean"==typeof t.data.options.noCoreSize&&t.data.options.noCoreSize}},{key:"onProjectAverage",value:function(t){i.default.calculate(t.data.projectReport)}},{key:"onProjectCalculate",value:function(t){a.default.calculate(t.data.projectReport,t.data.pathModule,t.data.settings)}}]),t}();e.default=u,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(s(0)),n=o(s(1)),i=o(s(84)),a=o(s(132));function o(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.default)(this,t),this._pluginManager=new i.default,("boolean"!=typeof e.loadDefaultPlugins||e.loadDefaultPlugins)&&this._pluginManager.add({name:"escomplex-plugin-metrics-project",instance:new a.default})}return(0,n.default)(t,[{key:"onConfigure",value:function(t){var e={serializeModules:"boolean"!=typeof t.serializeModules||t.serializeModules,skipCalculation:"boolean"==typeof t.skipCalculation&&t.skipCalculation},s=this._pluginManager.invokeSyncEvent("onConfigure",{options:t,settings:e});return null!==s?s.settings:e}},{key:"onProjectAverage",value:function(t,e,s){var r=this._pluginManager.invokeSyncEvent("onProjectAverage",void 0,{projectReport:t,pathModule:e,settings:s});return null!==r?r.projectReport:t}},{key:"onProjectCalculate",value:function(t,e,s){var r=this._pluginManager.invokeSyncEvent("onProjectCalculate",void 0,{projectReport:t,pathModule:e,settings:s});return null!==r?r.projectReport:t}},{key:"onProjectEnd",value:function(t,e,s){var r=this._pluginManager.invokeSyncEvent("onProjectEnd",void 0,{projectReport:t,pathModule:e,settings:s});return null!==r?r.projectReport:t}},{key:"onProjectPostAverage",value:function(t,e,s){var r=this._pluginManager.invokeSyncEvent("onProjectPostAverage",void 0,{projectReport:t,pathModule:e,settings:s});return null!==r?r.projectReport:t}},{key:"onProjectStart",value:function(t,e){this._pluginManager.invokeSyncEvent("onProjectStart",void 0,{pathModule:t,settings:e})}}]),t}();e.default=u,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(s(0)),n=o(s(1)),i=o(s(54)),a=o(s(11));function o(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(){(0,r.default)(this,t),this.methodAverage=new i.default,this.maintainability=0}return(0,n.default)(t,[{key:"keys",get:function(){return l}}]),t}();e.default=u;var l=a.default.getAccessorList(new u);t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=y(s(19)),n=y(s(5)),i=y(s(2)),a=y(s(0)),o=y(s(1)),u=y(s(25)),l=y(s(134)),h=y(s(52)),c=y(s(9)),p=y(s(51)),d=y(s(11)),f=y(s(21));function y(t){return t&&t.__esModule?t:{default:t}}var v=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{serializeModules:!0};(0,a.default)(this,t),this.settings="object"===(void 0===s?"undefined":(0,i.default)(s))?(0,n.default)({},s):{serializeModules:!0},this.adjacencyList=void 0,this.changeCost=0,this.coreSize=0,this.errors=[],this.firstOrderDensity=0,this.moduleAverage=new l.default,this.modules=Array.isArray(e)?e.sort(function(t,e){return f.default.compare(t.srcPath,e.srcPath)}):[],this.visibilityList=void 0}return(0,o.default)(t,[{key:"type",get:function(){return c.default.PROJECT}}]),(0,o.default)(t,[{key:"clearErrors",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.errors=[],t&&this.modules.forEach(function(t){t.clearErrors()})}},{key:"finalize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("object"!==(void 0===t?"undefined":(0,i.default)(t)))throw new TypeError("finalize error: 'options' is not an 'object'.");var e=this.getSetting("serializeModules",!0);return"boolean"==typeof t.serializeModules&&(e=t.serializeModules),e?this.modules.forEach(function(t){t.finalize()}):this.modules=this.modules.map(function(t){return{filePath:t.filePath,srcPath:t.srcPath,srcPathAlias:t.srcPathAlias}}),p.default.toFixedTraverse(this)}},{key:"getErrors",value:function(){var t,e=this,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeChildren:!0,includeReports:!1};if("object"!==(void 0===s?"undefined":(0,i.default)(s)))throw new TypeError("getErrors error: 'options' is not an 'object'.");"boolean"!=typeof s.includeChildren&&(s.includeChildren=!0);var n=s.includeReports?this.errors.map(function(t){return{error:t,source:e}}):(t=[]).concat.apply(t,(0,r.default)(this.errors));return s.includeChildren&&this.modules.forEach(function(t){var e;(e=n).push.apply(e,(0,r.default)(t.getErrors(s)))}),"object"===(0,i.default)(s.query)&&(n=n.filter(function(t){return d.default.safeEqual(s.query,t)})),n}},{key:"getName",value:function(){return""}},{key:"getSetting",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if("string"!=typeof t||""===t)throw new TypeError("getSetting error: 'key' is not a 'string' or is empty.");return"object"===(0,i.default)(this.settings)&&void 0!==this.settings[t]?this.settings[t]:e}},{key:"setSetting",value:function(t,e){if("string"!=typeof t||""===t)throw new TypeError("setSetting error: 'key' is not a 'string' or is empty.");return"object"===this.settings&&(this.settings[t]=e,!0)}},{key:"toFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return u.default.format(this,t,e)}}],[{key:"getFormats",value:function(){return u.default.getFormats(c.default.PROJECT)}},{key:"parse",value:function(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipFinalize:!1};if("object"!==(void 0===e?"undefined":(0,i.default)(e)))throw new TypeError("parse error: 'object' is not an 'object'.");if("object"!==(void 0===s?"undefined":(0,i.default)(s)))throw new TypeError("parse error: 'options' is not an 'object'.");var r=(0,n.default)(new t,e);return r.modules.length>0&&(r.modules=r.modules.map(function(t){return h.default.parse(t)})),s.skipFinalize||r.getSetting("serializeModules",!0)||r.finalize(),r}}]),t}();e.default=v,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(s(31)),n=c(s(2)),i=c(s(0)),a=c(s(1)),o=c(s(108)),u=c(s(52)),l=c(s(135)),h=c(s(133));function c(t){return t&&t.__esModule?t:{default:t}}var p=function(){function t(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((0,i.default)(this,t),"object"!==(void 0===e?"undefined":(0,n.default)(e)))throw new TypeError("ctor error: `pathModule` is not an `object`.");if("string"!=typeof e.sep)throw new TypeError("ctor error: `pathModule.sep` is not a `string`.");if("function"!=typeof e.dirname)throw new TypeError("ctor error: `pathModule.dirname` is not a `function`.");if("function"!=typeof e.extname)throw new TypeError("ctor error: `pathModule.extname` is not a `function`.");if("function"!=typeof e.relative)throw new TypeError("ctor error: `pathModule.relative` is not a `function`.");if("function"!=typeof e.resolve)throw new TypeError("ctor error: `pathModule.resolve` is not a `function`.");if("object"!==(void 0===s?"undefined":(0,n.default)(s)))throw new TypeError("ctor error: `options` is not an `object`.");this._pathModule=e,this._plugins=new h.default(s.project),this._escomplexModule=new o.default(s.module)}return(0,a.default)(t,[{key:"analyze",value:function(t){var e=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Array.isArray(t))throw new TypeError("analyze error: `modules` is not an `array`.");if("object"!==(void 0===s?"undefined":(0,n.default)(s)))throw new TypeError("analyze error: `options` is not an `object`.");var r=this._plugins.onConfigure(s);this._plugins.onProjectStart(this._pathModule,r);var i=t.map(function(t){var r=void 0;if("string"!=typeof t.srcPath||""===t.srcPath)throw new Error("analyze error: Invalid `srcPath`");try{return(r=e._escomplexModule.analyze(t.ast,s)).filePath=t.filePath,r.srcPath=t.srcPath,r.srcPathAlias=t.srcPathAlias,r}catch(e){throw e.message=t.srcPath+": "+e.message,e}},[]),a=new l.default(i,r);return r.skipCalculation?a:(this._plugins.onProjectCalculate(a,this._pathModule,r),this._plugins.onProjectAverage(a,this._pathModule,r),this._plugins.onProjectPostAverage(a,this._pathModule,r),this._plugins.onProjectEnd(a,this._pathModule,r),a.finalize())}},{key:"process",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(t instanceof l.default))throw new TypeError("process error: `projectReport` is not an instance of ProjectReport.");if("object"!==(void 0===e?"undefined":(0,n.default)(e)))throw new TypeError("process error: `options` is not an `object`.");if(t.modules.length>0&&!(t.modules[0]instanceof u.default))throw new TypeError("process error: `projectReport.modules` does not appear to contain `ModuleReport` entries.");var s=this._plugins.onConfigure(e);return t.settings=s,this._plugins.onProjectStart(this._pathModule,s),this._plugins.onProjectCalculate(t,this._pathModule,s),this._plugins.onProjectAverage(t,this._pathModule,s),this._plugins.onProjectPostAverage(t,this._pathModule,s),this._plugins.onProjectEnd(t,this._pathModule,s),t.finalize()}},{key:"analyzeAsync",value:function(t){var e=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new r.default(function(r,n){try{r(e.analyze(t,s))}catch(t){n(t)}})}},{key:"processAsync",value:function(t){var e=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new r.default(function(r,n){try{r(e.process(t,s))}catch(t){n(t)}})}}]),t}();e.default=p,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(s(16)),n=a(s(5)),i=a(s(0));function a(t){return t&&t.__esModule?t:{default:t}}e.default=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;(0,i.default)(this,t),this.data=(0,n.default)(JSON.parse((0,r.default)(e)),s),this.extra=a,this.eventbus=void 0,this.pluginName=void 0,this.pluginOptions=void 0},t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=i(s(0)),n=i(s(1));function i(t){return t&&t.__esModule?t:{default:t}}var a=function(){function t(e,s,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;(0,r.default)(this,t),this._data=s,this._enabled=!0,this._name=e,this._instance=n,this._eventProxy=i}return(0,n.default)(t,[{key:"data",get:function(){return this._data}},{key:"enabled",get:function(){return this._enabled},set:function(t){this._enabled=t}},{key:"eventProxy",get:function(){return this._eventProxy}},{key:"instance",get:function(){return this._instance}},{key:"name",get:function(){return this._name}}],[{key:"escape",value:function(t){if("string"!=typeof t)throw new TypeError("'value' is not a 'string'");var e=t.replace(/^(\.\.|\.)/,"");return e=(e=e.replace(/[\\]/g,"\\")).replace(/[\/]/g,"\\/")}}]),t}();e.default=a,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(s(2)),n=o(s(22)),i=o(s(0)),a=o(s(1));function o(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(){(0,i.default)(this,t)}return(0,a.default)(t,[{key:"bind",value:function(){return this.on.apply(this,arguments)}},{key:"listenTo",value:function(t,e,s){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this;if(!t)return this;var n=t._listenId||(t._listenId=g("l")),i=this._listeningTo||(this._listeningTo={}),a=i[n];if(!a){var o=this._listenId||(this._listenId=g("l"));a=i[n]={obj:t,objId:n,id:o,listeningTo:i,count:0}}return c(t,e,s,r,a),this}},{key:"listenToOnce",value:function(t,e,s){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this,n=h(f,{},e,s,this.stopListening.bind(this,t));return this.listenTo(t,n,void 0,r)}},{key:"off",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return this._events?(this._events=h(p,this._events,t,e,{context:s,listeners:this._listeners}),this):this}},{key:"on",value:function(t,e){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return c(this,t,e,s,void 0)}},{key:"once",value:function(t,e){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=h(f,{},t,e,this.off.bind(this));return"string"!=typeof t||null!==s&&void 0!==s||(e=void 0),this.on(r,e,s)}},{key:"stopListening",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this,i=this._listeningTo;if(!i)return this;for(var a=t?[t._listenId]:(0,n.default)(i),o=0;o<a.length;o++){var u=i[a[o]];if(!u)break;u.obj.off(e,s,r)}return this}},{key:"trigger",value:function(t){if(!this._events)return this;for(var e=Math.max(0,arguments.length-1),s=new Array(e),r=0;r<e;r++)s[r]=arguments[r+1];return h(y,this._events,t,void 0,s),this}},{key:"unbind",value:function(){return this.off.apply(this,arguments)}}]),t}();e.default=u;var l=/\s+/,h=function t(e,s,i,a,o){var u=0,h=void 0;if(i&&"object"===(void 0===i?"undefined":(0,r.default)(i))){void 0!==a&&"context"in o&&void 0===o.context&&(o.context=a);for(h=(0,n.default)(i);u<h.length;u++)s=t(e,s,h[u],i[h[u]],o)}else if(i&&l.test(i))for(h=i.split(l);u<h.length;u++)s=e(s,h[u],a,o);else s=e(s,i,a,o);return s},c=function(t,e,s,r,n){(t._events=h(d,t._events||{},e,s,{context:r,ctx:t,listening:n}),n)&&((t._listeners||(t._listeners={}))[n.id]=n);return t},p=function(t,e,s,r){if(t){var i=0,a=void 0,o=r.context,u=r.listeners;if(e||s||o||!u){for(var l=e?[e]:(0,n.default)(t);i<l.length;i++){var h=t[e=l[i]];if(!h)break;for(var c=[],p=0;p<h.length;p++){var d=h[p];s&&s!==d.callback&&s!==d.callback._callback||o&&o!==d.context?c.push(d):(a=d.listening)&&0==--a.count&&(delete u[a.id],delete a.listeningTo[a.objId])}c.length?t[e]=c:delete t[e]}return t}for(var f=(0,n.default)(u);i<f.length;i++)delete u[(a=u[f[i]]).id],delete a.listeningTo[a.objId]}},d=function(t,e,s,r){if(s){var n=t[e]||(t[e]=[]),i=r.context,a=r.ctx,o=r.listening;o&&o.count++,n.push({callback:s,context:i,ctx:i||a,listening:o})}return t},f=function(t,e,s,r){var n=this,i=arguments;if(s){var a=t[e]=function(){return r(e,a),s.apply(n,i)};a._callback=s}return t},y=function(t,e,s,r){if(t){var n=t[e],i=t.all;n&&i&&(i=i.slice()),n&&v(n,r),i&&v(i,[e].concat(r))}return t},v=function(t,e){var s=void 0,r=-1,n=e[0],i=e[1],a=e[2],o=t.length;switch(e.length){case 0:for(;++r<o;)(s=t[r]).callback.call(s.ctx);return;case 1:for(;++r<o;)(s=t[r]).callback.call(s.ctx,n);return;case 2:for(;++r<o;)(s=t[r]).callback.call(s.ctx,n,i);return;case 3:for(;++r<o;)(s=t[r]).callback.call(s.ctx,n,i,a);return;default:for(;++r<o;)(s=t[r]).callback.apply(s.ctx,e);return}},m=0,g=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=""+ ++m;return t?""+t+e:e};t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=m(s(2)),n=m(s(83)),i=m(s(31)),a=m(s(82)),o=m(s(22)),u=m(s(23)),l=m(s(4)),h=m(s(0)),c=m(s(1)),p=m(s(7)),d=m(s(97)),f=m(s(6)),y=m(s(139)),v=m(s(81));function m(t){return t&&t.__esModule?t:{default:t}}var g=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;(0,h.default)(this,e);var s=(0,p.default)(this,(e.__proto__||(0,l.default)(e)).call(this));return s.setEventbusName(t),s}return(0,f.default)(e,t),(0,c.default)(e,[{key:"createEventProxy",value:function(){return new v.default(this)}},{key:"forEachEvent",value:function(t){if(this._events){if("function"!=typeof t)throw new TypeError("'callback' is not a 'function'.");for(var e in this._events){var s=!0,r=!1,n=void 0;try{for(var i,a=(0,u.default)(this._events[e]);!(s=(i=a.next()).done);s=!0){var o=i.value;t(e,o.callback,o.ctx)}}catch(t){r=!0,n=t}finally{try{!s&&a.return&&a.return()}finally{if(r)throw n}}}}}},{key:"getEventbusName",value:function(){return this._eventbusName}},{key:"getEventNames",value:function(){return this._events?(0,o.default)(this._events):[]}},{key:"setEventbusName",value:function(t){return this._eventbusName=t,this}},{key:"triggerAsync",value:function(){var t=(0,a.default)(n.default.mark(function t(e){var s,r,a,o,u=arguments;return n.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:for(this._events||i.default.all([]),s=Math.max(0,u.length-1),r=new Array(s),a=0;a<s;a++)r[a]=u[a+1];return o=w(P,E,this._events,e,void 0,r),t.abrupt("return",void 0!==o?o:i.default.resolve());case 6:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"triggerDefer",value:function(){var t=this,s=arguments;return setTimeout(function(){(0,d.default)(e.prototype.__proto__||(0,l.default)(e.prototype),"trigger",t).apply(t,s)},0),this}},{key:"triggerSync",value:function(t){if(this._events){for(var e=Math.max(0,arguments.length-1),s=new Array(e),r=0;r<e;r++)s[r]=arguments[r+1];return w(P,_,this._events,t,void 0,s)}}},{key:"eventCount",get:function(){var t=0;for(var e in this._events)t+=this._events[e].length;return t}}]),e}(y.default);e.default=g;var x,b=/\s+/,w=function t(e,s,n,i,a,u){var l=0,h=void 0;if(i&&"object"===(void 0===i?"undefined":(0,r.default)(i))){void 0!==a&&"context"in u&&void 0===u.context&&(u.context=a);for(h=(0,o.default)(i);l<h.length;l++)n=t(e,s,n,h[l],i[h[l]],u)}else if(i&&b.test(i))for(h=i.split(b);l<h.length;l++)n=e(s,n,h[l],a,u);else n=e(s,n,i,a,u);return n},P=function(t,e,s,r,n){var i=void 0;if(e){var a=e[s],o=e.all;a&&o&&(o=o.slice()),a&&(i=t(a,n)),o&&(i=t(o,[s].concat(n)))}return i},E=(x=(0,a.default)(n.default.mark(function t(e,s){var r,a,o,u,l,h,c,p;return n.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r=void 0,a=-1,o=s[0],u=s[1],l=s[2],h=e.length,c=void 0,p=[],t.prev=4,t.t0=s.length,t.next=0===t.t0?8:1===t.t0?10:2===t.t0?12:3===t.t0?14:16;break;case 8:for(;++a<h;)null===(c=(r=e[a]).callback.call(r.ctx))&&void 0===c||p.push(c);return t.abrupt("break",18);case 10:for(;++a<h;)null===(c=(r=e[a]).callback.call(r.ctx,o))&&void 0===c||p.push(c);return t.abrupt("break",18);case 12:for(;++a<h;)null===(c=(r=e[a]).callback.call(r.ctx,o,u))&&void 0===c||p.push(c);return t.abrupt("break",18);case 14:for(;++a<h;)null===(c=(r=e[a]).callback.call(r.ctx,o,u,l))&&void 0===c||p.push(c);return t.abrupt("break",18);case 16:for(;++a<h;)null===(c=(r=e[a]).callback.apply(r.ctx,s))&&void 0===c||p.push(c);return t.abrupt("break",18);case 18:t.next=23;break;case 20:return t.prev=20,t.t1=t.catch(4),t.abrupt("return",i.default.reject(t.t1));case 23:return t.abrupt("return",p.length>1?i.default.all(p):i.default.resolve(c));case 24:case"end":return t.stop()}},t,void 0,[[4,20]])})),function(t,e){return x.apply(this,arguments)}),_=function(t,e){var s=void 0,r=-1,n=e[0],i=e[1],a=e[2],o=t.length,u=void 0,l=[];switch(e.length){case 0:for(;++r<o;)null===(u=(s=t[r]).callback.call(s.ctx))&&void 0===u||l.push(u);break;case 1:for(;++r<o;)null===(u=(s=t[r]).callback.call(s.ctx,n))&&void 0===u||l.push(u);break;case 2:for(;++r<o;)null===(u=(s=t[r]).callback.call(s.ctx,n,i))&&void 0===u||l.push(u);break;case 3:for(;++r<o;)null===(u=(s=t[r]).callback.call(s.ctx,n,i,a))&&void 0===u||l.push(u);break;default:for(;++r<o;)null===(u=(s=t[r]).callback.apply(s.ctx,e))&&void 0===u||l.push(u)}return l.length>1?l:u};t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=p(s(44)),n=p(s(100)),i=p(s(16)),a=p(s(22)),o=p(s(23)),u=p(s(15)),l=p(s(2)),h=p(s(0)),c=p(s(1));function p(t){return t&&t.__esModule?t:{default:t}}e.onPluginLoad=function(t){var e=t.eventbus;e.on("typhonjs:object:util:deep:freeze",d.deepFreeze,d),e.on("typhonjs:object:util:depth:traverse",d.depthTraverse,d),e.on("typhonjs:object:util:get:accessor:list",d.getAccessorList,d),e.on("typhonjs:object:util:safe:access",d.safeAccess,d),e.on("typhonjs:object:util:safe:batch:set",d.safeBatchSet,d),e.on("typhonjs:object:util:safe:equal",d.safeEqual,d),e.on("typhonjs:object:util:safe:set",d.safeSet,d),e.on("typhonjs:object:util:safe:set:all",d.safeSetAll,d),e.on("typhonjs:object:util:validate",d.validate,d),e.on("typhonjs:object:util:validate:array",d.validateArray,d),e.on("typhonjs:object:util:validate:entry",d.validateEntry,d),e.on("typhonjs:object:util:validate:entry|array",d.validateEntryOrArray,d)};var d=function(){function t(){(0,h.default)(this,t)}return(0,c.default)(t,null,[{key:"deepFreeze",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if("object"!==(void 0===t?"undefined":(0,l.default)(t)))throw new TypeError("'data' is not an 'object'.");if(!Array.isArray(e))throw new TypeError("'skipFreezeKeys' is not an 'array'.");return function t(e,s){if(Array.isArray(e))for(var n=0;n<e.length;n++)t(e[n],s);else if("object"===(void 0===e?"undefined":(0,l.default)(e)))for(var i in e)e.hasOwnProperty(i)&&-1===s.indexOf(i)&&t(e[i],s);return(0,r.default)(e)}(t,e)}},{key:"depthTraverse",value:function(t,e){var s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("object"!==(void 0===t?"undefined":(0,l.default)(t)))throw new TypeError("'data' is not an 'object'.");if("function"!=typeof e)throw new TypeError("'func' is not a 'function'.");return function t(e,s,r){if(r)if(Array.isArray(e))for(var n=0;n<e.length;n++)e[n]=t(e[n],s,r);else if("object"===(void 0===e?"undefined":(0,l.default)(e)))for(var i in e)e.hasOwnProperty(i)&&(e[i]=t(e[i],s,r));else e=s(e);else if(Array.isArray(e))for(var a=0;a<e.length;a++)t(e[a],s,r);else if("object"===(void 0===e?"undefined":(0,l.default)(e)))for(var o in e)e.hasOwnProperty(o)&&t(e[o],s,r);else s(e);return e}(t,e,s)}},{key:"getAccessorList",value:function(t){if("object"!==(void 0===t?"undefined":(0,l.default)(t)))throw new TypeError("getAccessorList error: 'data' is not an 'object'.");return function t(e){var s=[];var r=function(r){if(e.hasOwnProperty(r))if("object"===(0,l.default)(e[r])){var n=t(e[r]);n.forEach(function(t){s.push(Array.isArray(t)?r+"."+t.join("."):r+"."+t)})}else s.push(r)};for(var n in e)r(n);return s}(t)}},{key:"safeAccess",value:function(t,e){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if("object"!==(void 0===t?"undefined":(0,l.default)(t)))return s;if("string"!=typeof e)return s;for(var r=e.split("."),n=0;n<r.length;n++){if(void 0===t[r[n]]||null===t[r[n]])return s;t=t[r[n]]}return t}},{key:"safeBatchSet",value:function(e,s,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"set",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if("object"!==(void 0===e?"undefined":(0,l.default)(e)))throw new TypeError("safeBatchSet Error: 'data' is not an 'object'.");if(!Array.isArray(s))throw new TypeError("safeBatchSet Error: 'accessors' is not an 'array'.");"object"===(void 0===r?"undefined":(0,l.default)(r))?s.forEach(function(s){var o=t.safeAccess(r,s,i);t.safeSet(e,s,o,n,a)}):s.forEach(function(s){t.safeSet(e,s,r,n,a)})}},{key:"safeEqual",value:function(e,s){if(void 0===e||null===e||void 0===s||null===s)return!1;for(var r=t.getAccessorList(e),n=0;n<r.length;n++){var i=r[n];if(t.safeAccess(e,i)!==t.safeAccess(s,i))return!1}return!0}},{key:"safeSet",value:function(t,e,s){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"set",n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if("object"!==(void 0===t?"undefined":(0,l.default)(t)))throw new TypeError("safeSet Error: 'data' is not an 'object'.");if("string"!=typeof e)throw new TypeError("safeSet Error: 'accessor' is not a 'string'.");for(var i=e.split("."),a=0;a<i.length;a++){if(Array.isArray(t)){var o=+i[a];if(!(0,u.default)(o)||o<0)return!1}if(a===i.length-1)switch(r){case"add":t[i[a]]+=s;break;case"div":t[i[a]]/=s;break;case"mult":t[i[a]]*=s;break;case"set":t[i[a]]=s;break;case"set-undefined":void 0===t[i[a]]&&(t[i[a]]=s);break;case"sub":t[i[a]]-=s}else{if(n&&void 0===t[i[a]]&&(t[i[a]]={}),null===t[i[a]]||"object"!==(0,l.default)(t[i[a]]))return!1;t=t[i[a]]}}return!0}},{key:"safeSetAll",value:function(e,s){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"set",n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if("object"!==(void 0===e?"undefined":(0,l.default)(e)))throw new TypeError("'data' is not an 'object'.");if("object"!==(void 0===s?"undefined":(0,l.default)(s)))throw new TypeError("'accessorValues' is not an 'object'.");var i=!0,u=!1,h=void 0;try{for(var c,p=(0,o.default)((0,a.default)(s));!(i=(c=p.next()).done);i=!0){var d=c.value;s.hasOwnProperty(d)&&t.safeSet(e,d,s[d],r,n)}}catch(t){u=!0,h=t}finally{try{!i&&p.return&&p.return()}finally{if(u)throw h}}}},{key:"validate",value:function(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"data";if("object"!==(void 0===e?"undefined":(0,l.default)(e)))throw new TypeError("'"+r+"' is not an 'object'.");if("object"!==(void 0===s?"undefined":(0,l.default)(s)))throw new TypeError("'validationData' is not an 'object'.");var n=void 0,i=!0,u=!1,h=void 0;try{for(var c,p=(0,o.default)((0,a.default)(s));!(i=(c=p.next()).done);i=!0){var d=c.value;if(s.hasOwnProperty(d)){var f=s[d];switch(f.test){case"array":n=t.validateArray(e,d,f,r);break;case"entry":n=t.validateEntry(e,d,f,r);break;case"entry|array":n=t.validateEntryOrArray(e,d,f,r)}}}}catch(t){u=!0,h=t}finally{try{!i&&p.return&&p.return()}finally{if(u)throw h}}return n}},{key:"validateArray",value:function(e,s){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=r.type,o=void 0===a?void 0:a,u=r.expected,h=void 0===u?void 0:u,c=r.message,p=void 0===c?void 0:c,d=r.required,y=void 0===d||d,v=r.error,m=void 0===v||v,g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"data",x=t.safeAccess(e,s);if(!y&&void 0===x)return!0;if(!Array.isArray(x)){if(m)throw f(TypeError,"'"+g+"."+s+"' is not an 'array'.");return!1}if("string"==typeof o)for(var b=0;b<x.length;b++)if((0,l.default)(x[b])!==o){if(m){var w="object"===(0,l.default)(x[b])?(0,i.default)(x[b]):x[b];throw f(TypeError,"'"+g+"."+s+"["+b+"]': '"+w+"' is not a '"+o+"'.")}return!1}if(Array.isArray(h)){for(var P=0;P<x.length;P++)if(h.indexOf(x[P])<0){if(m){var E="object"===(0,l.default)(x[P])?(0,i.default)(x[P]):x[P];throw f(Error,"'"+g+"."+s+"["+P+"]': '"+E+"' is not an expected value: "+(0,i.default)(h)+".")}return!1}}else if(h instanceof n.default){for(var _=0;_<x.length;_++)if(!h.has(x[_])){if(m){var k="object"===(0,l.default)(x[_])?(0,i.default)(x[_]):x[_];throw f(Error,"'"+g+"."+s+"["+_+"]': '"+k+"' is not an expected value: "+(0,i.default)(h)+".")}return!1}}else if("function"==typeof h)for(var A=0;A<x.length;A++)try{var T=h(x[A]);if(void 0===T||!T)throw new Error(p)}catch(t){if(m){var S="object"===(0,l.default)(x[A])?(0,i.default)(x[A]):x[A];throw f(Error,"'"+g+"."+s+"["+A+"]': '"+S+"' failed validation: "+t.message+".")}return!1}return!0}},{key:"validateEntry",value:function(e,s){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=r.type,o=void 0===a?void 0:a,u=r.expected,h=void 0===u?void 0:u,c=r.message,p=void 0===c?void 0:c,d=r.required,y=void 0===d||d,v=r.error,m=void 0===v||v,g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"data",x=t.safeAccess(e,s);if(!y&&void 0===x)return!0;if(o&&(void 0===x?"undefined":(0,l.default)(x))!==o){if(m)throw f(TypeError,"'"+g+"."+s+"' is not a '"+o+"'.");return!1}if(h instanceof n.default&&!h.has(x)||Array.isArray(h)&&h.indexOf(x)<0){if(m){var b="object"===(void 0===x?"undefined":(0,l.default)(x))?(0,i.default)(x):x;throw f(Error,"'"+g+"."+s+"': '"+b+"' is not an expected value: "+(0,i.default)(h)+".")}return!1}if("function"==typeof h)try{var w=h(x);if(void 0===w||!w)throw new Error(p)}catch(t){if(m){var P="object"===(void 0===x?"undefined":(0,l.default)(x))?(0,i.default)(x):x;throw f(Error,"'"+g+"."+s+"': '"+P+"' failed to validate: "+t.message+".")}return!1}return!0}},{key:"validateEntryOrArray",value:function(e,s,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"data",i=t.safeAccess(e,s);return Array.isArray(i)?t.validateArray(e,s,r,n):t.validateEntry(e,s,r,n)}}]),t}();function f(t){var e=new t(arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0);return e._objectValidateError=!0,e}e.default=d},function(t,e){!function(e){"use strict";var s,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag",l="object"==typeof t,h=e.regeneratorRuntime;if(h)l&&(t.exports=h);else{(h=e.regeneratorRuntime=l?t.exports:{}).wrap=b;var c="suspendedStart",p="suspendedYield",d="executing",f="completed",y={},v={};v[a]=function(){return this};var m=Object.getPrototypeOf,g=m&&m(m(N([])));g&&g!==r&&n.call(g,a)&&(v=g);var x=_.prototype=P.prototype=Object.create(v);E.prototype=x.constructor=_,_.constructor=E,_[u]=E.displayName="GeneratorFunction",h.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===E||"GeneratorFunction"===(e.displayName||e.name))},h.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(x),t},h.awrap=function(t){return{__await:t}},k(A.prototype),A.prototype[o]=function(){return this},h.AsyncIterator=A,h.async=function(t,e,s,r){var n=new A(b(t,e,s,r));return h.isGeneratorFunction(e)?n:n.next().then(function(t){return t.done?t.value:n.next()})},k(x),x[u]="Generator",x[a]=function(){return this},x.toString=function(){return"[object Generator]"},h.keys=function(t){var e=[];for(var s in t)e.push(s);return e.reverse(),function s(){for(;e.length;){var r=e.pop();if(r in t)return s.value=r,s.done=!1,s}return s.done=!0,s}},h.values=N,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=s,this.done=!1,this.delegate=null,this.method="next",this.arg=s,this.tryEntries.forEach(C),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=s)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return o.type="throw",o.arg=t,e.next=r,n&&(e.method="next",e.arg=s),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var s=this.tryEntries.length-1;s>=0;--s){var r=this.tryEntries[s];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var s=this.tryEntries[e];if(s.finallyLoc===t)return this.complete(s.completion,s.afterLoc),C(s),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var s=this.tryEntries[e];if(s.tryLoc===t){var r=s.completion;if("throw"===r.type){var n=r.arg;C(s)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:N(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=s),y}}}function b(t,e,s,r){var n=e&&e.prototype instanceof P?e:P,i=Object.create(n.prototype),a=new M(r||[]);return i._invoke=function(t,e,s){var r=c;return function(n,i){if(r===d)throw new Error("Generator is already running");if(r===f){if("throw"===n)throw i;return j()}for(s.method=n,s.arg=i;;){var a=s.delegate;if(a){var o=T(a,s);if(o){if(o===y)continue;return o}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(r===c)throw r=f,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);r=d;var u=w(t,e,s);if("normal"===u.type){if(r=s.done?f:p,u.arg===y)continue;return{value:u.arg,done:s.done}}"throw"===u.type&&(r=f,s.method="throw",s.arg=u.arg)}}}(t,s,a),i}function w(t,e,s){try{return{type:"normal",arg:t.call(e,s)}}catch(t){return{type:"throw",arg:t}}}function P(){}function E(){}function _(){}function k(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function A(t){var e;this._invoke=function(s,r){function i(){return new Promise(function(e,i){!function e(s,r,i,a){var o=w(t[s],t,r);if("throw"!==o.type){var u=o.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?Promise.resolve(l.__await).then(function(t){e("next",t,i,a)},function(t){e("throw",t,i,a)}):Promise.resolve(l).then(function(t){u.value=t,i(u)},a)}a(o.arg)}(s,r,e,i)})}return e=e?e.then(i,i):i()}}function T(t,e){var r=t.iterator[e.method];if(r===s){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=s,T(t,e),"throw"===e.method))return y;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var n=w(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,y;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=s),e.delegate=null,y):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,y)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function N(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=s,e.done=!0,e};return i.next=i}}return{next:j}}function j(){return{value:s,done:!0}}}(function(){return this}()||Function("return this")())},function(t,e,s){var r=function(){return this}()||Function("return this")(),n=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=n&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=s(142),n)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(s(2)),n=a(s(0)),i=a(s(1));function a(t){return t&&t.__esModule?t:{default:t}}var o=function(){function t(e,s){if((0,n.default)(this,t),"string"!=typeof e)throw new TypeError("ctor error: metric is not a `string`.");this._data=s,this._metric=e}return(0,i.default)(t,[{key:"valueOf",value:function(){for(var t=arguments.length,e=Array(t),s=0;s<t;s++)e[s]=arguments[s];return Array.isArray(this._data)?this._data.map(function(t){return"function"==typeof t?t.apply(void 0,e):t}):"function"==typeof this._data?this._data.apply(this,e):this._data}},{key:"metric",get:function(){return this._metric}},{key:"type",get:function(){return(0,r.default)(this._data)}}]),t}();e.default=o,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={"||":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":12},t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=u(s(2)),n=u(s(0)),i=u(s(1)),a=u(s(86)),o=u(s(145));function u(t){return t&&t.__esModule?t:{default:t}}var l=function(){function t(){(0,n.default)(this,t)}return(0,i.default)(t,null,[{key:"formatSequence",value:function(t,e,s){var r=e.output;if(r.write("("),Array.isArray(t)&&t.length>0){s[t[0].type](t[0],e);for(var n=1;n<t.length;n++){r.write(", ");var i=t[n];s[i.type](i,e)}}r.write(")")}},{key:"formatBinaryExpressionPart",value:function(t,e,s,r,n){var i=a.default[t.type],u=a.default[e.type];if(i>u)n[t.type](t,r);else{if(i===u){if(13!==i&&14!==i)return void n[t.type](t,r);if(s){if(o.default[t.operator]>o.default[e.operator])return void n[t.type](t,r)}else if(o.default[t.operator]>=o.default[e.operator])return void n[t.type](t,r)}r.output.write("("),n[t.type](t,r),r.output.write(")")}}},{key:"hasCallExpression",value:function(t){for(;"object"===(void 0===t?"undefined":(0,r.default)(t));){var e=t.type;if("C"===e[0]&&"a"===e[1])return!0;if("M"!==e[0]||"e"!==e[1]||"m"!==e[2])return!1;t=t.object}}}]),t}();e.default=l,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(s(16)),n=a(s(146)),i=a(s(86));function a(t){return t&&t.__esModule?t:{default:t}}var o,u,l,h,c,p;e.default={Program:function(t,e){for(var s=e.lineEnd,r=e.output,n=e.indent.repeat(e.indentLevel),i=t.body,a=0;a<i.length;a++){var o=i[a];r.write(n),this[o.type](o,e),r.write(s)}},BlockStatement:function(t,e){var s=e.lineEnd,r=e.output,n=e.indent.repeat(e.indentLevel++),i=n+e.indent;r.write("{");var a=t.body;if(null!=a&&a.length>0){r.write(s);for(var o=0;o<a.length;o++){var u=a[o];r.write(i),this[u.type](u,e),r.write(s)}r.write(n)}r.write("}"),e.indentLevel--},EmptyStatement:function(t,e){e.output.write(";")},ExpressionStatement:function(t,e){var s=e.output,r=i.default[t.expression.type];17===r||3===r&&"O"===t.expression.left.type[0]?(s.write("("),this[t.expression.type](t.expression,e),s.write(")")):this[t.expression.type](t.expression,e),s.write(";")},IfStatement:function(t,e){var s=e.output;s.write("if ("),s.operators.push("if"),this[t.test.type](t.test,e),s.write(") "),this[t.consequent.type](t.consequent,e),null!=t.alternate&&(s.write(" else "),s.operators.push("else"),this[t.alternate.type](t.alternate,e))},LabeledStatement:function(t,e){this[t.label.type](t.label,e),e.output.write(": "),this[t.body.type](t.body,e)},BreakStatement:function(t,e){var s=e.output;s.write("break"),s.operators.push("break"),t.label&&(s.write(" "),this[t.label.type](t.label,e)),s.write(";")},ContinueStatement:function(t,e){var s=e.output;s.write("continue"),s.operators.push("continue"),t.label&&(s.write(" "),this[t.label.type](t.label,e)),s.write(";")},WithStatement:function(t,e){var s=e.output;s.write("with ("),s.operators.push("with"),this[t.object.type](t.object,e),s.write(") "),this[t.body.type](t.body,e)},SwitchStatement:function(t,e){var s=e.lineEnd,r=e.output,n=e.indent.repeat(e.indentLevel++);e.indentLevel++;var i=n+e.indent,a=i+e.indent;r.write("switch ("),r.operators.push("switch"),this[t.discriminant.type](t.discriminant,e),r.write(") {"+s);for(var o=t.cases,u=o.length,l=0;l<u;l++){var h=o[l];h.test?(r.write(i+"case "),r.operators.push("case"),this[h.test.type](h.test,e),r.write(":"+s)):(r.write(i+"default:"+s),r.operators.push("default"));for(var c=h.consequent,p=c.length,d=0;d<p;d++){var f=c[d];r.write(a),this[f.type](f,e),r.write(s)}}e.indentLevel-=2,r.write(n+"}")},ReturnStatement:function(t,e){var s=e.output;s.write("return"),s.operators.push("return"),t.argument&&(s.write(" "),this[t.argument.type](t.argument,e)),s.write(";")},ThrowStatement:function(t,e){var s=e.output;s.write("throw "),s.operators.push("throw"),this[t.argument.type](t.argument,e),s.write(";")},TryStatement:function(t,e){var s=e.output;if(s.write("try "),s.operators.push("try"),this[t.block.type](t.block,e),t.handler){var r=t.handler;s.write(" catch ("),s.operators.push("catch"),this[r.param.type](r.param,e),s.write(") "),this[r.body.type](r.body,e)}t.finalizer&&(s.write(" finally "),s.operators.push("finally"),this[t.finalizer.type](t.finalizer,e))},WhileStatement:function(t,e){var s=e.output;s.operators.push("while"),s.write("while ("),this[t.test.type](t.test,e),s.write(") "),this[t.body.type](t.body,e)},DoWhileStatement:function(t,e){var s=e.output;s.operators.push("dowhile"),s.write("do "),this[t.body.type](t.body,e),s.write(" while ("),this[t.test.type](t.test,e),s.write(");")},ForStatement:function(t,e){var s=e.output;s.write("for ("),s.operators.push("for"),null!=t.init&&(e.noTrailingSemicolon=!0,this[t.init.type](t.init,e),e.noTrailingSemicolon=!1),s.write("; "),t.test&&this[t.test.type](t.test,e),s.write("; "),t.update&&this[t.update.type](t.update,e),s.write(") "),this[t.body.type](t.body,e)},ForInStatement:l=function(t,e){var s=e.output;s.write("for (");var r=t.left,n=r.type;e.noTrailingSemicolon=!0,this[n](r,e),e.noTrailingSemicolon=!1,s.write("I"===t.type[3]?" in ":" of "),s.operators.push("I"===t.type[3]?"forin":"forof"),this[t.right.type](t.right,e),s.write(") "),this[t.body.type](t.body,e)},ForOfStatement:l,DebuggerStatement:function(t,e){e.output.write("debugger;"+e.lineEnd)},FunctionDeclaration:h=function(t,e){var s=e.output;s.write(t.generator?"function* ":"function "),s.operators.push(t.generator?"function*":"function"),t.id&&(s.write(t.id.name),s.operands.push(t.id.name)),n.default.formatSequence(t.params,e,this),s.write(" "),this[t.body.type](t.body,e)},FunctionExpression:h,VariableDeclaration:function(t,e){var s=e.output,r=t.declarations;s.write(t.kind+" "),s.operators.push(t.kind);var n=r.length;if(n>0){this.VariableDeclarator(r[0],e);for(var i=1;i<n;i++)s.write(", "),this.VariableDeclarator(r[i],e)}!0!==e.noTrailingSemicolon&&s.write(";")},VariableDeclarator:function(t,e){var s=e.output;this[t.id.type](t.id,e),null!=t.init&&(s.write(" = "),s.operators.push("="),this[t.init.type](t.init,e))},ClassDeclaration:function(t,e){var s=e.output;s.write("class "),s.operators.push("class"),t.id&&s.write(t.id.name+" "),t.superClass&&(s.write("extends "),s.operators.push("extends"),this[t.superClass.type](t.superClass,e),s.write(" ")),this.BlockStatement(t.body,e)},ImportDeclaration:function(t,e){var s=e.output;s.write("import "),s.operators.push("import");var r=t.specifiers,n=r.length;if(n>0){for(var i=0,a=void 0;i<n;){i>0&&s.write(", ");var o=(a=r[i]).type[6];if("D"===o)s.write(a.local.name),i++;else{if("N"!==o)break;s.write("* as "+a.local.name),i++}}if(i<n){for(s.write("{");;){var u=(a=r[i]).imported.name;if(s.write(u),u!==a.local.name&&s.write(" as "+a.local.name),!(++i<n))break;s.write(", ")}s.write("}")}s.write(" from "),s.operators.push("from")}this.Literal(t.source,e),s.write(";")},ExportDefaultDeclaration:function(t,e){var s=e.output;s.write("export default "),s.operators.push("export"),s.operators.push("default"),this[t.declaration.type](t.declaration,e),i.default[t.declaration.type]&&"F"!==t.declaration.type[0]&&s.write(";")},ExportNamedDeclaration:function(t,e){var s=e.output;if(s.write("export "),s.operators.push("export"),t.declaration)this[t.declaration.type](t.declaration,e);else{s.write("{"),s.operators.push("{}");var r=t.specifiers,n=r.length;if(n>0)for(var i=0;;){var a=r[i],o=a.local.name;if(s.write(o),o!==a.exported.name&&s.write(" as "+a.exported.name),!(++i<n))break;s.write(", ")}s.write("}"),t.source&&(s.write(" from "),this.Literal(t.source,e)),s.write(";")}},ExportAllDeclaration:function(t,e){var s=e.output;s.write("export * from "),s.operators.push("export"),s.operators.push("*"),this.Literal(t.source,e),s.write(";")},MethodDefinition:function(t,e){var s=e.output;switch(t.static&&(s.write("static "),s.operators.push("static")),t.kind[0]){case"g":case"s":s.write(t.kind+" "),s.operators.push(t.kind)}t.value.generator&&s.write("*"),t.computed?(s.write("["),this[t.key.type](t.key,e),s.write("]")):this[t.key.type](t.key,e),n.default.formatSequence(t.value.params,e,this),s.write(" "),this[t.value.body.type](t.value.body,e)},ClassExpression:function(t,e){this.ClassDeclaration(t,e)},ArrowFunctionExpression:function(t,e){var s=e.output,r=t.params;null!=r&&(1===r.length&&"I"===r[0].type[0]?s.write(r[0].name):n.default.formatSequence(t.params,e,this)),s.write(" => "),s.operators.push("function=>"),"O"===t.body.type[0]?(s.write("("),this.ObjectExpression(t.body,e),s.write(")")):this[t.body.type](t.body,e)},ThisExpression:function(t,e){e.output.write("this"),e.output.operators.push("this")},Super:function(t,e){e.output.write("super"),e.output.operators.push("super")},RestElement:p=function(t,e){e.output.write("..."),e.output.operators.push("... (rest)"),this[t.argument.type](t.argument,e)},SpreadElement:function(t,e){e.output.write("..."),e.output.operators.push("... (spread)"),this[t.argument.type](t.argument,e)},YieldExpression:function(t,e){var s=e.output;s.write(t.delegate?"yield*":"yield"),s.operators.push(t.delegate?"yield*":"yield"),t.argument&&(s.write(" "),this[t.argument.type](t.argument,e))},TemplateLiteral:function(t,e){var s=e.output,r=t.quasis,n=t.expressions,i=n.length;s.write("`");for(var a=0;a<i;a++){var o=n[a];s.write(r[a].value.raw),s.write("${"),this[o.type](o,e),s.write("}")}s.write(r[r.length-1].value.raw),s.write("`")},TaggedTemplateExpression:function(t,e){this[t.tag.type](t.tag,e),this[t.quasi.type](t.quasi,e)},ArrayExpression:o=function(t,e){var s=e.output;if(s.operators.push("[]"),s.write("["),t.elements.length>0)for(var r=t.elements,n=r.length,i=0;;){var a=r[i];if(null!=a&&this[a.type](a,e),!(++i<n)){null==a&&(s.write(", "),s.operators.push(","));break}s.write(", "),s.operators.push(",")}s.write("]")},ArrayPattern:o,ObjectExpression:function(t,e){var s=e.lineEnd,r=e.output,n=e.indent.repeat(e.indentLevel++),i=n+e.indent;if(r.operators.push("{}"),r.write("{"),t.properties.length>0){r.write(s);for(var a=","+s,o=t.properties,u=o.length,l=0;;){var h=o[l];if(r.write(i),this.Property(h,e),!(++l<u))break;r.write(a)}r.write(s),r.write(n+"}")}else r.write("}");e.indentLevel--},Property:c=function(t,e){if(t.method||t.kind&&"i"!==t.kind[0])this.MethodDefinition(t,e);else{var s=e.output;t.shorthand||(t.computed?(s.operators.push("[]"),s.write("["),this[t.key.type](t.key,e),s.write("]")):this[t.key.type](t.key,e),s.operators.push(":"),s.write(": ")),this[t.value.type](t.value,e)}},ObjectPattern:function(t,e){var s=e.output;if(s.operators.push("{}"),s.write("{"),t.properties.length>0)for(var r=t.properties,n=r.length,i=0;this[r[i].type](r[i],e),++i<n;)s.write(", ");s.write("}")},SequenceExpression:function(t,e){n.default.formatSequence(t.expressions,e,this)},UnaryExpression:function(t,e){var s=e.output;s.operators.push(t.operator+" ("+(t.prefix?"pre":"post")+"fix)"),t.prefix?(s.write(t.operator),t.operator.length>1&&s.write(" "),i.default[t.argument.type]<i.default.UnaryExpression?(s.write("("),this[t.argument.type](t.argument,e),s.write(")")):this[t.argument.type](t.argument,e)):(this[t.argument.type](t.argument,e),e.output.write(t.operator))},UpdateExpression:function(t,e){e.output.operators.push(t.operator+" ("+(t.prefix?"pre":"post")+"fix)"),t.prefix?(e.output.write(t.operator),this[t.argument.type](t.argument,e)):(this[t.argument.type](t.argument,e),e.output.write(t.operator))},AssignmentExpression:function(t,e){this[t.left.type](t.left,e),e.output.write(" "+t.operator+" "),this[t.right.type](t.right,e),e.output.operators.push(t.operator)},AssignmentPattern:function(t,e){this[t.left.type](t.left,e),e.output.write(" = "),this[t.right.type](t.right,e),e.output.operators.push("=")},BinaryExpression:u=function(t,e){var s=e.output;s.operators.push(t.operator),"in"===t.operator?(s.write("("),n.default.formatBinaryExpressionPart(t.left,t,!1,e,this),s.write(" "+t.operator+" "),n.default.formatBinaryExpressionPart(t.right,t,!0,e,this),s.write(")")):(n.default.formatBinaryExpressionPart(t.left,t,!1,e,this),s.write(" "+t.operator+" "),n.default.formatBinaryExpressionPart(t.right,t,!0,e,this))},LogicalExpression:u,ConditionalExpression:function(t,e){var s=e.output;i.default[t.test.type]>i.default.ConditionalExpression?this[t.test.type](t.test,e):(s.operators.push("()"),s.write("("),this[t.test.type](t.test,e),s.write(")")),s.write(" ? "),this[t.consequent.type](t.consequent,e),s.write(" : "),this[t.alternate.type](t.alternate,e),s.operators.push(":?")},NewExpression:function(t,e){var s=e.output;s.write("new "),s.operators.push("new"),i.default[t.callee.type]<i.default.CallExpression||n.default.hasCallExpression(t.callee)?(s.write("("),this[t.callee.type](t.callee,e),s.write(")"),s.operators.push("()")):this[t.callee.type](t.callee,e),n.default.formatSequence(t.arguments,e,this)},CallExpression:function(t,e){var s=e.output;i.default[t.callee.type]<i.default.CallExpression?(s.write("("),this[t.callee.type](t.callee,e),s.write(")"),s.operators.push("()")):this[t.callee.type](t.callee,e),n.default.formatSequence(t.arguments,e,this)},MemberExpression:function(t,e){var s=e.output;i.default[t.object.type]<i.default.MemberExpression?(s.write("("),this[t.object.type](t.object,e),s.write(")"),s.operators.push("()")):this[t.object.type](t.object,e),t.computed?(s.write("["),this[t.property.type](t.property,e),s.write("]"),s.operators.push("[]")):(s.write("."),s.operators.push("."),this[t.property.type](t.property,e))},MetaProperty:function(t,e){e.output.write(t.meta.name+"."+t.property.name),e.output.operators.push("."),e.output.operands.push(t.meta.name),e.output.operands.push(t.property.name)},Identifier:function(t,e){e.output.write(t.name),e.output.operands.push(t.name)},Literal:function(t,e){null!=t.raw?(e.output.write(t.raw),e.output.operands.push(t.raw)):null!=t.regex?this.RegExpLiteral(t,e):e.output.write((0,r.default)(t.value))},RegExpLiteral:function(t,e){var s=t.regex;e.output.write("new RegExp("+(0,r.default)(s.pattern)+", "+(0,r.default)(s.flags)+")")},ObjectProperty:c,RestProperty:p,BooleanLiteral:function(t,e){e.output.write(t.value),e.output.operands.push((0,r.default)(t.value))},DirectiveLiteral:function(t,e){e.output.write(t.value),e.output.operands.push((0,r.default)(t.value))},NullLiteral:function(t,e){e.output.write("null"),e.output.operands.push("null")},NumericLiteral:function(t,e){e.output.write(t.value),e.output.operands.push((0,r.default)(t.value))},StringLiteral:function(t,e){null!=t.extra&&null!=t.extra.raw?(e.output.write(t.extra.raw),e.output.operands.push(t.extra.raw)):(e.output.write((0,r.default)(t.value)),e.output.operands.push((0,r.default)(t.value)))}},t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=i(s(0)),n=i(s(1));function i(t){return t&&t.__esModule?t:{default:t}}var a=function(){function t(){(0,r.default)(this,t),this.source="",this.operands=[],this.operators=[]}return(0,n.default)(t,[{key:"write",value:function(t){this.source+=t}},{key:"toString",value:function(){return this.source}}]),t}();e.default=a,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=u(s(15)),n=u(s(2)),i=u(s(0)),a=u(s(148)),o=u(s(147));function u(t){return t&&t.__esModule?t:{default:t}}e.default=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,i.default)(this,t),"object"!==(void 0===e?"undefined":(0,n.default)(e)))throw new TypeError("ctor error: 'options' is not an 'object'.");this.output=new a.default,this.generator=o.default,this.indent="string"==typeof e.indent?e.indent:"\t",this.lineEnd="string"==typeof e.lineEnd?e.lineEnd:"\n",this.indentLevel=(0,r.default)(e.startingIndentLevel)?e.startingIndentLevel:0,this.noTrailingSemicolon=!1},t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=h(s(58)),n=h(s(2)),i=h(s(5)),a=h(s(4)),o=h(s(23)),u=h(s(0)),l=h(s(1));function h(t){return t&&t.__esModule?t:{default:t}}var c=function(){function t(){(0,u.default)(this,t)}return(0,l.default)(t,[{key:"onLoadSyntax",value:function(t){var e=!0,s=!1,r=void 0;try{for(var u,l=(0,o.default)(p((0,a.default)(this)));!(e=(u=l.next()).done);e=!0){var h=u.value,c=h.charAt(0);this[h]instanceof Function&&(c!==c.toLowerCase()||c===c.toUpperCase())&&(t.data.syntaxes[h]=(0,i.default)("object"===(0,n.default)(t.data.syntaxes[h])?t.data.syntaxes[h]:{},this[h](t.data.settings)))}}catch(t){s=!0,r=t}finally{try{!e&&l.return&&l.return()}finally{if(s)throw r}}}}]),t}();e.default=c;var p=function(t){var e=[];do{(0,r.default)(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),t=(0,a.default)(t)}while(void 0!==t&&null!==t&&t!==c.prototype);return e};t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=y(s(19)),n=y(s(2)),i=y(s(4)),a=y(s(0)),o=y(s(1)),u=y(s(7)),l=y(s(6)),h=y(s(150)),c=y(s(87)),p=y(s(43)),d=y(s(53)),f=y(s(85));function y(t){return t&&t.__esModule?t:{default:t}}var v=function(t){function e(){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,i.default)(e)).apply(this,arguments))}return(0,l.default)(e,t),(0,o.default)(e,[{key:"onConfigure",value:function(t){if(t.data.settings.commonjs="boolean"==typeof t.data.options.commonjs&&t.data.options.commonjs,t.data.settings.dependencyResolver="function"==typeof t.data.options.dependencyResolver?t.data.options.dependencyResolver:void 0,"object"===(0,n.default)(t.data.options.esmImportExport))t.data.settings.esmImportExport={halstead:"boolean"==typeof t.data.options.esmImportExport.halstead&&t.data.options.esmImportExport.halstead,lloc:"boolean"==typeof t.data.options.esmImportExport.lloc&&t.data.options.esmImportExport.lloc};else{var e="boolean"==typeof t.data.options.esmImportExport&&t.data.options.esmImportExport;t.data.settings.esmImportExport={halstead:e,lloc:e}}if(t.data.settings.forin="boolean"==typeof t.data.options.forin&&t.data.options.forin,t.data.settings.logicalor="boolean"!=typeof t.data.options.logicalor||t.data.options.logicalor,t.data.settings.switchcase="boolean"!=typeof t.data.options.switchcase||t.data.options.switchcase,"object"===(0,n.default)(t.data.options.templateExpression))t.data.settings.templateExpression={halstead:"boolean"!=typeof t.data.options.templateExpression.halstead||t.data.options.templateExpression.halstead,lloc:"boolean"!=typeof t.data.options.templateExpression.lloc||t.data.options.templateExpression.lloc};else{var s="boolean"!=typeof t.data.options.templateExpression||t.data.options.templateExpression;t.data.settings.templateExpression={halstead:s,lloc:s}}t.data.settings.trycatch="boolean"==typeof t.data.options.trycatch&&t.data.options.trycatch}},{key:"ArrayExpression",value:function(){return(0,f.default)(0,0,function(t){var e=["[]"];return Array.isArray(t.elements)&&t.elements.length>0&&e.push.apply(e,(0,r.default)(new Array(t.elements.length-1).fill(","))),e})}},{key:"AssignmentExpression",value:function(){return(0,f.default)(function(t,e){return e&&"ExpressionStatement"!==e.type?1:0},0,function(t){return t.operator})}},{key:"BlockStatement",value:function(){return(0,f.default)(0,0)}},{key:"BinaryExpression",value:function(){return(0,f.default)(0,0,function(t){return t.operator})}},{key:"BreakStatement",value:function(){return(0,f.default)(1,0,"break")}},{key:"CallExpression",value:function(t){return(0,f.default)(function(t,e){return e&&"ExpressionStatement"!==e.type&&"YieldExpression"!==e.type?1:0},0,"()",void 0,void 0,void 0,function(e){if(t.commonjs&&"Identifier"===e.callee.type&&"require"===e.callee.name&&1===e.arguments.length){var s=e.arguments[0],r="* dynamic dependency *";return"Literal"!==s.type&&"StringLiteral"!==s.type||(r="function"==typeof t.dependencyResolver?t.dependencyResolver(s.value):s.value),{line:e.loc.start.line,path:r,type:"cjs"}}})}},{key:"CatchClause",value:function(t){return(0,f.default)(1,function(){return t.trycatch?1:0},"catch")}},{key:"ConditionalExpression",value:function(){return(0,f.default)(0,1,":?")}},{key:"ContinueStatement",value:function(){return(0,f.default)(1,0,"continue")}},{key:"DoWhileStatement",value:function(){return(0,f.default)(2,function(t){return t.test?1:0},"dowhile")}},{key:"EmptyStatement",value:function(){return(0,f.default)(0,0)}},{key:"ExpressionStatement",value:function(){return(0,f.default)(function(t){return"object"===(0,n.default)(t.expression)&&"ArrowFunctionExpression"!==t.expression.type?1:0},0)}},{key:"ForInStatement",value:function(t){return(0,f.default)(1,function(){return t.forin?1:0},function(t){var e=["forin"],s=[];return t.left&&s.push(t.left),t.right&&s.push(t.right),s.length>0&&e.push.apply(e,(0,r.default)(c.default.parseNodes(s).operators)),e},function(t){var e=[],s=[];return t.left&&s.push(t.left),t.right&&s.push(t.right),s.length>0&&e.push.apply(e,(0,r.default)(c.default.parseNodes(s).operands)),e},["left","right"])}},{key:"ForStatement",value:function(){return(0,f.default)(1,function(t){return t.test?1:0},function(t){var e=["for"],s=[];return t.init&&s.push(t.init),t.test&&s.push(t.test),t.update&&s.push(t.update),s.length>0&&e.push.apply(e,(0,r.default)(c.default.parseNodes(s).operators)),e},function(t){var e=[],s=[];return t.init&&s.push(t.init),t.test&&s.push(t.test),t.update&&s.push(t.update),s.length>0&&e.push.apply(e,(0,r.default)(c.default.parseNodes(s).operands)),e},["init","test","update"])}},{key:"FunctionDeclaration",value:function(){return(0,f.default)(0,0,void 0,void 0,["id","params","defaults"],function(t,e){var s=m(t,e),i=g(t,e),a=[];e&&"MethodDefinition"===e.type?("boolean"==typeof t.generator&&t.generator&&a.push("function*"),"boolean"==typeof e.computed&&e.computed&&a.push.apply(a,(0,r.default)(c.default.parse(e.key).operators))):a.push("boolean"==typeof t.generator&&t.generator?"function*":"function");var o=[];return Array.isArray(t.params)&&t.params.forEach(function(t){var e=c.default.parse(t);i.push.apply(i,(0,r.default)(e.operands)),a.push.apply(a,(0,r.default)(e.operators)),"AssignmentPattern"===t.type?o.push.apply(o,(0,r.default)(c.default.parse(t.left).operands)):o.push.apply(o,(0,r.default)(e.operands))}),Array.isArray(t.defaults)&&t.defaults.forEach(function(t){if(null!==t&&"object"===(void 0===t?"undefined":(0,n.default)(t))){var e=c.default.parse(t);i.push.apply(i,(0,r.default)(e.operands)),a.push.apply(a,(0,r.default)(e.operators)),a.push("=")}}),{type:"method",name:s,cyclomatic:1,lineStart:t.loc.start.line,lineEnd:t.loc.end.line,lloc:1,operands:new p.default("operands",i),operators:new p.default("operators",a),paramNames:o}})}},{key:"FunctionExpression",value:function(){return(0,f.default)(0,0,void 0,void 0,["id","params","defaults"],function(t,e){var s=m(t,e),i=g(t,e),a=[];e&&"MethodDefinition"===e.type?("boolean"==typeof t.generator&&t.generator&&a.push("function*"),"boolean"==typeof e.computed&&e.computed&&a.push.apply(a,(0,r.default)(c.default.parse(e.key).operators))):a.push("boolean"==typeof t.generator&&t.generator?"function*":"function");var o=[];return Array.isArray(t.params)&&t.params.forEach(function(t){var e=c.default.parse(t);i.push.apply(i,(0,r.default)(e.operands)),a.push.apply(a,(0,r.default)(e.operators)),"AssignmentPattern"===t.type?o.push.apply(o,(0,r.default)(c.default.parse(t.left).operands)):o.push.apply(o,(0,r.default)(e.operands))}),Array.isArray(t.defaults)&&t.defaults.forEach(function(t){if(null!==t&&"object"===(void 0===t?"undefined":(0,n.default)(t))){var e=c.default.parse(t);i.push.apply(i,(0,r.default)(e.operands)),a.push.apply(a,(0,r.default)(e.operators)),a.push("=")}}),{type:"method",name:s,cyclomatic:1,lineStart:t.loc.start.line,lineEnd:t.loc.end.line,lloc:1,operands:new p.default("operands",i),operators:new p.default("operators",a),paramNames:o}})}},{key:"Identifier",value:function(){return(0,f.default)(0,0,void 0,function(t){return t.name})}},{key:"IfStatement",value:function(){return(0,f.default)(function(t){return t.alternate?2:1},1,["if",{identifier:"else",filter:function(t){return!!t.alternate}}])}},{key:"LabeledStatement",value:function(){return(0,f.default)(0,0)}},{key:"Literal",value:function(){return(0,f.default)(0,0,void 0,function(t){var e=[];return"object"===(0,n.default)(t.regex)&&void 0!==t.raw?e.push(t.raw):e.push("string"==typeof t.value?'"'+t.value+'"':t.value),e})}},{key:"LogicalExpression",value:function(t){return(0,f.default)(0,function(e){var s="&&"===e.operator,r="||"===e.operator;return s||t.logicalor&&r?1:0},function(t){return t.operator})}},{key:"MemberExpression",value:function(){return(0,f.default)(0,0,function(t){return"boolean"==typeof t.computed&&t.computed?"[]":"."})}},{key:"NewExpression",value:function(){return(0,f.default)(function(t){return"FunctionExpression"===t.callee.type?1:0},0,"new")}},{key:"ObjectExpression",value:function(){return(0,f.default)(0,0,"{}")}},{key:"Property",value:function(){return(0,f.default)(1,0,function(t){return void 0===t.shorthand?":":"boolean"!=typeof t.shorthand||t.shorthand?void 0:":"})}},{key:"ReturnStatement",value:function(){return(0,f.default)(1,0,"return")}},{key:"SequenceExpression",value:function(){return(0,f.default)(0,0)}},{key:"SwitchCase",value:function(t){return(0,f.default)(1,function(e){return t.switchcase&&e.test?1:0},function(t){return t.test?"case":"default"})}},{key:"SwitchStatement",value:function(){return(0,f.default)(1,0,"switch")}},{key:"ThisExpression",value:function(){return(0,f.default)(0,0,"this")}},{key:"ThrowStatement",value:function(){return(0,f.default)(1,0,"throw")}},{key:"TryStatement",value:function(){return(0,f.default)(1,0,function(t){return t.finalizer?["try","finally"]:["try"]},void 0,["guardedHandlers","handlers"])}},{key:"UnaryExpression",value:function(){return(0,f.default)(0,0,function(t){return t.operator+" ("+(t.prefix?"pre":"post")+"fix)"})}},{key:"UpdateExpression",value:function(){return(0,f.default)(0,0,function(t){return t.operator+" ("+(t.prefix?"pre":"post")+"fix)"})}},{key:"VariableDeclaration",value:function(){return(0,f.default)(0,0,function(t){return t.kind})}},{key:"VariableDeclarator",value:function(){return(0,f.default)(1,0,{identifier:"=",filter:function(t){return!!t.init}})}},{key:"WhileStatement",value:function(){return(0,f.default)(1,function(t){return t.test?1:0},"while")}},{key:"WithStatement",value:function(){return(0,f.default)(1,0,"with")}},{key:"AssignmentPattern",value:function(){return(0,f.default)(1,0,function(t){return t.operator})}},{key:"ArrayPattern",value:function(){return(0,f.default)(0,0,function(t){var e=["[]"];return Array.isArray(t.elements)&&t.elements.length>0&&e.push.apply(e,(0,r.default)(new Array(t.elements.length-1).fill(","))),e})}},{key:"ArrowFunctionExpression",value:function(){return(0,f.default)(0,0,void 0,void 0,function(t,e){return e&&"ExpressionStatement"!==e.type?["id","params","defaults"]:null},function(t,e){var s=e&&"ExpressionStatement"!==e.type,i=d.default.safeName(t.id),a=[],o=s?["function=>"]:[],u=[];return s&&Array.isArray(t.params)&&t.params.forEach(function(t){var e=c.default.parse(t);a.push.apply(a,(0,r.default)(e.operands)),o.push.apply(o,(0,r.default)(e.operators)),"AssignmentPattern"===t.type?u.push.apply(u,(0,r.default)(c.default.parse(t.left).operands)):u.push.apply(u,(0,r.default)(e.operands))}),s&&Array.isArray(t.defaults)&&t.defaults.forEach(function(t){if(null!==t&&"object"===(void 0===t?"undefined":(0,n.default)(t))){var e=c.default.parse(t);a.push.apply(a,(0,r.default)(e.operands)),o.push.apply(o,(0,r.default)(e.operators)),o.push("=")}}),{type:"method",name:i,cyclomatic:s?1:0,lineStart:t.loc.start.line,lineEnd:t.loc.end.line,lloc:s?1:0,operands:s?new p.default("operands",a):void 0,operators:s?new p.default("operators",o):void 0,paramNames:u,postLloc:s&&"object"===(0,n.default)(t.body)&&"BlockStatement"!==t.body.type?1:0}})}},{key:"ClassBody",value:function(){return(0,f.default)(0,0)}},{key:"ClassDeclaration",value:function(){return(0,f.default)(0,0,void 0,void 0,["id","superClass"],function(t){var e=d.default.safeName(t.id),s="<anonymous>"!==e?[e]:[],n=["class"],i=void 0;if(void 0!==t.superClass&&null!==t.superClass){var a=c.default.parse(t.superClass);n.push("extends"),s.push.apply(s,(0,r.default)(a.operands)),n.push.apply(n,(0,r.default)(a.operators)),i="Identifier"===t.superClass.type?d.default.safeName(t.superClass):"<computed~"+a.source+">"}return{type:"class",name:e,superClassName:i,lineStart:t.loc.start.line,lineEnd:t.loc.end.line,lloc:1,operands:new p.default("operands",s),operators:new p.default("operators",n)}})}},{key:"ClassExpression",value:function(){return(0,f.default)(0,0,void 0,void 0,["id","superClass"],function(t){var e=d.default.safeName(t.id),s="<anonymous>"!==e?[e]:[],n=["class"],i=void 0;if(void 0!==t.superClass&&null!==t.superClass){var a=c.default.parse(t.superClass);n.push("extends"),s.push.apply(s,(0,r.default)(a.operands)),n.push.apply(n,(0,r.default)(a.operators)),i="Identifier"===t.superClass.type?d.default.safeName(t.superClass):"<computed~"+a.source+">"}return{type:"class",name:d.default.safeName(t.id),superClassName:i,lineStart:t.loc.start.line,lineEnd:t.loc.end.line,lloc:1,operands:new p.default("operands",s),operators:new p.default("operators",n)}})}},{key:"ExportAllDeclaration",value:function(t){return(0,f.default)(t.esmImportExport.lloc?1:0,0,t.esmImportExport.halstead?["export","*"]:void 0,void 0,t.esmImportExport.halstead?void 0:null)}},{key:"ExportDefaultDeclaration",value:function(t){return(0,f.default)(t.esmImportExport.lloc?1:0,0,t.esmImportExport.halstead?["export","default"]:void 0)}},{key:"ExportNamedDeclaration",value:function(t){return(0,f.default)(t.esmImportExport.lloc?1:0,0,t.esmImportExport.halstead?["export","{}"]:void 0,void 0,t.esmImportExport.halstead?void 0:["source","specifiers"])}},{key:"ExportSpecifier",value:function(t){return(0,f.default)(0,0,t.esmImportExport.halstead?function(t){return t.exported.name!==t.local.name?"as":void 0}:void 0,void 0,t.esmImportExport.halstead?function(t){return t.exported.name===t.local.name?["local"]:void 0}:null)}},{key:"ForOfStatement",value:function(){return(0,f.default)(1,function(t){return t.test?1:0},function(t){var e=["forof"],s=[];return t.left&&s.push(t.left),t.right&&s.push(t.right),s.length>0&&e.push.apply(e,(0,r.default)(c.default.parseNodes(s).operators)),e},function(t){var e=[],s=[];return t.left&&s.push(t.left),t.right&&s.push(t.right),s.length>0&&e.push.apply(e,(0,r.default)(c.default.parseNodes(s).operands)),e},["left","right"])}},{key:"ImportDeclaration",value:function(t){return(0,f.default)(t.esmImportExport.lloc?1:0,0,t.esmImportExport.halstead?["import","from"]:void 0,void 0,t.esmImportExport.halstead?void 0:null,void 0,function(e){var s="function"==typeof t.dependencyResolver?t.dependencyResolver(e.source.value):e.source.value;return{line:e.source.loc.start.line,path:s,type:"esm"}})}},{key:"ImportDefaultSpecifier",value:function(){return(0,f.default)(0,0)}},{key:"ImportNamespaceSpecifier",value:function(t){return(0,f.default)(0,0,t.esmImportExport.halstead?["import","*","as"]:void 0,void 0,t.esmImportExport.halstead?void 0:null)}},{key:"ImportSpecifier",value:function(t){return(0,f.default)(0,0,t.esmImportExport.halstead?function(t){return t.imported.name===t.local.name?"{}":["{}","as"]}:void 0,void 0,t.esmImportExport.halstead?void 0:null)}},{key:"MetaProperty",value:function(){return(0,f.default)(0,0,".",function(t){return"string"==typeof t.meta&&"string"==typeof t.property?[t.meta,t.property]:void 0})}},{key:"MethodDefinition",value:function(){return(0,f.default)(0,0,function(t){var e=[];return!t.kind||"get"!==t.kind&&"set"!==t.kind||e.push(t.kind),"boolean"==typeof t.static&&t.static&&e.push("static"),e},void 0,"key")}},{key:"ObjectPattern",value:function(){return(0,f.default)(0,0,"{}")}},{key:"RestElement",value:function(){return(0,f.default)(0,0,"... (rest)")}},{key:"SpreadElement",value:function(){return(0,f.default)(0,0,"... (spread)")}},{key:"Super",value:function(){return(0,f.default)(0,0,"super")}},{key:"TaggedTemplateExpression",value:function(t){return(0,f.default)(t.templateExpression.lloc?1:0,0)}},{key:"TemplateElement",value:function(){return(0,f.default)(0,0,void 0,function(t){return""!==t.value.cooked?t.value.cooked:void 0})}},{key:"TemplateLiteral",value:function(t){return(0,f.default)(0,0,t.templateExpression.halstead?function(t){var e=["``"];return Array.isArray(t.expressions)&&t.expressions.length>0&&e.push.apply(e,(0,r.default)(new Array(t.expressions.length).fill("${}"))),e}:[])}},{key:"YieldExpression",value:function(){return(0,f.default)(function(t,e){return e&&"ExpressionStatement"!==e.type?1:0},0,function(t){return"boolean"==typeof t.delegate&&t.delegate?"yield*":"yield"})}}]),e}(h.default);function m(t,e){var s=void 0;return e&&"MethodDefinition"===e.type&&(s="boolean"==typeof e.computed&&e.computed?"Literal"===e.key.type?d.default.safeValue(e.key):"<computed~"+c.default.parse(e.key).source+">":d.default.safeName(e.key)),"string"!=typeof s&&(s=d.default.safeName(t.id||t.key)),s}function g(t,e){var s=[];return e&&"MethodDefinition"===e.type&&("boolean"==typeof e.computed&&e.computed?"Literal"===e.key.type?s.push(d.default.safeValue(e.key)):s.push.apply(s,(0,r.default)(c.default.parse(e.key).operands)):s.push(d.default.safeName(e.key))),0===s.length&&(void 0!==t.id&&null!==t.id||void 0!==t.key&&null!==t.key)&&s.push(d.default.safeName(t.id||t.key)),s}e.default=v,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=y(s(2)),n=y(s(19)),i=y(s(4)),a=y(s(0)),o=y(s(1)),u=y(s(7)),l=y(s(6)),h=y(s(151)),c=y(s(87)),p=y(s(43)),d=y(s(53)),f=y(s(85));function y(t){return t&&t.__esModule?t:{default:t}}var v=function(t){function e(){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,i.default)(e)).apply(this,arguments))}return(0,l.default)(e,t),(0,o.default)(e,[{key:"BindExpression",value:function(){return(0,f.default)(0,0)}},{key:"BooleanLiteral",value:function(){return(0,f.default)(0,0,void 0,function(t){return t.value})}},{key:"ClassMethod",value:function(){return(0,f.default)(0,0,void 0,void 0,["key","params"],function(t,e){var s=void 0,r=[],i=[];!t.kind||"get"!==t.kind&&"set"!==t.kind||i.push(t.kind),"boolean"==typeof t.async&&t.async&&i.push("async"),"boolean"==typeof t.static&&t.static&&i.push("static"),"boolean"==typeof t.generator&&t.generator&&i.push("function*"),"boolean"==typeof t.computed&&t.computed?(s="StringLiteral"===t.key.type?d.default.safeValue(t.key):"<computed~"+c.default.parse(t.key).source+">",r.push.apply(r,(0,n.default)(function(t){var e=[];"boolean"==typeof t.computed&&t.computed?"StringLiteral"===t.key.type?e.push(d.default.safeValue(t.key)):e.push.apply(e,(0,n.default)(c.default.parse(t.key).operands)):e.push(d.default.safeName(t.key));return e}(t))),i.push.apply(i,(0,n.default)(c.default.parse(t.key).operators))):(s=d.default.safeName(t.key),r.push(s));var a=[];return Array.isArray(t.params)&&t.params.forEach(function(t){var e=c.default.parse(t);r.push.apply(r,(0,n.default)(e.operands)),i.push.apply(i,(0,n.default)(e.operators)),"AssignmentPattern"===t.type?a.push.apply(a,(0,n.default)(c.default.parse(t.left).operands)):a.push.apply(a,(0,n.default)(e.operands))}),{type:"method",name:s,cyclomatic:1,lineStart:t.loc.start.line,lineEnd:t.loc.end.line,lloc:1,operands:new p.default("operands",r),operators:new p.default("operators",i),paramNames:a}})}},{key:"Decorator",value:function(){return(0,f.default)(0,0)}},{key:"Directive",value:function(){return(0,f.default)(1,0)}},{key:"DirectiveLiteral",value:function(){return(0,f.default)(0,0,void 0,function(t){return"string"==typeof t.value?'"'+t.value+'"':t.value})}},{key:"NullLiteral",value:function(){return(0,f.default)(0,0,void 0,"null")}},{key:"NumericLiteral",value:function(){return(0,f.default)(0,0,void 0,function(t){return t.value})}},{key:"ObjectMethod",value:function(){return(0,f.default)(1,0,function(t){return"string"!=typeof t.kind||"get"!==t.kind&&"set"!==t.kind?void 0:t.kind},void 0,"key")}},{key:"ObjectProperty",value:function(){return(0,f.default)(1,0,function(t){return void 0===t.shorthand?":":"boolean"!=typeof t.shorthand||t.shorthand?void 0:":"})}},{key:"RegExpLiteral",value:function(){return(0,f.default)(0,0,void 0,function(t){var e=[];return"object"===(0,r.default)(t.extra)&&void 0!==t.extra.raw&&e.push(t.extra.raw),e})}},{key:"RestProperty",value:function(){return(0,f.default)(0,0,"... (rest)")}},{key:"SpreadProperty",value:function(){return(0,f.default)(0,0,"... (spread)")}},{key:"StringLiteral",value:function(){return(0,f.default)(0,0,void 0,function(t){return'"'+t.value+'"'})}}]),e}(h.default);e.default=v,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(s(2)),n=a(s(0)),i=a(s(1));function a(t){return t&&t.__esModule?t:{default:t}}var o=function(){function t(e,s){if((0,n.default)(this,t),"string"!=typeof e)throw new TypeError("ctor error: metric is not a `string`.");if("object"!==(void 0===s?"undefined":(0,r.default)(s)))throw new TypeError("ctor error: data is not an `object`.");if(Array.isArray(s.identifier))s.identifier.forEach(function(t,e){if("function"!==t&&"string"!=typeof t)throw new TypeError("ctor error: data.identifier array is not a 'function' or 'string' at index: "+e+".")});else if("function"!=typeof s.identifier&&"string"!=typeof s.identifier)throw new TypeError("ctor error: data.identifier is not a `function` or `string`.");if(void 0!==s.filter&&"function"!=typeof s.filter)throw new TypeError("ctor error: data.filter is not a `function`.");this._data=s,this._metric=e}return(0,i.default)(t,[{key:"filter",value:function(){var t;return"function"!=typeof this._data.filter||(t=this._data).filter.apply(t,arguments)}},{key:"valueOf",value:function(){for(var t,e=arguments.length,s=Array(e),r=0;r<e;r++)s[r]=arguments[r];return Array.isArray(this._data.identifier)?this._data.identifier.map(function(t){return"function"==typeof t?t.apply(void 0,s):t}):"function"==typeof this._data.identifier?(t=this._data).identifier.apply(t,s):this._data.identifier}},{key:"metric",get:function(){return this._metric}},{key:"type",get:function(){return(0,r.default)(this._data)}}]),t}();e.default=o,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=u(s(15)),n=u(s(2)),i=u(s(0)),a=u(s(1)),o=u(s(43));function u(t){return t&&t.__esModule?t:{default:t}}var l=function(){function t(){(0,i.default)(this,t)}return(0,a.default)(t,null,[{key:"addDependencies",value:function(t,e){("object"===(void 0===e?"undefined":(0,n.default)(e))||Array.isArray(e))&&(t.dependencies=t.dependencies.concat(e))}},{key:"preScopeCreated",value:function(e,s){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],u=arguments[4];if("object"!==(void 0===i?"undefined":(0,n.default)(i)))throw new TypeError("preScopeCreated error: 'newScope' is not an 'object'.");if("string"!=typeof i.type)throw new TypeError("preScopeCreated error: 'newScope.type' is not a 'string'.");switch(i.type){case"class":case"method":if((0,r.default)(i.lloc)){e.aggregateReport.sloc.logical+=i.lloc;var l=s.getCurrentClassReport(),h=s.getCurrentMethodReport();l&&(l.aggregateReport.sloc.logical+=i.lloc),h&&(h.sloc.logical+=i.lloc)}if(i.operands instanceof o.default)i.operands.valueOf(a,u).forEach(function(r){t.halsteadItemEncountered(e,s,"operands",r)});if(i.operators instanceof o.default)i.operators.valueOf(a,u).forEach(function(r){t.halsteadItemEncountered(e,s,"operators",r)})}}},{key:"postScopeCreated",value:function(t,e){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("object"!==(void 0===s?"undefined":(0,n.default)(s)))throw new TypeError("postScopeCreated error: 'newScope' is not an 'object'.");if("string"!=typeof s.type)throw new TypeError("postScopeCreated error: 'newScope.type' is not a 'string'.");switch(s.type){case"class":break;case"method":if(!(0,r.default)(s.cyclomatic))throw new TypeError("postScopeCreated error: 'newScope.cyclomatic' is not an 'integer'.");if(!Array.isArray(s.paramNames))throw new TypeError("postScopeCreated error: 'newScope.paramNames' is not an 'array'.");var i=e.getCurrentClassReport(),a=e.getCurrentMethodReport();t.aggregateReport.cyclomatic+=s.cyclomatic,t.aggregateReport.paramCount+=s.paramNames.length,i&&(i.aggregateReport.cyclomatic+=s.cyclomatic,i.aggregateReport.paramCount+=s.paramNames.length),(0,r.default)(s.postLloc)&&(t.aggregateReport.sloc.logical+=s.postLloc,i&&(i.aggregateReport.sloc.logical+=s.postLloc),a&&(a.sloc.logical+=s.postLloc))}}},{key:"halsteadItemEncountered",value:function(e,s,r,n){var i=s.getCurrentClassReport(),a=s.getCurrentMethodReport();t.incrementHalsteadItems(e,r,n),i&&t.incrementHalsteadItems(i,r,n),a&&t.incrementHalsteadItems(a,r,n)}},{key:"incrementCyclomatic",value:function(t,e,s){var r=e.getCurrentClassReport(),n=e.getCurrentMethodReport();t.aggregate.cyclomatic+=s,r&&(r.aggregate.cyclomatic+=s),n&&(n.cyclomatic+=s)}},{key:"incrementLogicalSloc",value:function(t,e,s){var r=e.getCurrentClassReport(),n=e.getCurrentMethodReport();t.aggregate.sloc.logical+=s,r&&(r.aggregate.sloc.logical+=s),n&&(n.sloc.logical+=s)}},{key:"incrementHalsteadItems",value:function(t,e,s){-1===t.aggregateReport.halstead[e].identifiers.indexOf(s)&&(t.aggregateReport.halstead[e].identifiers.push(s),t.aggregateReport.halstead[e].distinct+=1),t.aggregateReport.halstead[e].total+=1}},{key:"processSyntax",value:function(e,s,r,n,i){var a=function(a){var u=r[a];switch(u.metric){case"cyclomatic":t.incrementCyclomatic(e,s,u.valueOf(n,i));break;case"dependencies":t.addDependencies(e,u.valueOf(n,i));break;case"lloc":t.incrementLogicalSloc(e,s,u.valueOf(n,i))}u instanceof o.default&&u.valueOf(n,i).forEach(function(r){t.halsteadItemEncountered(e,s,u.metric,r)})};for(var u in r)a(u)}}]),t}();e.default=l,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=i(s(0)),n=i(s(1));function i(t){return t&&t.__esModule?t:{default:t}}var a=function(){function t(){(0,r.default)(this,t)}return(0,n.default)(t,null,[{key:"calculate",value:function(e,s){var r=e.aggregateAverage;t.calculateMaintainabilityIndex(e,s,r.cyclomatic,r.halstead.effort,r.sloc.logical),e.classes.forEach(function(e){var r=e.methodAverage;t.calculateMaintainabilityIndex(e,s,r.cyclomatic,r.halstead.effort,r.sloc.logical)})}},{key:"calculateMaintainabilityIndex",value:function(t,e,s,r,n){t.maintainability=171-3.42*Math.log(r)-(.23*s==0?0:Math.log(s))-16.2*Math.log(n),t.maintainability>171&&(t.maintainability=171),e.newmi&&(t.maintainability=Math.max(0,100*t.maintainability/171))}}]),t}();e.default=a,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=i(s(0)),n=i(s(1));function i(t){return t&&t.__esModule?t:{default:t}}var a=function(){function t(){(0,r.default)(this,t)}return(0,n.default)(t,null,[{key:"calculate",value:function(e){e.methods.forEach(function(e){t.calculateCyclomaticDensity(e),t.calculateHalsteadMetrics(e.halstead)}),e.classes.forEach(function(e){e.methods.forEach(function(e){t.calculateCyclomaticDensity(e),t.calculateHalsteadMetrics(e.halstead)}),t.calculateCyclomaticDensity(e.aggregateReport),t.calculateHalsteadMetrics(e.aggregateReport.halstead)}),t.calculateCyclomaticDensity(e.aggregateReport),t.calculateHalsteadMetrics(e.aggregateReport.halstead)}},{key:"calculateCyclomaticDensity",value:function(t){t.cyclomaticDensity=0===t.sloc.logical?0:t.cyclomatic/t.sloc.logical*100}},{key:"calculateHalsteadMetrics",value:function(t){t.length=t.operators.total+t.operands.total,0===t.length?t.reset():(t.vocabulary=t.operators.distinct+t.operands.distinct,t.difficulty=t.operators.distinct/2*(0===t.operands.distinct?1:t.operands.total/t.operands.distinct),t.volume=t.length*(Math.log(t.vocabulary)/Math.log(2)),t.effort=t.difficulty*t.volume,t.bugs=t.volume/3e3,t.time=t.effort/18)}}]),t}();e.default=a,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(s(0)),n=a(s(1)),i=a(s(11));function a(t){return t&&t.__esModule?t:{default:t}}var o=function(){function t(){(0,r.default)(this,t)}return(0,n.default)(t,null,[{key:"calculate",value:function(t){var e=t.methods.length,s=e+1;t.methods.forEach(function(e){i.default.safeBatchSet(t.methodAverage,t.methodAverage.keys,e,"add")}),t.classes.forEach(function(r){var n=r.methods.length,a=n+1;e+=n,s+=n,r.methods.forEach(function(e){i.default.safeBatchSet(t.methodAverage,r.methodAverage.keys,e,"add"),i.default.safeBatchSet(r.methodAverage,r.methodAverage.keys,e,"add")}),0!==n&&i.default.safeBatchSet(r.methodAverage,r.methodAverage.keys,n,"div"),i.default.safeBatchSet(r.aggregateAverage,r.aggregateAverage.keys,r.aggregate,"add"),i.default.safeBatchSet(r.aggregateAverage,r.aggregateAverage.keys,a,"div")}),0!==e&&i.default.safeBatchSet(t.methodAverage,t.methodAverage.keys,e,"div"),i.default.safeBatchSet(t.aggregateAverage,t.aggregateAverage.keys,t.aggregate,"add"),i.default.safeBatchSet(t.aggregateAverage,t.aggregateAverage.keys,s,"div")}}]),t}();e.default=o,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=h(s(2)),n=h(s(0)),i=h(s(1)),a=h(s(157)),o=h(s(156)),u=h(s(155)),l=h(s(154));function h(t){return t&&t.__esModule?t:{default:t}}var c=function(){function t(){(0,n.default)(this,t)}return(0,i.default)(t,[{key:"onConfigure",value:function(t){t.data.settings.newmi="boolean"==typeof t.data.options.newmi&&t.data.options.newmi}},{key:"onEnterNode",value:function(t){var e=t.data.moduleReport,s=t.data.scopeControl,n=t.data.node,i=t.data.parent,a=t.data.syntaxes[n.type];"object"===(void 0===a?"undefined":(0,r.default)(a))&&l.default.processSyntax(e,s,a,n,i)}},{key:"onModuleAverage",value:function(t){a.default.calculate(t.data.moduleReport)}},{key:"onModuleCalculate",value:function(t){o.default.calculate(t.data.moduleReport)}},{key:"onModulePostAverage",value:function(t){u.default.calculate(t.data.moduleReport,t.data.settings)}},{key:"onModulePostScopeCreated",value:function(t){l.default.postScopeCreated(t.data.moduleReport,t.data.scopeControl,t.data.newScope)}},{key:"onModulePreScopeCreated",value:function(t){l.default.preScopeCreated(t.data.moduleReport,t.data.scopeControl,t.data.newScope,t.data.node,t.data.parent)}}]),t}();e.default=c,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=h(s(44)),n=h(s(0)),i=h(s(1)),a=h(s(158)),o=h(s(152)),u=h(s(52)),l=h(s(84));function h(t){return t&&t.__esModule?t:{default:t}}var c=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,n.default)(this,t),this._pluginManager=new l.default,("boolean"!=typeof e.loadDefaultPlugins||e.loadDefaultPlugins)&&(this._pluginManager.add({name:"escomplex-plugin-syntax-babylon",instance:new o.default}),this._pluginManager.add({name:"escomplex-plugin-metrics-module",instance:new a.default}))}return(0,i.default)(t,[{key:"onConfigure",value:function(t){var e={},s=this._pluginManager.invokeSyncEvent("onConfigure",void 0,{options:t,settings:e});return e=null!==s?s.settings:e,(0,r.default)(e),null!==s?s.settings:e}},{key:"onEnterNode",value:function(t,e,s,r,n,i,a){var o=this._pluginManager.invokeSyncEvent("onEnterNode",void 0,{moduleReport:t,scopeControl:e,ignoreKeys:s,syntaxes:r,settings:n,node:i,parent:a});return null!==o?o.ignoreKeys:[]}},{key:"onExitNode",value:function(t,e,s,r,n,i){this._pluginManager.invokeSyncEvent("onExitNode",void 0,{moduleReport:t,scopeControl:e,syntaxes:s,settings:r,node:n,parent:i})}},{key:"onLoadSyntax",value:function(t){var e={},s=this._pluginManager.invokeSyncEvent("onLoadSyntax",void 0,{settings:t,syntaxes:e});return null!==s?s.syntaxes:e}},{key:"onModuleStart",value:function(t,e,s){var r=new u.default(t.loc.start.line,t.loc.end.line,s);return this._pluginManager.invokeSyncEvent("onModuleStart",void 0,{ast:t,moduleReport:r,syntaxes:e,settings:s}),r}},{key:"onModuleAverage",value:function(t,e,s){return this._pluginManager.invokeSyncEvent("onModuleAverage",void 0,{moduleReport:t,syntaxes:e,settings:s}),t}},{key:"onModuleCalculate",value:function(t,e,s){return this._pluginManager.invokeSyncEvent("onModuleCalculate",void 0,{moduleReport:t,syntaxes:e,settings:s}),t}},{key:"onModuleEnd",value:function(t,e,s){return this._pluginManager.invokeSyncEvent("onModuleEnd",void 0,{moduleReport:t,syntaxes:e,settings:s}),t}},{key:"onModulePostAverage",value:function(t,e,s){return this._pluginManager.invokeSyncEvent("onModulePostAverage",void 0,{moduleReport:t,syntaxes:e,settings:s}),t}},{key:"onModulePostScopeCreated",value:function(t,e,s,r,n,i){this._pluginManager.invokeSyncEvent("onModulePostScopeCreated",void 0,{moduleReport:t,scopeControl:e,newScope:s,settings:r,node:n,parent:i})}},{key:"onModulePostScopePopped",value:function(t,e,s,r,n,i){this._pluginManager.invokeSyncEvent("onModulePostScopePopped",void 0,{moduleReport:t,scopeControl:e,scope:s,settings:r,node:n,parent:i})}},{key:"onModulePreScopeCreated",value:function(t,e,s,r,n,i){this._pluginManager.invokeSyncEvent("onModulePreScopeCreated",void 0,{moduleReport:t,scopeControl:e,newScope:s,settings:r,node:n,parent:i})}},{key:"onModulePreScopePopped",value:function(t,e,s,r,n,i){this._pluginManager.invokeSyncEvent("onModulePreScopePopped",void 0,{moduleReport:t,scopeControl:e,scope:s,settings:r,node:n,parent:i})}}]),t}();e.default=c,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,n=s(0),i=(r=n)&&r.__esModule?r:{default:r};e.default=function t(){(0,i.default)(this,t),this.bugs=0,this.difficulty=0,this.effort=0,this.length=0,this.time=0,this.vocabulary=0,this.volume=0,this.operands={distinct:0,total:0},this.operators={distinct:0,total:0}},t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(s(22)),n=a(s(0)),i=a(s(1));function a(t){return t&&t.__esModule?t:{default:t}}var o=function(){function t(){(0,n.default)(this,t),this.bugs=0,this.difficulty=0,this.effort=0,this.length=0,this.time=0,this.vocabulary=0,this.volume=0,this.operands={distinct:0,total:0,identifiers:[]},this.operators={distinct:0,total:0,identifiers:[]}}return(0,i.default)(t,[{key:"reset",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,r.default)(this).forEach(function(e){"number"==typeof t[e]&&(t[e]=0)}),e&&(this.operands={distinct:0,total:0,identifiers:[]},this.operators={distinct:0,total:0,identifiers:[]}),this}}]),t}();e.default=o,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=l(s(5)),n=l(s(4)),i=l(s(0)),a=l(s(1)),o=l(s(7)),u=l(s(6));function l(t){return t&&t.__esModule?t:{default:t}}var h=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.default)(this,e),(0,o.default)(this,(e.__proto__||(0,n.default)(e)).call(this,(0,r.default)({},c,t),s))}return(0,u.default)(e,t),(0,a.default)(e,[{key:"extension",get:function(){return"md"}},{key:"name",get:function(){return"markdown-visibility"}}]),e}(l(s(91)).default);e.default=h;var c={entryPrepend:"* ",entryWrapper:"`",textHeader:"* Visibility (reverse dependents / numerical indices correspond to ProjectReport modules / reports):\n"};t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(s(5)),n=c(s(4)),i=c(s(0)),a=c(s(1)),o=c(s(7)),u=c(s(6)),l=c(s(92)),h=c(s(21));function c(t){return t&&t.__esModule?t:{default:t}}var p=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.default)(this,e),(0,o.default)(this,(e.__proto__||(0,n.default)(e)).call(this,(0,r.default)({},d,t),s))}return(0,u.default)(e,t),(0,a.default)(e,[{key:"extension",get:function(){return"md"}},{key:"name",get:function(){return"markdown-modules"}}]),e}(l.default);e.default=p;var d={moduleReport:[new h.default.SafeEntry("* Module ","___modulecntrplus1___",1,":"),new h.default.SafeEntry(" * filePath: `","filePath",1,"`"),new h.default.SafeEntry(" * srcPath: `","srcPath",1,"`"),new h.default.SafeEntry(" * srcPathAlias: `","srcPathAlias",1,"`"),"\n"]};t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(s(5)),n=c(s(4)),i=c(s(0)),a=c(s(1)),o=c(s(7)),u=c(s(6)),l=c(s(93)),h=c(s(21));function c(t){return t&&t.__esModule?t:{default:t}}var p=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.default)(this,e),(0,o.default)(this,(e.__proto__||(0,n.default)(e)).call(this,(0,r.default)({},d,t),s))}return(0,u.default)(e,t),(0,a.default)(e,[{key:"extension",get:function(){return"md"}},{key:"name",get:function(){return"markdown-minimal"}}]),e}(l.default);e.default=p;var d={classMethod:[new h.default.SafeEntry("* Class method: **","name",0,"",h.default.tagEscapeHTML),new h.default.SafeEntry("** (","lineStart",1,")")],classReport:[new h.default.SafeEntry("* Class: **","name",0,"",h.default.tagEscapeHTML),new h.default.SafeEntry("** (","lineStart",1,")")],entryPrepend:"* ",entryTemplateTag:h.default.tagEscapeHTML,moduleMethod:[new h.default.SafeEntry("* Module method: **","name",0,"",h.default.tagEscapeHTML),new h.default.SafeEntry("** (","lineStart",1,")")],moduleReport:["\n",new h.default.SafeEntry("* Module ","___modulecntrplus1___",1,":"),new h.default.SafeEntry(" * filePath: `","filePath",1,"`"),new h.default.SafeEntry(" * srcPath: `","srcPath",1,"`"),new h.default.SafeEntry(" * srcPathAlias: `","srcPathAlias",1,"`")],projectReport:["* Project:\n"]};t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=l(s(5)),n=l(s(4)),i=l(s(0)),a=l(s(1)),o=l(s(7)),u=l(s(6));function l(t){return t&&t.__esModule?t:{default:t}}var h=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.default)(this,e),(0,o.default)(this,(e.__proto__||(0,n.default)(e)).call(this,(0,r.default)({},c,t),s))}return(0,u.default)(e,t),(0,a.default)(e,[{key:"extension",get:function(){return"md"}},{key:"name",get:function(){return"markdown-adjacency"}}]),e}(l(s(95)).default);e.default=h;var c={entryPrepend:"* ",entryWrapper:"`",textHeader:"* Adjacency (dependencies / numerical indices correspond to ProjectReport modules / reports):\n"};t.exports=e.default},function(t,e,s){var r=s(8);r(r.S+r.F*!s(14),"Object",{defineProperties:s(127)})},function(t,e,s){s(166);var r=s(3).Object;t.exports=function(t,e){return r.defineProperties(t,e)}},function(t,e,s){t.exports={default:s(167),__esModule:!0}},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(s(5)),n=c(s(4)),i=c(s(0)),a=c(s(1)),o=c(s(7)),u=c(s(6)),l=c(s(98)),h=c(s(21));function c(t){return t&&t.__esModule?t:{default:t}}var p=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"markdown-adjacency",u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"markdown-visibility";return(0,i.default)(this,e),(0,o.default)(this,(e.__proto__||(0,n.default)(e)).call(this,(0,r.default)({},d,t),s,a,u))}return(0,u.default)(e,t),(0,a.default)(e,[{key:"extension",get:function(){return"md"}},{key:"name",get:function(){return"markdown"}}]),e}(l.default);e.default=p;var d={classMethod:["\n",new h.default.SafeEntry("* Class method: **","name",1,"**",h.default.tagEscapeHTML)],classReport:["\n",new h.default.SafeEntry("* Class: **","name",1,"**",h.default.tagEscapeHTML)],entryPrepend:"* ",entryTemplateTag:h.default.tagEscapeHTML,moduleMethod:["\n",new h.default.SafeEntry("* Module method: **","name",1,"**",h.default.tagEscapeHTML)],moduleReport:["\n",new h.default.SafeEntry("* Module ","___modulecntrplus1___",1,":"),new h.default.SafeEntry(" * File path: `","filePath",1,"`"),new h.default.SafeEntry(" * Source path: `","srcPath",1,"`"),new h.default.SafeEntry(" * Source alias: `","srcPathAlias",1,"`")],projectReport:["* Project: \n"]};t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=l(s(16)),n=l(s(15)),i=l(s(2)),a=l(s(0)),o=l(s(1)),u=l(s(9));function l(t){return t&&t.__esModule?t:{default:t}}var h=function(){function t(){(0,a.default)(this,t)}return(0,o.default)(t,[{key:"formatReport",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=void 0;switch(t.type){case u.default.MODULE:s=this._formatModule(t);break;case u.default.PROJECT:s=this._formatProject(t);break;default:return console.warn("formatReport '"+this.name+"' warning: unsupported report type '"+t.type+"'."),""}return"object"===(void 0===e?"undefined":(0,i.default)(e))&&(0,n.default)(e.spacing)?(0,r.default)(s,void 0,e.spacing):(0,r.default)(s)}},{key:"isSupported",value:function(t){switch(t){case u.default.MODULE:case u.default.PROJECT:return!0;default:return!1}}},{key:"_formatModule",value:function(t){var e={};return t.filePath&&(e.filePath=t.filePath),t.srcPath&&(e.srcPath=t.srcPath),t.srcPathAlias&&(e.srcPathAlias=t.srcPathAlias),e}},{key:"_formatProject",value:function(t){var e=this,s={modules:[]};return t.modules.forEach(function(t){s.modules.push(e._formatModule(t))}),s}},{key:"extension",get:function(){return"json"}},{key:"name",get:function(){return"json-modules"}},{key:"type",get:function(){return"modules"}}]),t}();e.default=h,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(s(16)),n=c(s(15)),i=c(s(2)),a=c(s(5)),o=c(s(0)),u=c(s(1)),l=c(s(11)),h=c(s(9));function c(t){return t&&t.__esModule?t:{default:t}}var p=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d;(0,o.default)(this,t),this._keys=e}return(0,u.default)(t,[{key:"formatReport",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=(0,a.default)({},this._keys,e),o=void 0;switch(t.type){case h.default.CLASS:o=this._formatClass(t,s);break;case h.default.CLASS_METHOD:case h.default.MODULE_METHOD:case h.default.NESTED_METHOD:o=this._formatMethod(t,s);break;case h.default.MODULE:o=this._formatModule(t,!0,s);break;case h.default.PROJECT:o=this._formatProject(t,s);break;default:return console.warn("formatReport '"+this.name+"' warning: unsupported report type '"+t.type+"'."),""}return"object"===(void 0===s?"undefined":(0,i.default)(s))&&(0,n.default)(s.spacing)?(0,r.default)(o,void 0,s.spacing):(0,r.default)(o)}},{key:"isSupported",value:function(t){switch(t){case h.default.CLASS:case h.default.CLASS_METHOD:case h.default.MODULE_METHOD:case h.default.MODULE:case h.default.NESTED_METHOD:case h.default.PROJECT:return!0;default:return!1}}},{key:"_formatClass",value:function(t,e){var s=this,r={};return t.name&&(r.name=t.name),t.lineStart&&(r.lineStart=t.lineStart),t.lineEnd&&(r.lineEnd=t.lineEnd),Array.isArray(e.classReport)&&e.classReport.forEach(function(e){var s=l.default.safeAccess(t,e);s&&l.default.safeSet(r,e,s)}),r.methods=t.methods.map(function(t){return s._formatMethod(t,e)}),r}},{key:"_formatMethod",value:function(t,e){var s={};return t.name&&(s.name=t.name),t.lineStart&&(s.lineStart=t.lineStart),t.lineEnd&&(s.lineEnd=t.lineEnd),Array.isArray(e.methodReport)&&e.methodReport.forEach(function(e){var r=l.default.safeAccess(t,e);r&&l.default.safeSet(s,e,r)}),s}},{key:"_formatModule",value:function(t,e,s){var r=this,n={};return e?(t.filePath&&(n.filePath=t.filePath),t.srcPath&&(n.srcPath=t.srcPath),t.srcPathAlias&&(n.srcPathAlias=t.srcPathAlias),t.lineStart&&(n.lineStart=t.lineStart),t.lineEnd&&(n.lineEnd=t.lineEnd),Array.isArray(s.moduleReport)&&s.moduleReport.forEach(function(e){var s=l.default.safeAccess(t,e);s&&l.default.safeSet(n,e,s)}),n.classes=t.classes.map(function(t){return r._formatClass(t,s)}),n.methods=t.methods.map(function(t){return r._formatMethod(t,s)})):(t.filePath&&(n.filePath=t.filePath),t.srcPath&&(n.srcPath=t.srcPath),t.srcPathAlias&&(n.srcPathAlias=t.srcPathAlias),t.lineStart&&(n.lineStart=t.lineStart),t.lineEnd&&(n.lineEnd=t.lineEnd),n.classes=[],n.methods=[]),n}},{key:"_formatProject",value:function(t,e){var s=this,r={};Array.isArray(e.projectReport)&&e.projectReport.forEach(function(e){var s=l.default.safeAccess(t,e);s&&l.default.safeSet(r,e,s)}),r.modules=[];var n=t.getSetting("serializeModules",!1);return t.modules.forEach(function(t){r.modules.push(s._formatModule(t,n,e))}),r}},{key:"extension",get:function(){return"json"}},{key:"name",get:function(){return"json-minimal"}},{key:"type",get:function(){return"minimal"}}]),t}();e.default=p;var d={classReport:["maintainability","errors"],methodReport:["cyclomatic","halstead.difficulty","errors"],moduleReport:["maintainability","errors"],projectReport:["changeCost","errors"]};t.exports=e.default},function(t,e,s){var r=s(13),n=s(46).onFreeze;s(32)("freeze",function(t){return function(e){return t&&r(e)?t(n(e)):e}})},function(t,e,s){s(172),t.exports=s(3).Object.freeze},function(t,e,s){s(32)("getOwnPropertyNames",function(){return s(112).f})},function(t,e,s){s(174);var r=s(3).Object;t.exports=function(t){return r.getOwnPropertyNames(t)}},function(t,e,s){var r=s(27),n=s(62).f;s(32)("getOwnPropertyDescriptor",function(){return function(t,e){return n(r(t),e)}})},function(t,e,s){s(176);var r=s(3).Object;t.exports=function(t,e){return r.getOwnPropertyDescriptor(t,e)}},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=f(s(99)),n=f(s(58)),i=f(s(114)),a=f(s(66)),o=f(s(110)),u=f(s(22)),l=f(s(23)),h=f(s(44)),c=f(s(2)),p=f(s(0)),d=f(s(1));function f(t){return t&&t.__esModule?t:{default:t}}var y=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if((0,p.default)(this,t),{}.hasOwnProperty.call(this.constructor,v))throw new Error("Enum classes can’t be instantiated");"object"===(void 0===e?"undefined":(0,c.default)(e))&&null!==e&&function(t,e){var s=!0,i=!1,a=void 0;try{for(var u,h=(0,l.default)((0,n.default)(e));!(s=(u=h.next()).done);s=!0){var c=u.value,p=(0,r.default)(e,c);(0,o.default)(t,c,p)}}catch(t){i=!0,a=t}finally{try{!s&&h.return&&h.return()}finally{if(i)throw a}}}(this,e)}return(0,d.default)(t,[{key:"toString",value:function(){return this.constructor.name+"."+this.name}}],[{key:"initEnum",value:function(t){return Object.defineProperty(this,"enumValues",{value:[],configurable:!1,writable:!1,enumerable:!0}),Array.isArray(t)?this._enumValuesFromArray(t):this._enumValuesFromObject(t),(0,h.default)(this.enumValues),this[v]=!0,this}},{key:"_enumValuesFromArray",value:function(t){var e=!0,s=!1,r=void 0;try{for(var n,i=(0,l.default)(t);!(e=(n=i.next()).done);e=!0){var a=n.value;this._pushEnumValue(new this,a)}}catch(t){s=!0,r=t}finally{try{!e&&i.return&&i.return()}finally{if(s)throw r}}}},{key:"_enumValuesFromObject",value:function(t){var e=!0,s=!1,r=void 0;try{for(var n,i=(0,l.default)((0,u.default)(t));!(e=(n=i.next()).done);e=!0){var a=n.value,o=new this(t[a]);this._pushEnumValue(o,a)}}catch(t){s=!0,r=t}finally{try{!e&&i.return&&i.return()}finally{if(s)throw r}}}},{key:"_pushEnumValue",value:function(t,e){t.name=e,t.ordinal=this.enumValues.length,(0,o.default)(this,e,{value:t,configurable:!1,writable:!1,enumerable:!0}),this.enumValues.push(t)}},{key:"enumValueOf",value:function(t){return this.enumValues.find(function(e){return e.name===t})}},{key:a.default,value:function(){return(0,l.default)(this.enumValues)}}]),t}();e.default=y;var v=(0,i.default)();t.exports=e.default},function(t,e,s){var r=s(26),n=s(37);s(32)("keys",function(){return function(t){return n(r(t))}})},function(t,e,s){s(179),t.exports=s(3).Object.keys},function(t,e,s){s(101)("Set")},function(t,e,s){s(102)("Set")},function(t,e,s){var r=s(8);r(r.P+r.R,"Set",{toJSON:s(103)("Set")})},function(t,e,s){"use strict";var r=s(105),n=s(59);t.exports=s(104)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(n(this,"Set"),t=0===t?0:t,t)}},r)},function(t,e,s){s(50),s(30),s(34),s(184),s(183),s(182),s(181),t.exports=s(3).Set},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(s(16)),n=c(s(15)),i=c(s(2)),a=c(s(5)),o=c(s(0)),u=c(s(1)),l=c(s(11)),h=c(s(9));function c(t){return t&&t.__esModule?t:{default:t}}var p=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d;(0,o.default)(this,t),this._thresholds=e}return(0,u.default)(t,[{key:"formatReport",value:function(t){var e=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=void 0,u=void 0;switch(t.type){case h.default.MODULE:o=[t],u=!0;break;case h.default.PROJECT:o=t.modules,u=t.getSetting("serializeModules",!1);break;default:return console.warn("formatReport '"+this.name+"' warning: unsupported report type '"+t.type+"'."),""}var l=(0,a.default)({},this._thresholds,s),c={version:"7.0",file:[]};return o.forEach(function(t){c.file.push(e._formatModule(t,u,l))}),"object"===(void 0===l?"undefined":(0,i.default)(l))&&(0,n.default)(l.spacing)?(0,r.default)(c,void 0,l.spacing):(0,r.default)(c)}},{key:"isSupported",value:function(t){switch(t){case h.default.MODULE:case h.default.PROJECT:return!0;default:return!1}}},{key:"_formatModule",value:function(t,e,s){var r={};if(r.name=t.filePath?t.filePath:"<unknown>",r.error=[],e){"object"===(0,i.default)(s.moduleReport)&&this._parseErrors(t,s.moduleReport,r.error);for(var n=0;n<t.methods.length;n++)"object"===(0,i.default)(s.methodReport)&&this._parseErrors(t.methods[n],s.methodReport,r.error);for(var a=0;a<t.classes.length;a++){var o=t.classes[a];"object"===(0,i.default)(s.classReport)&&this._parseErrors(o,s.classReport,r.error);for(var u=0;u<o.methods.length;u++)"object"===(0,i.default)(s.methodReport)&&this._parseErrors(o.methods[u],s.methodReport,r.error)}}return r}},{key:"_parseErrors",value:function(t,e,s){for(var r in e)if(e.hasOwnProperty(r)){var n=l.default.safeAccess(t,r);if("number"==typeof n){var i=void 0,a=void 0,o=void 0,u=e[r];for(var h in u)if(u.hasOwnProperty(h)&&"_test"!==h)switch(u._test){case"<":n<u[h]&&(i=h,a=u[h],o=" < ");break;case"<=":n<=u[h]&&(i=h,a=u[h],o=" <= ");break;case">=":n>=u[h]&&(i=h,a=u[h],o=" >= ");break;default:n>u[h]&&(i=h,a=u[h],o=" > ")}if("string"==typeof i){var c=t.getName();s.push({line:t.lineStart,severity:i,message:r+": "+n+o+a,source:t.type.description+" "+(""!==c?"- "+c:"")})}}}}},{key:"extension",get:function(){return"json"}},{key:"name",get:function(){return"json-checkstyle"}},{key:"type",get:function(){return"checkstyle"}}]),t}();e.default=p;var d={classReport:{maintainability:{_test:"<",info:115,warning:100,error:90}},methodReport:{cyclomatic:{info:3,warning:7,error:12},"halstead.difficulty":{info:8,warning:13,error:20}},moduleReport:{maintainability:{_test:"<",info:115,warning:100,error:90}}};t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=u(s(16)),n=u(s(15)),i=u(s(2)),a=u(s(0)),o=u(s(1));function u(t){return t&&t.__esModule?t:{default:t}}var l=function(){function t(){(0,a.default)(this,t)}return(0,o.default)(t,[{key:"formatReport",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"object"===(void 0===e?"undefined":(0,i.default)(e))&&(0,n.default)(e.spacing)?(0,r.default)(t,void 0,e.spacing):(0,r.default)(t)}},{key:"isSupported",value:function(){return!0}},{key:"extension",get:function(){return"json"}},{key:"name",get:function(){return"json"}},{key:"type",get:function(){return"full"}}]),t}();e.default=l,t.exports=e.default},function(t,e,s){s(101)("Map")},function(t,e,s){s(102)("Map")},function(t,e,s){var r=s(33);t.exports=function(t,e){var s=[];return r(t,!1,s.push,s,e),s}},function(t,e,s){var r=s(8);r(r.P+r.R,"Map",{toJSON:s(103)("Map")})},function(t,e,s){var r=s(13),n=s(113),i=s(12)("species");t.exports=function(t){var e;return n(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!n(e.prototype)||(e=void 0),r(e)&&null===(e=e[i])&&(e=void 0)),void 0===e?Array:e}},function(t,e,s){var r=s(192);t.exports=function(t,e){return new(r(t))(e)}},function(t,e,s){var r=s(20),n=s(75),i=s(26),a=s(48),o=s(193);t.exports=function(t,e){var s=1==t,u=2==t,l=3==t,h=4==t,c=6==t,p=5==t||c,d=e||o;return function(e,o,f){for(var y,v,m=i(e),g=n(m),x=r(o,f,3),b=a(g.length),w=0,P=s?d(e,b):u?d(e,0):void 0;b>w;w++)if((p||w in g)&&(v=x(y=g[w],w,m),t))if(s)P[w]=v;else if(v)switch(t){case 3:return!0;case 5:return y;case 6:return w;case 2:P.push(y)}else if(h)return!1;return c?-1:l||h?h:P}}},function(t,e,s){"use strict";var r=s(105),n=s(59);t.exports=s(104)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(n(this,"Map"),t);return e&&e.v},set:function(t,e){return r.def(n(this,"Map"),0===t?0:t,e)}},r,!0)},function(t,e,s){s(50),s(30),s(34),s(195),s(191),s(189),s(188),t.exports=s(3).Map},function(t,e,s){var r=s(18),n=s(69);t.exports=s(3).getIterator=function(t){var e=n(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return r(e.call(t))}},function(t,e,s){s(34),s(30),t.exports=s(197)},function(t,e,s){var r=s(8);r(r.S,"Object",{create:s(49)})},function(t,e,s){s(199);var r=s(3).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,s){t.exports={default:s(200),__esModule:!0}},function(t,e,s){var r=s(13),n=s(18),i=function(t,e){if(n(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=s(20)(Function.call,s(62).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,s){return i(t,s),e?t.__proto__=s:r(t,s),t}}({},!1):void 0),check:i}},function(t,e,s){var r=s(8);r(r.S,"Object",{setPrototypeOf:s(202).set})},function(t,e,s){s(203),t.exports=s(3).Object.setPrototypeOf},function(t,e,s){t.exports={default:s(204),__esModule:!0}},function(t,e,s){var r=s(26),n=s(124);s(32)("getPrototypeOf",function(){return function(t){return n(r(t))}})},function(t,e,s){s(206),t.exports=s(3).Object.getPrototypeOf},function(t,e,s){"use strict";var r=s(17),n=s(39);t.exports=function(t,e,s){e in t?r.f(t,e,n(0,s)):t[e]=s}},function(t,e,s){"use strict";var r=s(20),n=s(8),i=s(26),a=s(122),o=s(121),u=s(48),l=s(208),h=s(69);n(n.S+n.F*!s(115)(function(t){Array.from(t)}),"Array",{from:function(t){var e,s,n,c,p=i(t),d="function"==typeof this?this:Array,f=arguments.length,y=f>1?arguments[1]:void 0,v=void 0!==y,m=0,g=h(p);if(v&&(y=r(y,f>2?arguments[2]:void 0,2)),void 0==g||d==Array&&o(g))for(s=new d(e=u(p.length));e>m;m++)l(s,m,v?y(p[m],m):p[m]);else for(c=g.call(p),s=new d;!(n=c.next()).done;m++)l(s,m,v?a(c,y,[n.value,m],!0):n.value);return s.length=m,s}})},function(t,e,s){s(30),s(209),t.exports=s(3).Array.from},function(t,e,s){"use strict";var r=s(14),n=s(37),i=s(63),a=s(45),o=s(26),u=s(75),l=Object.assign;t.exports=!l||s(29)(function(){var t={},e={},s=Symbol(),r="abcdefghijklmnopqrst";return t[s]=7,r.split("").forEach(function(t){e[t]=t}),7!=l({},t)[s]||Object.keys(l({},e)).join("")!=r})?function(t,e){for(var s=o(t),l=arguments.length,h=1,c=i.f,p=a.f;l>h;)for(var d,f=u(arguments[h++]),y=c?n(f).concat(c(f)):n(f),v=y.length,m=0;v>m;)d=y[m++],r&&!p.call(f,d)||(s[d]=f[d]);return s}:l},function(t,e,s){var r=s(8);r(r.S+r.F,"Object",{assign:s(211)})},function(t,e,s){s(212),t.exports=s(3).Object.assign},function(t,e,s){var r=s(13),n=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&n(t)===t}},function(t,e,s){var r=s(8);r(r.S,"Number",{isInteger:s(214)})},function(t,e,s){s(215),t.exports=s(3).Number.isInteger},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=h(s(15)),n=h(s(2)),i=h(s(0)),a=h(s(1)),o=h(s(107)),u=h(s(90)),l=h(s(88));function h(t){return t&&t.__esModule?t:{default:t}}var c=function(){function t(e){(0,i.default)(this,t),this._report=e,this._anonClassCntr=1,this._anonMethodCntr=1,this._scopeStackClass=[],this._scopeStackMethod=[],this._scopeStackNestedMethod=[]}return(0,a.default)(t,[{key:"createScope",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=void 0;if("object"!==(void 0===t?"undefined":(0,n.default)(t)))throw new TypeError("createScope error: 'newScope' is not an 'object'.");if("string"!=typeof t.type)throw new TypeError("createScope error: 'newScope.type' is not a 'string'.");if("string"!=typeof t.name)throw new TypeError("createScope error: 'newScope.name' is not a 'string'.");if(!(0,r.default)(t.lineStart))throw new TypeError("createScope error: 'newScope.lineStart' is not an 'integer'.");if(!(0,r.default)(t.lineEnd))throw new TypeError("createScope error: 'newScope.lineEnd' is not an 'integer'.");switch(t.type){case"class":var s="<anonymous>"!==t.name?t.name:"<anon class-"+this._anonClassCntr+++">",i="<anonymous>"!==t.superClassName?t.superClassName:"<anon class-"+this._anonClassCntr+++">";e=new o.default(s,i,t.lineStart,t.lineEnd),this._report.classes.push(e),this._scopeStackClass.push(e);break;case"method":if(!Array.isArray(t.paramNames))throw new TypeError("createScope error: 'newScope.paramNames' is not an 'array'.");var a="<anonymous>"!==t.name?t.name:"<anon method-"+this._anonMethodCntr+++">",h=this.getCurrentClassReport();h?(e=new u.default(a,t.paramNames,t.lineStart,t.lineEnd),h.methods.push(e)):(e=new l.default(a,t.paramNames,t.lineStart,t.lineEnd),this._report.methods.push(e)),this._scopeStackMethod.push(e);break;default:throw new Error("createScope error: Unknown scope type ("+t.type+").")}return e}},{key:"getCurrentClassReport",value:function(){if(Array.isArray(this._scopeStackClass))return this._scopeStackClass.length>0?this._scopeStackClass[this._scopeStackClass.length-1]:void 0}},{key:"getCurrentMethodReport",value:function(){if(Array.isArray(this._scopeStackMethod))return this._scopeStackMethod.length>0?this._scopeStackMethod[this._scopeStackMethod.length-1]:void 0}},{key:"popScope",value:function(t){if("object"!==(void 0===t?"undefined":(0,n.default)(t)))throw new TypeError("popScope error: 'scope' is not an 'object'.");if("string"!=typeof t.type)throw new TypeError("popScope error: 'scope.type' is not a 'string'.");switch(t.type){case"class":this._scopeStackClass.pop();break;case"method":this._scopeStackMethod.pop();break;default:throw new Error("popScope error: Unknown scope type ("+t.type+").")}}}]),t}();e.default=c,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},n=function(){function t(t,e){for(var s=0;s<e.length;s++){var r=e[s];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,s,r){return s&&t(e.prototype,s),r&&t(e,r),e}}();var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return n(t,[{key:"traverse",value:function(t,e){if("object"!==(void 0===e?"undefined":r(e)))throw new TypeError("Invalid callbacks");if("function"!=typeof e.enterNode&&"function"!=typeof e.exitNode)throw new TypeError("Invalid callbacks - missing `enterNode` and / or `exitNode`.");if(Array.isArray(t))this._visitNodes(t,void 0,e);else{if("object"!==(void 0===t?"undefined":r(t)))throw new TypeError("Invalid syntax tree");this._visitNode(t,void 0,e)}}},{key:"_visitNode",value:function(t,e,s){if(null!==t&&"object"===(void 0===t?"undefined":r(t))&&"string"==typeof t.type){var n="function"==typeof s.enterNode?s.enterNode(t,e):[];null!==n&&this._visitChildren(t,n,s),"function"==typeof s.exitNode&&s.exitNode(t,e)}}},{key:"_visitNodes",value:function(t,e,s){var r=this;t.forEach(function(t){r._visitNode(t,e,s)},this)}},{key:"_visitChildren",value:function(t,e,s){var n=this;e=Array.isArray(e)?e:[],Object.keys(t).forEach(function(i){e.indexOf(i)>=0||(Array.isArray(t[i])||"object"===r(t[i]))&&n._visitChild(t[i],t,s)})}},{key:"_visitChild",value:function(t,e,s){(Array.isArray(t)?this._visitNodes:this._visitNode).call(this,t,e,s)}}]),t}();e.default=i,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=!0;class n{constructor(t,e={}){this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=null!=e.binop?e.binop:null,this.updateContext=null}}const i=new Map;function a(t,e={}){e.keyword=t;const s=new n(t,e);return i.set(t,s),s}function o(t,e){return new n(t,{beforeExpr:r,binop:e})}const u={num:new n("num",{startsExpr:!0}),bigint:new n("bigint",{startsExpr:!0}),regexp:new n("regexp",{startsExpr:!0}),string:new n("string",{startsExpr:!0}),name:new n("name",{startsExpr:!0}),eof:new n("eof"),bracketL:new n("[",{beforeExpr:r,startsExpr:!0}),bracketR:new n("]"),braceL:new n("{",{beforeExpr:r,startsExpr:!0}),braceBarL:new n("{|",{beforeExpr:r,startsExpr:!0}),braceR:new n("}"),braceBarR:new n("|}"),parenL:new n("(",{beforeExpr:r,startsExpr:!0}),parenR:new n(")"),comma:new n(",",{beforeExpr:r}),semi:new n(";",{beforeExpr:r}),colon:new n(":",{beforeExpr:r}),doubleColon:new n("::",{beforeExpr:r}),dot:new n("."),question:new n("?",{beforeExpr:r}),questionDot:new n("?."),arrow:new n("=>",{beforeExpr:r}),template:new n("template"),ellipsis:new n("...",{beforeExpr:r}),backQuote:new n("`",{startsExpr:!0}),dollarBraceL:new n("${",{beforeExpr:r,startsExpr:!0}),at:new n("@"),hash:new n("#",{startsExpr:!0}),interpreterDirective:new n("#!..."),eq:new n("=",{beforeExpr:r,isAssign:!0}),assign:new n("_=",{beforeExpr:r,isAssign:!0}),incDec:new n("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),bang:new n("!",{beforeExpr:r,prefix:!0,startsExpr:!0}),tilde:new n("~",{beforeExpr:r,prefix:!0,startsExpr:!0}),pipeline:o("|>",0),nullishCoalescing:o("??",1),logicalOR:o("||",2),logicalAND:o("&&",3),bitwiseOR:o("|",4),bitwiseXOR:o("^",5),bitwiseAND:o("&",6),equality:o("==/!=/===/!==",7),relational:o("</>/<=/>=",8),bitShift:o("<</>>/>>>",9),plusMin:new n("+/-",{beforeExpr:r,binop:10,prefix:!0,startsExpr:!0}),modulo:new n("%",{beforeExpr:r,binop:11,startsExpr:!0}),star:o("*",11),slash:o("/",11),exponent:new n("**",{beforeExpr:r,binop:12,rightAssociative:!0}),_break:a("break"),_case:a("case",{beforeExpr:r}),_catch:a("catch"),_continue:a("continue"),_debugger:a("debugger"),_default:a("default",{beforeExpr:r}),_do:a("do",{isLoop:!0,beforeExpr:r}),_else:a("else",{beforeExpr:r}),_finally:a("finally"),_for:a("for",{isLoop:!0}),_function:a("function",{startsExpr:!0}),_if:a("if"),_return:a("return",{beforeExpr:r}),_switch:a("switch"),_throw:a("throw",{beforeExpr:r,prefix:!0,startsExpr:!0}),_try:a("try"),_var:a("var"),_const:a("const"),_while:a("while",{isLoop:!0}),_with:a("with"),_new:a("new",{beforeExpr:r,startsExpr:!0}),_this:a("this",{startsExpr:!0}),_super:a("super",{startsExpr:!0}),_class:a("class",{startsExpr:!0}),_extends:a("extends",{beforeExpr:r}),_export:a("export"),_import:a("import",{startsExpr:!0}),_null:a("null",{startsExpr:!0}),_true:a("true",{startsExpr:!0}),_false:a("false",{startsExpr:!0}),_in:a("in",{beforeExpr:r,binop:8}),_instanceof:a("instanceof",{beforeExpr:r,binop:8}),_typeof:a("typeof",{beforeExpr:r,prefix:!0,startsExpr:!0}),_void:a("void",{beforeExpr:r,prefix:!0,startsExpr:!0}),_delete:a("delete",{beforeExpr:r,prefix:!0,startsExpr:!0})},l=0,h=1,c=2,p=4,d=8,f=16,y=32,v=64,m=128,g=256,x=h|c|512;function b(t,e){return c|(t?p:0)|(e?d:0)}const w=1,P=2,E=4,_=8,k=16,A=128,T=256,S=512,C=1024,M=w|P|_|A,N=0|w|_|0,j=0|w|E|0,O=0|w|k|0,L=0|P|A,R=0|P,I=w|P|_|T,D=0|C,F=64,B=64|w,q=I|S,U=0|C;function V(t){return null!=t&&"Property"===t.type&&"init"===t.kind&&!1===t.method}const z=/\r\n?|[\n\u2028\u2029]/,H=new RegExp(z.source,"g");function J(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}const W=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function K(t){switch(t){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}class G{constructor(t,e,s,r){this.token=t,this.isExpr=!!e,this.preserveSpace=!!s,this.override=r}}const $={braceStatement:new G("{",!1),braceExpression:new G("{",!0),templateQuasi:new G("${",!1),parenStatement:new G("(",!1),parenExpression:new G("(",!0),template:new G("`",!0,!0,t=>t.readTmplToken()),functionExpression:new G("function",!0),functionStatement:new G("function",!1)};u.parenR.updateContext=u.braceR.updateContext=function(){if(1===this.state.context.length)return void(this.state.exprAllowed=!0);let t=this.state.context.pop();t===$.braceStatement&&"function"===this.curContext().token&&(t=this.state.context.pop()),this.state.exprAllowed=!t.isExpr},u.name.updateContext=function(t){let e=!1;t!==u.dot&&("of"===this.state.value&&!this.state.exprAllowed||"yield"===this.state.value&&this.scope.inGenerator)&&(e=!0),this.state.exprAllowed=e,this.state.isIterator&&(this.state.isIterator=!1)},u.braceL.updateContext=function(t){this.state.context.push(this.braceIsBlock(t)?$.braceStatement:$.braceExpression),this.state.exprAllowed=!0},u.dollarBraceL.updateContext=function(){this.state.context.push($.templateQuasi),this.state.exprAllowed=!0},u.parenL.updateContext=function(t){const e=t===u._if||t===u._for||t===u._with||t===u._while;this.state.context.push(e?$.parenStatement:$.parenExpression),this.state.exprAllowed=!0},u.incDec.updateContext=function(){},u._function.updateContext=u._class.updateContext=function(t){!t.beforeExpr||t===u.semi||t===u._else||t===u._return&&z.test(this.input.slice(this.state.lastTokEnd,this.state.start))||(t===u.colon||t===u.braceL)&&this.curContext()===$.b_stat?this.state.context.push($.functionStatement):this.state.context.push($.functionExpression),this.state.exprAllowed=!1},u.backQuote.updateContext=function(){this.curContext()===$.template?this.state.context.pop():this.state.context.push($.template),this.state.exprAllowed=!1};const X={strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},Y=new Set(X.strict),Q=new Set(X.strict.concat(X.strictBind)),Z=(t,e)=>e&&"await"===t||"enum"===t;function tt(t,e){return Z(t,e)||Y.has(t)}function et(t,e){return Z(t,e)||Q.has(t)}function st(t){return i.has(t)}const rt=/^in(stanceof)?$/;let nt="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-Ᶎꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭧꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",it="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_";const at=new RegExp("["+nt+"]"),ot=new RegExp("["+nt+it+"]");nt=it=null;const ut=[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],lt=[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 ht(t,e){let s=65536;for(let r=0,n=e.length;r<n;r+=2){if((s+=e[r])>t)return!1;if((s+=e[r+1])>=t)return!0}return!1}function ct(t){return t<65?36===t:t<=90||(t<97?95===t:t<=122||(t<=65535?t>=170&&at.test(String.fromCharCode(t)):ht(t,ut)))}function pt(t){return t<48?36===t:t<58||!(t<65)&&(t<=90||(t<97?95===t:t<=122||(t<=65535?t>=170&&ot.test(String.fromCharCode(t)):ht(t,ut)||ht(t,lt))))}const dt=["any","bool","boolean","empty","false","mixed","null","number","static","string","true","typeof","void","interface","extends","_"];function ft(t){return"type"===t.importKind||"typeof"===t.importKind}function yt(t){return(t.type===u.name||!!t.type.keyword)&&"from"!==t.value}const vt={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};const mt=/\*?\s*@((?:no)?flow)\b/;const gt={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},xt=/^[\da-fA-F]+$/,bt=/^\d+$/;function wt(t){return!!t&&("JSXOpeningFragment"===t.type||"JSXClosingFragment"===t.type)}function Pt(t){if("JSXIdentifier"===t.type)return t.name;if("JSXNamespacedName"===t.type)return t.namespace.name+":"+t.name.name;if("JSXMemberExpression"===t.type)return Pt(t.object)+"."+Pt(t.property);throw new Error("Node had unexpected type: "+t.type)}$.j_oTag=new G("<tag",!1),$.j_cTag=new G("</tag",!1),$.j_expr=new G("<tag>...</tag>",!0,!0),u.jsxName=new n("jsxName"),u.jsxText=new n("jsxText",{beforeExpr:!0}),u.jsxTagStart=new n("jsxTagStart",{startsExpr:!0}),u.jsxTagEnd=new n("jsxTagEnd"),u.jsxTagStart.updateContext=function(){this.state.context.push($.j_expr),this.state.context.push($.j_oTag),this.state.exprAllowed=!1},u.jsxTagEnd.updateContext=function(t){const e=this.state.context.pop();e===$.j_oTag&&t===u.slash||e===$.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===$.j_expr):this.state.exprAllowed=!0};class Et{constructor(t){this.var=[],this.lexical=[],this.functions=[],this.flags=t}}class _t{constructor(t,e){this.scopeStack=[],this.undefinedExports=new Map,this.raise=t,this.inModule=e}get inFunction(){return(this.currentVarScope().flags&c)>0}get inGenerator(){return(this.currentVarScope().flags&d)>0}get inAsync(){return(this.currentVarScope().flags&p)>0}get allowSuper(){return(this.currentThisScope().flags&v)>0}get allowDirectSuper(){return(this.currentThisScope().flags&m)>0}get inNonArrowFunction(){return(this.currentThisScope().flags&c)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new Et(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){this.scopeStack.pop()}treatFunctionsAsVarInScope(t){return!!(t.flags&c||!this.inModule&&t.flags&h)}declareName(t,e,s){let r=this.currentScope();if(e&_||e&k)this.checkRedeclarationInScope(r,t,e,s),e&k?r.functions.push(t):r.lexical.push(t),e&_&&this.maybeExportDefined(r,t);else if(e&E)for(let n=this.scopeStack.length-1;n>=0&&(r=this.scopeStack[n],this.checkRedeclarationInScope(r,t,e,s),r.var.push(t),this.maybeExportDefined(r,t),!(r.flags&x));--n);this.inModule&&r.flags&h&&this.undefinedExports.delete(t)}maybeExportDefined(t,e){this.inModule&&t.flags&h&&this.undefinedExports.delete(e)}checkRedeclarationInScope(t,e,s,r){this.isRedeclaredInScope(t,e,s)&&this.raise(r,`Identifier '${e}' has already been declared`)}isRedeclaredInScope(t,e,s){return!!(s&w)&&(s&_?t.lexical.indexOf(e)>-1||t.functions.indexOf(e)>-1||t.var.indexOf(e)>-1:s&k?t.lexical.indexOf(e)>-1||!this.treatFunctionsAsVarInScope(t)&&t.var.indexOf(e)>-1:t.lexical.indexOf(e)>-1&&!(t.flags&y&&t.lexical[0]===e)||!this.treatFunctionsAsVarInScope(t)&&t.functions.indexOf(e)>-1)}checkLocalExport(t){-1===this.scopeStack[0].lexical.indexOf(t.name)&&-1===this.scopeStack[0].var.indexOf(t.name)&&-1===this.scopeStack[0].functions.indexOf(t.name)&&this.undefinedExports.set(t.name,t.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScope(){for(let t=this.scopeStack.length-1;;t--){const e=this.scopeStack[t];if(e.flags&x)return e}}currentThisScope(){for(let t=this.scopeStack.length-1;;t--){const e=this.scopeStack[t];if((e.flags&x||e.flags&g)&&!(e.flags&f))return e}}}class kt extends Et{constructor(...t){super(...t),this.types=[],this.enums=[],this.constEnums=[],this.classes=[],this.exportOnlyBindings=[]}}class At extends _t{createScope(t){return new kt(t)}declareName(t,e,s){const r=this.currentScope();if(e&C)return this.maybeExportDefined(r,t),void r.exportOnlyBindings.push(t);super.declareName(...arguments),e&P&&(e&w||(this.checkRedeclarationInScope(r,t,e,s),this.maybeExportDefined(r,t)),r.types.push(t)),e&T&&r.enums.push(t),e&S&&r.constEnums.push(t),e&A&&r.classes.push(t)}isRedeclaredInScope(t,e,s){if(t.enums.indexOf(e)>-1){if(s&T){return!!(s&S)!==t.constEnums.indexOf(e)>-1}return!0}return s&A&&t.classes.indexOf(e)>-1?t.lexical.indexOf(e)>-1&&!!(s&w):!!(s&P&&t.types.indexOf(e)>-1)||super.isRedeclaredInScope(...arguments)}checkLocalExport(t){-1===this.scopeStack[0].types.indexOf(t.name)&&-1===this.scopeStack[0].exportOnlyBindings.indexOf(t.name)&&super.checkLocalExport(t)}}function Tt(t){if(null==t)throw new Error(`Unexpected ${t} value.`);return t}function St(t){if(!t)throw new Error("Assert fail")}u.placeholder=new n("%%",{startsExpr:!0});function Ct(t,e){return t.some(t=>Array.isArray(t)?t[0]===e:t===e)}function Mt(t,e,s){const r=t.find(t=>Array.isArray(t)?t[0]===e:t===e);return r&&Array.isArray(r)?r[1][s]:null}const Nt=["minimal","smart","fsharp"];const jt={estree:t=>(class extends t{estreeParseRegExpLiteral({pattern:t,flags:e}){let s=null;try{s=new RegExp(t,e)}catch(t){}const r=this.estreeParseLiteral(s);return r.regex={pattern:t,flags:e},r}estreeParseLiteral(t){return this.parseLiteral(t,"Literal")}directiveToStmt(t){const e=t.value,s=this.startNodeAt(t.start,t.loc.start),r=this.startNodeAt(e.start,e.loc.start);return r.value=e.value,r.raw=e.extra.raw,s.expression=this.finishNodeAt(r,"Literal",e.end,e.loc.end),s.directive=e.extra.raw.slice(1,-1),this.finishNodeAt(s,"ExpressionStatement",t.end,t.loc.end)}initFunction(t,e){super.initFunction(t,e),t.expression=!1}checkDeclaration(t){V(t)?this.checkDeclaration(t.value):super.checkDeclaration(t)}checkGetterSetterParams(t){const e=t,s="get"===e.kind?0:1,r=e.start;e.value.params.length!==s&&("get"===e.kind?this.raise(r,"getter must not have any formal parameters"):this.raise(r,"setter must have exactly one formal parameter")),"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raise(r,"setter function argument must not be a rest parameter")}checkLVal(t,e=F,s,r){switch(t.type){case"ObjectPattern":t.properties.forEach(t=>{this.checkLVal("Property"===t.type?t.value:t,e,s,"object destructuring pattern")});break;default:super.checkLVal(t,e,s,r)}}checkPropClash(t,e){if("SpreadElement"===t.type||t.computed||t.method||t.shorthand)return;const s=t.key;"__proto__"===("Identifier"===s.type?s.name:String(s.value))&&"init"===t.kind&&(e.proto&&this.raise(s.start,"Redefinition of __proto__ property"),e.proto=!0)}isStrictBody(t){if("BlockStatement"===t.body.type&&t.body.body.length>0)for(let e=0,s=t.body.body;e<s.length;e++){const t=s[e];if("ExpressionStatement"!==t.type||"Literal"!==t.expression.type)break;if("use strict"===t.expression.value)return!0}return!1}isValidDirective(t){return!("ExpressionStatement"!==t.type||"Literal"!==t.expression.type||"string"!=typeof t.expression.value||t.expression.extra&&t.expression.extra.parenthesized)}stmtToDirective(t){const e=super.stmtToDirective(t),s=t.expression.value;return e.value.value=s,e}parseBlockBody(t,e,s,r){super.parseBlockBody(t,e,s,r);const n=t.directives.map(t=>this.directiveToStmt(t));t.body=n.concat(t.body),delete t.directives}pushClassMethod(t,e,s,r,n,i){this.parseMethod(e,s,r,n,i,"ClassMethod",!0),e.typeParameters&&(e.value.typeParameters=e.typeParameters,delete e.typeParameters),t.body.push(e)}parseExprAtom(t){switch(this.state.type){case u.regexp:return this.estreeParseRegExpLiteral(this.state.value);case u.num:case u.string:return this.estreeParseLiteral(this.state.value);case u._null:return this.estreeParseLiteral(null);case u._true:return this.estreeParseLiteral(!0);case u._false:return this.estreeParseLiteral(!1);default:return super.parseExprAtom(t)}}parseLiteral(t,e,s,r){const n=super.parseLiteral(t,e,s,r);return n.raw=n.extra.raw,delete n.extra,n}parseFunctionBody(t,e,s=!1){super.parseFunctionBody(t,e,s),t.expression="BlockStatement"!==t.body.type}parseMethod(t,e,s,r,n,i,a=!1){let o=this.startNode();return o.kind=t.kind,(o=super.parseMethod(o,e,s,r,n,i,a)).type="FunctionExpression",delete o.kind,t.value=o,i="ClassMethod"===i?"MethodDefinition":i,this.finishNode(t,i)}parseObjectMethod(t,e,s,r,n){const i=super.parseObjectMethod(t,e,s,r,n);return i&&(i.type="Property","method"===i.kind&&(i.kind="init"),i.shorthand=!1),i}parseObjectProperty(t,e,s,r,n){const i=super.parseObjectProperty(t,e,s,r,n);return i&&(i.kind="init",i.type="Property"),i}toAssignable(t,e,s){return V(t)?(this.toAssignable(t.value,e,s),t):super.toAssignable(t,e,s)}toAssignableObjectExpressionProp(t,e,s){"get"===t.kind||"set"===t.kind?this.raise(t.key.start,"Object pattern can't contain getter or setter"):t.method?this.raise(t.key.start,"Object pattern can't contain methods"):super.toAssignableObjectExpressionProp(t,e,s)}}),jsx:t=>(class extends t{jsxReadToken(){let t="",e=this.state.pos;for(;;){this.state.pos>=this.length&&this.raise(this.state.start,"Unterminated JSX contents");const s=this.input.charCodeAt(this.state.pos);switch(s){case 60:case 123:return this.state.pos===this.state.start?60===s&&this.state.exprAllowed?(++this.state.pos,this.finishToken(u.jsxTagStart)):super.getTokenFromCode(s):(t+=this.input.slice(e,this.state.pos),this.finishToken(u.jsxText,t));case 38:t+=this.input.slice(e,this.state.pos),t+=this.jsxReadEntity(),e=this.state.pos;break;default:J(s)?(t+=this.input.slice(e,this.state.pos),t+=this.jsxReadNewLine(!0),e=this.state.pos):++this.state.pos}}}jsxReadNewLine(t){const e=this.input.charCodeAt(this.state.pos);let s;return++this.state.pos,13===e&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,s=t?"\n":"\r\n"):s=String.fromCharCode(e),++this.state.curLine,this.state.lineStart=this.state.pos,s}jsxReadString(t){let e="",s=++this.state.pos;for(;;){this.state.pos>=this.length&&this.raise(this.state.start,"Unterminated string constant");const r=this.input.charCodeAt(this.state.pos);if(r===t)break;38===r?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos):J(r)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!1),s=this.state.pos):++this.state.pos}return e+=this.input.slice(s,this.state.pos++),this.finishToken(u.string,e)}jsxReadEntity(){let t,e="",s=0,r=this.input[this.state.pos];const n=++this.state.pos;for(;this.state.pos<this.length&&s++<10;){if(";"===(r=this.input[this.state.pos++])){"#"===e[0]?"x"===e[1]?(e=e.substr(2),xt.test(e)&&(t=String.fromCodePoint(parseInt(e,16)))):(e=e.substr(1),bt.test(e)&&(t=String.fromCodePoint(parseInt(e,10)))):t=gt[e];break}e+=r}return t||(this.state.pos=n,"&")}jsxReadWord(){let t;const e=this.state.pos;do{t=this.input.charCodeAt(++this.state.pos)}while(pt(t)||45===t);return this.finishToken(u.jsxName,this.input.slice(e,this.state.pos))}jsxParseIdentifier(){const t=this.startNode();return this.match(u.jsxName)?t.name=this.state.value:this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")}jsxParseNamespacedName(){const t=this.state.start,e=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(u.colon))return s;const r=this.startNodeAt(t,e);return r.namespace=s,r.name=this.jsxParseIdentifier(),this.finishNode(r,"JSXNamespacedName")}jsxParseElementName(){const t=this.state.start,e=this.state.startLoc;let s=this.jsxParseNamespacedName();if("JSXNamespacedName"===s.type)return s;for(;this.eat(u.dot);){const r=this.startNodeAt(t,e);r.object=s,r.property=this.jsxParseIdentifier(),s=this.finishNode(r,"JSXMemberExpression")}return s}jsxParseAttributeValue(){let t;switch(this.state.type){case u.braceL:if(t=this.startNode(),this.next(),"JSXEmptyExpression"===(t=this.jsxParseExpressionContainer(t)).expression.type)throw this.raise(t.start,"JSX attributes must only be assigned a non-empty expression");return t;case u.jsxTagStart:case u.string:return this.parseExprAtom();default:throw this.raise(this.state.start,"JSX value should be either an expression or a quoted JSX text")}}jsxParseEmptyExpression(){const t=this.startNodeAt(this.state.lastTokEnd,this.state.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.state.start,this.state.startLoc)}jsxParseSpreadChild(t){return this.next(),t.expression=this.parseExpression(),this.expect(u.braceR),this.finishNode(t,"JSXSpreadChild")}jsxParseExpressionContainer(t){return this.match(u.braceR)?t.expression=this.jsxParseEmptyExpression():t.expression=this.parseExpression(),this.expect(u.braceR),this.finishNode(t,"JSXExpressionContainer")}jsxParseAttribute(){const t=this.startNode();return this.eat(u.braceL)?(this.expect(u.ellipsis),t.argument=this.parseMaybeAssign(),this.expect(u.braceR),this.finishNode(t,"JSXSpreadAttribute")):(t.name=this.jsxParseNamespacedName(),t.value=this.eat(u.eq)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute"))}jsxParseOpeningElementAt(t,e){const s=this.startNodeAt(t,e);return this.match(u.jsxTagEnd)?(this.expect(u.jsxTagEnd),this.finishNode(s,"JSXOpeningFragment")):(s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s))}jsxParseOpeningElementAfterName(t){const e=[];for(;!this.match(u.slash)&&!this.match(u.jsxTagEnd);)e.push(this.jsxParseAttribute());return t.attributes=e,t.selfClosing=this.eat(u.slash),this.expect(u.jsxTagEnd),this.finishNode(t,"JSXOpeningElement")}jsxParseClosingElementAt(t,e){const s=this.startNodeAt(t,e);return this.match(u.jsxTagEnd)?(this.expect(u.jsxTagEnd),this.finishNode(s,"JSXClosingFragment")):(s.name=this.jsxParseElementName(),this.expect(u.jsxTagEnd),this.finishNode(s,"JSXClosingElement"))}jsxParseElementAt(t,e){const s=this.startNodeAt(t,e),r=[],n=this.jsxParseOpeningElementAt(t,e);let i=null;if(!n.selfClosing){t:for(;;)switch(this.state.type){case u.jsxTagStart:if(t=this.state.start,e=this.state.startLoc,this.next(),this.eat(u.slash)){i=this.jsxParseClosingElementAt(t,e);break t}r.push(this.jsxParseElementAt(t,e));break;case u.jsxText:r.push(this.parseExprAtom());break;case u.braceL:{const t=this.startNode();this.next(),this.match(u.ellipsis)?r.push(this.jsxParseSpreadChild(t)):r.push(this.jsxParseExpressionContainer(t));break}default:throw this.unexpected()}wt(n)&&!wt(i)?this.raise(i.start,"Expected corresponding JSX closing tag for <>"):!wt(n)&&wt(i)?this.raise(i.start,"Expected corresponding JSX closing tag for <"+Pt(n.name)+">"):wt(n)||wt(i)||Pt(i.name)!==Pt(n.name)&&this.raise(i.start,"Expected corresponding JSX closing tag for <"+Pt(n.name)+">")}return wt(n)?(s.openingFragment=n,s.closingFragment=i):(s.openingElement=n,s.closingElement=i),s.children=r,this.match(u.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 <>...</>?"),wt(n)?this.finishNode(s,"JSXFragment"):this.finishNode(s,"JSXElement")}jsxParseElement(){const t=this.state.start,e=this.state.startLoc;return this.next(),this.jsxParseElementAt(t,e)}parseExprAtom(t){return this.match(u.jsxText)?this.parseLiteral(this.state.value,"JSXText"):this.match(u.jsxTagStart)?this.jsxParseElement():this.isRelational("<")&&33!==this.input.charCodeAt(this.state.pos)?(this.finishToken(u.jsxTagStart),this.jsxParseElement()):super.parseExprAtom(t)}getTokenFromCode(t){if(this.state.inPropertyName)return super.getTokenFromCode(t);const e=this.curContext();if(e===$.j_expr)return this.jsxReadToken();if(e===$.j_oTag||e===$.j_cTag){if(ct(t))return this.jsxReadWord();if(62===t)return++this.state.pos,this.finishToken(u.jsxTagEnd);if((34===t||39===t)&&e===$.j_oTag)return this.jsxReadString(t)}return 60===t&&this.state.exprAllowed&&33!==this.input.charCodeAt(this.state.pos+1)?(++this.state.pos,this.finishToken(u.jsxTagStart)):super.getTokenFromCode(t)}updateContext(t){if(this.match(u.braceL)){const e=this.curContext();e===$.j_oTag?this.state.context.push($.braceExpression):e===$.j_expr?this.state.context.push($.templateQuasi):super.updateContext(t),this.state.exprAllowed=!0}else{if(!this.match(u.slash)||t!==u.jsxTagStart)return super.updateContext(t);this.state.context.length-=2,this.state.context.push($.j_cTag),this.state.exprAllowed=!1}}}),flow:t=>(class extends t{constructor(t,e){super(t,e),this.flowPragma=void 0}shouldParseTypes(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma}finishToken(t,e){return t!==u.string&&t!==u.semi&&t!==u.interpreterDirective&&void 0===this.flowPragma&&(this.flowPragma=null),super.finishToken(t,e)}addComment(t){if(void 0===this.flowPragma){const e=mt.exec(t.value);if(e)if("flow"===e[1])this.flowPragma="flow";else{if("noflow"!==e[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}}return super.addComment(t)}flowParseTypeInitialiser(t){const e=this.state.inType;this.state.inType=!0,this.expect(t||u.colon);const s=this.flowParseType();return this.state.inType=e,s}flowParsePredicate(){const t=this.startNode(),e=this.state.startLoc,s=this.state.start;this.expect(u.modulo);const r=this.state.startLoc;return this.expectContextual("checks"),e.line===r.line&&e.column===r.column-1||this.raise(s,"Spaces between ´%´ and ´checks´ are not allowed here."),this.eat(u.parenL)?(t.value=this.parseExpression(),this.expect(u.parenR),this.finishNode(t,"DeclaredPredicate")):this.finishNode(t,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const t=this.state.inType;this.state.inType=!0,this.expect(u.colon);let e=null,s=null;return this.match(u.modulo)?(this.state.inType=t,s=this.flowParsePredicate()):(e=this.flowParseType(),this.state.inType=t,this.match(u.modulo)&&(s=this.flowParsePredicate())),[e,s]}flowParseDeclareClass(t){return this.next(),this.flowParseInterfaceish(t,!0),this.finishNode(t,"DeclareClass")}flowParseDeclareFunction(t){this.next();const e=t.id=this.parseIdentifier(),s=this.startNode(),r=this.startNode();this.isRelational("<")?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,this.expect(u.parenL);const n=this.flowParseFunctionTypeParams();return s.params=n.params,s.rest=n.rest,this.expect(u.parenR),[s.returnType,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.typeAnnotation=this.finishNode(s,"FunctionTypeAnnotation"),e.typeAnnotation=this.finishNode(r,"TypeAnnotation"),this.resetEndLocation(e),this.semicolon(),this.finishNode(t,"DeclareFunction")}flowParseDeclare(t,e){if(this.match(u._class))return this.flowParseDeclareClass(t);if(this.match(u._function))return this.flowParseDeclareFunction(t);if(this.match(u._var))return this.flowParseDeclareVariable(t);if(this.eatContextual("module"))return this.match(u.dot)?this.flowParseDeclareModuleExports(t):(e&&this.unexpected(this.state.lastTokStart,"`declare module` cannot be used inside another `declare module`"),this.flowParseDeclareModule(t));if(this.isContextual("type"))return this.flowParseDeclareTypeAlias(t);if(this.isContextual("opaque"))return this.flowParseDeclareOpaqueType(t);if(this.isContextual("interface"))return this.flowParseDeclareInterface(t);if(this.match(u._export))return this.flowParseDeclareExportDeclaration(t,e);throw this.unexpected()}flowParseDeclareVariable(t){return this.next(),t.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(t.id.name,j,t.id.start),this.semicolon(),this.finishNode(t,"DeclareVariable")}flowParseDeclareModule(t){this.scope.enter(l),this.match(u.string)?t.id=this.parseExprAtom():t.id=this.parseIdentifier();const e=t.body=this.startNode(),s=e.body=[];for(this.expect(u.braceL);!this.match(u.braceR);){let t=this.startNode();this.match(u._import)?(this.next(),this.isContextual("type")||this.match(u._typeof)||this.unexpected(this.state.lastTokStart,"Imports within a `declare module` body must always be `import type` or `import typeof`"),this.parseImport(t)):(this.expectContextual("declare","Only declares and type imports are allowed inside declare module"),t=this.flowParseDeclare(t,!0)),s.push(t)}this.scope.exit(),this.expect(u.braceR),this.finishNode(e,"BlockStatement");let r=null,n=!1;const i="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";var a;return s.forEach(t=>{"DeclareExportAllDeclaration"===(t=t).type||"DeclareExportDeclaration"===t.type&&(!t.declaration||"TypeAlias"!==t.declaration.type&&"InterfaceDeclaration"!==t.declaration.type)?("CommonJS"===r&&this.unexpected(t.start,i),r="ES"):"DeclareModuleExports"===t.type&&(n&&this.unexpected(t.start,"Duplicate `declare module.exports` statement"),"ES"===r&&this.unexpected(t.start,i),r="CommonJS",n=!0)}),t.kind=r||"CommonJS",this.finishNode(t,"DeclareModule")}flowParseDeclareExportDeclaration(t,e){if(this.expect(u._export),this.eat(u._default))return this.match(u._function)||this.match(u._class)?t.declaration=this.flowParseDeclare(this.startNode()):(t.declaration=this.flowParseType(),this.semicolon()),t.default=!0,this.finishNode(t,"DeclareExportDeclaration");if(this.match(u._const)||this.isLet()||(this.isContextual("type")||this.isContextual("interface"))&&!e){const t=this.state.value,e=vt[t];this.unexpected(this.state.start,`\`declare export ${t}\` is not supported. Use \`${e}\` instead`)}if(this.match(u._var)||this.match(u._function)||this.match(u._class)||this.isContextual("opaque"))return t.declaration=this.flowParseDeclare(this.startNode()),t.default=!1,this.finishNode(t,"DeclareExportDeclaration");if(this.match(u.star)||this.match(u.braceL)||this.isContextual("interface")||this.isContextual("type")||this.isContextual("opaque"))return"ExportNamedDeclaration"===(t=this.parseExport(t)).type&&(t.type="ExportDeclaration",t.default=!1,delete t.exportKind),t.type="Declare"+t.type,t;throw this.unexpected()}flowParseDeclareModuleExports(t){return this.next(),this.expectContextual("exports"),t.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(t,"DeclareModuleExports")}flowParseDeclareTypeAlias(t){return this.next(),this.flowParseTypeAlias(t),t.type="DeclareTypeAlias",t}flowParseDeclareOpaqueType(t){return this.next(),this.flowParseOpaqueType(t,!0),t.type="DeclareOpaqueType",t}flowParseDeclareInterface(t){return this.next(),this.flowParseInterfaceish(t),this.finishNode(t,"DeclareInterface")}flowParseInterfaceish(t,e=!1){if(t.id=this.flowParseRestrictedIdentifier(!e),this.scope.declareName(t.id.name,e?O:N,t.id.start),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.extends=[],t.implements=[],t.mixins=[],this.eat(u._extends))do{t.extends.push(this.flowParseInterfaceExtends())}while(!e&&this.eat(u.comma));if(this.isContextual("mixins")){this.next();do{t.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(u.comma))}if(this.isContextual("implements")){this.next();do{t.implements.push(this.flowParseInterfaceExtends())}while(this.eat(u.comma))}t.body=this.flowParseObjectType({allowStatic:e,allowExact:!1,allowSpread:!1,allowProto:e,allowInexact:!1})}flowParseInterfaceExtends(){const t=this.startNode();return t.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,this.finishNode(t,"InterfaceExtends")}flowParseInterface(t){return this.flowParseInterfaceish(t),this.finishNode(t,"InterfaceDeclaration")}checkNotUnderscore(t){if("_"===t)throw this.unexpected(null,"`_` is only allowed as a type argument to call or new")}checkReservedType(t,e){dt.indexOf(t)>-1&&this.raise(e,`Cannot overwrite reserved type ${t}`)}flowParseRestrictedIdentifier(t){return this.checkReservedType(this.state.value,this.state.start),this.parseIdentifier(t)}flowParseTypeAlias(t){return t.id=this.flowParseRestrictedIdentifier(),this.scope.declareName(t.id.name,N,t.id.start),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.right=this.flowParseTypeInitialiser(u.eq),this.semicolon(),this.finishNode(t,"TypeAlias")}flowParseOpaqueType(t,e){return this.expectContextual("type"),t.id=this.flowParseRestrictedIdentifier(!0),this.scope.declareName(t.id.name,N,t.id.start),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.supertype=null,this.match(u.colon)&&(t.supertype=this.flowParseTypeInitialiser(u.colon)),t.impltype=null,e||(t.impltype=this.flowParseTypeInitialiser(u.eq)),this.semicolon(),this.finishNode(t,"OpaqueType")}flowParseTypeParameter(t=!1){const e=this.state.start,s=this.startNode(),r=this.flowParseVariance(),n=this.flowParseTypeAnnotatableIdentifier();return s.name=n.name,s.variance=r,s.bound=n.typeAnnotation,this.match(u.eq)?(this.eat(u.eq),s.default=this.flowParseType()):t&&this.unexpected(e,"Type parameter declaration needs a default, since a preceding type parameter declaration has a default."),this.finishNode(s,"TypeParameter")}flowParseTypeParameterDeclaration(){const t=this.state.inType,e=this.startNode();e.params=[],this.state.inType=!0,this.isRelational("<")||this.match(u.jsxTagStart)?this.next():this.unexpected();let s=!1;do{const t=this.flowParseTypeParameter(s);e.params.push(t),t.default&&(s=!0),this.isRelational(">")||this.expect(u.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){const t=this.startNode(),e=this.state.inType;t.params=[],this.state.inType=!0,this.expectRelational("<");const s=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.isRelational(">");)t.params.push(this.flowParseType()),this.isRelational(">")||this.expect(u.comma);return this.state.noAnonFunctionType=s,this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){const t=this.startNode(),e=this.state.inType;for(t.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)t.params.push(this.flowParseTypeOrImplicitInstantiation()),this.isRelational(">")||this.expect(u.comma);return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")}flowParseInterfaceType(){const t=this.startNode();if(this.expectContextual("interface"),t.extends=[],this.eat(u._extends))do{t.extends.push(this.flowParseInterfaceExtends())}while(this.eat(u.comma));return t.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(t,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(u.num)||this.match(u.string)?this.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(t,e,s){return t.static=e,this.lookahead().type===u.colon?(t.id=this.flowParseObjectPropertyKey(),t.key=this.flowParseTypeInitialiser()):(t.id=null,t.key=this.flowParseType()),this.expect(u.bracketR),t.value=this.flowParseTypeInitialiser(),t.variance=s,this.finishNode(t,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(t,e){return t.static=e,t.id=this.flowParseObjectPropertyKey(),this.expect(u.bracketR),this.expect(u.bracketR),this.isRelational("<")||this.match(u.parenL)?(t.method=!0,t.optional=!1,t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.start,t.loc.start))):(t.method=!1,this.eat(u.question)&&(t.optional=!0),t.value=this.flowParseTypeInitialiser()),this.finishNode(t,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(t){for(t.params=[],t.rest=null,t.typeParameters=null,this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(u.parenL);!this.match(u.parenR)&&!this.match(u.ellipsis);)t.params.push(this.flowParseFunctionTypeParam()),this.match(u.parenR)||this.expect(u.comma);return this.eat(u.ellipsis)&&(t.rest=this.flowParseFunctionTypeParam()),this.expect(u.parenR),t.returnType=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(t,e){const s=this.startNode();return t.static=e,t.value=this.flowParseObjectTypeMethodish(s),this.finishNode(t,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:t,allowExact:e,allowSpread:s,allowProto:r,allowInexact:n}){const i=this.state.inType;this.state.inType=!0;const a=this.startNode();let o,l;a.callProperties=[],a.properties=[],a.indexers=[],a.internalSlots=[];let h=!1;for(e&&this.match(u.braceBarL)?(this.expect(u.braceBarL),o=u.braceBarR,l=!0):(this.expect(u.braceL),o=u.braceR,l=!1),a.exact=l;!this.match(o);){let e=!1,i=null;const o=this.startNode();if(r&&this.isContextual("proto")){const e=this.lookahead();e.type!==u.colon&&e.type!==u.question&&(this.next(),i=this.state.start,t=!1)}if(t&&this.isContextual("static")){const t=this.lookahead();t.type!==u.colon&&t.type!==u.question&&(this.next(),e=!0)}const l=this.flowParseVariance();if(this.eat(u.bracketL))null!=i&&this.unexpected(i),this.eat(u.bracketL)?(l&&this.unexpected(l.start),a.internalSlots.push(this.flowParseObjectTypeInternalSlot(o,e))):a.indexers.push(this.flowParseObjectTypeIndexer(o,e,l));else if(this.match(u.parenL)||this.isRelational("<"))null!=i&&this.unexpected(i),l&&this.unexpected(l.start),a.callProperties.push(this.flowParseObjectTypeCallProperty(o,e));else{let t="init";if(this.isContextual("get")||this.isContextual("set")){const e=this.lookahead();e.type!==u.name&&e.type!==u.string&&e.type!==u.num||(t=this.state.value,this.next())}const r=this.flowParseObjectTypeProperty(o,e,i,l,t,s,n);null===r?h=!0:a.properties.push(r)}this.flowObjectTypeSemicolon()}this.expect(o),s&&(a.inexact=h);const c=this.finishNode(a,"ObjectTypeAnnotation");return this.state.inType=i,c}flowParseObjectTypeProperty(t,e,s,r,n,i,a){if(this.match(u.ellipsis)){i||this.unexpected(null,"Spread operator cannot appear in class or interface definitions"),null!=s&&this.unexpected(s),r&&this.unexpected(r.start,"Spread properties cannot have variance"),this.expect(u.ellipsis);const e=this.eat(u.comma)||this.eat(u.semi);if(this.match(u.braceR)){if(a)return null;this.unexpected(null,"Explicit inexact syntax is only allowed inside inexact objects")}return this.match(u.braceBarR)&&this.unexpected(null,"Explicit inexact syntax cannot appear inside an explicit exact object type"),e&&this.unexpected(null,"Explicit inexact syntax must appear at the end of an inexact object"),t.argument=this.flowParseType(),this.finishNode(t,"ObjectTypeSpreadProperty")}{t.key=this.flowParseObjectPropertyKey(),t.static=e,t.proto=null!=s,t.kind=n;let i=!1;return this.isRelational("<")||this.match(u.parenL)?(t.method=!0,null!=s&&this.unexpected(s),r&&this.unexpected(r.start),t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.start,t.loc.start)),"get"!==n&&"set"!==n||this.flowCheckGetterSetterParams(t)):("init"!==n&&this.unexpected(),t.method=!1,this.eat(u.question)&&(i=!0),t.value=this.flowParseTypeInitialiser(),t.variance=r),t.optional=i,this.finishNode(t,"ObjectTypeProperty")}}flowCheckGetterSetterParams(t){const e="get"===t.kind?0:1,s=t.start;t.value.params.length+(t.value.rest?1:0)!==e&&("get"===t.kind?this.raise(s,"getter must not have any formal parameters"):this.raise(s,"setter must have exactly one formal parameter")),"set"===t.kind&&t.value.rest&&this.raise(s,"setter function argument must not be a rest parameter")}flowObjectTypeSemicolon(){this.eat(u.semi)||this.eat(u.comma)||this.match(u.braceR)||this.match(u.braceBarR)||this.unexpected()}flowParseQualifiedTypeIdentifier(t,e,s){t=t||this.state.start,e=e||this.state.startLoc;let r=s||this.parseIdentifier();for(;this.eat(u.dot);){const s=this.startNodeAt(t,e);s.qualification=r,s.id=this.parseIdentifier(),r=this.finishNode(s,"QualifiedTypeIdentifier")}return r}flowParseGenericType(t,e,s){const r=this.startNodeAt(t,e);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(t,e,s),this.isRelational("<")&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"GenericTypeAnnotation")}flowParseTypeofType(){const t=this.startNode();return this.expect(u._typeof),t.argument=this.flowParsePrimaryType(),this.finishNode(t,"TypeofTypeAnnotation")}flowParseTupleType(){const t=this.startNode();for(t.types=[],this.expect(u.bracketL);this.state.pos<this.length&&!this.match(u.bracketR)&&(t.types.push(this.flowParseType()),!this.match(u.bracketR));)this.expect(u.comma);return this.expect(u.bracketR),this.finishNode(t,"TupleTypeAnnotation")}flowParseFunctionTypeParam(){let t=null,e=!1,s=null;const r=this.startNode(),n=this.lookahead();return n.type===u.colon||n.type===u.question?(t=this.parseIdentifier(),this.eat(u.question)&&(e=!0),s=this.flowParseTypeInitialiser()):s=this.flowParseType(),r.name=t,r.optional=e,r.typeAnnotation=s,this.finishNode(r,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(t){const e=this.startNodeAt(t.start,t.loc.start);return e.name=null,e.optional=!1,e.typeAnnotation=t,this.finishNode(e,"FunctionTypeParam")}flowParseFunctionTypeParams(t=[]){let e=null;for(;!this.match(u.parenR)&&!this.match(u.ellipsis);)t.push(this.flowParseFunctionTypeParam()),this.match(u.parenR)||this.expect(u.comma);return this.eat(u.ellipsis)&&(e=this.flowParseFunctionTypeParam()),{params:t,rest:e}}flowIdentToTypeAnnotation(t,e,s,r){switch(r.name){case"any":return this.finishNode(s,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(s,"BooleanTypeAnnotation");case"mixed":return this.finishNode(s,"MixedTypeAnnotation");case"empty":return this.finishNode(s,"EmptyTypeAnnotation");case"number":return this.finishNode(s,"NumberTypeAnnotation");case"string":return this.finishNode(s,"StringTypeAnnotation");default:return this.checkNotUnderscore(r.name),this.flowParseGenericType(t,e,r)}}flowParsePrimaryType(){const t=this.state.start,e=this.state.startLoc,s=this.startNode();let r,n,i=!1;const a=this.state.noAnonFunctionType;switch(this.state.type){case u.name:return this.isContextual("interface")?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(t,e,s,this.parseIdentifier());case u.braceL:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case u.braceBarL:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case u.bracketL:return this.state.noAnonFunctionType=!1,n=this.flowParseTupleType(),this.state.noAnonFunctionType=a,n;case u.relational:if("<"===this.state.value)return s.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(u.parenL),r=this.flowParseFunctionTypeParams(),s.params=r.params,s.rest=r.rest,this.expect(u.parenR),this.expect(u.arrow),s.returnType=this.flowParseType(),this.finishNode(s,"FunctionTypeAnnotation");break;case u.parenL:if(this.next(),!this.match(u.parenR)&&!this.match(u.ellipsis))if(this.match(u.name)){const t=this.lookahead().type;i=t!==u.question&&t!==u.colon}else i=!0;if(i){if(this.state.noAnonFunctionType=!1,n=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(u.comma)||this.match(u.parenR)&&this.lookahead().type===u.arrow))return this.expect(u.parenR),n;this.eat(u.comma)}return r=n?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(n)]):this.flowParseFunctionTypeParams(),s.params=r.params,s.rest=r.rest,this.expect(u.parenR),this.expect(u.arrow),s.returnType=this.flowParseType(),s.typeParameters=null,this.finishNode(s,"FunctionTypeAnnotation");case u.string:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case u._true:case u._false:return s.value=this.match(u._true),this.next(),this.finishNode(s,"BooleanLiteralTypeAnnotation");case u.plusMin:if("-"===this.state.value){if(this.next(),this.match(u.num))return this.parseLiteral(-this.state.value,"NumberLiteralTypeAnnotation",s.start,s.loc.start);if(this.match(u.bigint))return this.parseLiteral(-this.state.value,"BigIntLiteralTypeAnnotation",s.start,s.loc.start);this.unexpected(null,'Unexpected token, expected "number" or "bigint"')}this.unexpected();case u.num:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case u.bigint:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case u._void:return this.next(),this.finishNode(s,"VoidTypeAnnotation");case u._null:return this.next(),this.finishNode(s,"NullLiteralTypeAnnotation");case u._this:return this.next(),this.finishNode(s,"ThisTypeAnnotation");case u.star:return this.next(),this.finishNode(s,"ExistsTypeAnnotation");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType();if(this.state.type.keyword){const t=this.state.type.label;return this.next(),super.createIdentifier(s,t)}}throw this.unexpected()}flowParsePostfixType(){const t=this.state.start,e=this.state.startLoc;let s=this.flowParsePrimaryType();for(;this.match(u.bracketL)&&!this.canInsertSemicolon();){const r=this.startNodeAt(t,e);r.elementType=s,this.expect(u.bracketL),this.expect(u.bracketR),s=this.finishNode(r,"ArrayTypeAnnotation")}return s}flowParsePrefixType(){const t=this.startNode();return this.eat(u.question)?(t.typeAnnotation=this.flowParsePrefixType(),this.finishNode(t,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){const t=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(u.arrow)){const e=this.startNodeAt(t.start,t.loc.start);return e.params=[this.reinterpretTypeAsFunctionTypeParam(t)],e.rest=null,e.returnType=this.flowParseType(),e.typeParameters=null,this.finishNode(e,"FunctionTypeAnnotation")}return t}flowParseIntersectionType(){const t=this.startNode();this.eat(u.bitwiseAND);const e=this.flowParseAnonFunctionWithoutParens();for(t.types=[e];this.eat(u.bitwiseAND);)t.types.push(this.flowParseAnonFunctionWithoutParens());return 1===t.types.length?e:this.finishNode(t,"IntersectionTypeAnnotation")}flowParseUnionType(){const t=this.startNode();this.eat(u.bitwiseOR);const e=this.flowParseIntersectionType();for(t.types=[e];this.eat(u.bitwiseOR);)t.types.push(this.flowParseIntersectionType());return 1===t.types.length?e:this.finishNode(t,"UnionTypeAnnotation")}flowParseType(){const t=this.state.inType;this.state.inType=!0;const e=this.flowParseUnionType();return this.state.inType=t,this.state.exprAllowed=this.state.exprAllowed||this.state.noAnonFunctionType,e}flowParseTypeOrImplicitInstantiation(){if(this.state.type===u.name&&"_"===this.state.value){const t=this.state.start,e=this.state.startLoc,s=this.parseIdentifier();return this.flowParseGenericType(t,e,s)}return this.flowParseType()}flowParseTypeAnnotation(){const t=this.startNode();return t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(t){const e=t?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(u.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e)),e}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.end,t.typeAnnotation.loc.end),t.expression}flowParseVariance(){let t=null;return this.match(u.plusMin)&&(t=this.startNode(),"+"===this.state.value?t.kind="plus":t.kind="minus",this.next(),this.finishNode(t,"Variance")),t}parseFunctionBody(t,e,s=!1){return e?this.forwardNoArrowParamsConversionAt(t,()=>super.parseFunctionBody(t,!0,s)):super.parseFunctionBody(t,!1,s)}parseFunctionBodyAndFinish(t,e,s=!1){if(this.match(u.colon)){const e=this.startNode();[e.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),t.returnType=e.typeAnnotation?this.finishNode(e,"TypeAnnotation"):null}super.parseFunctionBodyAndFinish(t,e,s)}parseStatement(t,e){if(this.state.strict&&this.match(u.name)&&"interface"===this.state.value){const t=this.startNode();return this.next(),this.flowParseInterface(t)}{const s=super.parseStatement(t,e);return void 0!==this.flowPragma||this.isValidDirective(s)||(this.flowPragma=null),s}}parseExpressionStatement(t,e){if("Identifier"===e.type)if("declare"===e.name){if(this.match(u._class)||this.match(u.name)||this.match(u._function)||this.match(u._var)||this.match(u._export))return this.flowParseDeclare(t)}else if(this.match(u.name)){if("interface"===e.name)return this.flowParseInterface(t);if("type"===e.name)return this.flowParseTypeAlias(t);if("opaque"===e.name)return this.flowParseOpaqueType(t,!1)}return super.parseExpressionStatement(t,e)}shouldParseExportDeclaration(){return this.isContextual("type")||this.isContextual("interface")||this.isContextual("opaque")||super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){return(!this.match(u.name)||"type"!==this.state.value&&"interface"!==this.state.value&&"opaque"!==this.state.value)&&super.isExportDefaultSpecifier()}parseConditional(t,e,s,r,n){if(!this.match(u.question))return t;if(n){const i=this.state.clone();try{return super.parseConditional(t,e,s,r)}catch(e){if(e instanceof SyntaxError)return this.state=i,n.start=e.pos||this.state.start,t;throw e}}this.expect(u.question);const i=this.state.clone(),a=this.state.noArrowAt,o=this.startNodeAt(s,r);let{consequent:l,failed:h}=this.tryParseConditionalConsequent(),[c,p]=this.getArrowLikeExpressions(l);if(h||p.length>0){const t=[...a];if(p.length>0){this.state=i,this.state.noArrowAt=t;for(let e=0;e<p.length;e++)t.push(p[e].start);({consequent:l,failed:h}=this.tryParseConditionalConsequent()),[c,p]=this.getArrowLikeExpressions(l)}h&&c.length>1&&this.raise(i.start,"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate."),h&&1===c.length&&(this.state=i,this.state.noArrowAt=t.concat(c[0].start),({consequent:l,failed:h}=this.tryParseConditionalConsequent())),this.getArrowLikeExpressions(l,!0)}return this.state.noArrowAt=a,this.expect(u.colon),o.test=t,o.consequent=l,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign(e,void 0,void 0,void 0)),this.finishNode(o,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const t=this.parseMaybeAssign(),e=!this.match(u.colon);return this.state.noArrowParamsConversionAt.pop(),{consequent:t,failed:e}}getArrowLikeExpressions(t,e){const s=[t],r=[];for(;0!==s.length;){const t=s.pop();var n;if("ArrowFunctionExpression"===t.type)t.typeParameters||!t.returnType?(this.toAssignableList(t.params,!0,"arrow function parameters",null===(n=t.extra)||void 0===n?void 0:n.trailingComma),this.scope.enter(b(!1,!1)|f),super.checkParams(t,!1,!0),this.scope.exit()):r.push(t),s.push(t.body);else"ConditionalExpression"===t.type&&(s.push(t.consequent),s.push(t.alternate))}if(e){for(let e=0;e<r.length;e++){var i;this.toAssignableList(t.params,!0,"arrow function parameters",null===(i=t.extra)||void 0===i?void 0:i.trailingComma)}return[r,[]]}return function(t,e){const s=[],r=[];for(let n=0;n<t.length;n++)(e(t[n],n,t)?s:r).push(t[n]);return[s,r]}(r,t=>{try{var e;return this.toAssignableList(t.params,!0,"arrow function parameters",null===(e=t.extra)||void 0===e?void 0:e.trailingComma),!0}catch(t){return!1}})}forwardNoArrowParamsConversionAt(t,e){let s;return-1!==this.state.noArrowParamsConversionAt.indexOf(t.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),s=e(),this.state.noArrowParamsConversionAt.pop()):s=e(),s}parseParenItem(t,e,s){if(t=super.parseParenItem(t,e,s),this.eat(u.question)&&(t.optional=!0,this.resetEndLocation(t)),this.match(u.colon)){const r=this.startNodeAt(e,s);return r.expression=t,r.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(r,"TypeCastExpression")}return t}assertModuleNodeAllowed(t){"ImportDeclaration"===t.type&&("type"===t.importKind||"typeof"===t.importKind)||"ExportNamedDeclaration"===t.type&&"type"===t.exportKind||"ExportAllDeclaration"===t.type&&"type"===t.exportKind||super.assertModuleNodeAllowed(t)}parseExport(t){const e=super.parseExport(t);return"ExportNamedDeclaration"!==e.type&&"ExportAllDeclaration"!==e.type||(e.exportKind=e.exportKind||"value"),e}parseExportDeclaration(t){if(this.isContextual("type")){t.exportKind="type";const e=this.startNode();return this.next(),this.match(u.braceL)?(t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t),null):this.flowParseTypeAlias(e)}if(this.isContextual("opaque")){t.exportKind="type";const e=this.startNode();return this.next(),this.flowParseOpaqueType(e,!1)}if(this.isContextual("interface")){t.exportKind="type";const e=this.startNode();return this.next(),this.flowParseInterface(e)}return super.parseExportDeclaration(t)}eatExportStar(t){return!!super.eatExportStar(...arguments)||!(!this.isContextual("type")||this.lookahead().type!==u.star)&&(t.exportKind="type",this.next(),this.next(),!0)}maybeParseExportNamespaceSpecifier(t){const e=this.state.start,s=super.maybeParseExportNamespaceSpecifier(t);return s&&"type"===t.exportKind&&this.unexpected(e),s}parseClassId(t,e,s){super.parseClassId(t,e,s),this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}getTokenFromCode(t){const e=this.input.charCodeAt(this.state.pos+1);return 123===t&&124===e?this.finishOp(u.braceBarL,2):!this.state.inType||62!==t&&60!==t?function(t,e){return 64===t&&64===e}(t,e)?(this.state.isIterator=!0,super.readWord()):super.getTokenFromCode(t):this.finishOp(u.relational,1)}toAssignable(t,e,s){return"TypeCastExpression"===t.type?super.toAssignable(this.typeCastToParameter(t),e,s):super.toAssignable(t,e,s)}toAssignableList(t,e,s,r){for(let e=0;e<t.length;e++){const s=t[e];s&&"TypeCastExpression"===s.type&&(t[e]=this.typeCastToParameter(s))}return super.toAssignableList(t,e,s,r)}toReferencedList(t,e){for(let s=0;s<t.length;s++){const r=t[s];!r||"TypeCastExpression"!==r.type||r.extra&&r.extra.parenthesized||!(t.length>1)&&e||this.raise(r.typeAnnotation.start,"The type cast expression is expected to be wrapped with parenthesis")}return t}checkLVal(t,e=F,s,r){if("TypeCastExpression"!==t.type)return super.checkLVal(t,e,s,r)}parseClassProperty(t){return this.match(u.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(t)}parseClassPrivateProperty(t){return this.match(u.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(t)}isClassMethod(){return this.isRelational("<")||super.isClassMethod()}isClassProperty(){return this.match(u.colon)||super.isClassProperty()}isNonstaticConstructor(t){return!this.match(u.colon)&&super.isNonstaticConstructor(t)}pushClassMethod(t,e,s,r,n,i){e.variance&&this.unexpected(e.variance.start),delete e.variance,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(t,e,s,r,n,i)}pushClassPrivateMethod(t,e,s,r){e.variance&&this.unexpected(e.variance.start),delete e.variance,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(t,e,s,r)}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();const e=t.implements=[];do{const t=this.startNode();t.id=this.flowParseRestrictedIdentifier(!0),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,e.push(this.finishNode(t,"ClassImplements"))}while(this.eat(u.comma))}}parsePropertyName(t){const e=this.flowParseVariance(),s=super.parsePropertyName(t);return t.variance=e,s}parseObjPropValue(t,e,s,r,n,i,a,o){let l;t.variance&&this.unexpected(t.variance.start),delete t.variance,this.isRelational("<")&&(l=this.flowParseTypeParameterDeclaration(),this.match(u.parenL)||this.unexpected()),super.parseObjPropValue(t,e,s,r,n,i,a,o),l&&((t.value||t).typeParameters=l)}parseAssignableListItemTypes(t){if(this.eat(u.question)){if("Identifier"!==t.type)throw this.raise(t.start,"A binding pattern parameter cannot be optional in an implementation signature.");t.optional=!0}return this.match(u.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),this.resetEndLocation(t),t}parseMaybeDefault(t,e,s){const r=super.parseMaybeDefault(t,e,s);return"AssignmentPattern"===r.type&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(r.typeAnnotation.start,"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`"),r}shouldParseDefaultImport(t){return ft(t)?yt(this.state):super.shouldParseDefaultImport(t)}parseImportSpecifierLocal(t,e,s,r){e.local=ft(t)?this.flowParseRestrictedIdentifier(!0):this.parseIdentifier(),this.checkLVal(e.local,N,void 0,r),t.specifiers.push(this.finishNode(e,s))}maybeParseDefaultImportSpecifier(t){t.importKind="value";let e=null;if(this.match(u._typeof)?e="typeof":this.isContextual("type")&&(e="type"),e){const s=this.lookahead();"type"===e&&s.type===u.star&&this.unexpected(s.start),(yt(s)||s.type===u.braceL||s.type===u.star)&&(this.next(),t.importKind=e)}return super.maybeParseDefaultImportSpecifier(t)}parseImportSpecifier(t){const e=this.startNode(),s=this.state.start,r=this.parseIdentifier(!0);let n=null;"type"===r.name?n="type":"typeof"===r.name&&(n="typeof");let i=!1;if(this.isContextual("as")&&!this.isLookaheadContextual("as")){const t=this.parseIdentifier(!0);null===n||this.match(u.name)||this.state.type.keyword?(e.imported=r,e.importKind=null,e.local=this.parseIdentifier()):(e.imported=t,e.importKind=n,e.local=t.__clone())}else null!==n&&(this.match(u.name)||this.state.type.keyword)?(e.imported=this.parseIdentifier(!0),e.importKind=n,this.eatContextual("as")?e.local=this.parseIdentifier():(i=!0,e.local=e.imported.__clone())):(i=!0,e.imported=r,e.importKind=null,e.local=e.imported.__clone());const a=ft(t),o=ft(e);a&&o&&this.raise(s,"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"),(a||o)&&this.checkReservedType(e.local.name,e.local.start),!i||a||o||this.checkReservedWord(e.local.name,e.start,!0,!0),this.checkLVal(e.local,N,void 0,"import specifier"),t.specifiers.push(this.finishNode(e,"ImportSpecifier"))}parseFunctionParams(t,e){const s=t.kind;"get"!==s&&"set"!==s&&this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(t,e)}parseVarId(t,e){super.parseVarId(t,e),this.match(u.colon)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,e){if(this.match(u.colon)){const e=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,t.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=e}return super.parseAsyncArrowFromCallExpression(t,e)}shouldParseAsyncArrow(){return this.match(u.colon)||super.shouldParseAsyncArrow()}parseMaybeAssign(t,e,s,r){let n=null;if(this.hasPlugin("jsx")&&(this.match(u.jsxTagStart)||this.isRelational("<"))){const i=this.state.clone();try{return super.parseMaybeAssign(t,e,s,r)}catch(t){if(!(t instanceof SyntaxError))throw t;{this.state=i;const e=this.state.context.length;this.state.context[e-1]===$.j_oTag&&(this.state.context.length-=2),n=t}}}if(null!=n||this.isRelational("<")){let i,a;try{a=this.flowParseTypeParameterDeclaration(),(i=this.forwardNoArrowParamsConversionAt(a,()=>super.parseMaybeAssign(t,e,s,r))).typeParameters=a,this.resetStartLocationFromNode(i,a)}catch(t){throw n||t}if("ArrowFunctionExpression"===i.type)return i;if(null!=n)throw n;this.raise(a.start,"Expected an arrow function after this type parameter declaration")}return super.parseMaybeAssign(t,e,s,r)}parseArrow(t){if(this.match(u.colon)){const e=this.state.clone();try{const s=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const r=this.startNode();[r.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=s,this.canInsertSemicolon()&&this.unexpected(),this.match(u.arrow)||this.unexpected(),t.returnType=r.typeAnnotation?this.finishNode(r,"TypeAnnotation"):null}catch(t){if(!(t instanceof SyntaxError))throw t;this.state=e}}return super.parseArrow(t)}shouldParseArrow(){return this.match(u.colon)||super.shouldParseArrow()}setArrowFunctionParameters(t,e){-1!==this.state.noArrowParamsConversionAt.indexOf(t.start)?t.params=e:super.setArrowFunctionParameters(t,e)}checkParams(t,e,s){if(!s||-1===this.state.noArrowParamsConversionAt.indexOf(t.start))return super.checkParams(t,e,s)}parseParenAndDistinguishExpression(t){return super.parseParenAndDistinguishExpression(t&&-1===this.state.noArrowAt.indexOf(this.state.start))}parseSubscripts(t,e,s,r){if("Identifier"===t.type&&"async"===t.name&&-1!==this.state.noArrowAt.indexOf(e)){this.next();const r=this.startNodeAt(e,s);r.callee=t,r.arguments=this.parseCallExpressionArguments(u.parenR,!1),t=this.finishNode(r,"CallExpression")}else if("Identifier"===t.type&&"async"===t.name&&this.isRelational("<")){const n=this.state.clone();let i;try{const t=this.parseAsyncArrowWithTypeParameters(e,s);if(t)return t}catch(t){i=t}this.state=n;try{return super.parseSubscripts(t,e,s,r)}catch(t){throw i||t}}return super.parseSubscripts(t,e,s,r)}parseSubscript(t,e,s,r,n){if(this.match(u.questionDot)&&this.isLookaheadRelational("<")){if(this.expectPlugin("optionalChaining"),n.optionalChainMember=!0,r)return n.stop=!0,t;this.next();const i=this.startNodeAt(e,s);return i.callee=t,i.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(u.parenL),i.arguments=this.parseCallExpressionArguments(u.parenR,!1),i.optional=!0,this.finishNode(i,"OptionalCallExpression")}if(!r&&this.shouldParseTypes()&&this.isRelational("<")){const r=this.startNodeAt(e,s);r.callee=t;const i=this.state.clone();try{return r.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(u.parenL),r.arguments=this.parseCallExpressionArguments(u.parenR,!1),n.optionalChainMember?(r.optional=!1,this.finishNode(r,"OptionalCallExpression")):this.finishNode(r,"CallExpression")}catch(t){if(!(t instanceof SyntaxError))throw t;this.state=i}}return super.parseSubscript(t,e,s,r,n)}parseNewArguments(t){let e=null;if(this.shouldParseTypes()&&this.isRelational("<")){const t=this.state.clone();try{e=this.flowParseTypeParameterInstantiationCallOrNew()}catch(e){if(!(e instanceof SyntaxError))throw e;this.state=t}}t.typeArguments=e,super.parseNewArguments(t)}parseAsyncArrowWithTypeParameters(t,e){const s=this.startNodeAt(t,e);if(this.parseFunctionParams(s),this.parseArrow(s))return this.parseArrowExpression(s,void 0,!0)}readToken_mult_modulo(t){const e=this.input.charCodeAt(this.state.pos+1);if(42===t&&47===e&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();super.readToken_mult_modulo(t)}readToken_pipe_amp(t){const e=this.input.charCodeAt(this.state.pos+1);124!==t||125!==e?super.readToken_pipe_amp(t):this.finishOp(u.braceBarR,2)}parseTopLevel(t,e){const s=super.parseTopLevel(t,e);return this.state.hasFlowComment&&this.unexpected(null,"Unterminated flow-comment"),s}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment())return this.state.hasFlowComment&&this.unexpected(null,"Cannot have a flow comment inside another flow comment"),this.hasFlowCommentCompletion(),this.state.pos+=this.skipFlowComment(),void(this.state.hasFlowComment=!0);if(this.state.hasFlowComment){const t=this.input.indexOf("*-/",this.state.pos+=2);return-1===t&&this.raise(this.state.pos-2,"Unterminated comment"),void(this.state.pos=t+3)}super.skipBlockComment()}skipFlowComment(){const{pos:t}=this.state;let e=2;for(;[32,9].includes(this.input.charCodeAt(t+e));)e++;const s=this.input.charCodeAt(e+t),r=this.input.charCodeAt(e+t+1);return 58===s&&58===r?e+2:"flow-include"===this.input.slice(e+t,e+t+12)?e+12:58===s&&58!==r&&e}hasFlowCommentCompletion(){-1===this.input.indexOf("*/",this.state.pos)&&this.raise(this.state.pos,"Unterminated comment")}}),typescript:t=>(class extends t{getScopeHandler(){return At}tsIsIdentifier(){return this.match(u.name)}tsNextTokenCanFollowModifier(){return this.next(),!(this.hasPrecedingLineBreak()||this.match(u.parenL)||this.match(u.parenR)||this.match(u.colon)||this.match(u.eq)||this.match(u.question)||this.match(u.bang))}tsParseModifier(t){if(!this.match(u.name))return;const e=this.state.value;return-1!==t.indexOf(e)&&this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))?e:void 0}tsIsListTerminator(t){switch(t){case"EnumMembers":case"TypeMembers":return this.match(u.braceR);case"HeritageClauseElement":return this.match(u.braceL);case"TupleElementTypes":return this.match(u.bracketR);case"TypeParametersOrArguments":return this.isRelational(">")}throw new Error("Unreachable")}tsParseList(t,e){const s=[];for(;!this.tsIsListTerminator(t);)s.push(e());return s}tsParseDelimitedList(t,e){return Tt(this.tsParseDelimitedListWorker(t,e,!0))}tsParseDelimitedListWorker(t,e,s){const r=[];for(;!this.tsIsListTerminator(t);){const n=e();if(null==n)return;if(r.push(n),!this.eat(u.comma)){if(this.tsIsListTerminator(t))break;return void(s&&this.expect(u.comma))}}return r}tsParseBracketedList(t,e,s,r){r||(s?this.expect(u.bracketL):this.expectRelational("<"));const n=this.tsParseDelimitedList(t,e);return s?this.expect(u.bracketR):this.expectRelational(">"),n}tsParseImportType(){const t=this.startNode();if(this.expect(u._import),this.expect(u.parenL),!this.match(u.string))throw this.unexpected(null,"Argument in a type import must be a string literal");return t.argument=this.parseExprAtom(),this.expect(u.parenR),this.eat(u.dot)&&(t.qualifier=this.tsParseEntityName(!0)),this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSImportType")}tsParseEntityName(t){let e=this.parseIdentifier();for(;this.eat(u.dot);){const s=this.startNodeAtNode(e);s.left=e,s.right=this.parseIdentifier(t),e=this.finishNode(s,"TSQualifiedName")}return e}tsParseTypeReference(){const t=this.startNode();return t.typeName=this.tsParseEntityName(!1),!this.hasPrecedingLineBreak()&&this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeReference")}tsParseThisTypePredicate(t){this.next();const e=this.startNodeAtNode(t);return e.parameterName=t,e.typeAnnotation=this.tsParseTypeAnnotation(!1),this.finishNode(e,"TSTypePredicate")}tsParseThisTypeNode(){const t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")}tsParseTypeQuery(){const t=this.startNode();return this.expect(u._typeof),this.match(u._import)?t.exprName=this.tsParseImportType():t.exprName=this.tsParseEntityName(!0),this.finishNode(t,"TSTypeQuery")}tsParseTypeParameter(){const t=this.startNode();return t.name=this.parseIdentifierName(t.start),t.constraint=this.tsEatThenParseType(u._extends),t.default=this.tsEatThenParseType(u.eq),this.finishNode(t,"TSTypeParameter")}tsTryParseTypeParameters(){if(this.isRelational("<"))return this.tsParseTypeParameters()}tsParseTypeParameters(){const t=this.startNode();return this.isRelational("<")||this.match(u.jsxTagStart)?this.next():this.unexpected(),t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this),!1,!0),this.finishNode(t,"TSTypeParameterDeclaration")}tsTryNextParseConstantContext(){return this.lookahead().type===u._const?(this.next(),this.tsParseTypeReference()):null}tsFillSignature(t,e){const s=t===u.arrow;e.typeParameters=this.tsTryParseTypeParameters(),this.expect(u.parenL),e.parameters=this.tsParseBindingListForSignature(),s?e.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(t):this.match(t)&&(e.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(t))}tsParseBindingListForSignature(){return this.parseBindingList(u.parenR,41).map(t=>{if("Identifier"!==t.type&&"RestElement"!==t.type&&"ObjectPattern"!==t.type&&"ArrayPattern"!==t.type)throw this.unexpected(t.start,"Name in a signature must be an Identifier, ObjectPattern or ArrayPattern,"+`instead got ${t.type}`);return t})}tsParseTypeMemberSemicolon(){this.eat(u.comma)||this.semicolon()}tsParseSignatureMember(t,e){return this.tsFillSignature(u.colon,e),this.tsParseTypeMemberSemicolon(),this.finishNode(e,t)}tsIsUnambiguouslyIndexSignature(){return this.next(),this.eat(u.name)&&this.match(u.colon)}tsTryParseIndexSignature(t){if(!this.match(u.bracketL)||!this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))return;this.expect(u.bracketL);const e=this.parseIdentifier();e.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(e),this.expect(u.bracketR),t.parameters=[e];const s=this.tsTryParseTypeAnnotation();return s&&(t.typeAnnotation=s),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSIndexSignature")}tsParsePropertyOrMethodSignature(t,e){this.eat(u.question)&&(t.optional=!0);const s=t;if(e||!this.match(u.parenL)&&!this.isRelational("<")){const t=s;e&&(t.readonly=!0);const r=this.tsTryParseTypeAnnotation();return r&&(t.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSPropertySignature")}{const t=s;return this.tsFillSignature(u.colon,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSMethodSignature")}}tsParseTypeMember(){const t=this.startNode();if(this.match(u.parenL)||this.isRelational("<"))return this.tsParseSignatureMember("TSCallSignatureDeclaration",t);if(this.match(u._new)){const e=this.startNode();return this.next(),this.match(u.parenL)||this.isRelational("<")?this.tsParseSignatureMember("TSConstructSignatureDeclaration",t):(t.key=this.createIdentifier(e,"new"),this.tsParsePropertyOrMethodSignature(t,!1))}const e=!!this.tsParseModifier(["readonly"]),s=this.tsTryParseIndexSignature(t);return s?(e&&(t.readonly=!0),s):(this.parsePropertyName(t),this.tsParsePropertyOrMethodSignature(t,e))}tsParseTypeLiteral(){const t=this.startNode();return t.members=this.tsParseObjectTypeMembers(),this.finishNode(t,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(u.braceL);const t=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(u.braceR),t}tsIsStartOfMappedType(){return this.next(),this.eat(u.plusMin)?this.isContextual("readonly"):(this.isContextual("readonly")&&this.next(),!!this.match(u.bracketL)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(u._in))))}tsParseMappedTypeParameter(){const t=this.startNode();return t.name=this.parseIdentifierName(t.start),t.constraint=this.tsExpectThenParseType(u._in),this.finishNode(t,"TSTypeParameter")}tsParseMappedType(){const t=this.startNode();return this.expect(u.braceL),this.match(u.plusMin)?(t.readonly=this.state.value,this.next(),this.expectContextual("readonly")):this.eatContextual("readonly")&&(t.readonly=!0),this.expect(u.bracketL),t.typeParameter=this.tsParseMappedTypeParameter(),this.expect(u.bracketR),this.match(u.plusMin)?(t.optional=this.state.value,this.next(),this.expect(u.question)):this.eat(u.question)&&(t.optional=!0),t.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(u.braceR),this.finishNode(t,"TSMappedType")}tsParseTupleType(){const t=this.startNode();t.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let e=!1;return t.elementTypes.forEach(t=>{"TSOptionalType"===t.type?e=!0:e&&"TSRestType"!==t.type&&this.raise(t.start,"A required element cannot follow an optional element.")}),this.finishNode(t,"TSTupleType")}tsParseTupleElementType(){if(this.match(u.ellipsis)){const t=this.startNode();return this.next(),t.typeAnnotation=this.tsParseType(),this.checkCommaAfterRest(93),this.finishNode(t,"TSRestType")}const t=this.tsParseType();if(this.eat(u.question)){const e=this.startNodeAtNode(t);return e.typeAnnotation=t,this.finishNode(e,"TSOptionalType")}return t}tsParseParenthesizedType(){const t=this.startNode();return this.expect(u.parenL),t.typeAnnotation=this.tsParseType(),this.expect(u.parenR),this.finishNode(t,"TSParenthesizedType")}tsParseFunctionOrConstructorType(t){const e=this.startNode();return"TSConstructorType"===t&&this.expect(u._new),this.tsFillSignature(u.arrow,e),this.finishNode(e,t)}tsParseLiteralTypeNode(){const t=this.startNode();return t.literal=(()=>{switch(this.state.type){case u.num:case u.string:case u._true:case u._false:return this.parseExprAtom();default:throw this.unexpected()}})(),this.finishNode(t,"TSLiteralType")}tsParseTemplateLiteralType(){const t=this.startNode(),e=this.parseTemplate(!1);if(e.expressions.length>0)throw this.raise(e.expressions[0].start,"Template literal types cannot have any substitution");return t.literal=e,this.finishNode(t,"TSLiteralType")}tsParseNonArrayType(){switch(this.state.type){case u.name:case u._void:case u._null:{const t=this.match(u._void)?"TSVoidKeyword":this.match(u._null)?"TSNullKeyword":function(t){switch(t){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}}(this.state.value);if(void 0!==t&&46!==this.lookaheadCharCode()){const e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference()}case u.string:case u.num:case u._true:case u._false:return this.tsParseLiteralTypeNode();case u.plusMin:if("-"===this.state.value){const t=this.startNode();if(this.lookahead().type!==u.num)throw this.unexpected();return t.literal=this.parseMaybeUnary(),this.finishNode(t,"TSLiteralType")}break;case u._this:{const t=this.tsParseThisTypeNode();return this.isContextual("is")&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(t):t}case u._typeof:return this.tsParseTypeQuery();case u._import:return this.tsParseImportType();case u.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case u.bracketL:return this.tsParseTupleType();case u.parenL:return this.tsParseParenthesizedType();case u.backQuote:return this.tsParseTemplateLiteralType()}throw this.unexpected()}tsParseArrayTypeOrHigher(){let t=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(u.bracketL);)if(this.match(u.bracketR)){const e=this.startNodeAtNode(t);e.elementType=t,this.expect(u.bracketR),t=this.finishNode(e,"TSArrayType")}else{const e=this.startNodeAtNode(t);e.objectType=t,e.indexType=this.tsParseType(),this.expect(u.bracketR),t=this.finishNode(e,"TSIndexedAccessType")}return t}tsParseTypeOperator(t){const e=this.startNode();return this.expectContextual(t),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===t&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(t){switch(t.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(t.start,"'readonly' type modifier is only permitted on array and tuple literal types.")}}tsParseInferType(){const t=this.startNode();this.expectContextual("infer");const e=this.startNode();return e.name=this.parseIdentifierName(e.start),t.typeParameter=this.finishNode(e,"TSTypeParameter"),this.finishNode(t,"TSInferType")}tsParseTypeOperatorOrHigher(){const t=["keyof","unique","readonly"].find(t=>this.isContextual(t));return t?this.tsParseTypeOperator(t):this.isContextual("infer")?this.tsParseInferType():this.tsParseArrayTypeOrHigher()}tsParseUnionOrIntersectionType(t,e,s){this.eat(s);let r=e();if(this.match(s)){const n=[r];for(;this.eat(s);)n.push(e());const i=this.startNodeAtNode(r);i.types=n,r=this.finishNode(i,t)}return r}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),u.bitwiseAND)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),u.bitwiseOR)}tsIsStartOfFunctionType(){return!!this.isRelational("<")||this.match(u.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(this.match(u.name)||this.match(u._this))return this.next(),!0;if(this.match(u.braceL)){let t=1;for(this.next();t>0;)this.match(u.braceL)?++t:this.match(u.braceR)&&--t,this.next();return!0}if(this.match(u.bracketL)){let t=1;for(this.next();t>0;)this.match(u.bracketL)?++t:this.match(u.bracketR)&&--t,this.next();return!0}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(u.parenR)||this.match(u.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(u.colon)||this.match(u.comma)||this.match(u.question)||this.match(u.eq))return!0;if(this.match(u.parenR)&&(this.next(),this.match(u.arrow)))return!0}return!1}tsParseTypeOrTypePredicateAnnotation(t){return this.tsInType(()=>{const e=this.startNode();this.expect(t);const s=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!s)return this.tsParseTypeAnnotation(!1,e);const r=this.tsParseTypeAnnotation(!1),n=this.startNodeAtNode(s);return n.parameterName=s,n.typeAnnotation=r,e.typeAnnotation=this.finishNode(n,"TSTypePredicate"),this.finishNode(e,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){return this.match(u.colon)?this.tsParseTypeOrTypePredicateAnnotation(u.colon):void 0}tsTryParseTypeAnnotation(){return this.match(u.colon)?this.tsParseTypeAnnotation():void 0}tsTryParseType(){return this.tsEatThenParseType(u.colon)}tsParseTypePredicatePrefix(){const t=this.parseIdentifier();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),t}tsParseTypeAnnotation(t=!0,e=this.startNode()){return this.tsInType(()=>{t&&this.expect(u.colon),e.typeAnnotation=this.tsParseType()}),this.finishNode(e,"TSTypeAnnotation")}tsParseType(){St(this.state.inType);const t=this.tsParseNonConditionalType();if(this.hasPrecedingLineBreak()||!this.eat(u._extends))return t;const e=this.startNodeAtNode(t);return e.checkType=t,e.extendsType=this.tsParseNonConditionalType(),this.expect(u.question),e.trueType=this.tsParseType(),this.expect(u.colon),e.falseType=this.tsParseType(),this.finishNode(e,"TSConditionalType")}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(u._new)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){const t=this.startNode(),e=this.tsTryNextParseConstantContext();return t.typeAnnotation=e||this.tsNextThenParseType(),this.expectRelational(">"),t.expression=this.parseMaybeUnary(),this.finishNode(t,"TSTypeAssertion")}tsParseHeritageClause(t){const e=this.state.start,s=this.tsParseDelimitedList("HeritageClauseElement",this.tsParseExpressionWithTypeArguments.bind(this));return s.length||this.raise(e,`'${t}' list cannot be empty.`),s}tsParseExpressionWithTypeArguments(){const t=this.startNode();return t.expression=this.tsParseEntityName(!1),this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSExpressionWithTypeArguments")}tsParseInterfaceDeclaration(t){t.id=this.parseIdentifier(),this.checkLVal(t.id,L,void 0,"typescript interface declaration"),t.typeParameters=this.tsTryParseTypeParameters(),this.eat(u._extends)&&(t.extends=this.tsParseHeritageClause("extends"));const e=this.startNode();return e.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),t.body=this.finishNode(e,"TSInterfaceBody"),this.finishNode(t,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(t){return t.id=this.parseIdentifier(),this.checkLVal(t.id,R,void 0,"typescript type alias"),t.typeParameters=this.tsTryParseTypeParameters(),t.typeAnnotation=this.tsExpectThenParseType(u.eq),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")}tsInNoContext(t){const e=this.state.context;this.state.context=[e[0]];try{return t()}finally{this.state.context=e}}tsInType(t){const e=this.state.inType;this.state.inType=!0;try{return t()}finally{this.state.inType=e}}tsEatThenParseType(t){return this.match(t)?this.tsNextThenParseType():void 0}tsExpectThenParseType(t){return this.tsDoThenParseType(()=>this.expect(t))}tsNextThenParseType(){return this.tsDoThenParseType(()=>this.next())}tsDoThenParseType(t){return this.tsInType(()=>(t(),this.tsParseType()))}tsParseEnumMember(){const t=this.startNode();return t.id=this.match(u.string)?this.parseExprAtom():this.parseIdentifier(!0),this.eat(u.eq)&&(t.initializer=this.parseMaybeAssign()),this.finishNode(t,"TSEnumMember")}tsParseEnumDeclaration(t,e){return e&&(t.const=!0),t.id=this.parseIdentifier(),this.checkLVal(t.id,e?q:I,void 0,"typescript enum declaration"),this.expect(u.braceL),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(u.braceR),this.finishNode(t,"TSEnumDeclaration")}tsParseModuleBlock(){const t=this.startNode();return this.scope.enter(l),this.expect(u.braceL),this.parseBlockOrModuleBlockBody(t.body=[],void 0,!0,u.braceR),this.scope.exit(),this.finishNode(t,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(t,e=!1){if(t.id=this.parseIdentifier(),e||this.checkLVal(t.id,U,null,"module or namespace declaration"),this.eat(u.dot)){const e=this.startNode();this.tsParseModuleOrNamespaceDeclaration(e,!0),t.body=e}else this.scope.enter(512),t.body=this.tsParseModuleBlock(),this.scope.exit();return this.finishNode(t,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(t){return this.isContextual("global")?(t.global=!0,t.id=this.parseIdentifier()):this.match(u.string)?t.id=this.parseExprAtom():this.unexpected(),this.match(u.braceL)?(this.scope.enter(512),t.body=this.tsParseModuleBlock(),this.scope.exit()):this.semicolon(),this.finishNode(t,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(t,e){return t.isExport=e||!1,t.id=this.parseIdentifier(),this.expect(u.eq),t.moduleReference=this.tsParseModuleReference(),this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual("require")&&40===this.lookaheadCharCode()}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){const t=this.startNode();if(this.expectContextual("require"),this.expect(u.parenL),!this.match(u.string))throw this.unexpected();return t.expression=this.parseExprAtom(),this.expect(u.parenR),this.finishNode(t,"TSExternalModuleReference")}tsLookAhead(t){const e=this.state.clone(),s=t();return this.state=e,s}tsTryParseAndCatch(t){const e=this.state.clone();try{return t()}catch(t){if(t instanceof SyntaxError)return void(this.state=e);throw t}}tsTryParse(t){const e=this.state.clone(),s=t();return void 0!==s&&!1!==s?s:void(this.state=e)}tsTryParseDeclare(t){if(this.isLineTerminator())return;let e,s=this.state.type;switch(this.isContextual("let")&&(s=u._var,e="let"),s){case u._function:return this.parseFunctionStatement(t,!1,!0);case u._class:return t.declare=!0,this.parseClass(t,!0,!1);case u._const:if(this.match(u._const)&&this.isLookaheadContextual("enum"))return this.expect(u._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(t,!0);case u._var:return e=e||this.state.value,this.parseVarStatement(t,e);case u.name:{const e=this.state.value;return"global"===e?this.tsParseAmbientExternalModuleDeclaration(t):this.tsParseDeclaration(t,e,!0)}}}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0)}tsParseExpressionStatement(t,e){switch(e.name){case"declare":{const e=this.tsTryParseDeclare(t);if(e)return e.declare=!0,e;break}case"global":if(this.match(u.braceL)){this.scope.enter(512);const s=t;return s.global=!0,s.id=e,s.body=this.tsParseModuleBlock(),this.scope.exit(),this.finishNode(s,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(t,e.name,!1)}}tsParseDeclaration(t,e,s){switch(e){case"abstract":if(this.tsCheckLineTerminatorAndMatch(u._class,s)){const e=t;return e.abstract=!0,s&&(this.next(),this.match(u._class)||this.unexpected(null,u._class)),this.parseClass(e,!0,!1)}break;case"enum":if(s||this.match(u.name))return s&&this.next(),this.tsParseEnumDeclaration(t,!1);break;case"interface":if(this.tsCheckLineTerminatorAndMatch(u.name,s))return s&&this.next(),this.tsParseInterfaceDeclaration(t);break;case"module":if(s&&this.next(),this.match(u.string))return this.tsParseAmbientExternalModuleDeclaration(t);if(this.tsCheckLineTerminatorAndMatch(u.name,s))return this.tsParseModuleOrNamespaceDeclaration(t);break;case"namespace":if(this.tsCheckLineTerminatorAndMatch(u.name,s))return s&&this.next(),this.tsParseModuleOrNamespaceDeclaration(t);break;case"type":if(this.tsCheckLineTerminatorAndMatch(u.name,s))return s&&this.next(),this.tsParseTypeAliasDeclaration(t)}}tsCheckLineTerminatorAndMatch(t,e){return(e||this.match(t))&&!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(t,e){if(!this.isRelational("<"))return;const s=this.tsTryParseAndCatch(()=>{const s=this.startNodeAt(t,e);return s.typeParameters=this.tsParseTypeParameters(),super.parseFunctionParams(s),s.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(u.arrow),s});return s?this.parseArrowExpression(s,null,!0):void 0}tsParseTypeArguments(){const t=this.startNode();return t.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expectRelational("<"),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),this.state.exprAllowed=!1,this.expectRelational(">"),this.finishNode(t,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){if(this.match(u.name))switch(this.state.value){case"abstract":case"declare":case"enum":case"interface":case"module":case"namespace":case"type":return!0}return!1}isExportDefaultSpecifier(){return!this.tsIsDeclarationStart()&&super.isExportDefaultSpecifier()}parseAssignableListItem(t,e){const s=this.state.start,r=this.state.startLoc;let n,i=!1;t&&(n=this.parseAccessModifier(),i=!!this.tsParseModifier(["readonly"]));const a=this.parseMaybeDefault();this.parseAssignableListItemTypes(a);const o=this.parseMaybeDefault(a.start,a.loc.start,a);if(n||i){const t=this.startNodeAt(s,r);if(e.length&&(t.decorators=e),n&&(t.accessibility=n),i&&(t.readonly=i),"Identifier"!==o.type&&"AssignmentPattern"!==o.type)throw this.raise(t.start,"A parameter property may not be declared using a binding pattern.");return t.parameter=o,this.finishNode(t,"TSParameterProperty")}return e.length&&(a.decorators=e),o}parseFunctionBodyAndFinish(t,e,s=!1){this.match(u.colon)&&(t.returnType=this.tsParseTypeOrTypePredicateAnnotation(u.colon));const r="FunctionDeclaration"===e?"TSDeclareFunction":"ClassMethod"===e?"TSDeclareMethod":void 0;r&&!this.match(u.braceL)&&this.isLineTerminator()?this.finishNode(t,r):super.parseFunctionBodyAndFinish(t,e,s)}checkFunctionStatementId(t){!t.body&&t.id?this.checkLVal(t.id,D,null,"function name"):super.checkFunctionStatementId(...arguments)}parseSubscript(t,e,s,r,n){if(!this.hasPrecedingLineBreak()&&this.match(u.bang)){this.state.exprAllowed=!1,this.next();const r=this.startNodeAt(e,s);return r.expression=t,this.finishNode(r,"TSNonNullExpression")}if(this.isRelational("<")){const i=this.tsTryParseAndCatch(()=>{if(!r&&this.atPossibleAsync(t)){const t=this.tsTryParseGenericAsyncArrowFunction(e,s);if(t)return t}const i=this.startNodeAt(e,s);i.callee=t;const a=this.tsParseTypeArguments();if(a){if(!r&&this.eat(u.parenL))return i.arguments=this.parseCallExpressionArguments(u.parenR,!1),i.typeParameters=a,this.finishCallExpression(i);if(this.match(u.backQuote))return this.parseTaggedTemplateExpression(e,s,t,n,a)}this.unexpected()});if(i)return i}return super.parseSubscript(t,e,s,r,n)}parseNewArguments(t){if(this.isRelational("<")){const e=this.tsTryParseAndCatch(()=>{const t=this.tsParseTypeArguments();return this.match(u.parenL)||this.unexpected(),t});e&&(t.typeParameters=e)}super.parseNewArguments(t)}parseExprOp(t,e,s,r,n){if(Tt(u._in.binop)>r&&!this.hasPrecedingLineBreak()&&this.isContextual("as")){const i=this.startNodeAt(e,s);i.expression=t;const a=this.tsTryNextParseConstantContext();return i.typeAnnotation=a||this.tsNextThenParseType(),this.finishNode(i,"TSAsExpression"),this.parseExprOp(i,e,s,r,n)}return super.parseExprOp(t,e,s,r,n)}checkReservedWord(t,e,s,r){}checkDuplicateExports(){}parseImport(t){return this.match(u.name)&&this.lookahead().type===u.eq?this.tsParseImportEqualsDeclaration(t):super.parseImport(t)}parseExport(t){if(this.match(u._import))return this.expect(u._import),this.tsParseImportEqualsDeclaration(t,!0);if(this.eat(u.eq)){const e=t;return e.expression=this.parseExpression(),this.semicolon(),this.finishNode(e,"TSExportAssignment")}if(this.eatContextual("as")){const e=t;return this.expectContextual("namespace"),e.id=this.parseIdentifier(),this.semicolon(),this.finishNode(e,"TSNamespaceExportDeclaration")}return super.parseExport(t)}isAbstractClass(){return this.isContextual("abstract")&&this.lookahead().type===u._class}parseExportDefaultExpression(){if(this.isAbstractClass()){const t=this.startNode();return this.next(),this.parseClass(t,!0,!0),t.abstract=!0,t}if("interface"===this.state.value){const t=this.tsParseDeclaration(this.startNode(),this.state.value,!0);if(t)return t}return super.parseExportDefaultExpression()}parseStatementContent(t,e){if(this.state.type===u._const){const t=this.lookahead();if(t.type===u.name&&"enum"===t.value){const t=this.startNode();return this.expect(u._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(t,!0)}}return super.parseStatementContent(t,e)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}parseClassMember(t,e,s,r){const n=this.parseAccessModifier();n&&(e.accessibility=n),super.parseClassMember(t,e,s,r)}parseClassMemberWithIsStatic(t,e,s,r,n){const i=e,a=e,o=e;let u=!1,l=!1;switch(this.tsParseModifier(["abstract","readonly"])){case"readonly":l=!0,u=!!this.tsParseModifier(["abstract"]);break;case"abstract":u=!0,l=!!this.tsParseModifier(["readonly"])}if(u&&(i.abstract=!0),l&&(o.readonly=!0),!u&&!r&&!i.accessibility){const s=this.tsTryParseIndexSignature(e);if(s)return void t.body.push(s)}if(l)return i.static=r,this.parseClassPropertyName(a),this.parsePostMemberNameModifiers(i),void this.pushClassProperty(t,a);super.parseClassMemberWithIsStatic(t,e,s,r,n)}parsePostMemberNameModifiers(t){this.eat(u.question)&&(t.optional=!0)}parseExpressionStatement(t,e){return("Identifier"===e.type?this.tsParseExpressionStatement(t,e):void 0)||super.parseExpressionStatement(t,e)}shouldParseExportDeclaration(){return!!this.tsIsDeclarationStart()||super.shouldParseExportDeclaration()}parseConditional(t,e,s,r,n){if(!n||!this.match(u.question))return super.parseConditional(t,e,s,r,n);const i=this.state.clone();try{return super.parseConditional(t,e,s,r)}catch(e){if(!(e instanceof SyntaxError))throw e;return this.state=i,n.start=e.pos||this.state.start,t}}parseParenItem(t,e,s){if(t=super.parseParenItem(t,e,s),this.eat(u.question)&&(t.optional=!0,this.resetEndLocation(t)),this.match(u.colon)){const r=this.startNodeAt(e,s);return r.expression=t,r.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(r,"TSTypeCastExpression")}return t}parseExportDeclaration(t){const e=this.state.start,s=this.state.startLoc,r=this.eatContextual("declare");let n;return this.match(u.name)&&(n=this.tsTryParseExportDeclaration()),n||(n=super.parseExportDeclaration(t)),n&&r&&(this.resetStartLocation(n,e,s),n.declare=!0),n}parseClassId(t,e,s){if((!e||s)&&this.isContextual("implements"))return;super.parseClassId(t,e,s,t.declare?D:M);const r=this.tsTryParseTypeParameters();r&&(t.typeParameters=r)}parseClassProperty(t){!t.optional&&this.eat(u.bang)&&(t.definite=!0);const e=this.tsTryParseTypeAnnotation();return e&&(t.typeAnnotation=e),super.parseClassProperty(t)}pushClassMethod(t,e,s,r,n,i){const a=this.tsTryParseTypeParameters();a&&(e.typeParameters=a),super.pushClassMethod(t,e,s,r,n,i)}pushClassPrivateMethod(t,e,s,r){const n=this.tsTryParseTypeParameters();n&&(e.typeParameters=n),super.pushClassPrivateMethod(t,e,s,r)}parseClassSuper(t){super.parseClassSuper(t),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.tsParseTypeArguments()),this.eatContextual("implements")&&(t.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(t,...e){const s=this.tsTryParseTypeParameters();s&&(t.typeParameters=s),super.parseObjPropValue(t,...e)}parseFunctionParams(t,e){const s=this.tsTryParseTypeParameters();s&&(t.typeParameters=s),super.parseFunctionParams(t,e)}parseVarId(t,e){super.parseVarId(t,e),"Identifier"===t.id.type&&this.eat(u.bang)&&(t.definite=!0);const s=this.tsTryParseTypeAnnotation();s&&(t.id.typeAnnotation=s,this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,e){return this.match(u.colon)&&(t.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(t,e)}parseMaybeAssign(...t){let e,s,r;if(this.match(u.jsxTagStart)){St(this.curContext()===$.j_oTag),St(this.state.context[this.state.context.length-2]===$.j_expr);const s=this.state.clone();try{return super.parseMaybeAssign(...t)}catch(t){if(!(t instanceof SyntaxError))throw t;this.state=s,St(this.curContext()===$.j_oTag),this.state.context.pop(),St(this.curContext()===$.j_expr),this.state.context.pop(),e=t}}if(void 0===e&&!this.isRelational("<"))return super.parseMaybeAssign(...t);const n=this.state.clone();try{r=this.tsParseTypeParameters(),("ArrowFunctionExpression"!==(s=super.parseMaybeAssign(...t)).type||s.extra&&s.extra.parenthesized)&&this.unexpected()}catch(s){if(!(s instanceof SyntaxError))throw s;if(e)throw e;return St(!this.hasPlugin("jsx")),this.state=n,super.parseMaybeAssign(...t)}return r&&0!==r.params.length&&this.resetStartLocationFromNode(s,r),s.typeParameters=r,s}parseMaybeUnary(t){return!this.hasPlugin("jsx")&&this.isRelational("<")?this.tsParseTypeAssertion():super.parseMaybeUnary(t)}parseArrow(t){if(this.match(u.colon)){const e=this.state.clone();try{const s=this.tsParseTypeOrTypePredicateAnnotation(u.colon);if(this.canInsertSemicolon()||!this.match(u.arrow))return void(this.state=e);t.returnType=s}catch(t){if(!(t instanceof SyntaxError))throw t;this.state=e}}return super.parseArrow(t)}parseAssignableListItemTypes(t){if(this.eat(u.question)){if("Identifier"!==t.type)throw this.raise(t.start,"A binding pattern parameter cannot be optional in an implementation signature.");t.optional=!0}const e=this.tsTryParseTypeAnnotation();return e&&(t.typeAnnotation=e),this.resetEndLocation(t),t}toAssignable(t,e,s){switch(t.type){case"TSTypeCastExpression":return super.toAssignable(this.typeCastToParameter(t),e,s);case"TSParameterProperty":return super.toAssignable(t,e,s);case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":return t.expression=this.toAssignable(t.expression,e,s),t;default:return super.toAssignable(t,e,s)}}checkLVal(t,e=F,s,r){switch(t.type){case"TSTypeCastExpression":return;case"TSParameterProperty":return void this.checkLVal(t.parameter,e,s,"parameter property");case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":return void this.checkLVal(t.expression,e,s,r);default:return void super.checkLVal(t,e,s,r)}}parseBindingAtom(){switch(this.state.type){case u._this:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseMaybeDecoratorArguments(t){if(this.isRelational("<")){const e=this.tsParseTypeArguments();if(this.match(u.parenL)){const s=super.parseMaybeDecoratorArguments(t);return s.typeParameters=e,s}this.unexpected(this.state.start,u.parenL)}return super.parseMaybeDecoratorArguments(t)}isClassMethod(){return this.isRelational("<")||super.isClassMethod()}isClassProperty(){return this.match(u.bang)||this.match(u.colon)||super.isClassProperty()}parseMaybeDefault(...t){const e=super.parseMaybeDefault(...t);return"AssignmentPattern"===e.type&&e.typeAnnotation&&e.right.start<e.typeAnnotation.start&&this.raise(e.typeAnnotation.start,"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`"),e}getTokenFromCode(t){return!this.state.inType||62!==t&&60!==t?super.getTokenFromCode(t):this.finishOp(u.relational,1)}toAssignableList(t){for(let e=0;e<t.length;e++){const s=t[e];if(s)switch(s.type){case"TSTypeCastExpression":t[e]=this.typeCastToParameter(s);break;case"TSAsExpression":case"TSTypeAssertion":this.raise(s.start,"Unexpected type cast in parameter position.")}}return super.toAssignableList(...arguments)}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.end,t.typeAnnotation.loc.end),t.expression}toReferencedList(t,e){for(let e=0;e<t.length;e++){const s=t[e];s&&s._exprListItem&&"TsTypeCastExpression"===s.type&&this.raise(s.start,"Did not expect a type annotation here.")}return t}shouldParseArrow(){return this.match(u.colon)||super.shouldParseArrow()}shouldParseAsyncArrow(){return this.match(u.colon)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(t){if(this.isRelational("<")){const e=this.tsTryParseAndCatch(()=>this.tsParseTypeArguments());e&&(t.typeParameters=e)}return super.jsxParseOpeningElementAfterName(t)}getGetterSetterExpectedParamCount(t){const e=super.getGetterSetterExpectedParamCount(t),s=t.params[0];return s&&"Identifier"===s.type&&"this"===s.name?e+1:e}}),v8intrinsic:t=>(class extends t{parseV8Intrinsic(){if(this.match(u.modulo)){const t=this.state.start,e=this.startNode();if(this.eat(u.modulo),this.match(u.name)){const t=this.parseIdentifierName(this.state.start),s=this.createIdentifier(e,t);if(s.type="V8IntrinsicIdentifier",this.match(u.parenL))return s}this.unexpected(t)}}parseExprAtom(){return this.parseV8Intrinsic()||super.parseExprAtom(...arguments)}}),placeholders:t=>(class extends t{parsePlaceholder(t){if(this.match(u.placeholder)){const e=this.startNode();return this.next(),this.assertNoSpace("Unexpected space in placeholder."),e.name=super.parseIdentifier(!0),this.assertNoSpace("Unexpected space in placeholder."),this.expect(u.placeholder),this.finishPlaceholder(e,t)}}finishPlaceholder(t,e){const s=!(!t.expectedNode||"Placeholder"!==t.type);return t.expectedNode=e,s?t:this.finishNode(t,"Placeholder")}getTokenFromCode(t){return 37===t&&37===this.input.charCodeAt(this.state.pos+1)?this.finishOp(u.placeholder,2):super.getTokenFromCode(...arguments)}parseExprAtom(){return this.parsePlaceholder("Expression")||super.parseExprAtom(...arguments)}parseIdentifier(){return this.parsePlaceholder("Identifier")||super.parseIdentifier(...arguments)}checkReservedWord(t){void 0!==t&&super.checkReservedWord(...arguments)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom(...arguments)}checkLVal(t){"Placeholder"!==t.type&&super.checkLVal(...arguments)}toAssignable(t){return t&&"Placeholder"===t.type&&"Expression"===t.expectedNode?(t.expectedNode="Pattern",t):super.toAssignable(...arguments)}verifyBreakContinue(t){t.label&&"Placeholder"===t.label.type||super.verifyBreakContinue(...arguments)}parseExpressionStatement(t,e){if("Placeholder"!==e.type||e.extra&&e.extra.parenthesized)return super.parseExpressionStatement(...arguments);if(this.match(u.colon)){const s=t;return s.label=this.finishPlaceholder(e,"Identifier"),this.next(),s.body=this.parseStatement("label"),this.finishNode(s,"LabeledStatement")}return this.semicolon(),t.name=e.name,this.finishPlaceholder(t,"Statement")}parseBlock(){return this.parsePlaceholder("BlockStatement")||super.parseBlock(...arguments)}parseFunctionId(){return this.parsePlaceholder("Identifier")||super.parseFunctionId(...arguments)}parseClass(t,e,s){const r=e?"ClassDeclaration":"ClassExpression";this.next(),this.takeDecorators(t);const n=this.parsePlaceholder("Identifier");if(n)if(this.match(u._extends)||this.match(u.placeholder)||this.match(u.braceL))t.id=n;else{if(s||!e)return t.id=null,t.body=this.finishPlaceholder(n,"ClassBody"),this.finishNode(t,r);this.unexpected(null,"A class name is required")}else this.parseClassId(t,e,s);return this.parseClassSuper(t),t.body=this.parsePlaceholder("ClassBody")||this.parseClassBody(!!t.superClass),this.finishNode(t,r)}parseExport(t){const e=this.parsePlaceholder("Identifier");if(!e)return super.parseExport(...arguments);if(!this.isContextual("from")&&!this.match(u.comma))return t.specifiers=[],t.source=null,t.declaration=this.finishPlaceholder(e,"Declaration"),this.finishNode(t,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const s=this.startNode();return s.exported=e,t.specifiers=[this.finishNode(s,"ExportDefaultSpecifier")],super.parseExport(t)}maybeParseExportDefaultSpecifier(t){return!!(t.specifiers&&t.specifiers.length>0)||super.maybeParseExportDefaultSpecifier(...arguments)}checkExport(t){const{specifiers:e}=t;e&&e.length&&(t.specifiers=e.filter(t=>"Placeholder"===t.exported.type)),super.checkExport(t),t.specifiers=e}parseImport(t){const e=this.parsePlaceholder("Identifier");if(!e)return super.parseImport(...arguments);if(t.specifiers=[],!this.isContextual("from")&&!this.match(u.comma))return t.source=this.finishPlaceholder(e,"StringLiteral"),this.semicolon(),this.finishNode(t,"ImportDeclaration");const s=this.startNodeAtNode(e);return s.local=e,this.finishNode(s,"ImportDefaultSpecifier"),t.specifiers.push(s),this.eat(u.comma)&&(this.maybeParseStarImportSpecifier(t)||this.parseNamedImportSpecifiers(t)),this.expectContextual("from"),t.source=this.parseImportSource(),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource(...arguments)}})},Ot=Object.keys(jt),Lt={sourceType:"script",sourceFilename:void 0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createParenthesizedExpressions:!1};class Rt{constructor(t,e){this.line=t,this.column=e}}class It{constructor(t,e){this.start=t,this.end=e}}class Dt{constructor(){this.sawUnambiguousESM=!1}hasPlugin(t){return this.plugins.has(t)}getPluginOption(t,e){if(this.hasPlugin(t))return this.plugins.get(t)[e]}}function Ft(t){return t[t.length-1]}class Bt extends Dt{addComment(t){this.filename&&(t.loc.filename=this.filename),this.state.trailingComments.push(t),this.state.leadingComments.push(t)}adjustCommentsAfterTrailingComma(t,e,s){if(0===this.state.leadingComments.length)return;let r=null,n=e.length;for(;null===r&&n>0;)r=e[--n];if(null===r)return;for(let t=0;t<this.state.leadingComments.length;t++)this.state.leadingComments[t].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(t,1),t--);const i=[];for(let e=0;e<this.state.leadingComments.length;e++){const r=this.state.leadingComments[e];r.end<t.end?(i.push(r),s||(this.state.leadingComments.splice(e,1),e--)):(void 0===t.trailingComments&&(t.trailingComments=[]),t.trailingComments.push(r))}s&&(this.state.leadingComments=[]),i.length>0?r.trailingComments=i:void 0!==r.trailingComments&&(r.trailingComments=[])}processComment(t){if("Program"===t.type&&t.body.length>0)return;const e=this.state.commentStack;let s,r,n,i,a;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=t.end?(n=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else if(e.length>0){const s=Ft(e);s.trailingComments&&s.trailingComments[0].start>=t.end&&(n=s.trailingComments,delete s.trailingComments)}for(e.length>0&&Ft(e).start>=t.start&&(s=e.pop());e.length>0&&Ft(e).start>=t.start;)r=e.pop();if(!r&&s&&(r=s),s)switch(t.type){case"ObjectExpression":this.adjustCommentsAfterTrailingComma(t,t.properties);break;case"ObjectPattern":this.adjustCommentsAfterTrailingComma(t,t.properties,!0);break;case"CallExpression":this.adjustCommentsAfterTrailingComma(t,t.arguments);break;case"ArrayExpression":this.adjustCommentsAfterTrailingComma(t,t.elements);break;case"ArrayPattern":this.adjustCommentsAfterTrailingComma(t,t.elements,!0)}else this.state.commentPreviousNode&&("ImportSpecifier"===this.state.commentPreviousNode.type&&"ImportSpecifier"!==t.type||"ExportSpecifier"===this.state.commentPreviousNode.type&&"ExportSpecifier"!==t.type)&&this.adjustCommentsAfterTrailingComma(t,[this.state.commentPreviousNode],!0);if(r){if(r.leadingComments)if(r!==t&&r.leadingComments.length>0&&Ft(r.leadingComments).end<=t.start)t.leadingComments=r.leadingComments,delete r.leadingComments;else for(i=r.leadingComments.length-2;i>=0;--i)if(r.leadingComments[i].end<=t.start){t.leadingComments=r.leadingComments.splice(0,i+1);break}}else if(this.state.leadingComments.length>0)if(Ft(this.state.leadingComments).end<=t.start){if(this.state.commentPreviousNode)for(a=0;a<this.state.leadingComments.length;a++)this.state.leadingComments[a].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(a,1),a--);this.state.leadingComments.length>0&&(t.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(i=0;i<this.state.leadingComments.length&&!(this.state.leadingComments[i].end>t.start);i++);const e=this.state.leadingComments.slice(0,i);e.length&&(t.leadingComments=e),0===(n=this.state.leadingComments.slice(i)).length&&(n=null)}this.state.commentPreviousNode=t,n&&(n.length&&n[0].start>=t.start&&Ft(n).end<=t.end?t.innerComments=n:t.trailingComments=n),e.push(t)}}class qt extends Bt{getLocationForPosition(t){let e;return e=t===this.state.start?this.state.startLoc:t===this.state.lastTokStart?this.state.lastTokStartLoc:t===this.state.end?this.state.endLoc:t===this.state.lastTokEnd?this.state.lastTokEndLoc:function(t,e){let s,r=1,n=0;for(H.lastIndex=0;(s=H.exec(t))&&s.index<e;)r++,n=H.lastIndex;return new Rt(r,e-n)}(this.input,t)}raise(t,e,{missingPluginNames:s,code:r}={}){const n=this.getLocationForPosition(t);e+=` (${n.line}:${n.column})`;const i=new SyntaxError(e);throw i.pos=t,i.loc=n,s&&(i.missingPlugin=s),void 0!==r&&(i.code=r),i}}class Ut{constructor(){this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.inParameters=!1,this.maybeInArrowParameters=!1,this.inPipeline=!1,this.inType=!1,this.noAnonFunctionType=!1,this.inPropertyName=!1,this.inClassProperty=!1,this.hasFlowComment=!1,this.isIterator=!1,this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.soloAwait=!1,this.inFSharpPipelineDirectBody=!1,this.classLevel=0,this.labels=[],this.decoratorStack=[[]],this.yieldPos=-1,this.awaitPos=-1,this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.commentPreviousNode=null,this.pos=0,this.lineStart=0,this.type=u.eof,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.lastTokStart=0,this.lastTokEnd=0,this.context=[$.braceStatement],this.exprAllowed=!0,this.containsEsc=!1,this.containsOctal=!1,this.octalPosition=null,this.exportedIdentifiers=[],this.invalidTemplateEscapePosition=null}init(t){this.strict=!1!==t.strictMode&&"module"===t.sourceType,this.curLine=t.startLine,this.startLoc=this.endLoc=this.curPosition()}curPosition(){return new Rt(this.curLine,this.pos-this.lineStart)}clone(t){const e=new Ut,s=Object.keys(this);for(let r=0,n=s.length;r<n;r++){const n=s[r];let i=this[n];!t&&Array.isArray(i)&&(i=i.slice()),e[n]=i}return e}}var Vt=function(t){return t>=48&&t<=57};const zt=new Set(["g","m","s","i","y","u"]),Ht={decBinOct:[46,66,69,79,95,98,101,111],hex:[46,88,95,120]},Jt={bin:[48,49]};Jt.oct=[...Jt.bin,50,51,52,53,54,55],Jt.dec=[...Jt.oct,56,57],Jt.hex=[...Jt.dec,65,66,67,68,69,70,97,98,99,100,101,102];class Wt{constructor(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new It(t.startLoc,t.endLoc)}}class Kt extends qt{constructor(t,e){super(),this.state=new Ut,this.state.init(t),this.input=e,this.length=e.length,this.isLookahead=!1}next(){this.options.tokens&&!this.isLookahead&&this.state.tokens.push(new Wt(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()}eat(t){return!!this.match(t)&&(this.next(),!0)}match(t){return this.state.type===t}lookahead(){const t=this.state;this.state=t.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;const e=this.state;return this.state=t,e}nextTokenStart(){const t=this.state.pos;return W.lastIndex=t,t+W.exec(this.input)[0].length}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}setStrict(t){if(this.state.strict=t,this.match(u.num)||this.match(u.string)){for(this.state.pos=this.state.start;this.state.pos<this.state.lineStart;)this.state.lineStart=this.input.lastIndexOf("\n",this.state.lineStart-2)+1,--this.state.curLine;this.nextToken()}}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){const t=this.curContext();t&&t.preserveSpace||this.skipSpace(),this.state.containsOctal=!1,this.state.octalPosition=null,this.state.start=this.state.pos,this.state.startLoc=this.state.curPosition(),this.state.pos>=this.length?this.finishToken(u.eof):t.override?t.override(this):this.getTokenFromCode(this.input.codePointAt(this.state.pos))}pushComment(t,e,s,r,n,i){const a={type:t?"CommentBlock":"CommentLine",value:e,start:s,end:r,loc:new It(n,i)};this.options.tokens&&this.state.tokens.push(a),this.state.comments.push(a),this.addComment(a)}skipBlockComment(){const t=this.state.curPosition(),e=this.state.pos,s=this.input.indexOf("*/",this.state.pos+2);let r;for(-1===s&&this.raise(e,"Unterminated comment"),this.state.pos=s+2,H.lastIndex=e;(r=H.exec(this.input))&&r.index<this.state.pos;)++this.state.curLine,this.state.lineStart=r.index+r[0].length;this.isLookahead||this.pushComment(!0,this.input.slice(e+2,s),e,this.state.pos,t,this.state.curPosition())}skipLineComment(t){const e=this.state.pos,s=this.state.curPosition();let r=this.input.charCodeAt(this.state.pos+=t);if(this.state.pos<this.length)for(;!J(r)&&++this.state.pos<this.length;)r=this.input.charCodeAt(this.state.pos);this.isLookahead||this.pushComment(!1,this.input.slice(e+t,this.state.pos),e,this.state.pos,s,this.state.curPosition())}skipSpace(){t:for(;this.state.pos<this.length;){const t=this.input.charCodeAt(this.state.pos);switch(t){case 32:case 160:case 9:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++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 t}break;default:if(!K(t))break t;++this.state.pos}}}finishToken(t,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();const s=this.state.type;this.state.type=t,this.state.value=e,this.isLookahead||this.updateContext(s)}readToken_numberSign(){if(0===this.state.pos&&this.readToken_interpreter())return;const t=this.state.pos+1,e=this.input.charCodeAt(t);if(e>=48&&e<=57&&this.raise(this.state.pos,"Unexpected digit after hash token"),(this.hasPlugin("classPrivateProperties")||this.hasPlugin("classPrivateMethods"))&&this.state.classLevel>0)return++this.state.pos,void this.finishToken(u.hash);"smart"===this.getPluginOption("pipelineOperator","proposal")?this.finishOp(u.hash,1):this.raise(this.state.pos,"Unexpected character '#'")}readToken_dot(){const t=this.input.charCodeAt(this.state.pos+1);t>=48&&t<=57?this.readNumber(!0):46===t&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(u.ellipsis)):(++this.state.pos,this.finishToken(u.dot))}readToken_slash(){if(this.state.exprAllowed&&!this.state.inType)return++this.state.pos,void this.readRegexp();61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(u.assign,2):this.finishOp(u.slash,1)}readToken_interpreter(){if(0!==this.state.pos||this.length<2)return!1;const t=this.state.pos;this.state.pos+=1;let e=this.input.charCodeAt(this.state.pos);if(33!==e)return!1;for(;!J(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);const s=this.input.slice(t+2,this.state.pos);return this.finishToken(u.interpreterDirective,s),!0}readToken_mult_modulo(t){let e=42===t?u.star:u.modulo,s=1,r=this.input.charCodeAt(this.state.pos+1);const n=this.state.exprAllowed;42===t&&42===r&&(s++,r=this.input.charCodeAt(this.state.pos+2),e=u.exponent),61!==r||n||(s++,e=u.assign),this.finishOp(e,s)}readToken_pipe_amp(t){const e=this.input.charCodeAt(this.state.pos+1);e!==t?124!==t||62!==e?61!==e?this.finishOp(124===t?u.bitwiseOR:u.bitwiseAND,1):this.finishOp(u.assign,2):this.finishOp(u.pipeline,2):61===this.input.charCodeAt(this.state.pos+2)?this.finishOp(u.assign,3):this.finishOp(124===t?u.logicalOR:u.logicalAND,2)}readToken_caret(){61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(u.assign,2):this.finishOp(u.bitwiseXOR,1)}readToken_plus_min(t){const e=this.input.charCodeAt(this.state.pos+1);if(e===t)return 45!==e||this.inModule||62!==this.input.charCodeAt(this.state.pos+2)||0!==this.state.lastTokEnd&&!z.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?void this.finishOp(u.incDec,2):(this.skipLineComment(3),this.skipSpace(),void this.nextToken());61===e?this.finishOp(u.assign,2):this.finishOp(u.plusMin,1)}readToken_lt_gt(t){const e=this.input.charCodeAt(this.state.pos+1);let s=1;return e===t?(s=62===t&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+s)?void this.finishOp(u.assign,s+1):void this.finishOp(u.bitShift,s)):33!==e||60!==t||this.inModule||45!==this.input.charCodeAt(this.state.pos+2)||45!==this.input.charCodeAt(this.state.pos+3)?(61===e&&(s=2),void this.finishOp(u.relational,s)):(this.skipLineComment(4),this.skipSpace(),void this.nextToken())}readToken_eq_excl(t){const e=this.input.charCodeAt(this.state.pos+1);if(61!==e)return 61===t&&62===e?(this.state.pos+=2,void this.finishToken(u.arrow)):void this.finishOp(61===t?u.eq:u.bang,1);this.finishOp(u.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2)}readToken_question(){const t=this.input.charCodeAt(this.state.pos+1),e=this.input.charCodeAt(this.state.pos+2);63!==t||this.state.inType?46!==t||e>=48&&e<=57?(++this.state.pos,this.finishToken(u.question)):(this.state.pos+=2,this.finishToken(u.questionDot)):61===e?this.finishOp(u.assign,3):this.finishOp(u.nullishCoalescing,2)}getTokenFromCode(t){switch(t){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(u.parenL);case 41:return++this.state.pos,void this.finishToken(u.parenR);case 59:return++this.state.pos,void this.finishToken(u.semi);case 44:return++this.state.pos,void this.finishToken(u.comma);case 91:return++this.state.pos,void this.finishToken(u.bracketL);case 93:return++this.state.pos,void this.finishToken(u.bracketR);case 123:return++this.state.pos,void this.finishToken(u.braceL);case 125:return++this.state.pos,void this.finishToken(u.braceR);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(u.doubleColon,2):(++this.state.pos,this.finishToken(u.colon)));case 63:return void this.readToken_question();case 96:return++this.state.pos,void this.finishToken(u.backQuote);case 48:{const t=this.input.charCodeAt(this.state.pos+1);if(120===t||88===t)return void this.readRadixNumber(16);if(111===t||79===t)return void this.readRadixNumber(8);if(98===t||66===t)return void this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(t);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(t);case 124:case 38:return void this.readToken_pipe_amp(t);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(t);case 60:case 62:return void this.readToken_lt_gt(t);case 61:case 33:return void this.readToken_eq_excl(t);case 126:return void this.finishOp(u.tilde,1);case 64:return++this.state.pos,void this.finishToken(u.at);case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if(ct(t))return void this.readWord()}this.raise(this.state.pos,`Unexpected character '${String.fromCodePoint(t)}'`)}finishOp(t,e){const s=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(t,s)}readRegexp(){const t=this.state.pos;let e,s;for(;;){this.state.pos>=this.length&&this.raise(t,"Unterminated regular expression");const r=this.input.charAt(this.state.pos);if(z.test(r)&&this.raise(t,"Unterminated regular expression"),e)e=!1;else{if("["===r)s=!0;else if("]"===r&&s)s=!1;else if("/"===r&&!s)break;e="\\"===r}++this.state.pos}const r=this.input.slice(t,this.state.pos);++this.state.pos;let n="";for(;this.state.pos<this.length;){const t=this.input[this.state.pos],e=this.input.codePointAt(this.state.pos);if(zt.has(t))n.indexOf(t)>-1&&this.raise(this.state.pos+1,"Duplicate regular expression flag"),++this.state.pos,n+=t;else{if(!pt(e)&&92!==e)break;this.raise(this.state.pos+1,"Invalid regular expression flag")}}this.finishToken(u.regexp,{pattern:r,flags:n})}readInt(t,e,s=!0){const r=this.state.pos,n=16===t?Ht.hex:Ht.decBinOct,i=16===t?Jt.hex:10===t?Jt.dec:8===t?Jt.oct:Jt.bin;let a=0;for(let r=0,o=null==e?1/0:e;r<o;++r){const e=this.input.charCodeAt(this.state.pos);let r;if(this.hasPlugin("numericSeparator")&&95===e){const t=this.input.charCodeAt(this.state.pos-1),e=this.input.charCodeAt(this.state.pos+1);-1===i.indexOf(e)&&this.raise(this.state.pos,"Invalid or unexpected token"),(n.indexOf(t)>-1||n.indexOf(e)>-1||Number.isNaN(e))&&this.raise(this.state.pos,"Invalid or unexpected token"),s||this.raise(this.state.pos,"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences"),++this.state.pos}else{if((r=e>=97?e-97+10:e>=65?e-65+10:Vt(e)?e-48:1/0)>=t)break;++this.state.pos,a=a*t+r}}return this.state.pos===r||null!=e&&this.state.pos-r!==e?null:a}readRadixNumber(t){const e=this.state.pos;let s=!1;this.state.pos+=2;const r=this.readInt(t);if(null==r&&this.raise(this.state.start+2,"Expected number in radix "+t),this.hasPlugin("bigInt")&&110===this.input.charCodeAt(this.state.pos)&&(++this.state.pos,s=!0),ct(this.input.codePointAt(this.state.pos))&&this.raise(this.state.pos,"Identifier directly after number"),s){const t=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");this.finishToken(u.bigint,t)}else this.finishToken(u.num,r)}readNumber(t){const e=this.state.pos;let s=!1,r=!1,n=!1;t||null!==this.readInt(10)||this.raise(e,"Invalid number");let i=this.state.pos-e>=2&&48===this.input.charCodeAt(e);i&&(this.state.strict&&this.raise(e,"Legacy octal literals are not allowed in strict mode"),/[89]/.test(this.input.slice(e,this.state.pos))&&(i=!1,n=!0));let a=this.input.charCodeAt(this.state.pos);if(46!==a||i||(++this.state.pos,this.readInt(10),s=!0,a=this.input.charCodeAt(this.state.pos)),69!==a&&101!==a||i||(43!==(a=this.input.charCodeAt(++this.state.pos))&&45!==a||++this.state.pos,null===this.readInt(10)&&this.raise(e,"Invalid number"),s=!0,a=this.input.charCodeAt(this.state.pos)),this.hasPlugin("numericSeparator")&&(i||n)){const t=this.input.slice(e,this.state.pos).indexOf("_");t>0&&this.raise(t+e,"Numeric separator can not be used after leading 0")}this.hasPlugin("bigInt")&&110===a&&((s||i||n)&&this.raise(e,"Invalid BigIntLiteral"),++this.state.pos,r=!0),ct(this.input.codePointAt(this.state.pos))&&this.raise(this.state.pos,"Identifier directly after number");const o=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");if(r)return void this.finishToken(u.bigint,o);const l=i?parseInt(o,8):parseFloat(o);this.finishToken(u.num,l)}readCodePoint(t){let e;if(123===this.input.charCodeAt(this.state.pos)){const s=++this.state.pos;if(e=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,t),++this.state.pos,null===e)--this.state.invalidTemplateEscapePosition;else if(e>1114111){if(!t)return this.state.invalidTemplateEscapePosition=s-2,null;this.raise(s,"Code point out of bounds")}}else e=this.readHexChar(4,t);return e}readString(t){let e="",s=++this.state.pos;for(;;){this.state.pos>=this.length&&this.raise(this.state.start,"Unterminated string constant");const r=this.input.charCodeAt(this.state.pos);if(r===t)break;92===r?(e+=this.input.slice(s,this.state.pos),e+=this.readEscapedChar(!1),s=this.state.pos):8232===r||8233===r?(++this.state.pos,++this.state.curLine):J(r)?this.raise(this.state.start,"Unterminated string constant"):++this.state.pos}e+=this.input.slice(s,this.state.pos++),this.finishToken(u.string,e)}readTmplToken(){let t="",e=this.state.pos,s=!1;for(;;){this.state.pos>=this.length&&this.raise(this.state.start,"Unterminated template");const r=this.input.charCodeAt(this.state.pos);if(96===r||36===r&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(u.template)?36===r?(this.state.pos+=2,void this.finishToken(u.dollarBraceL)):(++this.state.pos,void this.finishToken(u.backQuote)):(t+=this.input.slice(e,this.state.pos),void this.finishToken(u.template,s?null:t));if(92===r){t+=this.input.slice(e,this.state.pos);const r=this.readEscapedChar(!0);null===r?s=!0:t+=r,e=this.state.pos}else if(J(r)){switch(t+=this.input.slice(e,this.state.pos),++this.state.pos,r){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(r)}++this.state.curLine,this.state.lineStart=this.state.pos,e=this.state.pos}else++this.state.pos}}readEscapedChar(t){const e=!t,s=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,s){case 110:return"\n";case 114:return"\r";case 120:{const t=this.readHexChar(2,e);return null===t?null:String.fromCharCode(t)}case 117:{const t=this.readCodePoint(e);return null===t?null:String.fromCodePoint(t)}case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:this.state.lineStart=this.state.pos,++this.state.curLine;case 8232:case 8233:return"";default:if(s>=48&&s<=55){const e=this.state.pos-1;let s=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.state.pos+=s.length-1;const n=this.input.charCodeAt(this.state.pos);if("0"!==s||56===n||57===n){if(t)return this.state.invalidTemplateEscapePosition=e,null;this.state.strict?this.raise(e,"Octal literal in strict mode"):this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=e)}return String.fromCharCode(r)}return String.fromCharCode(s)}}readHexChar(t,e){const s=this.state.pos,r=this.readInt(16,t,!1);return null===r&&(e?this.raise(s,"Bad character escape sequence"):(this.state.pos=s-1,this.state.invalidTemplateEscapePosition=s-1)),r}readWord1(){let t="";this.state.containsEsc=!1;const e=this.state.pos;let s=this.state.pos;for(;this.state.pos<this.length;){const r=this.input.codePointAt(this.state.pos);if(pt(r))this.state.pos+=r<=65535?1:2;else if(this.state.isIterator&&64===r)++this.state.pos;else{if(92!==r)break;{this.state.containsEsc=!0,t+=this.input.slice(s,this.state.pos);const r=this.state.pos,n=this.state.pos===e?ct:pt;117!==this.input.charCodeAt(++this.state.pos)&&this.raise(this.state.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.state.pos;const i=this.readCodePoint(!0);n(i,!0)||this.raise(r,"Invalid Unicode escape"),t+=String.fromCodePoint(i),s=this.state.pos}}}return t+this.input.slice(s,this.state.pos)}isIterator(t){return"@@iterator"===t||"@@asyncIterator"===t}readWord(){const t=this.readWord1(),e=!this.state.containsEsc&&i.get(t)||u.name;!this.state.isIterator||this.isIterator(t)&&this.state.inType||this.raise(this.state.pos,`Invalid identifier ${t}`),this.finishToken(e,t)}braceIsBlock(t){const e=this.curContext();return e===$.functionExpression||e===$.functionStatement||(t!==u.colon||e!==$.braceStatement&&e!==$.braceExpression?t===u._return||t===u.name&&this.state.exprAllowed?z.test(this.input.slice(this.state.lastTokEnd,this.state.start)):t===u._else||t===u.semi||t===u.eof||t===u.parenR||t===u.arrow||(t===u.braceL?e===$.braceStatement:t!==u._var&&t!==u._const&&t!==u.name&&(t===u.relational||!this.state.exprAllowed)):!e.isExpr)}updateContext(t){const e=this.state.type;let s;!e.keyword||t!==u.dot&&t!==u.questionDot?(s=e.updateContext)?s.call(this,t):this.state.exprAllowed=e.beforeExpr:this.state.exprAllowed=!1}}const Gt=/^('|")((?:\\?.)*?)\1/;class $t extends Kt{addExtra(t,e,s){if(!t)return;(t.extra=t.extra||{})[e]=s}isRelational(t){return this.match(u.relational)&&this.state.value===t}isLookaheadRelational(t){const e=this.nextTokenStart();if(this.input.charAt(e)===t){if(e+1===this.input.length)return!0;const s=this.input.charCodeAt(e+1);return s!==t.charCodeAt(0)&&61!==s}return!1}expectRelational(t){this.isRelational(t)?this.next():this.unexpected(null,u.relational)}eatRelational(t){return!!this.isRelational(t)&&(this.next(),!0)}isContextual(t){return this.match(u.name)&&this.state.value===t&&!this.state.containsEsc}isUnparsedContextual(t,e){const s=t+e.length;return this.input.slice(t,s)===e&&(s===this.input.length||!pt(this.input.charCodeAt(s)))}isLookaheadContextual(t){const e=this.nextTokenStart();return this.isUnparsedContextual(e,t)}eatContextual(t){return this.isContextual(t)&&this.eat(u.name)}expectContextual(t,e){this.eatContextual(t)||this.unexpected(null,e)}canInsertSemicolon(){return this.match(u.eof)||this.match(u.braceR)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return z.test(this.input.slice(this.state.lastTokEnd,this.state.start))}isLineTerminator(){return this.eat(u.semi)||this.canInsertSemicolon()}semicolon(){this.isLineTerminator()||this.unexpected(null,u.semi)}expect(t,e){this.eat(t)||this.unexpected(e,t)}assertNoSpace(t="Unexpected space."){this.state.start>this.state.lastTokEnd&&this.raise(this.state.lastTokEnd,t)}unexpected(t,e="Unexpected token"){throw"string"!=typeof e&&(e=`Unexpected token, expected "${e.label}"`),this.raise(null!=t?t:this.state.start,e)}expectPlugin(t,e){if(!this.hasPlugin(t))throw this.raise(null!=e?e:this.state.start,`This experimental syntax requires enabling the parser plugin: '${t}'`,{missingPluginNames:[t]});return!0}expectOnePlugin(t,e){if(!t.some(t=>this.hasPlugin(t)))throw this.raise(null!=e?e:this.state.start,`This experimental syntax requires enabling one of the following parser plugin(s): '${t.join(", ")}'`,{missingPluginNames:t})}checkYieldAwaitInDefaultParams(){-1!==this.state.yieldPos&&(-1===this.state.awaitPos||this.state.yieldPos<this.state.awaitPos)&&this.raise(this.state.yieldPos,"Yield cannot be used as name inside a generator function"),-1!==this.state.awaitPos&&this.raise(this.state.awaitPos,"Await cannot be used as name inside an async function")}strictDirective(t){for(;;){W.lastIndex=t,t+=W.exec(this.input)[0].length;const e=Gt.exec(this.input.slice(t));if(!e)break;if("use strict"===e[2])return!0;t+=e[0].length,W.lastIndex=t,t+=W.exec(this.input)[0].length,";"===this.input[t]&&t++}return!1}}class Xt{constructor(t,e,s){this.type="",this.start=e,this.end=0,this.loc=new It(s),t&&t.options.ranges&&(this.range=[e,0]),t&&t.filename&&(this.loc.filename=t.filename)}__clone(){const t=new Xt,e=Object.keys(this);for(let s=0,r=e.length;s<r;s++){const r=e[s];"leadingComments"!==r&&"trailingComments"!==r&&"innerComments"!==r&&(t[r]=this[r])}return t}}class Yt extends $t{startNode(){return new Xt(this,this.state.start,this.state.startLoc)}startNodeAt(t,e){return new Xt(this,t,e)}startNodeAtNode(t){return this.startNodeAt(t.start,t.loc.start)}finishNode(t,e){return this.finishNodeAt(t,e,this.state.lastTokEnd,this.state.lastTokEndLoc)}finishNodeAt(t,e,s,r){return t.type=e,t.end=s,t.loc.end=r,this.options.ranges&&(t.range[1]=s),this.processComment(t),t}resetStartLocation(t,e,s){t.start=e,t.loc.start=s,this.options.ranges&&(t.range[0]=e)}resetEndLocation(t,e=this.state.lastTokEnd,s=this.state.lastTokEndLoc){t.end=e,t.loc.end=s,this.options.ranges&&(t.range[1]=e)}resetStartLocationFromNode(t,e){this.resetStartLocation(t,e.start,e.loc.start)}}class Qt extends Yt{toAssignable(t,e,s){var r;if(t)switch(t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":t.type="ObjectPattern";for(let s=0,r=t.properties.length,i=r-1;s<r;s++){var n;const r=t.properties[s],a=s===i;this.toAssignableObjectExpressionProp(r,e,a),a&&"RestElement"===r.type&&(null===(n=t.extra)||void 0===n?void 0:n.trailingComma)&&this.raiseRestNotLast(t.extra.trailingComma)}break;case"ObjectProperty":this.toAssignable(t.value,e,s);break;case"SpreadElement":{this.checkToRestConversion(t),t.type="RestElement";const r=t.argument;this.toAssignable(r,e,s);break}case"ArrayExpression":t.type="ArrayPattern",this.toAssignableList(t.elements,e,s,null===(r=t.extra)||void 0===r?void 0:r.trailingComma);break;case"AssignmentExpression":"="===t.operator?(t.type="AssignmentPattern",delete t.operator):this.raise(t.left.end,"Only '=' operator can be used for specifying default value.");break;case"ParenthesizedExpression":t.expression=this.toAssignable(t.expression,e,s);break;case"MemberExpression":if(!e)break;default:{const e="Invalid left-hand side"+(s?" in "+s:"expression");this.raise(t.start,e)}}return t}toAssignableObjectExpressionProp(t,e,s){if("ObjectMethod"===t.type){const e="get"===t.kind||"set"===t.kind?"Object pattern can't contain getter or setter":"Object pattern can't contain methods";this.raise(t.key.start,e)}else"SpreadElement"!==t.type||s?this.toAssignable(t,e,"object destructuring pattern"):this.raiseRestNotLast(t.start)}toAssignableList(t,e,s,r){let n=t.length;if(n){const i=t[n-1];if(i&&"RestElement"===i.type)--n;else if(i&&"SpreadElement"===i.type){i.type="RestElement";const t=i.argument;this.toAssignable(t,e,s),"Identifier"!==t.type&&"MemberExpression"!==t.type&&"ArrayPattern"!==t.type&&"ObjectPattern"!==t.type&&this.unexpected(t.start),r&&this.raiseTrailingCommaAfterRest(r),--n}}for(let r=0;r<n;r++){const n=t[r];n&&(this.toAssignable(n,e,s),"RestElement"===n.type&&this.raiseRestNotLast(n.start))}return t}toReferencedList(t,e){return t}toReferencedListDeep(t,e){this.toReferencedList(t,e);for(let e=0;e<t.length;e++){const s=t[e];s&&"ArrayExpression"===s.type&&this.toReferencedListDeep(s.elements)}return t}parseSpread(t,e){const s=this.startNode();return this.next(),s.argument=this.parseMaybeAssign(!1,t,void 0,e),this.finishNode(s,"SpreadElement")}parseRestBinding(){const t=this.startNode();return this.next(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")}parseBindingAtom(){switch(this.state.type){case u.bracketL:{const t=this.startNode();return this.next(),t.elements=this.parseBindingList(u.bracketR,93,!0),this.finishNode(t,"ArrayPattern")}case u.braceL:return this.parseObj(!0)}return this.parseIdentifier()}parseBindingList(t,e,s,r){const n=[];let i=!0;for(;!this.eat(t);)if(i?i=!1:this.expect(u.comma),s&&this.match(u.comma))n.push(null);else{if(this.eat(t))break;if(this.match(u.ellipsis)){n.push(this.parseAssignableListItemTypes(this.parseRestBinding())),this.checkCommaAfterRest(e),this.expect(t);break}{const t=[];for(this.match(u.at)&&this.hasPlugin("decorators")&&this.raise(this.state.start,"Stage 2 decorators cannot be used to decorate parameters");this.match(u.at);)t.push(this.parseDecorator());n.push(this.parseAssignableListItem(r,t))}}return n}parseAssignableListItem(t,e){const s=this.parseMaybeDefault();this.parseAssignableListItemTypes(s);const r=this.parseMaybeDefault(s.start,s.loc.start,s);return e.length&&(s.decorators=e),r}parseAssignableListItemTypes(t){return t}parseMaybeDefault(t,e,s){if(e=e||this.state.startLoc,t=t||this.state.start,s=s||this.parseBindingAtom(),!this.eat(u.eq))return s;const r=this.startNodeAt(t,e);return r.left=s,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")}checkLVal(t,e=F,s,r){switch(t.type){case"Identifier":if(this.state.strict&&et(t.name,this.inModule)&&this.raise(t.start,`${e===F?"Assigning to":"Binding"} '${t.name}' in strict mode`),s){const e=`_${t.name}`;s[e]?this.raise(t.start,"Argument name clash"):s[e]=!0}e===N&&"let"===t.name&&this.raise(t.start,"'let' is not allowed to be used as a name in 'let' or 'const' declarations."),e&F||this.scope.declareName(t.name,e,t.start);break;case"MemberExpression":e!==F&&this.raise(t.start,"Binding member expression");break;case"ObjectPattern":for(let r=0,n=t.properties;r<n.length;r++){let t=n[r];"ObjectProperty"===t.type&&(t=t.value),this.checkLVal(t,e,s,"object destructuring pattern")}break;case"ArrayPattern":for(let r=0,n=t.elements;r<n.length;r++){const t=n[r];t&&this.checkLVal(t,e,s,"array destructuring pattern")}break;case"AssignmentPattern":this.checkLVal(t.left,e,s,"assignment pattern");break;case"RestElement":this.checkLVal(t.argument,e,s,"rest element");break;case"ParenthesizedExpression":this.checkLVal(t.expression,e,s,"parenthesized expression");break;default:{const s=(e===F?"Invalid":"Binding invalid")+" left-hand side"+(r?" in "+r:"expression");this.raise(t.start,s)}}}checkToRestConversion(t){"Identifier"!==t.argument.type&&"MemberExpression"!==t.argument.type&&this.raise(t.argument.start,"Invalid rest operator's argument")}checkCommaAfterRest(t){this.match(u.comma)&&(this.lookaheadCharCode()===t?this.raiseTrailingCommaAfterRest(this.state.start):this.raiseRestNotLast(this.state.start))}raiseRestNotLast(t){this.raise(t,"Rest element must be last element")}raiseTrailingCommaAfterRest(t){this.raise(t,"Unexpected trailing comma after rest element")}}const Zt=t=>"ParenthesizedExpression"===t.type?Zt(t.expression):t;class te extends Qt{checkPropClash(t,e){if("SpreadElement"===t.type||t.computed||t.kind||t.shorthand)return;const s=t.key;"__proto__"===("Identifier"===s.type?s.name:String(s.value))&&(e.proto&&this.raise(s.start,"Redefinition of __proto__ property"),e.proto=!0)}getExpression(){this.scope.enter(h),this.nextToken();const t=this.parseExpression();return this.match(u.eof)||this.unexpected(),t.comments=this.state.comments,t}parseExpression(t,e){const s=this.state.start,r=this.state.startLoc,n=this.parseMaybeAssign(t,e);if(this.match(u.comma)){const i=this.startNodeAt(s,r);for(i.expressions=[n];this.eat(u.comma);)i.expressions.push(this.parseMaybeAssign(t,e));return this.toReferencedList(i.expressions),this.finishNode(i,"SequenceExpression")}return n}parseMaybeAssign(t,e,s,r){const n=this.state.start,i=this.state.startLoc;if(this.isContextual("yield")){if(this.scope.inGenerator){let e=this.parseYield(t);return s&&(e=s.call(this,e,n,i)),e}this.state.exprAllowed=!1}let a;e?a=!1:(e={start:0},a=!0),(this.match(u.parenL)||this.match(u.name))&&(this.state.potentialArrowAt=this.state.start);let o=this.parseMaybeConditional(t,e,r);if(s&&(o=s.call(this,o,n,i)),this.state.type.isAssign){const s=this.startNodeAt(n,i),r=this.state.value;s.operator=r,"??="===r&&(this.expectPlugin("nullishCoalescingOperator"),this.expectPlugin("logicalAssignment")),"||="!==r&&"&&="!==r||this.expectPlugin("logicalAssignment"),s.left=this.match(u.eq)?this.toAssignable(o,void 0,"assignment expression"):o,e.start=0,this.checkLVal(o,void 0,void 0,"assignment expression");const a=Zt(o);let l;return"ObjectPattern"===a.type?l="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===a.type&&(l="`([a]) = 0` use `([a] = 0)`"),l&&(o.extra&&o.extra.parenthesized||"ParenthesizedExpression"===o.type)&&this.raise(a.start,`You're trying to assign to a parenthesized expression, eg. instead of ${l}`),this.next(),s.right=this.parseMaybeAssign(t),this.finishNode(s,"AssignmentExpression")}return a&&e.start&&this.unexpected(e.start),o}parseMaybeConditional(t,e,s){const r=this.state.start,n=this.state.startLoc,i=this.state.potentialArrowAt,a=this.parseExprOps(t,e);return"ArrowFunctionExpression"===a.type&&a.start===i?a:e&&e.start?a:this.parseConditional(a,t,r,n,s)}parseConditional(t,e,s,r,n){if(this.eat(u.question)){const n=this.startNodeAt(s,r);return n.test=t,n.consequent=this.parseMaybeAssign(),this.expect(u.colon),n.alternate=this.parseMaybeAssign(e),this.finishNode(n,"ConditionalExpression")}return t}parseExprOps(t,e){const s=this.state.start,r=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseMaybeUnary(e);return"ArrowFunctionExpression"===i.type&&i.start===n?i:e&&e.start?i:this.parseExprOp(i,s,r,-1,t)}parseExprOp(t,e,s,r,n){const i=this.state.type.binop;if(!(null==i||n&&this.match(u._in))&&i>r){const a=this.state.value;if("|>"===a&&this.state.inFSharpPipelineDirectBody)return t;const o=this.startNodeAt(e,s);o.left=t,o.operator=a,"**"!==a||"UnaryExpression"!==t.type||!this.options.createParenthesizedExpressions&&t.extra&&t.extra.parenthesized||this.raise(t.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");const l=this.state.type;if(l===u.pipeline?(this.expectPlugin("pipelineOperator"),this.state.inPipeline=!0,this.checkPipelineAtInfixOperator(t,e)):l===u.nullishCoalescing&&this.expectPlugin("nullishCoalescingOperator"),this.next(),l===u.pipeline&&"minimal"===this.getPluginOption("pipelineOperator","proposal")&&this.match(u.name)&&"await"===this.state.value&&this.scope.inAsync)throw this.raise(this.state.start,'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal');if(o.right=this.parseExprOpRightExpr(l,i,n),l===u.nullishCoalescing){if(!("LogicalExpression"!==t.type||"??"===t.operator||t.extra&&t.extra.parenthesized))throw this.raise(t.start,"Nullish coalescing operator(??) requires parens when mixing with logical operators");if(!("LogicalExpression"!==o.right.type||"??"===o.right.operator||o.right.extra&&o.right.extra.parenthesized))throw this.raise(o.right.start,"Nullish coalescing operator(??) requires parens when mixing with logical operators")}return this.finishNode(o,l===u.logicalOR||l===u.logicalAND||l===u.nullishCoalescing?"LogicalExpression":"BinaryExpression"),this.parseExprOp(o,e,s,r,n)}return t}parseExprOpRightExpr(t,e,s){const r=this.state.start,n=this.state.startLoc;switch(t){case u.pipeline:switch(this.getPluginOption("pipelineOperator","proposal")){case"smart":return this.withTopicPermittingContext(()=>this.parseSmartPipelineBody(this.parseExprOpBaseRightExpr(t,e,s),r,n));case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(e,s))}default:return this.parseExprOpBaseRightExpr(t,e,s)}}parseExprOpBaseRightExpr(t,e,s){const r=this.state.start,n=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnary(),r,n,t.rightAssociative?e-1:e,s)}parseMaybeUnary(t){if(this.isContextual("await")&&this.isAwaitAllowed())return this.parseAwait();if(this.state.type.prefix){const e=this.startNode(),s=this.match(u.incDec);if(e.operator=this.state.value,e.prefix=!0,"throw"===e.operator&&this.expectPlugin("throwExpressions"),this.next(),e.argument=this.parseMaybeUnary(),t&&t.start&&this.unexpected(t.start),s)this.checkLVal(e.argument,void 0,void 0,"prefix operation");else if(this.state.strict&&"delete"===e.operator){const t=e.argument;"Identifier"===t.type?this.raise(e.start,"Deleting local variable in strict mode"):"MemberExpression"===t.type&&"PrivateName"===t.property.type&&this.raise(e.start,"Deleting a private field is not allowed")}return this.finishNode(e,s?"UpdateExpression":"UnaryExpression")}const e=this.state.start,s=this.state.startLoc;let r=this.parseExprSubscripts(t);if(t&&t.start)return r;for(;this.state.type.postfix&&!this.canInsertSemicolon();){const t=this.startNodeAt(e,s);t.operator=this.state.value,t.prefix=!1,t.argument=r,this.checkLVal(r,void 0,void 0,"postfix operation"),this.next(),r=this.finishNode(t,"UpdateExpression")}return r}parseExprSubscripts(t){const e=this.state.start,s=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseExprAtom(t);return"ArrowFunctionExpression"===n.type&&n.start===r?n:t&&t.start?n:this.parseSubscripts(n,e,s)}parseSubscripts(t,e,s,r){const n={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsync(t),stop:!1};do{t=this.parseSubscript(t,e,s,r,n),n.maybeAsyncArrow=!1}while(!n.stop);return t}parseSubscript(t,e,s,r,n){if(!r&&this.eat(u.doubleColon)){const i=this.startNodeAt(e,s);return i.object=t,i.callee=this.parseNoCallExpr(),n.stop=!0,this.parseSubscripts(this.finishNode(i,"BindExpression"),e,s,r)}if(this.match(u.questionDot)){if(this.expectPlugin("optionalChaining"),n.optionalChainMember=!0,r&&40===this.lookaheadCharCode())return n.stop=!0,t;this.next();const i=this.startNodeAt(e,s);return this.eat(u.bracketL)?(i.object=t,i.property=this.parseExpression(),i.computed=!0,i.optional=!0,this.expect(u.bracketR),this.finishNode(i,"OptionalMemberExpression")):this.eat(u.parenL)?(i.callee=t,i.arguments=this.parseCallExpressionArguments(u.parenR,!1),i.optional=!0,this.finishNode(i,"OptionalCallExpression")):(i.object=t,i.property=this.parseIdentifier(!0),i.computed=!1,i.optional=!0,this.finishNode(i,"OptionalMemberExpression"))}if(this.eat(u.dot)){const r=this.startNodeAt(e,s);return r.object=t,r.property=this.parseMaybePrivateName(),r.computed=!1,"PrivateName"===r.property.type&&"Super"===r.object.type&&this.raise(e,"Private fields can't be accessed on super"),n.optionalChainMember?(r.optional=!1,this.finishNode(r,"OptionalMemberExpression")):this.finishNode(r,"MemberExpression")}if(this.eat(u.bracketL)){const r=this.startNodeAt(e,s);return r.object=t,r.property=this.parseExpression(),r.computed=!0,this.expect(u.bracketR),n.optionalChainMember?(r.optional=!1,this.finishNode(r,"OptionalMemberExpression")):this.finishNode(r,"MemberExpression")}if(!r&&this.match(u.parenL)){const r=this.state.maybeInArrowParameters,i=this.state.yieldPos,a=this.state.awaitPos;this.state.maybeInArrowParameters=!0,this.state.yieldPos=-1,this.state.awaitPos=-1,this.next();let o=this.startNodeAt(e,s);return o.callee=t,o.arguments=this.parseCallExpressionArguments(u.parenR,n.maybeAsyncArrow,"Import"===t.type,"Super"!==t.type,o),n.optionalChainMember?this.finishOptionalCallExpression(o):this.finishCallExpression(o),n.maybeAsyncArrow&&this.shouldParseAsyncArrow()?(n.stop=!0,o=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e,s),o),this.checkYieldAwaitInDefaultParams(),this.state.yieldPos=i,this.state.awaitPos=a):(this.toReferencedListDeep(o.arguments),-1!==i&&(this.state.yieldPos=i),(this.isAwaitAllowed()||r)&&-1===a||(this.state.awaitPos=a)),this.state.maybeInArrowParameters=r,o}return this.match(u.backQuote)?this.parseTaggedTemplateExpression(e,s,t,n):(n.stop=!0,t)}parseTaggedTemplateExpression(t,e,s,r,n){const i=this.startNodeAt(t,e);return i.tag=s,i.quasi=this.parseTemplate(!0),n&&(i.typeParameters=n),r.optionalChainMember&&this.raise(t,"Tagged Template Literals are not allowed in optionalChain"),this.finishNode(i,"TaggedTemplateExpression")}atPossibleAsync(t){return"Identifier"===t.type&&"async"===t.name&&this.state.lastTokEnd===t.end&&!this.canInsertSemicolon()&&"async"===this.input.slice(t.start,t.end)}finishCallExpression(t){if("Import"===t.callee.type){1!==t.arguments.length&&this.raise(t.start,"import() requires exactly one argument");const e=t.arguments[0];e&&"SpreadElement"===e.type&&this.raise(e.start,"... is not allowed in import()")}return this.finishNode(t,"CallExpression")}finishOptionalCallExpression(t){if("Import"===t.callee.type){1!==t.arguments.length&&this.raise(t.start,"import() requires exactly one argument");const e=t.arguments[0];e&&"SpreadElement"===e.type&&this.raise(e.start,"... is not allowed in import()")}return this.finishNode(t,"OptionalCallExpression")}parseCallExpressionArguments(t,e,s,r,n){const i=[];let a,o=!0;const l=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(t);){if(o)o=!1;else if(this.expect(u.comma),this.match(t)){s&&this.raise(this.state.lastTokStart,"Trailing comma is disallowed inside import(...) arguments"),n&&this.addExtra(n,"trailingComma",this.state.lastTokStart),this.next();break}this.match(u.parenL)&&!a&&(a=this.state.start),i.push(this.parseExprListItem(!1,e?{start:0}:void 0,e?{start:0}:void 0,r))}return e&&a&&this.shouldParseAsyncArrow()&&this.unexpected(),this.state.inFSharpPipelineDirectBody=l,i}shouldParseAsyncArrow(){return this.match(u.arrow)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,e){var s;return this.expect(u.arrow),this.parseArrowExpression(t,e.arguments,!0,null===(s=e.extra)||void 0===s?void 0:s.trailingComma),t}parseNoCallExpr(){const t=this.state.start,e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,e,!0)}parseExprAtom(t){this.state.type===u.slash&&this.readRegexp();const e=this.state.potentialArrowAt===this.state.start;let s;switch(this.state.type){case u._super:return this.scope.allowSuper||this.options.allowSuperOutsideMethod||this.raise(this.state.start,"super is only allowed in object methods and classes"),s=this.startNode(),this.next(),!this.match(u.parenL)||this.scope.allowDirectSuper||this.options.allowSuperOutsideMethod||this.raise(s.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?"),this.match(u.parenL)||this.match(u.bracketL)||this.match(u.dot)||this.unexpected(),this.finishNode(s,"Super");case u._import:return s=this.startNode(),this.next(),this.match(u.dot)?this.parseImportMetaProperty(s):(this.expectPlugin("dynamicImport",s.start),this.match(u.parenL)||this.unexpected(null,u.parenL),this.finishNode(s,"Import"));case u._this:return s=this.startNode(),this.next(),this.finishNode(s,"ThisExpression");case u.name:{s=this.startNode();const t=this.state.containsEsc,r=this.parseIdentifier();if(!t&&"async"===r.name&&this.match(u._function)&&!this.canInsertSemicolon())return this.next(),this.parseFunction(s,void 0,!0);if(e&&!t&&"async"===r.name&&this.match(u.name)&&!this.canInsertSemicolon()){const t=[this.parseIdentifier()];return this.expect(u.arrow),this.parseArrowExpression(s,t,!0),s}return e&&this.match(u.arrow)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(s,[r],!1),s):r}case u._do:{this.expectPlugin("doExpressions");const t=this.startNode();this.next();const e=this.state.labels;return this.state.labels=[],t.body=this.parseBlock(),this.state.labels=e,this.finishNode(t,"DoExpression")}case u.regexp:{const t=this.state.value;return(s=this.parseLiteral(t.value,"RegExpLiteral")).pattern=t.pattern,s.flags=t.flags,s}case u.num:return this.parseLiteral(this.state.value,"NumericLiteral");case u.bigint:return this.parseLiteral(this.state.value,"BigIntLiteral");case u.string:return this.parseLiteral(this.state.value,"StringLiteral");case u._null:return s=this.startNode(),this.next(),this.finishNode(s,"NullLiteral");case u._true:case u._false:return this.parseBooleanLiteral();case u.parenL:return this.parseParenAndDistinguishExpression(e);case u.bracketL:{const e=this.state.inFSharpPipelineDirectBody;return this.state.inFSharpPipelineDirectBody=!1,s=this.startNode(),this.next(),s.elements=this.parseExprList(u.bracketR,!0,t,s),this.state.maybeInArrowParameters||this.toReferencedList(s.elements),this.state.inFSharpPipelineDirectBody=e,this.finishNode(s,"ArrayExpression")}case u.braceL:{const e=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const s=this.parseObj(!1,t);return this.state.inFSharpPipelineDirectBody=e,s}case u._function:return this.parseFunctionExpression();case u.at:this.parseDecorators();case u._class:return s=this.startNode(),this.takeDecorators(s),this.parseClass(s,!1);case u._new:return this.parseNew();case u.backQuote:return this.parseTemplate(!1);case u.doubleColon:{s=this.startNode(),this.next(),s.object=null;const t=s.callee=this.parseNoCallExpr();if("MemberExpression"===t.type)return this.finishNode(s,"BindExpression");throw this.raise(t.start,"Binding should be performed on object property.")}case u.hash:if(this.state.inPipeline){if(s=this.startNode(),"smart"!==this.getPluginOption("pipelineOperator","proposal")&&this.raise(s.start,"Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option."),this.next(),this.primaryTopicReferenceIsAllowedInCurrentTopicContext())return this.registerTopicReference(),this.finishNode(s,"PipelinePrimaryTopicReference");throw this.raise(s.start,"Topic reference was used in a lexical context without topic binding")}default:throw this.unexpected()}}parseBooleanLiteral(){const t=this.startNode();return t.value=this.match(u._true),this.next(),this.finishNode(t,"BooleanLiteral")}parseMaybePrivateName(){if(this.match(u.hash)){this.expectOnePlugin(["classPrivateProperties","classPrivateMethods"]);const t=this.startNode();return this.next(),this.assertNoSpace("Unexpected space between # and identifier"),t.id=this.parseIdentifier(!0),this.finishNode(t,"PrivateName")}return this.parseIdentifier(!0)}parseFunctionExpression(){const t=this.startNode();let e=this.startNode();return this.next(),e=this.createIdentifier(e,"function"),this.scope.inGenerator&&this.eat(u.dot)?this.parseMetaProperty(t,e,"sent"):this.parseFunction(t)}parseMetaProperty(t,e,s){t.meta=e,"function"===e.name&&"sent"===s&&(this.isContextual(s)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected());const r=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==s||r)&&this.raise(t.property.start,`The only valid meta property for ${e.name} is ${e.name}.${s}`),this.finishNode(t,"MetaProperty")}parseImportMetaProperty(t){const e=this.createIdentifier(this.startNodeAtNode(t),"import");return this.expect(u.dot),this.isContextual("meta")?this.expectPlugin("importMeta"):this.hasPlugin("importMeta")||this.raise(e.start,"Dynamic imports require a parameter: import('a.js')"),this.inModule||this.raise(e.start,"import.meta may appear only with 'sourceType: \"module\"'",{code:"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"}),this.sawUnambiguousESM=!0,this.parseMetaProperty(t,e,"meta")}parseLiteral(t,e,s,r){s=s||this.state.start,r=r||this.state.startLoc;const n=this.startNodeAt(s,r);return this.addExtra(n,"rawValue",t),this.addExtra(n,"raw",this.input.slice(s,this.state.end)),n.value=t,this.next(),this.finishNode(n,e)}parseParenAndDistinguishExpression(t){const e=this.state.start,s=this.state.startLoc;let r;this.expect(u.parenL);const n=this.state.maybeInArrowParameters,i=this.state.yieldPos,a=this.state.awaitPos,o=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.yieldPos=-1,this.state.awaitPos=-1,this.state.inFSharpPipelineDirectBody=!1;const l=this.state.start,h=this.state.startLoc,c=[],p={start:0},d={start:0};let f,y,v=!0;for(;!this.match(u.parenR);){if(v)v=!1;else if(this.expect(u.comma,d.start||null),this.match(u.parenR)){y=this.state.start;break}if(this.match(u.ellipsis)){const t=this.state.start,e=this.state.startLoc;f=this.state.start,c.push(this.parseParenItem(this.parseRestBinding(),t,e)),this.checkCommaAfterRest(41);break}c.push(this.parseMaybeAssign(!1,p,this.parseParenItem,d))}const m=this.state.start,g=this.state.startLoc;this.expect(u.parenR),this.state.maybeInArrowParameters=n,this.state.inFSharpPipelineDirectBody=o;let x=this.startNodeAt(e,s);if(t&&this.shouldParseArrow()&&(x=this.parseArrow(x))){this.checkYieldAwaitInDefaultParams(),this.state.yieldPos=i,this.state.awaitPos=a;for(let t=0;t<c.length;t++){const e=c[t];e.extra&&e.extra.parenthesized&&this.unexpected(e.extra.parenStart)}return this.parseArrowExpression(x,c,!1),x}if(-1!==i&&(this.state.yieldPos=i),-1!==a&&(this.state.awaitPos=a),c.length||this.unexpected(this.state.lastTokStart),y&&this.unexpected(y),f&&this.unexpected(f),p.start&&this.unexpected(p.start),d.start&&this.unexpected(d.start),this.toReferencedListDeep(c,!0),c.length>1?((r=this.startNodeAt(l,h)).expressions=c,this.finishNodeAt(r,"SequenceExpression",m,g)):r=c[0],!this.options.createParenthesizedExpressions)return this.addExtra(r,"parenthesized",!0),this.addExtra(r,"parenStart",e),r;const b=this.startNodeAt(e,s);return b.expression=r,this.finishNode(b,"ParenthesizedExpression"),b}shouldParseArrow(){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(u.arrow))return t}parseParenItem(t,e,s){return t}parseNew(){const t=this.startNode(),e=this.parseIdentifier(!0);if(this.eat(u.dot)){const s=this.parseMetaProperty(t,e,"target");if(!this.scope.inNonArrowFunction&&!this.state.inClassProperty){let t="new.target can only be used in functions";this.hasPlugin("classProperties")&&(t+=" or class properties"),this.raise(s.start,t)}return s}return t.callee=this.parseNoCallExpr(),"Import"===t.callee.type?this.raise(t.callee.start,"Cannot use new with import(...)"):"OptionalMemberExpression"===t.callee.type||"OptionalCallExpression"===t.callee.type?this.raise(this.state.lastTokEnd,"constructors in/after an Optional Chain are not allowed"):this.eat(u.questionDot)&&this.raise(this.state.start,"constructors in/after an Optional Chain are not allowed"),this.parseNewArguments(t),this.finishNode(t,"NewExpression")}parseNewArguments(t){if(this.eat(u.parenL)){const e=this.parseExprList(u.parenR);this.toReferencedList(e),t.arguments=e}else t.arguments=[]}parseTemplateElement(t){const e=this.startNode();return null===this.state.value&&(t?this.state.invalidTemplateEscapePosition=null:this.raise(this.state.invalidTemplateEscapePosition||0,"Invalid escape sequence in template")),e.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),e.tail=this.match(u.backQuote),this.finishNode(e,"TemplateElement")}parseTemplate(t){const e=this.startNode();this.next(),e.expressions=[];let s=this.parseTemplateElement(t);for(e.quasis=[s];!s.tail;)this.expect(u.dollarBraceL),e.expressions.push(this.parseExpression()),this.expect(u.braceR),e.quasis.push(s=this.parseTemplateElement(t));return this.next(),this.finishNode(e,"TemplateLiteral")}parseObj(t,e){const s=Object.create(null);let r=!0;const n=this.startNode();for(n.properties=[],this.next();!this.eat(u.braceR);){if(r)r=!1;else if(this.expect(u.comma),this.match(u.braceR)){this.addExtra(n,"trailingComma",this.state.lastTokStart),this.next();break}const i=this.parseObjectMember(t,e);t||this.checkPropClash(i,s),i.shorthand&&this.addExtra(i,"shorthand",!0),n.properties.push(i)}return this.finishNode(n,t?"ObjectPattern":"ObjectExpression")}isAsyncProp(t){return!t.computed&&"Identifier"===t.key.type&&"async"===t.key.name&&(this.match(u.name)||this.match(u.num)||this.match(u.string)||this.match(u.bracketL)||this.state.type.keyword||this.match(u.star))&&!this.hasPrecedingLineBreak()}parseObjectMember(t,e){let s=[];if(this.match(u.at))if(this.hasPlugin("decorators"))this.raise(this.state.start,"Stage 2 decorators disallow object literal property decorators");else for(;this.match(u.at);)s.push(this.parseDecorator());const r=this.startNode();let n,i,a=!1,o=!1;if(this.match(u.ellipsis))return s.length&&this.unexpected(),t?(this.next(),r.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(r,"RestElement")):this.parseSpread();s.length&&(r.decorators=s,s=[]),r.method=!1,(t||e)&&(n=this.state.start,i=this.state.startLoc),t||(a=this.eat(u.star));const l=this.state.containsEsc;return this.parsePropertyName(r),t||l||a||!this.isAsyncProp(r)?o=!1:(o=!0,a=this.eat(u.star),this.parsePropertyName(r)),this.parseObjPropValue(r,n,i,a,o,t,e,l),r}isGetterOrSetterMethod(t,e){return!e&&!t.computed&&"Identifier"===t.key.type&&("get"===t.key.name||"set"===t.key.name)&&(this.match(u.string)||this.match(u.num)||this.match(u.bracketL)||this.match(u.name)||!!this.state.type.keyword)}getGetterSetterExpectedParamCount(t){return"get"===t.kind?0:1}checkGetterSetterParams(t){const e=this.getGetterSetterExpectedParamCount(t),s=t.start;t.params.length!==e&&("get"===t.kind?this.raise(s,"getter must not have any formal parameters"):this.raise(s,"setter must have exactly one formal parameter")),"set"===t.kind&&"RestElement"===t.params[t.params.length-1].type&&this.raise(s,"setter function argument must not be a rest parameter")}parseObjectMethod(t,e,s,r,n){return s||e||this.match(u.parenL)?(r&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")):!n&&this.isGetterOrSetterMethod(t,r)?((e||s)&&this.unexpected(),t.kind=t.key.name,this.parsePropertyName(t),this.parseMethod(t,!1,!1,!1,!1,"ObjectMethod"),this.checkGetterSetterParams(t),t):void 0}parseObjectProperty(t,e,s,r,n){return t.shorthand=!1,this.eat(u.colon)?(t.value=r?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,n),this.finishNode(t,"ObjectProperty")):t.computed||"Identifier"!==t.key.type?void 0:(this.checkReservedWord(t.key.name,t.key.start,!0,!0),r?t.value=this.parseMaybeDefault(e,s,t.key.__clone()):this.match(u.eq)&&n?(n.start||(n.start=this.state.start),t.value=this.parseMaybeDefault(e,s,t.key.__clone())):t.value=t.key.__clone(),t.shorthand=!0,this.finishNode(t,"ObjectProperty"))}parseObjPropValue(t,e,s,r,n,i,a,o){const u=this.parseObjectMethod(t,r,n,i,o)||this.parseObjectProperty(t,e,s,i,a);return u||this.unexpected(),u}parsePropertyName(t){if(this.eat(u.bracketL))t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(u.bracketR);else{const e=this.state.inPropertyName;this.state.inPropertyName=!0,t.key=this.match(u.num)||this.match(u.string)?this.parseExprAtom():this.parseMaybePrivateName(),"PrivateName"!==t.key.type&&(t.computed=!1),this.state.inPropertyName=e}return t.key}initFunction(t,e){t.id=null,t.generator=!1,t.async=!!e}parseMethod(t,e,s,r,n,i,a=!1){const o=this.state.yieldPos,u=this.state.awaitPos;this.state.yieldPos=-1,this.state.awaitPos=-1,this.initFunction(t,s),t.generator=!!e;const l=r;return this.scope.enter(b(s,t.generator)|v|(a?g:0)|(n?m:0)),this.parseFunctionParams(t,l),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBodyAndFinish(t,i,!0),this.scope.exit(),this.state.yieldPos=o,this.state.awaitPos=u,t}parseArrowExpression(t,e,s,r){this.scope.enter(b(s,!1)|f),this.initFunction(t,s);const n=this.state.maybeInArrowParameters,i=this.state.yieldPos,a=this.state.awaitPos;return this.state.maybeInArrowParameters=!1,this.state.yieldPos=-1,this.state.awaitPos=-1,e&&this.setArrowFunctionParameters(t,e,r),this.parseFunctionBody(t,!0),this.scope.exit(),this.state.maybeInArrowParameters=n,this.state.yieldPos=i,this.state.awaitPos=a,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,e,s){t.params=this.toAssignableList(e,!0,"arrow function parameters",s)}isStrictBody(t){if("BlockStatement"===t.body.type&&t.body.directives.length)for(let e=0,s=t.body.directives;e<s.length;e++){if("use strict"===s[e].value.value)return!0}return!1}parseFunctionBodyAndFinish(t,e,s=!1){this.parseFunctionBody(t,!1,s),this.finishNode(t,e)}parseFunctionBody(t,e,s=!1){const r=e&&!this.match(u.braceL),n=this.state.strict;let i=!1;const a=this.state.inParameters;if(this.state.inParameters=!1,r)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e);else{const r=!this.isSimpleParamList(t.params);if((!n||r)&&(i=this.strictDirective(this.state.end))&&r){const e="method"!==t.kind&&"constructor"!==t.kind||!t.key?t.start:t.key.end;this.raise(e,"Illegal 'use strict' directive in function with non-simple parameter list")}const a=this.state.labels;this.state.labels=[],i&&(this.state.strict=!0),this.checkParams(t,!(n||i||e||s||r),e),t.body=this.parseBlock(!0,!1),this.state.labels=a}this.state.inParameters=a,this.state.strict&&t.id&&this.checkLVal(t.id,B,void 0,"function name"),this.state.strict=n}isSimpleParamList(t){for(let e=0,s=t.length;e<s;e++)if("Identifier"!==t[e].type)return!1;return!0}checkParams(t,e,s){const r=Object.create(null);for(let s=0;s<t.params.length;s++)this.checkLVal(t.params[s],j,e?null:r,"function parameter list")}parseExprList(t,e,s,r){const n=[];let i=!0;for(;!this.eat(t);){if(i)i=!1;else if(this.expect(u.comma),this.match(t)){r&&this.addExtra(r,"trailingComma",this.state.lastTokStart),this.next();break}n.push(this.parseExprListItem(e,s))}return n}parseExprListItem(t,e,s,r){let n;if(t&&this.match(u.comma))n=null;else if(this.match(u.ellipsis)){const t=this.state.start,r=this.state.startLoc;n=this.parseParenItem(this.parseSpread(e,s),t,r)}else if(this.match(u.question)){this.expectPlugin("partialApplication"),r||this.raise(this.state.start,"Unexpected argument placeholder");const t=this.startNode();this.next(),n=this.finishNode(t,"ArgumentPlaceholder")}else n=this.parseMaybeAssign(!1,e,this.parseParenItem,s);return n}parseIdentifier(t){const e=this.startNode(),s=this.parseIdentifierName(e.start,t);return this.createIdentifier(e,s)}createIdentifier(t,e){return t.name=e,t.loc.identifierName=e,this.finishNode(t,"Identifier")}parseIdentifierName(t,e){let s;if(this.match(u.name))s=this.state.value,!e&&this.state.containsEsc&&st(s)&&this.raise(this.state.pos,`Escape sequence in keyword ${s}`);else{if(!this.state.type.keyword)throw this.unexpected();"class"!==(s=this.state.type.keyword)&&"function"!==s||this.state.lastTokEnd===this.state.lastTokStart+1&&46===this.input.charCodeAt(this.state.lastTokStart)||this.state.context.pop()}return e||this.checkReservedWord(s,this.state.start,!!this.state.type.keyword,!1),this.next(),s}checkReservedWord(t,e,s,r){this.scope.inGenerator&&"yield"===t&&this.raise(e,"Can not use 'yield' as identifier inside a generator"),"await"===t&&(this.scope.inAsync?this.raise(e,"Can not use 'await' as identifier inside an async function"):-1===this.state.awaitPos&&(this.state.maybeInArrowParameters||this.isAwaitAllowed())&&(this.state.awaitPos=this.state.start)),this.state.inClassProperty&&"arguments"===t&&this.raise(e,"'arguments' is not allowed in class field initializer"),s&&st(t)&&this.raise(e,`Unexpected keyword '${t}'`),(this.state.strict?r?et:tt:Z)(t,this.inModule)&&(this.scope.inAsync||"await"!==t||this.raise(e,"Can not use keyword 'await' outside an async function"),this.raise(e,`Unexpected reserved word '${t}'`))}isAwaitAllowed(){return this.scope.inFunction?this.scope.inAsync:!!this.options.allowAwaitOutsideFunction}parseAwait(){-1===this.state.awaitPos&&(this.state.awaitPos=this.state.start);const t=this.startNode();return this.next(),this.state.inParameters&&this.raise(t.start,"await is not allowed in async function parameters"),this.match(u.star)&&this.raise(t.start,"await* has been removed from the async functions proposal. Use Promise.all() instead."),this.state.soloAwait||(t.argument=this.parseMaybeUnary()),this.finishNode(t,"AwaitExpression")}parseYield(t){-1===this.state.yieldPos&&(this.state.yieldPos=this.state.start);const e=this.startNode();return this.state.inParameters&&this.raise(e.start,"yield is not allowed in generator parameters"),this.next(),this.match(u.semi)||!this.match(u.star)&&!this.state.type.startsExpr||this.hasPrecedingLineBreak()?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(u.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")}checkPipelineAtInfixOperator(t,e){if("smart"===this.getPluginOption("pipelineOperator","proposal")&&"SequenceExpression"===t.type)throw this.raise(e,"Pipeline head should not be a comma-separated sequence expression")}parseSmartPipelineBody(t,e,s){const r=this.checkSmartPipelineBodyStyle(t);return this.checkSmartPipelineBodyEarlyErrors(t,r,e),this.parseSmartPipelineBodyInStyle(t,r,e,s)}checkSmartPipelineBodyEarlyErrors(t,e,s){if(this.match(u.arrow))throw this.raise(this.state.start,'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized');if("PipelineTopicExpression"===e&&"SequenceExpression"===t.type)throw this.raise(s,"Pipeline body may not be a comma-separated sequence expression")}parseSmartPipelineBodyInStyle(t,e,s,r){const n=this.startNodeAt(s,r);switch(e){case"PipelineBareFunction":n.callee=t;break;case"PipelineBareConstructor":n.callee=t.callee;break;case"PipelineBareAwaitedFunction":n.callee=t.argument;break;case"PipelineTopicExpression":if(!this.topicReferenceWasUsedInCurrentTopicContext())throw this.raise(s,"Pipeline is in topic style but does not use topic reference");n.expression=t;break;default:throw this.raise(s,`Unknown pipeline style ${e}`)}return this.finishNode(n,e)}checkSmartPipelineBodyStyle(t){return t.type,this.isSimpleReference(t)?"PipelineBareFunction":"PipelineTopicExpression"}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}withTopicPermittingContext(t){const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}withTopicForbiddingContext(t){const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}withSoloAwaitPermittingContext(t){const e=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=e}}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}primaryTopicReferenceIsAllowedInCurrentTopicContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentTopicContext(){return null!=this.state.topicContext.maxTopicIndex&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(t,e){const s=this.state.start,r=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const i=this.parseExprOp(this.parseMaybeUnary(),s,r,t,e);return this.state.inFSharpPipelineDirectBody=n,i}}const ee={kind:"loop"},se={kind:"switch"},re=0,ne=1,ie=2,ae=4;class oe extends te{parseTopLevel(t,e){if(e.sourceType=this.options.sourceType,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,u.eof),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let t=0,e=Array.from(this.scope.undefinedExports);t<e.length;t++){const[s]=e[t],r=this.scope.undefinedExports.get(s);this.raise(r,`Export '${s}' is not defined`)}return t.program=this.finishNode(e,"Program"),t.comments=this.state.comments,this.options.tokens&&(t.tokens=this.state.tokens),this.finishNode(t,"File")}stmtToDirective(t){const e=t.expression,s=this.startNodeAt(e.start,e.loc.start),r=this.startNodeAt(t.start,t.loc.start),n=this.input.slice(e.start,e.end),i=s.value=n.slice(1,-1);return this.addExtra(s,"raw",n),this.addExtra(s,"rawValue",i),r.value=this.finishNodeAt(s,"DirectiveLiteral",e.end,e.loc.end),this.finishNodeAt(r,"Directive",t.end,t.loc.end)}parseInterpreterDirective(){if(!this.match(u.interpreterDirective))return null;const t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(t){if(!this.isContextual("let"))return!1;const e=this.nextTokenStart(),s=this.input.charCodeAt(e);if(91===s)return!0;if(t)return!1;if(123===s)return!0;if(ct(s)){let t=e+1;for(;pt(this.input.charCodeAt(t));)++t;const s=this.input.slice(e,t);if(!rt.test(s))return!0}return!1}parseStatement(t,e){return this.match(u.at)&&this.parseDecorators(!0),this.parseStatementContent(t,e)}parseStatementContent(t,e){let s=this.state.type;const r=this.startNode();let n;switch(this.isLet(t)&&(s=u._var,n="let"),s){case u._break:case u._continue:return this.parseBreakContinueStatement(r,s.keyword);case u._debugger:return this.parseDebuggerStatement(r);case u._do:return this.parseDoStatement(r);case u._for:return this.parseForStatement(r);case u._function:if(46===this.lookaheadCharCode())break;return t&&(this.state.strict?this.raise(this.state.start,"In strict mode code, functions can only be declared at top level or inside a block"):"if"!==t&&"label"!==t&&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")),this.parseFunctionStatement(r,!1,!t);case u._class:return t&&this.unexpected(),this.parseClass(r,!0);case u._if:return this.parseIfStatement(r);case u._return:return this.parseReturnStatement(r);case u._switch:return this.parseSwitchStatement(r);case u._throw:return this.parseThrowStatement(r);case u._try:return this.parseTryStatement(r);case u._const:case u._var:return n=n||this.state.value,t&&"var"!==n&&this.unexpected(this.state.start,"Lexical declaration cannot appear in a single-statement context"),this.parseVarStatement(r,n);case u._while:return this.parseWhileStatement(r);case u._with:return this.parseWithStatement(r);case u.braceL:return this.parseBlock();case u.semi:return this.parseEmptyStatement(r);case u._export:case u._import:{const t=this.lookaheadCharCode();if(40===t||46===t)break;let n;return this.options.allowImportExportEverywhere||e||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.next(),s===u._import?"ImportDeclaration"!==(n=this.parseImport(r)).type||n.importKind&&"value"!==n.importKind||(this.sawUnambiguousESM=!0):("ExportNamedDeclaration"!==(n=this.parseExport(r)).type||n.exportKind&&"value"!==n.exportKind)&&("ExportAllDeclaration"!==n.type||n.exportKind&&"value"!==n.exportKind)&&"ExportDefaultDeclaration"!==n.type||(this.sawUnambiguousESM=!0),this.assertModuleNodeAllowed(r),n}default:if(this.isAsyncFunction())return t&&this.unexpected(null,"Async functions can only be declared at the top level or inside a block"),this.next(),this.parseFunctionStatement(r,!0,!t)}const i=this.state.value,a=this.parseExpression();return s===u.name&&"Identifier"===a.type&&this.eat(u.colon)?this.parseLabeledStatement(r,i,a,t):this.parseExpressionStatement(r,a)}assertModuleNodeAllowed(t){this.options.allowImportExportEverywhere||this.inModule||this.raise(t.start,"'import' and 'export' may appear only with 'sourceType: \"module\"'",{code:"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"})}takeDecorators(t){const e=this.state.decoratorStack[this.state.decoratorStack.length-1];e.length&&(t.decorators=e,this.resetStartLocationFromNode(t,e[0]),this.state.decoratorStack[this.state.decoratorStack.length-1]=[])}canHaveLeadingDecorator(){return this.match(u._class)}parseDecorators(t){const e=this.state.decoratorStack[this.state.decoratorStack.length-1];for(;this.match(u.at);){const t=this.parseDecorator();e.push(t)}this.match(u._export)?(t||this.unexpected(),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.")):this.canHaveLeadingDecorator()||this.raise(this.state.start,"Leading decorators must be attached to a class declaration")}parseDecorator(){this.expectOnePlugin(["decorators-legacy","decorators"]);const t=this.startNode();if(this.next(),this.hasPlugin("decorators")){this.state.decoratorStack.push([]);const e=this.state.start,s=this.state.startLoc;let r;if(this.eat(u.parenL))r=this.parseExpression(),this.expect(u.parenR);else for(r=this.parseIdentifier(!1);this.eat(u.dot);){const t=this.startNodeAt(e,s);t.object=r,t.property=this.parseIdentifier(!0),t.computed=!1,r=this.finishNode(t,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(r),this.state.decoratorStack.pop()}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t){if(this.eat(u.parenL)){const e=this.startNodeAtNode(t);return e.callee=t,e.arguments=this.parseCallExpressionArguments(u.parenR,!1),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return t}parseBreakContinueStatement(t,e){const s="break"===e;return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,e),this.finishNode(t,s?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,e){const s="break"===e;let r;for(r=0;r<this.state.labels.length;++r){const e=this.state.labels[r];if(null==t.label||e.name===t.label.name){if(null!=e.kind&&(s||"loop"===e.kind))break;if(t.label&&s)break}}r===this.state.labels.length&&this.raise(t.start,"Unsyntactic "+e)}parseDebuggerStatement(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")}parseHeaderExpression(){this.expect(u.parenL);const t=this.parseExpression();return this.expect(u.parenR),t}parseDoStatement(t){return this.next(),this.state.labels.push(ee),t.body=this.withTopicForbiddingContext(()=>this.parseStatement("do")),this.state.labels.pop(),this.expect(u._while),t.test=this.parseHeaderExpression(),this.eat(u.semi),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(ee);let e=-1;if((this.scope.inAsync||!this.scope.inFunction&&this.options.allowAwaitOutsideFunction)&&this.eatContextual("await")&&(e=this.state.lastTokStart),this.scope.enter(l),this.expect(u.parenL),this.match(u.semi))return e>-1&&this.unexpected(e),this.parseFor(t,null);const s=this.isLet();if(this.match(u._var)||this.match(u._const)||s){const r=this.startNode(),n=s?"let":this.state.value;return this.next(),this.parseVar(r,!0,n),this.finishNode(r,"VariableDeclaration"),(this.match(u._in)||this.isContextual("of"))&&1===r.declarations.length?this.parseForIn(t,r,e):(e>-1&&this.unexpected(e),this.parseFor(t,r))}const r={start:0},n=this.parseExpression(!0,r);if(this.match(u._in)||this.isContextual("of")){const s=this.isContextual("of")?"for-of statement":"for-in statement";return this.toAssignable(n,void 0,s),this.checkLVal(n,void 0,void 0,s),this.parseForIn(t,n,e)}return r.start&&this.unexpected(r.start),e>-1&&this.unexpected(e),this.parseFor(t,n)}parseFunctionStatement(t,e,s){return this.next(),this.parseFunction(t,ne|(s?0:ie),e)}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(u._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")}parseReturnStatement(t){return this.scope.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.state.start,"'return' outside of function"),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();const e=t.cases=[];let s,r;for(this.expect(u.braceL),this.state.labels.push(se),this.scope.enter(l);!this.match(u.braceR);)if(this.match(u._case)||this.match(u._default)){const t=this.match(u._case);s&&this.finishNode(s,"SwitchCase"),e.push(s=this.startNode()),s.consequent=[],this.next(),t?s.test=this.parseExpression():(r&&this.raise(this.state.lastTokStart,"Multiple default clauses"),r=!0,s.test=null),this.expect(u.colon)}else s?s.consequent.push(this.parseStatement(null)):this.unexpected();return this.scope.exit(),s&&this.finishNode(s,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),z.test(this.input.slice(this.state.lastTokEnd,this.state.start))&&this.raise(this.state.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(u._catch)){const e=this.startNode();if(this.next(),this.match(u.parenL)){this.expect(u.parenL),e.param=this.parseBindingAtom();const t="Identifier"===e.param.type;this.scope.enter(t?y:0),this.checkLVal(e.param,N,null,"catch clause"),this.expect(u.parenR)}else e.param=null,this.scope.enter(l);e.body=this.withTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(u._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")}parseVarStatement(t,e){return this.next(),this.parseVar(t,!1,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(ee),t.body=this.withTopicForbiddingContext(()=>this.parseStatement("while")),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(this.state.start,"'with' in strict mode"),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withTopicForbiddingContext(()=>this.parseStatement("with")),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,e,s,r){for(let t=0,r=this.state.labels;t<r.length;t++){r[t].name===e&&this.raise(s.start,`Label '${e}' is already declared`)}const n=this.state.type.isLoop?"loop":this.match(u._switch)?"switch":null;for(let e=this.state.labels.length-1;e>=0;e--){const s=this.state.labels[e];if(s.statementStart!==t.start)break;s.statementStart=this.state.start,s.kind=n}return this.state.labels.push({name:e,kind:n,statementStart:this.state.start}),t.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,e=!0){const s=this.startNode();return this.expect(u.braceL),e&&this.scope.enter(l),this.parseBlockBody(s,t,!1,u.braceR),e&&this.scope.exit(),this.finishNode(s,"BlockStatement")}isValidDirective(t){return"ExpressionStatement"===t.type&&"StringLiteral"===t.expression.type&&!t.expression.extra.parenthesized}parseBlockBody(t,e,s,r){const n=t.body=[],i=t.directives=[];this.parseBlockOrModuleBlockBody(n,e?i:void 0,s,r)}parseBlockOrModuleBlockBody(t,e,s,r){let n,i,a=!1;for(;!this.eat(r);){a||!this.state.containsOctal||i||(i=this.state.octalPosition);const r=this.parseStatement(null,s);if(e&&!a&&this.isValidDirective(r)){const t=this.stmtToDirective(r);e.push(t),void 0===n&&"use strict"===t.value.value&&(n=this.state.strict,this.setStrict(!0),i&&this.raise(i,"Octal literal in strict mode"))}else a=!0,t.push(r)}!1===n&&this.setStrict(!1)}parseFor(t,e){return t.init=e,this.expect(u.semi),t.test=this.match(u.semi)?null:this.parseExpression(),this.expect(u.semi),t.update=this.match(u.parenR)?null:this.parseExpression(),this.expect(u.parenR),t.body=this.withTopicForbiddingContext(()=>this.parseStatement("for")),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,e,s){const r=this.match(u._in);return this.next(),r?s>-1&&this.unexpected(s):t.await=s>-1,"VariableDeclaration"!==e.type||null==e.declarations[0].init||r&&!this.state.strict&&"var"===e.kind&&"Identifier"===e.declarations[0].id.type?"AssignmentPattern"===e.type&&this.raise(e.start,"Invalid left-hand side in for-loop"):this.raise(e.start,`${r?"for-in":"for-of"} loop variable declaration may not have an initializer`),t.left=e,t.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(u.parenR),t.body=this.withTopicForbiddingContext(()=>this.parseStatement("for")),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,r?"ForInStatement":"ForOfStatement")}parseVar(t,e,s){const r=t.declarations=[],n=this.hasPlugin("typescript");for(t.kind=s;;){const t=this.startNode();if(this.parseVarId(t,s),this.eat(u.eq)?t.init=this.parseMaybeAssign(e):("const"!==s||this.match(u._in)||this.isContextual("of")?"Identifier"===t.id.type||e&&(this.match(u._in)||this.isContextual("of"))||this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):n||this.unexpected(),t.init=null),r.push(this.finishNode(t,"VariableDeclarator")),!this.eat(u.comma))break}return t}parseVarId(t,e){t.id=this.parseBindingAtom(),this.checkLVal(t.id,"var"===e?j:N,void 0,"variable declaration")}parseFunction(t,e=re,s=!1){const r=e&ne,n=e&ie,i=!(!r||e&ae);this.initFunction(t,s),this.match(u.star)&&n&&this.unexpected(this.state.start,"Generators can only be declared at the top level or inside a block"),t.generator=this.eat(u.star),r&&(t.id=this.parseFunctionId(i));const a=this.state.maybeInArrowParameters,o=this.state.inClassProperty,l=this.state.yieldPos,h=this.state.awaitPos;return this.state.maybeInArrowParameters=!1,this.state.inClassProperty=!1,this.state.yieldPos=-1,this.state.awaitPos=-1,this.scope.enter(b(t.async,t.generator)),r||(t.id=this.parseFunctionId()),this.parseFunctionParams(t),this.withTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(t,r?"FunctionDeclaration":"FunctionExpression")}),this.scope.exit(),r&&!n&&this.checkFunctionStatementId(t),this.state.maybeInArrowParameters=a,this.state.inClassProperty=o,this.state.yieldPos=l,this.state.awaitPos=h,t}parseFunctionId(t){return t||this.match(u.name)?this.parseIdentifier():null}parseFunctionParams(t,e){const s=this.state.inParameters;this.state.inParameters=!0,this.expect(u.parenL),t.params=this.parseBindingList(u.parenR,41,!1,e),this.state.inParameters=s,this.checkYieldAwaitInDefaultParams()}checkFunctionStatementId(t){t.id&&this.checkLVal(t.id,this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?j:N:O,null,"function name")}parseClass(t,e,s){this.next(),this.takeDecorators(t);const r=this.state.strict;return this.state.strict=!0,this.parseClassId(t,e,s),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass),this.state.strict=r,this.finishNode(t,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(u.eq)||this.match(u.semi)||this.match(u.braceR)}isClassMethod(){return this.match(u.parenL)}isNonstaticConstructor(t){return!(t.computed||t.static||"constructor"!==t.key.name&&"constructor"!==t.key.value)}parseClassBody(t){this.state.classLevel++;const e={hadConstructor:!1};let s=[];const r=this.startNode();return r.body=[],this.expect(u.braceL),this.withTopicForbiddingContext(()=>{for(;!this.eat(u.braceR);){if(this.eat(u.semi)){s.length>0&&this.raise(this.state.lastTokEnd,"Decorators must not be followed by a semicolon");continue}if(this.match(u.at)){s.push(this.parseDecorator());continue}const n=this.startNode();s.length&&(n.decorators=s,this.resetStartLocationFromNode(n,s[0]),s=[]),this.parseClassMember(r,n,e,t),"constructor"===n.kind&&n.decorators&&n.decorators.length>0&&this.raise(n.start,"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")}}),s.length&&this.raise(this.state.start,"You have trailing decorators with no method"),this.state.classLevel--,this.finishNode(r,"ClassBody")}parseClassMember(t,e,s,r){let n=!1;const i=this.state.containsEsc;if(this.match(u.name)&&"static"===this.state.value){const s=this.parseIdentifier(!0);if(this.isClassMethod()){const r=e;return r.kind="method",r.computed=!1,r.key=s,r.static=!1,void this.pushClassMethod(t,r,!1,!1,!1,!1)}if(this.isClassProperty()){const r=e;return r.computed=!1,r.key=s,r.static=!1,void t.body.push(this.parseClassProperty(r))}if(i)throw this.unexpected();n=!0}this.parseClassMemberWithIsStatic(t,e,s,n,r)}parseClassMemberWithIsStatic(t,e,s,r,n){const i=e,a=e,o=e,l=e,h=i,c=i;if(e.static=r,this.eat(u.star))return h.kind="method",this.parseClassPropertyName(h),"PrivateName"===h.key.type?void this.pushClassPrivateMethod(t,a,!0,!1):(this.isNonstaticConstructor(i)&&this.raise(i.key.start,"Constructor can't be a generator"),void this.pushClassMethod(t,i,!0,!1,!1,!1));const p=this.state.containsEsc,d=this.parseClassPropertyName(e),f="PrivateName"===d.type,y="Identifier"===d.type;if(this.parsePostMemberNameModifiers(c),this.isClassMethod()){if(h.kind="method",f)return void this.pushClassPrivateMethod(t,a,!1,!1);const e=this.isNonstaticConstructor(i);let r=!1;e&&(i.kind="constructor",i.decorators&&this.raise(i.start,"You can't attach decorators to a class constructor"),s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(d.start,"Duplicate constructor in the same class"),s.hadConstructor=!0,r=n),this.pushClassMethod(t,i,!1,!1,e,r)}else if(this.isClassProperty())f?this.pushClassPrivateProperty(t,l):this.pushClassProperty(t,o);else if(!y||"async"!==d.name||p||this.isLineTerminator())!y||"get"!==d.name&&"set"!==d.name||p||this.match(u.star)&&this.isLineTerminator()?this.isLineTerminator()?f?this.pushClassPrivateProperty(t,l):this.pushClassProperty(t,o):this.unexpected():(h.kind=d.name,this.parseClassPropertyName(i),"PrivateName"===h.key.type?this.pushClassPrivateMethod(t,a,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(i.key.start,"Constructor can't have get/set modifier"),this.pushClassMethod(t,i,!1,!1,!1,!1)),this.checkGetterSetterParams(i));else{const e=this.eat(u.star);h.kind="method",this.parseClassPropertyName(h),"PrivateName"===h.key.type?this.pushClassPrivateMethod(t,a,e,!0):(this.isNonstaticConstructor(i)&&this.raise(i.key.start,"Constructor can't be an async function"),this.pushClassMethod(t,i,e,!0,!1,!1))}}parseClassPropertyName(t){const e=this.parsePropertyName(t);return t.computed||!t.static||"prototype"!==e.name&&"prototype"!==e.value||this.raise(e.start,"Classes may not have static property named prototype"),"PrivateName"===e.type&&"constructor"===e.id.name&&this.raise(e.start,"Classes may not have a private field named '#constructor'"),e}pushClassProperty(t,e){e.computed||"constructor"!==e.key.name&&"constructor"!==e.key.value||this.raise(e.key.start,"Classes may not have a field named 'constructor'"),t.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(t,e){this.expectPlugin("classPrivateProperties",e.key.start),t.body.push(this.parseClassPrivateProperty(e))}pushClassMethod(t,e,s,r,n,i){t.body.push(this.parseMethod(e,s,r,n,i,"ClassMethod",!0))}pushClassPrivateMethod(t,e,s,r){this.expectPlugin("classPrivateMethods",e.key.start),t.body.push(this.parseMethod(e,s,r,!1,!1,"ClassPrivateMethod",!0))}parsePostMemberNameModifiers(t){}parseAccessModifier(){}parseClassPrivateProperty(t){return this.state.inClassProperty=!0,this.scope.enter(g|v),t.value=this.eat(u.eq)?this.parseMaybeAssign():null,this.semicolon(),this.state.inClassProperty=!1,this.scope.exit(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return t.typeAnnotation||this.expectPlugin("classProperties"),this.state.inClassProperty=!0,this.scope.enter(g|v),this.match(u.eq)?(this.expectPlugin("classProperties"),this.next(),t.value=this.parseMaybeAssign()):t.value=null,this.semicolon(),this.state.inClassProperty=!1,this.scope.exit(),this.finishNode(t,"ClassProperty")}parseClassId(t,e,s,r=M){this.match(u.name)?(t.id=this.parseIdentifier(),e&&this.checkLVal(t.id,r,void 0,"class name")):s||!e?t.id=null:this.unexpected(null,"A class name is required")}parseClassSuper(t){t.superClass=this.eat(u._extends)?this.parseExprSubscripts():null}parseExport(t){const e=this.maybeParseExportDefaultSpecifier(t),s=!e||this.eat(u.comma),r=s&&this.eatExportStar(t),n=r&&this.maybeParseExportNamespaceSpecifier(t),i=s&&(!n||this.eat(u.comma)),a=e||r;if(r&&!n)return e&&this.unexpected(),this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration");const o=this.maybeParseExportNamedSpecifiers(t);if(e&&s&&!r&&!o||n&&i&&!o)throw this.unexpected(null,u.braceL);let l;if(a||o?(l=!1,this.parseExportFrom(t,a)):l=this.maybeParseExportDeclaration(t),a||o||l)return this.checkExport(t,!0,!1,!!t.source),this.finishNode(t,"ExportNamedDeclaration");if(this.eat(u._default))return t.declaration=this.parseExportDefaultExpression(),this.checkExport(t,!0,!0),this.finishNode(t,"ExportDefaultDeclaration");throw this.unexpected(null,u.braceL)}eatExportStar(t){return this.eat(u.star)}maybeParseExportDefaultSpecifier(t){if(this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom");const e=this.startNode();return e.exported=this.parseIdentifier(!0),t.specifiers=[this.finishNode(e,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual("as")){t.specifiers||(t.specifiers=[]),this.expectPlugin("exportNamespaceFrom");const e=this.startNodeAt(this.state.lastTokStart,this.state.lastTokStartLoc);return this.next(),e.exported=this.parseIdentifier(!0),t.specifiers.push(this.finishNode(e,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){return!!this.match(u.braceL)&&(t.specifiers||(t.specifiers=[]),t.specifiers.push(...this.parseExportSpecifiers()),t.source=null,t.declaration=null,!0)}maybeParseExportDeclaration(t){if(this.shouldParseExportDeclaration()){if(this.isContextual("async")){const t=this.nextTokenStart();this.isUnparsedContextual(t,"function")||this.unexpected(t,'Unexpected token, expected "function"')}return t.specifiers=[],t.source=null,t.declaration=this.parseExportDeclaration(t),!0}return!1}isAsyncFunction(){if(!this.isContextual("async"))return!1;const t=this.nextTokenStart();return!z.test(this.input.slice(this.state.pos,t))&&this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){const t=this.startNode(),e=this.isAsyncFunction();if(this.match(u._function)||e)return this.next(),e&&this.next(),this.parseFunction(t,ne|ae,e);if(this.match(u._class))return this.parseClass(t,!0,!0);if(this.match(u.at))return 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(!1),this.parseClass(t,!0,!0);if(this.match(u._const)||this.match(u._var)||this.isLet())return this.raise(this.state.start,"Only expressions, functions or classes are allowed as the `default` export.");{const t=this.parseMaybeAssign();return this.semicolon(),t}}parseExportDeclaration(t){return this.parseStatement(null)}isExportDefaultSpecifier(){if(this.match(u.name))return"async"!==this.state.value&&"let"!==this.state.value;if(!this.match(u._default))return!1;const t=this.nextTokenStart();return 44===this.input.charCodeAt(t)||this.isUnparsedContextual(t,"from")}parseExportFrom(t,e){this.eatContextual("from")?(t.source=this.parseImportSource(),this.checkExport(t)):e?this.unexpected():t.source=null,this.semicolon()}shouldParseExportDeclaration(){if(this.match(u.at)&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))){if(!this.getPluginOption("decorators","decoratorsBeforeExport"))return!0;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")}return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isLet()||this.isAsyncFunction()}checkExport(t,e,s,r){if(e)if(s)this.checkDuplicateExports(t,"default");else if(t.specifiers&&t.specifiers.length)for(let e=0,s=t.specifiers;e<s.length;e++){const t=s[e];this.checkDuplicateExports(t,t.exported.name),!r&&t.local&&(this.checkReservedWord(t.local.name,t.local.start,!0,!1),this.scope.checkLocalExport(t.local))}else if(t.declaration)if("FunctionDeclaration"===t.declaration.type||"ClassDeclaration"===t.declaration.type){const e=t.declaration.id;if(!e)throw new Error("Assertion failure");this.checkDuplicateExports(t,e.name)}else if("VariableDeclaration"===t.declaration.type)for(let e=0,s=t.declaration.declarations;e<s.length;e++){const t=s[e];this.checkDeclaration(t.id)}if(this.state.decoratorStack[this.state.decoratorStack.length-1].length){const e=t.declaration&&("ClassDeclaration"===t.declaration.type||"ClassExpression"===t.declaration.type);if(!t.declaration||!e)throw this.raise(t.start,"You can only use decorators on an export when exporting a class");this.takeDecorators(t.declaration)}}checkDeclaration(t){if("Identifier"===t.type)this.checkDuplicateExports(t,t.name);else if("ObjectPattern"===t.type)for(let e=0,s=t.properties;e<s.length;e++){const t=s[e];this.checkDeclaration(t)}else if("ArrayPattern"===t.type)for(let e=0,s=t.elements;e<s.length;e++){const t=s[e];t&&this.checkDeclaration(t)}else"ObjectProperty"===t.type?this.checkDeclaration(t.value):"RestElement"===t.type?this.checkDeclaration(t.argument):"AssignmentPattern"===t.type&&this.checkDeclaration(t.left)}checkDuplicateExports(t,e){if(this.state.exportedIdentifiers.indexOf(e)>-1)throw this.raise(t.start,"default"===e?"Only one default export allowed per module.":`\`${e}\` has already been exported. Exported identifiers must be unique.`);this.state.exportedIdentifiers.push(e)}parseExportSpecifiers(){const t=[];let e=!0;for(this.expect(u.braceL);!this.eat(u.braceR);){if(e)e=!1;else if(this.expect(u.comma),this.eat(u.braceR))break;const s=this.startNode();s.local=this.parseIdentifier(!0),s.exported=this.eatContextual("as")?this.parseIdentifier(!0):s.local.__clone(),t.push(this.finishNode(s,"ExportSpecifier"))}return t}parseImport(t){if(t.specifiers=[],!this.match(u.string)){const e=!this.maybeParseDefaultImportSpecifier(t)||this.eat(u.comma),s=e&&this.maybeParseStarImportSpecifier(t);e&&!s&&this.parseNamedImportSpecifiers(t),this.expectContextual("from")}return t.source=this.parseImportSource(),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(u.string)||this.unexpected(),this.parseExprAtom()}shouldParseDefaultImport(t){return this.match(u.name)}parseImportSpecifierLocal(t,e,s,r){e.local=this.parseIdentifier(),this.checkLVal(e.local,N,void 0,r),t.specifiers.push(this.finishNode(e,s))}maybeParseDefaultImportSpecifier(t){return!!this.shouldParseDefaultImport(t)&&(this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier","default import specifier"),!0)}maybeParseStarImportSpecifier(t){if(this.match(u.star)){const e=this.startNode();return this.next(),this.expectContextual("as"),this.parseImportSpecifierLocal(t,e,"ImportNamespaceSpecifier","import namespace specifier"),!0}return!1}parseNamedImportSpecifiers(t){let e=!0;for(this.expect(u.braceL);!this.eat(u.braceR);){if(e)e=!1;else if(this.eat(u.colon)&&this.unexpected(null,"ES2015 named imports do not destructure. Use another statement for destructuring after the import."),this.expect(u.comma),this.eat(u.braceR))break;this.parseImportSpecifier(t)}}parseImportSpecifier(t){const e=this.startNode();e.imported=this.parseIdentifier(!0),this.eatContextual("as")?e.local=this.parseIdentifier():(this.checkReservedWord(e.imported.name,e.start,!0,!0),e.local=e.imported.__clone()),this.checkLVal(e.local,N,void 0,"import specifier"),t.specifiers.push(this.finishNode(e,"ImportSpecifier"))}}class ue extends oe{constructor(t,e){super(t=function(t){const e={};for(let s=0,r=Object.keys(Lt);s<r.length;s++){const n=r[s];e[n]=t&&null!=t[n]?t[n]:Lt[n]}return e}(t),e);const s=this.getScopeHandler();this.options=t,this.inModule="module"===this.options.sourceType,this.scope=new s(this.raise.bind(this),this.inModule),this.plugins=function(t){const e=new Map;for(let s=0;s<t.length;s++){const r=t[s],[n,i]=Array.isArray(r)?r:[r,{}];e.has(n)||e.set(n,i||{})}return e}(this.options.plugins),this.filename=t.sourceFilename}getScopeHandler(){return _t}parse(){this.scope.enter(h);const t=this.startNode(),e=this.startNode();return this.nextToken(),this.parseTopLevel(t,e)}}function le(t,e){let s=ue;return t&&t.plugins&&(!function(t){if(Ct(t,"decorators")){if(Ct(t,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");const e=Mt(t,"decorators","decoratorsBeforeExport");if(null==e)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'.");if("boolean"!=typeof e)throw new Error("'decoratorsBeforeExport' must be a boolean.")}if(Ct(t,"flow")&&Ct(t,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(Ct(t,"placeholders")&&Ct(t,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(Ct(t,"pipelineOperator")&&!Nt.includes(Mt(t,"pipelineOperator","proposal")))throw new Error("'pipelineOperator' requires 'proposal' option whose value should be one of: "+Nt.map(t=>`'${t}'`).join(", "))}(t.plugins),s=function(t){const e=Ot.filter(e=>Ct(t,e)),s=e.join("/");let r=he[s];if(!r){r=ue;for(let t=0;t<e.length;t++){const s=e[t];r=jt[s](r)}he[s]=r}return r}(t.plugins)),new s(t,e)}const he={};e.parse=function(t,e){if(!e||"unambiguous"!==e.sourceType)return le(e,t).parse();e=Object.assign({},e);try{e.sourceType="module";const s=le(e,t),r=s.parse();return s.sawUnambiguousESM||(r.program.sourceType="script"),r}catch(s){try{return e.sourceType="script",le(e,t).parse()}catch(t){}throw s}},e.parseExpression=function(t,e){const s=le(e,t);return s.options.strictMode&&(s.state.strict=!0),s.getExpression()},e.tokTypes=u},function(t,e,s){var r=s(3),n=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(t){return n.stringify.apply(n,arguments)}},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=u(s(2)),n=u(s(16)),i=u(s(0)),a=u(s(1));e.onPluginLoad=function(t){t.eventbus.on("typhonjs:babel:parser:parse",h.parse,h)};var o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e.default=t,e}(s(219));function u(t){return t&&t.__esModule?t:{default:t}}var l={plugins:["asyncGenerators","bigInt","classProperties","classPrivateProperties","classPrivateMethods",["decorators",{decoratorsBeforeExport:!1}],"doExpressions","dynamicImport","exportDefaultFrom","exportNamespaceFrom","functionBind","functionSent","importMeta","jsx","logicalAssignment","nullishCoalescingOperator","numericSeparator","objectRestSpread","optionalCatchBinding","optionalChaining",["pipelineOperator",{proposal:"minimal"}],"throwExpressions","typescript"]},h=function(){function t(){(0,i.default)(this,t)}return(0,a.default)(t,null,[{key:"parse",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=JSON.parse((0,n.default)(l));if("object"===(void 0===s?"undefined":(0,r.default)(s))&&("boolean"==typeof s.decoratorsBeforeExport&&(i.plugins[5][1].decoratorsBeforeExport=s.decoratorsBeforeExport),"boolean"==typeof s.decoratorsLegacy&&s.decoratorsLegacy&&(i.plugins[5]="decorators-legacy"),"string"==typeof s.pipelineOperatorProposal&&(i.plugins[20][1].proposal=s.pipelineOperatorProposal),"boolean"==typeof s.flow&&s.flow)){var a=i.plugins.indexOf("typescript");a>-1&&i.plugins.splice(a,1),i.plugins.push("flow")}return(e="object"===(void 0===e?"undefined":(0,r.default)(e))?e:i).sourceType="string"==typeof e.sourceType?e.sourceType:"unambiguous",o.parse(t,e)}}]),t}();e.default=h},function(t,e,s){var r=s(8);r(r.S+r.F*!s(14),"Object",{defineProperty:s(17).f})},function(t,e,s){s(222);var r=s(3).Object;t.exports=function(t,e,s){return r.defineProperty(t,e,s)}},function(t,e,s){s(64)("observable")},function(t,e,s){s(64)("asyncIterator")},function(t,e,s){var r=s(37),n=s(63),i=s(45);t.exports=function(t){var e=r(t),s=n.f;if(s)for(var a,o=s(t),u=i.f,l=0;o.length>l;)u.call(t,a=o[l++])&&e.push(a);return e}},function(t,e,s){"use strict";var r=s(10),n=s(28),i=s(14),a=s(8),o=s(128),u=s(46).KEY,l=s(29),h=s(73),c=s(35),p=s(47),d=s(12),f=s(65),y=s(64),v=s(226),m=s(113),g=s(18),x=s(13),b=s(26),w=s(27),P=s(76),E=s(39),_=s(49),k=s(112),A=s(62),T=s(63),S=s(17),C=s(37),M=A.f,N=S.f,j=k.f,O=r.Symbol,L=r.JSON,R=L&&L.stringify,I=d("_hidden"),D=d("toPrimitive"),F={}.propertyIsEnumerable,B=h("symbol-registry"),q=h("symbols"),U=h("op-symbols"),V=Object.prototype,z="function"==typeof O&&!!T.f,H=r.QObject,J=!H||!H.prototype||!H.prototype.findChild,W=i&&l(function(){return 7!=_(N({},"a",{get:function(){return N(this,"a",{value:7}).a}})).a})?function(t,e,s){var r=M(V,e);r&&delete V[e],N(t,e,s),r&&t!==V&&N(V,e,r)}:N,K=function(t){var e=q[t]=_(O.prototype);return e._k=t,e},G=z&&"symbol"==typeof O.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof O},$=function(t,e,s){return t===V&&$(U,e,s),g(t),e=P(e,!0),g(s),n(q,e)?(s.enumerable?(n(t,I)&&t[I][e]&&(t[I][e]=!1),s=_(s,{enumerable:E(0,!1)})):(n(t,I)||N(t,I,E(1,{})),t[I][e]=!0),W(t,e,s)):N(t,e,s)},X=function(t,e){g(t);for(var s,r=v(e=w(e)),n=0,i=r.length;i>n;)$(t,s=r[n++],e[s]);return t},Y=function(t){var e=F.call(this,t=P(t,!0));return!(this===V&&n(q,t)&&!n(U,t))&&(!(e||!n(this,t)||!n(q,t)||n(this,I)&&this[I][t])||e)},Q=function(t,e){if(t=w(t),e=P(e,!0),t!==V||!n(q,e)||n(U,e)){var s=M(t,e);return!s||!n(q,e)||n(t,I)&&t[I][e]||(s.enumerable=!0),s}},Z=function(t){for(var e,s=j(w(t)),r=[],i=0;s.length>i;)n(q,e=s[i++])||e==I||e==u||r.push(e);return r},tt=function(t){for(var e,s=t===V,r=j(s?U:w(t)),i=[],a=0;r.length>a;)!n(q,e=r[a++])||s&&!n(V,e)||i.push(q[e]);return i};z||(o((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(s){this===V&&e.call(U,s),n(this,I)&&n(this[I],t)&&(this[I][t]=!1),W(this,t,E(1,s))};return i&&J&&W(V,t,{configurable:!0,set:e}),K(t)}).prototype,"toString",function(){return this._k}),A.f=Q,S.f=$,s(111).f=k.f=Z,s(45).f=Y,T.f=tt,i&&!s(41)&&o(V,"propertyIsEnumerable",Y,!0),f.f=function(t){return K(d(t))}),a(a.G+a.W+a.F*!z,{Symbol:O});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),st=0;et.length>st;)d(et[st++]);for(var rt=C(d.store),nt=0;rt.length>nt;)y(rt[nt++]);a(a.S+a.F*!z,"Symbol",{for:function(t){return n(B,t+="")?B[t]:B[t]=O(t)},keyFor:function(t){if(!G(t))throw TypeError(t+" is not a symbol!");for(var e in B)if(B[e]===t)return e},useSetter:function(){J=!0},useSimple:function(){J=!1}}),a(a.S+a.F*!z,"Object",{create:function(t,e){return void 0===e?_(t):X(_(t),e)},defineProperty:$,defineProperties:X,getOwnPropertyDescriptor:Q,getOwnPropertyNames:Z,getOwnPropertySymbols:tt});var it=l(function(){T.f(1)});a(a.S+a.F*it,"Object",{getOwnPropertySymbols:function(t){return T.f(b(t))}}),L&&a(a.S+a.F*(!z||l(function(){var t=O();return"[null]"!=R([t])||"{}"!=R({a:t})||"{}"!=R(Object(t))})),"JSON",{stringify:function(t){for(var e,s,r=[t],n=1;arguments.length>n;)r.push(arguments[n++]);if(s=e=r[1],(x(e)||void 0!==t)&&!G(t))return m(e)||(e=function(t,e){if("function"==typeof s&&(e=s.call(this,t,e)),!G(e))return e}),r[1]=e,R.apply(L,r)}}),O.prototype[D]||s(24)(O.prototype,D,O.prototype.valueOf),c(O,"Symbol"),c(Math,"Math",!0),c(r.JSON,"JSON",!0)},function(t,e,s){s(227),s(50),s(225),s(224),t.exports=s(3).Symbol},function(t,e,s){s(30),s(34),t.exports=s(65).f("iterator")},function(t,e,s){"use strict";var r=s(8),n=s(68),i=s(118);r(r.S,"Promise",{try:function(t){var e=n.f(this),s=i(t);return(s.e?e.reject:e.resolve)(s.v),e.promise}})},function(t,e,s){"use strict";var r=s(8),n=s(3),i=s(10),a=s(120),o=s(117);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,n.Promise||i.Promise),s="function"==typeof t;return this.then(s?function(s){return o(e,t()).then(function(){return s})}:t,s?function(s){return o(e,t()).then(function(){throw s})}:t)}})},function(t,e,s){var r=s(10).navigator;t.exports=r&&r.userAgent||""},function(t,e,s){var r=s(10),n=s(119).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,o=r.Promise,u="process"==s(36)(a);t.exports=function(){var t,e,s,l=function(){var r,n;for(u&&(r=a.domain)&&r.exit();t;){n=t.fn,t=t.next;try{n()}catch(r){throw t?s():e=void 0,r}}e=void 0,r&&r.enter()};if(u)s=function(){a.nextTick(l)};else if(!i||r.navigator&&r.navigator.standalone)if(o&&o.resolve){var h=o.resolve(void 0);s=function(){h.then(l)}}else s=function(){n.call(r,l)};else{var c=!0,p=document.createTextNode("");new i(l).observe(p,{characterData:!0}),s=function(){p.data=c=!c}}return function(r){var n={fn:r,next:void 0};e&&(e.next=n),t||(t=n,s()),e=n}}},function(t,e){t.exports=function(t,e,s){var r=void 0===s;switch(e.length){case 0:return r?t():t.call(s);case 1:return r?t(e[0]):t.call(s,e[0]);case 2:return r?t(e[0],e[1]):t.call(s,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(s,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(s,e[0],e[1],e[2],e[3])}return t.apply(s,e)}},function(t,e,s){"use strict";var r,n,i,a,o=s(41),u=s(10),l=s(20),h=s(71),c=s(8),p=s(13),d=s(40),f=s(70),y=s(33),v=s(120),m=s(119).set,g=s(233)(),x=s(68),b=s(118),w=s(232),P=s(117),E=u.TypeError,_=u.process,k=_&&_.versions,A=k&&k.v8||"",T=u.Promise,S="process"==h(_),C=function(){},M=n=x.f,N=!!function(){try{var t=T.resolve(1),e=(t.constructor={})[s(12)("species")]=function(t){t(C,C)};return(S||"function"==typeof PromiseRejectionEvent)&&t.then(C)instanceof e&&0!==A.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(t){}}(),j=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},O=function(t,e){if(!t._n){t._n=!0;var s=t._c;g(function(){for(var r=t._v,n=1==t._s,i=0,a=function(e){var s,i,a,o=n?e.ok:e.fail,u=e.resolve,l=e.reject,h=e.domain;try{o?(n||(2==t._h&&I(t),t._h=1),!0===o?s=r:(h&&h.enter(),s=o(r),h&&(h.exit(),a=!0)),s===e.promise?l(E("Promise-chain cycle")):(i=j(s))?i.call(s,u,l):u(s)):l(r)}catch(t){h&&!a&&h.exit(),l(t)}};s.length>i;)a(s[i++]);t._c=[],t._n=!1,e&&!t._h&&L(t)})}},L=function(t){m.call(u,function(){var e,s,r,n=t._v,i=R(t);if(i&&(e=b(function(){S?_.emit("unhandledRejection",n,t):(s=u.onunhandledrejection)?s({promise:t,reason:n}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",n)}),t._h=S||R(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},R=function(t){return 1!==t._h&&0===(t._a||t._c).length},I=function(t){m.call(u,function(){var e;S?_.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})})},D=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),O(e,!0))},F=function(t){var e,s=this;if(!s._d){s._d=!0,s=s._w||s;try{if(s===t)throw E("Promise can't be resolved itself");(e=j(t))?g(function(){var r={_w:s,_d:!1};try{e.call(t,l(F,r,1),l(D,r,1))}catch(t){D.call(r,t)}}):(s._v=t,s._s=1,O(s,!1))}catch(t){D.call({_w:s,_d:!1},t)}}};N||(T=function(t){f(this,T,"Promise","_h"),d(t),r.call(this);try{t(l(F,this,1),l(D,this,1))}catch(t){D.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=s(67)(T.prototype,{then:function(t,e){var s=M(v(this,T));return s.ok="function"!=typeof t||t,s.fail="function"==typeof e&&e,s.domain=S?_.domain:void 0,this._c.push(s),this._a&&this._a.push(s),this._s&&O(this,!1),s.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=l(F,t,1),this.reject=l(D,t,1)},x.f=M=function(t){return t===T||t===a?new i(t):n(t)}),c(c.G+c.W+c.F*!N,{Promise:T}),s(35)(T,"Promise"),s(116)("Promise"),a=s(3).Promise,c(c.S+c.F*!N,"Promise",{reject:function(t){var e=M(this);return(0,e.reject)(t),e.promise}}),c(c.S+c.F*(o||!N),"Promise",{resolve:function(t){return P(o&&this===a?T:this,t)}}),c(c.S+c.F*!(N&&s(115)(function(t){T.all(t).catch(C)})),"Promise",{all:function(t){var e=this,s=M(e),r=s.resolve,n=s.reject,i=b(function(){var s=[],i=0,a=1;y(t,!1,function(t){var o=i++,u=!1;s.push(void 0),a++,e.resolve(t).then(function(t){u||(u=!0,s[o]=t,--a||r(s))},n)}),--a||r(s)});return i.e&&n(i.v),s.promise},race:function(t){var e=this,s=M(e),r=s.reject,n=b(function(){y(t,!1,function(t){e.resolve(t).then(s.resolve,r)})});return n.e&&r(n.v),s.promise}})},function(t,e){t.exports=function(){}},function(t,e,s){"use strict";var r=s(236),n=s(123),i=s(38),a=s(27);t.exports=s(78)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,s=this._i++;return!t||s>=t.length?(this._t=void 0,n(1)):n(0,"keys"==e?s:"values"==e?t[s]:[s,t[s]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e,s){var r=s(80),n=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?n(t+e,0):i(t,e)}},function(t,e,s){var r=s(27),n=s(48),i=s(238);t.exports=function(t){return function(e,s,a){var o,u=r(e),l=n(u.length),h=i(a,l);if(t&&s!=s){for(;l>h;)if((o=u[h++])!=o)return!0}else for(;l>h;h++)if((t||h in u)&&u[h]===s)return t||h||0;return!t&&-1}}},function(t,e,s){"use strict";var r=s(49),n=s(39),i=s(35),a={};s(24)(a,s(12)("iterator"),function(){return this}),t.exports=function(t,e,s){t.prototype=r(a,{next:n(1,s)}),i(t,e+" Iterator")}},function(t,e,s){var r=s(80),n=s(79);t.exports=function(t){return function(e,s){var i,a,o=String(n(e)),u=r(s),l=o.length;return u<0||u>=l?t?"":void 0:(i=o.charCodeAt(u))<55296||i>56319||u+1===l||(a=o.charCodeAt(u+1))<56320||a>57343?t?o.charAt(u):i:t?o.slice(u,u+2):a-56320+(i-55296<<10)+65536}}},function(t,e,s){s(50),s(30),s(34),s(235),s(231),s(230),t.exports=s(3).Promise},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(s(31)),n=c(s(2)),i=c(s(0)),a=c(s(1)),o=c(s(109)),u=c(s(221)),l=c(s(108)),h=c(s(136));function c(t){return t&&t.__esModule?t:{default:t}}var p=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,i.default)(this,t),"object"!==(void 0===e?"undefined":(0,n.default)(e)))throw new TypeError("ctor error: 'options' is not an 'object'.");this._escomplexModule=new l.default(e.module),this._escomplexProject=new h.default(o.default,e)}return(0,a.default)(t,[{key:"analyzeModule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;if("string"!=typeof t)throw new TypeError("analyze error: 'source' is not a 'string'.");return this._escomplexModule.analyze(u.default.parse(t,s,r),e)}},{key:"analyzeModuleAST",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._escomplexModule.analyze(t,e)}},{key:"analyzeProject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,n=t.map(function(t){try{return{ast:u.default.parse(t.code,s,r),filePath:t.filePath,srcPath:t.srcPath,srcPathAlias:t.srcPathAlias}}catch(s){if(e.ignoreErrors)return null;throw s.message=t.path+": "+s.message,s}}).filter(function(t){return!!t});return this._escomplexProject.analyze(n,e)}},{key:"analyzeProjectAST",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._escomplexProject.analyze(t,e)}},{key:"parse",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return u.default.parse(t,e,s)}},{key:"processProject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._escomplexProject.process(t,e)}},{key:"analyzeModuleAsync",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;return new r.default(function(r,a){try{r(s.analyzeModule(t,e,n,i))}catch(t){a(t)}})}},{key:"analyzeModuleASTAsync",value:function(t){var e=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new r.default(function(r,n){try{r(e.analyzeModuleAST(t,s))}catch(t){n(t)}})}},{key:"analyzeProjectAsync",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;return new r.default(function(r,a){try{r(s.analyzeProject(t,e,n,i))}catch(t){a(t)}})}},{key:"analyzeProjectASTAsync",value:function(t){var e=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new r.default(function(r,n){try{r(e.analyzeProjectAST(t,s))}catch(t){n(t)}})}},{key:"parseAsync",value:function(t){var e=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return new r.default(function(r,i){try{r(e.parse(t,s,n))}catch(t){i(t)}})}},{key:"processProjectAsync",value:function(t){var e=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new r.default(function(r,n){try{r(e.processProject(t,s))}catch(t){n(t)}})}}]),t}();e.default=p,t.exports=e.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,n=s(243),i=(r=n)&&r.__esModule?r:{default:r};e.default=new i.default,t.exports=e.default},function(t,e){t.exports=require("fs")},function(t,e,s){const r=s(245),n=s(244),i=process.argv[2];try{const t=n.analyzeModule(r.readFileSync(i).toString()),e={};t.methods.forEach(t=>{e[t.name]=t.cyclomatic}),console.log(JSON.stringify([t.aggregate.cyclomatic,e]))}catch(t){console.log([0,{}])}},function(t,e,s){t.exports=s(246)}]);
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Attractor
|
4
|
+
class JsCalculator < BaseCalculator
|
5
|
+
def initialize(file_prefix: '', minimum_churn_count: 3, start_ago: 365 * 5)
|
6
|
+
super(file_prefix: file_prefix, file_extension: '(js|jsx)', minimum_churn_count: minimum_churn_count, start_ago: start_ago)
|
7
|
+
@type = "JavaScript"
|
8
|
+
end
|
9
|
+
|
10
|
+
def calculate
|
11
|
+
super do |change|
|
12
|
+
complexity, details = JSON.parse(`node #{__dir__}/../../../dist/calculator.bundle.js #{Dir.pwd}/#{change[:file_path]}`)
|
13
|
+
|
14
|
+
[complexity, details]
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require "attractor/javascript/version"
|
2
|
+
|
3
|
+
require "attractor"
|
4
|
+
require "attractor/registry_entry"
|
5
|
+
require "attractor/calculators/base_calculator"
|
6
|
+
require "attractor/calculators/js_calculator"
|
7
|
+
require "attractor/detectors/base_detector"
|
8
|
+
require "attractor/detectors/js_detector"
|
9
|
+
|
10
|
+
module Attractor
|
11
|
+
module Javascript
|
12
|
+
class Error < StandardError; end
|
13
|
+
|
14
|
+
Attractor.register(Attractor::RegistryEntry.new(type: "js", detector_class: JsDetector, calculator_class: JsCalculator))
|
15
|
+
end
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,185 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: attractor-javascript
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Julian Rubisch
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-02-06 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: attractor
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: aruba
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: cucumber
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pry
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '10.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '10.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '3.0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '3.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: standard
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: structured_changelog
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
description: " Attractor plugin for the Ruby programming language and its ecosystem\n"
|
140
|
+
email:
|
141
|
+
- julian@julianrubisch.at
|
142
|
+
executables: []
|
143
|
+
extensions: []
|
144
|
+
extra_rdoc_files: []
|
145
|
+
files:
|
146
|
+
- ".gitignore"
|
147
|
+
- Gemfile
|
148
|
+
- README.md
|
149
|
+
- Rakefile
|
150
|
+
- attractor-javascript.gemspec
|
151
|
+
- bin/console
|
152
|
+
- bin/setup
|
153
|
+
- dist/calculator.bundle.js
|
154
|
+
- lib/attractor/calculators/js_calculator.rb
|
155
|
+
- lib/attractor/detectors/js_detector.rb
|
156
|
+
- lib/attractor/javascript.rb
|
157
|
+
- lib/attractor/javascript/version.rb
|
158
|
+
homepage: https://github.com/julianrubisch/attractor-javascript
|
159
|
+
licenses:
|
160
|
+
- MIT
|
161
|
+
metadata:
|
162
|
+
homepage_uri: https://github.com/julianrubisch/attractor-javascript
|
163
|
+
source_code_uri: https://github.com/julianrubisch/attractor-javascript
|
164
|
+
bug_tracker_uri: https://github.com/julianrubisch/attractor-javascript/issues
|
165
|
+
changelog_uri: https://github.com/julianrubisch/attractor-javascript/CHANGELOG.md
|
166
|
+
post_install_message:
|
167
|
+
rdoc_options: []
|
168
|
+
require_paths:
|
169
|
+
- lib
|
170
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
171
|
+
requirements:
|
172
|
+
- - ">="
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: '0'
|
175
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">="
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '0'
|
180
|
+
requirements: []
|
181
|
+
rubygems_version: 3.0.3
|
182
|
+
signing_key:
|
183
|
+
specification_version: 4
|
184
|
+
summary: Attractor plugin for the Ruby programming language and its ecosystem
|
185
|
+
test_files: []
|